Creates an on-demand typed DAO instance.
Creates an on-demand typed DAO instance.
type of the DAO to create.
an on-demand DAO instance for the specified type.
Executes the given function within a transaction.
Executes the given function within a transaction.
the return type of the function to execute.
the function to execute within the transaction.
the result of the function.
Exception
if an Exception is thrown by the function, the transaction will be
rolled-back.
Executes the given function within a transaction.
Executes the given function within a transaction.
the return type of the function to execute.
the function to execute within the transaction.
the result of the function.
Exception
if an Exception is thrown by the function, the transaction will be
rolled-back.
Executes the given function within a transaction of the given isolation level.
Executes the given function within a transaction of the given isolation level. This method has been added to break the ambiguity of the methods above.
the return type of the function to execute.
the isolation level for the transaction.
the function to execute within the transaction.
the result of the function.
Exception
if an Exception is thrown by the function, the transaction will be
rolled-back.
Creates a typed DAO instance.
Creates a typed DAO instance.
type of the DAO to create.
a DAO instance for the specified type.
Extends this DBI to support for-comprehensions for transactions.
Applies the given function with a DBI org.skife.jdbi.v2.Handle.
Applies the given function with a DBI org.skife.jdbi.v2.Handle.
the return type of the function to apply.
the function to apply the handle to.
the result of applying the function.
Exception
if an Exception is thrown by the function.
Executes the given function within a transaction of the given isolation level.
Executes the given function within a transaction of the given isolation level.
the return type of the function to execute.
the isolation level for the transaction.
the function to execute within the transaction.
the result of the function.
This method cannot be called. See https://issues.scala-lang.org/browse/SI-8021 Use JDBIWrapper#inTransactionWithIsolation.
Exception
if an Exception is thrown by the function, the transaction will be
rolled-back.
Executes the given function within a transaction of the given isolation level.
Executes the given function within a transaction of the given isolation level.
the return type of the function to execute.
the isolation level for the transaction.
the function to execute within the transaction.
the result of the function.
This method cannot be called. See https://issues.scala-lang.org/browse/SI-8021 Use JDBIWrapper#inTransactionWithIsolation.
Exception
if an Exception is thrown by the function, the transaction will be
rolled-back.
Provides idiomatic Scala enhancements to the JDBI API.
Examples -
dbi.open[DAO] to open a handle and attach a new sql object of the specified type to that handle
dbi.daoFor[DAO] to create a new sql object which will obtain and release connections from this dbi instance, as it needs to, and can, respectively
When in scope, you can create transactions using for comprehension. For instance -