Provides a DbApi that you can use to run queries in "auto-commit" mode, such that every query runs in its own transaction and is committed automatically on-completion.
Provides a DbApi that you can use to run queries in "auto-commit" mode, such that every query runs in its own transaction and is committed automatically on-completion.
This can be useful for interactive testing, but requires that you manually manage the closing of the connection to avoid leaking connections (if using a connection pool like HikariCP), and should be avoided in most production environments in favor of .transaction{...} blocks.
Attributes
def renderSql[Q, R](query: Q, castParams: Boolean)(implicit qr: Queryable[Q, R]): String
Converts the given query Q into a string. Useful for debugging and logging
Converts the given query Q into a string. Useful for debugging and logging
Opens a database transaction within the given block, automatically committing it if the block returns successfully and rolling it back if the blow fails with an uncaught exception. Within the block, you provides a DbApi.Txn you can use to run queries, create savepoints, or roll back the transaction.
Opens a database transaction within the given block, automatically committing it if the block returns successfully and rolling it back if the blow fails with an uncaught exception. Within the block, you provides a DbApi.Txn you can use to run queries, create savepoints, or roll back the transaction.