Interface DatabaseConnectionBuilder
-
public interface DatabaseConnectionBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DatabaseConnection
connect(Credential credential)
Connect to a database using a credential.DatabaseConnectionBuilder
setErrorLogger(DatabaseErrorLogger errorLogger)
Set a post-DatabaseErrorLogger
, which is executed after an SQL statement failed.DatabaseConnectionBuilder
setPLSQLJobContext(boolean enable)
DatabaseConnectionBuilder
setPostLogger(DatabaseLogger postLogger)
Set a post-DatabaseLogger
, which is executed after an SQL statement is executed.DatabaseConnectionBuilder
setPreLogger(DatabaseLogger preLogger)
Set a pre-DatabaseLogger
, which is executed before an SQL statement is executed.
-
-
-
Method Detail
-
connect
DatabaseConnection connect(Credential credential) throws SQLException
Connect to a database using a credential.- Parameters:
credential
- The (JDBC) credentials to use to connect to the database.- Returns:
- A database connection.
- Throws:
SQLException
- See Also:
for an example
-
setPLSQLJobContext
DatabaseConnectionBuilder setPLSQLJobContext(boolean enable)
- Parameters:
enable
- Should the current process ID be set in the PL/SQL API? (On Oracle only, because the PL/SQL API can only be available on Oracle).- Returns:
- this
-
setPostLogger
DatabaseConnectionBuilder setPostLogger(DatabaseLogger postLogger)
Set a post-DatabaseLogger
, which is executed after an SQL statement is executed.- Parameters:
postLogger
-- Returns:
- this
- See Also:
for an example
-
setPreLogger
DatabaseConnectionBuilder setPreLogger(DatabaseLogger preLogger)
Set a pre-DatabaseLogger
, which is executed before an SQL statement is executed.- Parameters:
preLogger
-- Returns:
- set
- See Also:
for an example
-
setErrorLogger
DatabaseConnectionBuilder setErrorLogger(DatabaseErrorLogger errorLogger)
Set a post-DatabaseErrorLogger
, which is executed after an SQL statement failed.- Parameters:
errorLogger
-- Returns:
- this
- See Also:
for an example
-
-