zio-jdbc
zio-jdbc copied to clipboard
additional features for Sql[+A]
potentials
- in
- notIn
- and
- or
- where
These methods can be added to Sql
type and modelled after the existing Sql#values
method.
Example:
class Sql[+A](...) { self =>
def and(right: Sql[ZResultSet])(implicit ev: A <:< ZResultSet): Sql[ZResultSet] =
self ++ Sql(" AND ", identity(_)) ++ right
}
For improved performance, we can construct the syntax fragments as constant values which are private and stored in the Sq
l companion object, together with other existing constants such as values
.
@jdegoes, I would like to work on this.
#21 contains 'and' plus 'or' methods