wsql
Members list
Packages
Type members
Classlikes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class BatchImpl[T]
TODO support camel and underscore name mapping like doSomething <-> do_something
TODO support camel and underscore name mapping like doSomething <-> do_something
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
BeanBuilder.type
Attributes
- Supertypes
currently, only classes supprt, dont support object yet. mapping a column name to a field name. such as field: userName, column: user_name
currently, only classes supprt, dont support object yet. mapping a column name to a field name. such as field: userName, column: user_name
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Camel2UnderscoreMapperclass IdentityMapping
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object given_ConnectionOps.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object given_DataSourceOps.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
Attributes
- Supertypes
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
for values(of type T) to passed into Statement or passed out from ResultSet, it should has a contxt bound of JdbcValueAccessor[T]
for values(of type T) to passed into Statement or passed out from ResultSet, it should has a contxt bound of JdbcValueAccessor[T]
package wangzx.scala_commons.sql prdefined a lot of pre-defined implementation for the jdbc value types:
-
boolean, byte, short, Int, Long, Float, Double, BigDecimal, scala.BigDecimal
-
String
-
Date, Time, Timestamp
-
Blob, Clob, byte[]
-
Option[T] if T has JdbcValueAccessor context bounded
developer can define your's value type such as a MyDate which stored as database Date
, you need only define an implicit value of JdbcValueAccessor[MyDate], then you can:
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class DbEnumJdbcValueAccessor[T]object _jva_array0.typeobject _jva_bd.typeobject _jva_blob0.typeobject _jva_clob0.typeobject _jva_date0.typeobject _jva_date2.typeobject _jva_ts0.typeobject given_JdbcValueAccessor_Boolean.typeobject given_JdbcValueAccessor_Byte.typeobject given_JdbcValueAccessor_Double.typeobject given_JdbcValueAccessor_Float.typeobject given_JdbcValueAccessor_Int.typeobject given_JdbcValueAccessor_Long.typeobject given_JdbcValueAccessor_Null.typeobject given_JdbcValueAccessor_Short.typeobject given_JdbcValueAccessor_|.typeobject jva_bd0.typeobject jdbcValueAccessor.typeShow all
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JdbcValueAccessor.type
Attributes
- Supertypes
-
trait Any => Unitclass Objecttrait Matchableclass Any
- Self type
-
NoopProcessor.type
any record level(a table row) having a ResultSetMapper context bound can used in rows[T](sql)
any record level(a table row) having a ResultSetMapper context bound can used in rows[T](sql)
the scala-sql library provide a Macro to automate generate the implementation for a given case class T if all it's field is JdbcValueAccess-able(having a JdbcValueAccess context bound).
since the macro will generate a ResultSetMapper class for you anytime if there is not an explicit imported implicit value, maybe a lot of anonymous class will be generated. that is no problem but a bigger jar. to avoid this problem, you can define a implicit ResultSetMappper value in the Case Class's companion object.
case class User(name: String, age: Int) object User { implicit val resultSetmapper = ResultSetMapper.material[User] }
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object _rsm_bd.typeobject _rsm_bd0.typeobject _rsm_date.typeobject _rsm_date0.typeobject _rsm_ts_0.typeobject given_ResultSetMapper_Boolean.typeobject given_ResultSetMapper_Byte.typeobject given_ResultSetMapper_Double.typeobject given_ResultSetMapper_Float.typeobject given_ResultSetMapper_Int.typeobject given_ResultSetMapper_Long.typeobject given_ResultSetMapper_Short.typeobject given_ResultSetMapper_|.typeobject resultSetMapper.typeShow all
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ResultSetMapper.type
Attributes
- Companion
- object
- Supertypes
-
trait ResultSettrait AutoCloseabletrait Wrapperclass Objecttrait Matchableclass AnyShow all
wrap a sql"select * from table where id = $id" object
wrap a sql"select * from table where id = $id" object
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
annotated on a case class, to specify the column mapper, such as @UseColumnMapper(classOf[Camel2UnderscoreMapper]) default using IdentityMapping
annotated on a case class, to specify the column mapper, such as @UseColumnMapper(classOf[Camel2UnderscoreMapper]) default using IdentityMapping
Attributes
- Supertypes
-
trait StaticAnnotationclass Annotationclass Objecttrait Matchableclass Any
Attributes
- Supertypes
-
trait StaticAnnotationclass Annotationclass Objecttrait Matchableclass Any
Attributes
- Supertypes
- Self type
-
given_ConnectionOps.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Supertypes
- Self type
-
given_DataSourceOps.type
Givens
Givens
Extensions
Extensions
SQL"" will validate the sql statement at compiler time.
SQL"" will validate the sql statement at compiler time.