Creates a connection, managed with given handler.
Creates a connection, managed with given handler.
connection handler
connection properties
a new Acolyte connection
connection(handler) // without connection properties // With connection property to fallback untyped null connection(handler, "acolyte.parameter.untypedNull" -> "true")
Creates a connection, whose statement will be passed to given handler.
Creates a connection, whose statement will be passed to given handler.
statement handler
connection properties
a new Acolyte connection
connection(handler) // without connection properties // With connection property to fallback untyped null connection(handler, "acolyte.parameter.untypedNull" -> "true")
Creates a new handler detecting all statements as queries
(like handleStatement.withQueryDetection(".*").withQueryHandler(h)
).
Creates a new handler detecting all statements as queries
(like handleStatement.withQueryDetection(".*").withQueryHandler(h)
).
import acolyte.jdbc.AcolyteDSL.{ connection, handleQuery } connection { handleQuery { _ => res }
Creates an empty handler.
Creates an empty handler.
import acolyte.jdbc.AcolyteDSL.{ connection, handleStatement }
connection { handleStatement }
Returns an update result with row |count| and generated |keys|.
Returns an update result with row |count| and generated |keys|.
Updated (row) count
Generated keys
import acolyte.jdbc.AcolyteDSL.updateResult import acolyte.jdbc.RowLists updateResult(2/* updated rows */, RowLists.stringList("a", "b"))
Executes |f| using connection accepting only queries, and answering with |result| to any query.
Executes |f| using connection accepting only queries, and answering with |result| to any query.
import acolyte.jdbc.AcolyteDSL.withQueryResult val str: String = withQueryResult(queryRes) { con => "str" }
Acolyte DSL for JDBC.