public interface DbConnection
extends org.mule.runtime.extension.api.connectivity.TransactionalConnection
Connection adding connector's specific functionality| Modifier and Type | Method and Description |
|---|---|
void |
abortActiveLobStreams()
Resets the count of the returned results that are streams that still need to be consumed.
|
void |
beginStreaming()
Starts streaming.
|
default Array |
createArrayOf(String typeName,
Object value)
|
default Array |
createArrayOf(String typeName,
Object[] values)
|
default Struct |
createStruct(String typeName,
Object[] values)
|
void |
decrementActiveLobStreams()
Decrements the count of the returned results that are streams that need to be consumed.
|
void |
endStreaming()
Marks that the streaming is over
|
List<DbType> |
getCustomDataTypes() |
default Optional<DbType> |
getDbTypeByVendor(String typeName,
ResultSet procedureColumns) |
Connection |
getJdbcConnection() |
default ResultSet |
getProcedureColumns(String storedProcedureName,
String storedProcedureOwner,
String storedProcedureParentOwner,
String catalogName)
Retrieves a description of the given stored procedure parameter and result columns.
|
default Optional<String> |
getProcedureColumnType(String procedureName,
String columnName,
String owner)
Returns the type name of a Stored Procedure Column
|
StatementResultIteratorFactory |
getStatementResultIteratorFactory(ResultSetHandler resultSetHandler)
Returns the
StatementResultIteratorFactory used to create the StatementResultIterator for this connection. |
default Set<String> |
getTables()
Returns all the available tables of the current Database.
|
List<DbType> |
getVendorDataTypes() |
boolean |
hasActiveLobStreams()
Finds out if there are open LOB streams in the results that need to be consumed.
|
void |
incrementActiveLobStreams()
Increments the count of the returned results that are streams that need to be consumed.
|
boolean |
isStreaming() |
boolean |
isTransactionActive() |
void |
release()
Closes the underlying JDBC connection, provided that
isStreaming() is false |
boolean |
supportsContentStreaming() |
StatementResultIteratorFactory getStatementResultIteratorFactory(ResultSetHandler resultSetHandler)
StatementResultIteratorFactory used to create the StatementResultIterator for this connection.resultSetHandler - used to process resultSets created from this connectionStatementResultIterator for this connection.List<DbType> getVendorDataTypes()
DbTypes which are specific to the Database vendorConnection getJdbcConnection()
void release()
isStreaming() is falsevoid beginStreaming()
this connection is about to be
iteratedboolean isStreaming()
beginStreaming() has been invoked on this instance but endStreaming() has notvoid endStreaming()
boolean isTransactionActive()
boolean supportsContentStreaming()
void incrementActiveLobStreams()
void decrementActiveLobStreams()
void abortActiveLobStreams()
boolean hasActiveLobStreams()
default Array createArrayOf(String typeName, Object[] values) throws SQLException
typeName - The Array type namevalues - The values to convert to an ArrayArraySQLException - if an error occurs trying to create the array.default Array createArrayOf(String typeName, Object value) throws SQLException
typeName - The Array type namevalue - The values to convert to an ArrayArraySQLException - if an error occurs trying to create the array.default Struct createStruct(String typeName, Object[] values) throws SQLException
typeName - The Struct type namevalues - The values to convert to an StructStructSQLException - if an error occurs trying to create the struct.default ResultSet getProcedureColumns(String storedProcedureName, String storedProcedureOwner, String storedProcedureParentOwner, String catalogName) throws SQLException
DatabaseMetaData.getProcedureColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
Some Databases assign a different meaning to each parameter. You should override this method when needed.storedProcedureName - the stored procedure namestoredProcedureOwner - the owner of the stored procedurestoredProcedureParentOwner - the owner of the owner of the stored procedurecatalogName - the catalog name where the stored procedure is definedResultSet - each row describes a stored procedure parameter or columnSQLException - if a database access error occursdefault Optional<String> getProcedureColumnType(String procedureName, String columnName, String owner) throws SQLException
procedureName - The Stored Procedure namecolumnName - Name of the column nameowner - The owner of the stored procedureSQLException - if an error occurs trying to obtain the column namedefault Set<String> getTables() throws SQLException
SQLException - if an error occurs trying to obtain the table namesdefault Optional<DbType> getDbTypeByVendor(String typeName, ResultSet procedureColumns) throws SQLException
SQLExceptionCopyright © 2021. All rights reserved.