Binds value to each parameter by name.
Binds value to each parameter by name.
Example:
val insert = conn.insert("insert into table(p1, p2) values (:p1, :p2)") insert.map(_.bind("p1" -> "str", "p2" -> 10L)).foreach(_.execute())
Throws:
Binds value to each parameter by index.
Binds value to each parameter by index.
Parameters are ordered, each value in params
sequence will be bound
to the corresponding parameter.
Example:
val insert = conn.insert("insert into table(p1, p2) values (:p1, :p2)") insert.map(_.bind("str", 10L)).foreach(_.execute())
Throws:
Creates an executable version of the statement object without providing any arguments.
Creates an executable version of the statement object without providing any arguments.
Example:
val insert = conn.statement("insert into table(p1, p2) values ('str', 10)") insert.map(_.noArgs).foreach(_.execute())
Streams statement named arguments to a database.
Streams statement named arguments to a database.
This method can be used to repeatedly execute this statement with
published arguments by leveraging Reactive Streams specification's
Publisher
with a back-pressure. Each published element is a map
containing all arguments required by this statement.
Resulting future can fail with:
Streams statement arguments to a database.
Streams statement arguments to a database.
This method can be used to repeatedly execute this statement with
published arguments by leveraging Reactive Streams specification's
Publisher
with a back-pressure. Each published element is an indexed
sequence containing all arguments required by this statement.
Resulting future can fail with:
Represent a SQL statement
Methods of this trait allow to bind argument values to parameters either by name or index. Classes extending this trait can be used as an alternative to
sql
string interpolator - SqlInterpolator.