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]
}
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.