This is supposed to emulate how Row retrieval works in JDBC Int JDBC, ResultSet won't ever actually have Option values inside, so the actual option-decoder needs to understand that fact e.g.
Defines the primary interface by which information in Quill is composed.
Defines the primary interface by which information in Quill is composed. This includes not only queries but all code fragements. A quotation can be a simple value: {{ val pi = quote(3.14159) }} And be used within another quotation: {{ case class Circle(radius: Float)
val areas = quote { query[Circle].map(c => pi * c.radius * c.radius) } }} Quotations can also contain high-order functions and inline values: {{ val area = quote { (c: Circle) => { val r2 = c.radius * c.radius pi * r2 } } val areas = quote { query[Circle].map(c => area(c)) } }}
Note that this class must not be in quill-engine since it cannot be shared with ProtoQuill and which has a different implementation of Quoted.
Scala 3.1.1 fails to compile / no method options for more info.
Convenience API that allows construction of a Quat using Quat.from[T]
This is supposed to emulate how Row retrieval works in JDBC Int JDBC, ResultSet won't ever actually have Option values inside, so the actual option-decoder needs to understand that fact e.g.
Deocder[Option[Int]](java.sql.ResultSet(foo:1, etc)).getInt(1)
* and wrap it into a Optional value for the equivalent row implementation:Deocder[Option[Int]](Row(foo:1, etc)).apply(1)
. (*note that java.sql.ResultSet actually doesn't have this syntax because it isn't a product). Similarly, when doingResultSet(foo:null /*Expecting an int*/, etc).getInt(1)
the result will be 0 as opposed to throwing a NPE as would be the scala expectation. So we need to doRow(foo:null /*Expecting an int*/, etc).apply(1)
do the same thing.