Package org.frankframework.dbms
Class PostgresqlDbmsSupport
java.lang.Object
org.frankframework.dbms.GenericDbmsSupport
org.frankframework.dbms.PostgresqlDbmsSupport
- All Implemented Interfaces:
IDbmsSupport
Support for PostgreSQL.
Limitations: PostgreSQL blobs and clobs are handled via byte arrays that are kept in memory. The maximum size of blobs and clobs is therefor limited by memory size.
-
Field Summary
Fields inherited from class org.frankframework.dbms.GenericDbmsSupport
KEYWORD_SELECT, log, sqlTranslators
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
alterAutoIncrement
(Connection connection, String tableName, int startWith) void
applyBlobParameter
(PreparedStatement stmt, int column, Object blobHandle) void
applyClobParameter
(PreparedStatement stmt, int column, Object clobHandle) getBlobHandle
(PreparedStatement stmt, int column) getBlobHandle
(ResultSet rs, int column) getBlobInputStream
(ResultSet rs, int column) getBlobInputStream
(ResultSet rs, String column) getBlobOutputStream
(PreparedStatement stmt, int column, Object blobHandle) getBlobOutputStream
(ResultSet rs, int column, Object blobHandle) getClobHandle
(PreparedStatement stmt, int column) getClobHandle
(ResultSet rs, int column) getClobReader
(ResultSet rs, int column) getClobReader
(ResultSet rs, String column) getClobWriter
(PreparedStatement stmt, int column, Object clobHandle) getClobWriter
(ResultSet rs, int column, Object clobHandle) getDateAndOffset
(String dateValue, int daysOffset) getDatetimeLiteral
(Date date) getDbms()
getSchema
(Connection conn) getTableColumns
(Connection conn, String schemaName, String tableName, String columnNamePattern) getTimestampAsDate
(String columnName) boolean
hasIndexOnColumn
(Connection conn, String schemaOwner, String tableName, String columnName) boolean
hasIndexOnColumns
(Connection conn, String schemaOwner, String tableName, List<String> columns) boolean
boolean
isClobType
(ResultSetMetaData rsmeta, int colNum) boolean
isColumnPresent
(Connection conn, String schemaName, String tableName, String columnName) boolean
boolean
DBMS Feature flag: is it possible to call a stored procedure that returns the results of a SELECT statement directly, without needing a REFCURSOR OUT parameter.boolean
isTablePresent
(Connection conn, String schemaName, String tableName) prepareQueryTextForWorkQueuePeeking
(int batchSize, String selectQuery, int wait) prepareQueryTextForWorkQueueReading
(int batchSize, String selectQuery, int wait) void
updateBlob
(ResultSet rs, int column, Object blobHandle) void
updateBlob
(ResultSet rs, String column, Object blobHandle) void
updateClob
(ResultSet rs, int column, Object clobHandle) void
updateClob
(ResultSet rs, String column, Object clobHandle) Methods inherited from class org.frankframework.dbms.GenericDbmsSupport
autoIncrementInsertValue, autoIncrementKeyMustBeInserted, autoIncrementUsesSequenceObject, convertQuery, createTranslator, doHasIndexOnColumns, doIsColumnPresent, doIsTablePresent, getBlobOutputStream, getBooleanValue, getDbmsName, getFormattedDate, getFromForTablelessSelect, getLength, getSqlTranslator, getSysDate, getTableColumns, getTableColumns, getTextFieldType, getTimestampFieldType, isBlobType, isColumnPresent, isConstraintViolation, isQueryConversionRequired, isSequencePresent, isTablePresent, prepareQueryTextForNonLockingRead, prepareQueryTextForWorkQueuePeeking, prepareQueryTextForWorkQueueReading, provideFirstRowsHintAfterFirstKeyword, provideIndexHintAfterFirstKeyword, provideTrailingFirstRowsHint, splitQuery, warnConvertQuery
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.frankframework.dbms.IDbmsSupport
canFetchStatementParameterMetaData, getCursorSqlType, isRowVersionTimestamp
-
Constructor Details
-
PostgresqlDbmsSupport
public PostgresqlDbmsSupport()
-
-
Method Details
-
getDbms
- Specified by:
getDbms
in interfaceIDbmsSupport
- Overrides:
getDbms
in classGenericDbmsSupport
-
isParameterTypeMatchRequired
public boolean isParameterTypeMatchRequired()- Specified by:
isParameterTypeMatchRequired
in interfaceIDbmsSupport
- Overrides:
isParameterTypeMatchRequired
in classGenericDbmsSupport
-
hasSkipLockedFunctionality
public boolean hasSkipLockedFunctionality()- Specified by:
hasSkipLockedFunctionality
in interfaceIDbmsSupport
- Overrides:
hasSkipLockedFunctionality
in classGenericDbmsSupport
-
getDatetimeLiteral
- Specified by:
getDatetimeLiteral
in interfaceIDbmsSupport
- Overrides:
getDatetimeLiteral
in classGenericDbmsSupport
-
getTimestampAsDate
- Specified by:
getTimestampAsDate
in interfaceIDbmsSupport
- Overrides:
getTimestampAsDate
in classGenericDbmsSupport
-
getDateAndOffset
- Specified by:
getDateAndOffset
in interfaceIDbmsSupport
- Overrides:
getDateAndOffset
in classGenericDbmsSupport
-
isClobType
- Specified by:
isClobType
in interfaceIDbmsSupport
- Overrides:
isClobType
in classGenericDbmsSupport
- Throws:
SQLException
-
getClobReader
- Specified by:
getClobReader
in interfaceIDbmsSupport
- Overrides:
getClobReader
in classGenericDbmsSupport
- Throws:
SQLException
-
getClobReader
- Specified by:
getClobReader
in interfaceIDbmsSupport
- Overrides:
getClobReader
in classGenericDbmsSupport
- Throws:
SQLException
-
getClobHandle
- Specified by:
getClobHandle
in interfaceIDbmsSupport
- Overrides:
getClobHandle
in classGenericDbmsSupport
- Throws:
SQLException
DbmsException
-
getClobHandle
- Specified by:
getClobHandle
in interfaceIDbmsSupport
- Overrides:
getClobHandle
in classGenericDbmsSupport
- Throws:
SQLException
DbmsException
-
getClobWriter
- Specified by:
getClobWriter
in interfaceIDbmsSupport
- Overrides:
getClobWriter
in classGenericDbmsSupport
- Throws:
SQLException
-
getClobWriter
public Writer getClobWriter(PreparedStatement stmt, int column, Object clobHandle) throws SQLException - Specified by:
getClobWriter
in interfaceIDbmsSupport
- Overrides:
getClobWriter
in classGenericDbmsSupport
- Throws:
SQLException
-
updateClob
public void updateClob(ResultSet rs, int column, Object clobHandle) throws SQLException, DbmsException - Specified by:
updateClob
in interfaceIDbmsSupport
- Overrides:
updateClob
in classGenericDbmsSupport
- Throws:
SQLException
DbmsException
-
updateClob
public void updateClob(ResultSet rs, String column, Object clobHandle) throws SQLException, DbmsException - Specified by:
updateClob
in interfaceIDbmsSupport
- Overrides:
updateClob
in classGenericDbmsSupport
- Throws:
SQLException
DbmsException
-
applyClobParameter
public void applyClobParameter(PreparedStatement stmt, int column, Object clobHandle) throws SQLException - Specified by:
applyClobParameter
in interfaceIDbmsSupport
- Overrides:
applyClobParameter
in classGenericDbmsSupport
- Throws:
SQLException
-
getBlobFieldType
- Specified by:
getBlobFieldType
in interfaceIDbmsSupport
- Overrides:
getBlobFieldType
in classGenericDbmsSupport
-
getBlobInputStream
- Specified by:
getBlobInputStream
in interfaceIDbmsSupport
- Overrides:
getBlobInputStream
in classGenericDbmsSupport
- Throws:
SQLException
-
getBlobInputStream
- Specified by:
getBlobInputStream
in interfaceIDbmsSupport
- Overrides:
getBlobInputStream
in classGenericDbmsSupport
- Throws:
SQLException
-
getBlobHandle
- Specified by:
getBlobHandle
in interfaceIDbmsSupport
- Overrides:
getBlobHandle
in classGenericDbmsSupport
- Throws:
SQLException
DbmsException
-
getBlobHandle
- Specified by:
getBlobHandle
in interfaceIDbmsSupport
- Overrides:
getBlobHandle
in classGenericDbmsSupport
- Throws:
SQLException
DbmsException
-
getBlobOutputStream
public OutputStream getBlobOutputStream(ResultSet rs, int column, Object blobHandle) throws SQLException - Specified by:
getBlobOutputStream
in interfaceIDbmsSupport
- Overrides:
getBlobOutputStream
in classGenericDbmsSupport
- Throws:
SQLException
-
getBlobOutputStream
public OutputStream getBlobOutputStream(PreparedStatement stmt, int column, Object blobHandle) throws SQLException - Specified by:
getBlobOutputStream
in interfaceIDbmsSupport
- Overrides:
getBlobOutputStream
in classGenericDbmsSupport
- Throws:
SQLException
-
updateBlob
public void updateBlob(ResultSet rs, int column, Object blobHandle) throws SQLException, DbmsException - Specified by:
updateBlob
in interfaceIDbmsSupport
- Overrides:
updateBlob
in classGenericDbmsSupport
- Throws:
SQLException
DbmsException
-
updateBlob
public void updateBlob(ResultSet rs, String column, Object blobHandle) throws SQLException, DbmsException - Specified by:
updateBlob
in interfaceIDbmsSupport
- Overrides:
updateBlob
in classGenericDbmsSupport
- Throws:
SQLException
DbmsException
-
applyBlobParameter
public void applyBlobParameter(PreparedStatement stmt, int column, Object blobHandle) throws SQLException - Specified by:
applyBlobParameter
in interfaceIDbmsSupport
- Overrides:
applyBlobParameter
in classGenericDbmsSupport
- Throws:
SQLException
-
getSchema
- Specified by:
getSchema
in interfaceIDbmsSupport
- Overrides:
getSchema
in classGenericDbmsSupport
- Throws:
DbmsException
-
getTableColumns
public ResultSet getTableColumns(Connection conn, String schemaName, String tableName, String columnNamePattern) throws DbmsException - Specified by:
getTableColumns
in interfaceIDbmsSupport
- Overrides:
getTableColumns
in classGenericDbmsSupport
- Throws:
DbmsException
-
isTablePresent
public boolean isTablePresent(Connection conn, String schemaName, String tableName) throws DbmsException - Specified by:
isTablePresent
in interfaceIDbmsSupport
- Overrides:
isTablePresent
in classGenericDbmsSupport
- Throws:
DbmsException
-
isColumnPresent
public boolean isColumnPresent(Connection conn, String schemaName, String tableName, String columnName) throws DbmsException - Specified by:
isColumnPresent
in interfaceIDbmsSupport
- Overrides:
isColumnPresent
in classGenericDbmsSupport
- Throws:
DbmsException
-
hasIndexOnColumn
public boolean hasIndexOnColumn(Connection conn, String schemaOwner, String tableName, String columnName) throws DbmsException - Specified by:
hasIndexOnColumn
in interfaceIDbmsSupport
- Overrides:
hasIndexOnColumn
in classGenericDbmsSupport
- Throws:
DbmsException
-
hasIndexOnColumns
public boolean hasIndexOnColumns(Connection conn, String schemaOwner, String tableName, List<String> columns) throws DbmsException - Specified by:
hasIndexOnColumns
in interfaceIDbmsSupport
- Overrides:
hasIndexOnColumns
in classGenericDbmsSupport
- Throws:
DbmsException
-
prepareQueryTextForWorkQueueReading
public String prepareQueryTextForWorkQueueReading(int batchSize, String selectQuery, int wait) throws DbmsException - Specified by:
prepareQueryTextForWorkQueueReading
in interfaceIDbmsSupport
- Overrides:
prepareQueryTextForWorkQueueReading
in classGenericDbmsSupport
- Throws:
DbmsException
-
prepareQueryTextForWorkQueuePeeking
public String prepareQueryTextForWorkQueuePeeking(int batchSize, String selectQuery, int wait) throws DbmsException - Specified by:
prepareQueryTextForWorkQueuePeeking
in interfaceIDbmsSupport
- Overrides:
prepareQueryTextForWorkQueuePeeking
in classGenericDbmsSupport
- Throws:
DbmsException
-
alterAutoIncrement
public int alterAutoIncrement(Connection connection, String tableName, int startWith) throws DbmsException - Throws:
DbmsException
-
getAutoIncrementKeyFieldType
- Specified by:
getAutoIncrementKeyFieldType
in interfaceIDbmsSupport
- Overrides:
getAutoIncrementKeyFieldType
in classGenericDbmsSupport
-
isStoredProcedureResultSetSupported
public boolean isStoredProcedureResultSetSupported()Description copied from interface:IDbmsSupport
DBMS Feature flag: is it possible to call a stored procedure that returns the results of a SELECT statement directly, without needing a REFCURSOR OUT parameter.- Returns:
- true for database that can directly return SELECT results. Not supported for PostgreSQL and Oracle.
-