public static interface DatabaseProviderVertx.Builder
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
DatabaseProviderVertx |
create()
WARNING: You should try to avoid using this method.
|
void |
transact(DbCode code)
This is a convenience method to eliminate the need for explicitly
managing the resources (and error handling) for this class.
|
void |
transact(DbCodeTx code)
This is a convenience method to eliminate the need for explicitly
managing the resources (and error handling) for this class.
|
<T> void |
transactAsync(DbCodeTyped<T> code,
io.vertx.core.Handler<io.vertx.core.AsyncResult<T>> resultHandler) |
<T> void |
transactAsync(DbCodeTypedTx<T> code,
io.vertx.core.Handler<io.vertx.core.AsyncResult<T>> resultHandler) |
DatabaseProviderVertx.Builder |
withConnectionAccess()
Allow direct access to the underlying database connection.
|
DatabaseProviderVertx.Builder |
withDatePerAppOnly()
Wherever argDateNowPerDb() is specified, use argDateNowPerApp() instead.
|
DatabaseProviderVertx.Builder |
withOptions(OptionsOverride options) |
DatabaseProviderVertx.Builder |
withSqlInExceptionMessages()
Include SQL in exception messages.
|
DatabaseProviderVertx.Builder |
withSqlParameterLogging()
Enable logging of parameter values along with the SQL.
|
DatabaseProviderVertx.Builder |
withTransactionControl()
Allow provided Database instances to explicitly control transactions using the
commitNow() and rollbackNow() methods.
|
DatabaseProviderVertx.Builder |
withTransactionControlSilentlyIgnored()
This can be useful when testing code, as it can pretend to use transactions,
while giving you control over whether it actually commits or rolls back.
|
@CheckReturnValue DatabaseProviderVertx.Builder withOptions(OptionsOverride options)
@CheckReturnValue DatabaseProviderVertx.Builder withSqlParameterLogging()
@CheckReturnValue DatabaseProviderVertx.Builder withSqlInExceptionMessages()
@CheckReturnValue DatabaseProviderVertx.Builder withDatePerAppOnly()
@CheckReturnValue DatabaseProviderVertx.Builder withTransactionControl()
@CheckReturnValue DatabaseProviderVertx.Builder withTransactionControlSilentlyIgnored()
@CheckReturnValue DatabaseProviderVertx.Builder withConnectionAccess()
@CheckReturnValue DatabaseProviderVertx create()
If you use this method you are responsible for managing the transaction and commit/rollback/close.
void transact(DbCode code)
DbCode.run(Supplier) method threw a Throwable.code - the code you want to run as a transaction with a Database#transact(DbCodeTx)} if you want to explicitly manage
when the transaction commits or rolls back<T> void transactAsync(DbCodeTyped<T> code, io.vertx.core.Handler<io.vertx.core.AsyncResult<T>> resultHandler)
void transact(DbCodeTx code)
DbCodeTx.run(Supplier, Transaction) method threw a Throwable
while Transaction.isRollbackOnError() returns true, or
Transaction.isRollbackOnly() returns a true value.code - the code you want to run as a transaction with a Database<T> void transactAsync(DbCodeTypedTx<T> code, io.vertx.core.Handler<io.vertx.core.AsyncResult<T>> resultHandler)
void close()
Copyright © 2016. All rights reserved.