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 TypeMethodDescriptionintalterAutoIncrement(Connection connection, String tableName, int startWith) voidapplyBlobParameter(PreparedStatement stmt, int column, Object blobHandle) voidapplyClobParameter(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) booleanhasIndexOnColumn(Connection conn, String schemaOwner, String tableName, String columnName) booleanhasIndexOnColumns(Connection conn, String schemaOwner, String tableName, List<String> columns) booleanbooleanisClobType(ResultSetMetaData rsmeta, int colNum) booleanisColumnPresent(Connection conn, String schemaName, String tableName, String columnName) booleanbooleanDBMS 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.booleanisTablePresent(Connection conn, String schemaName, String tableName) prepareQueryTextForWorkQueuePeeking(int batchSize, String selectQuery, int wait) prepareQueryTextForWorkQueueReading(int batchSize, String selectQuery, int wait) voidupdateBlob(ResultSet rs, int column, Object blobHandle) voidupdateBlob(ResultSet rs, String column, Object blobHandle) voidupdateClob(ResultSet rs, int column, Object clobHandle) voidupdateClob(ResultSet rs, String column, Object clobHandle) Methods inherited from class org.frankframework.dbms.GenericDbmsSupport
autoIncrementInsertValue, autoIncrementKeyMustBeInserted, autoIncrementUsesSequenceObject, convertQuery, createTranslator, doHasIndexOnColumns, doIsColumnPresent, doIsTablePresent, getBlobOutputStream, getBooleanValue, getFormattedDate, getFromForTablelessSelect, getLength, getSqlTranslator, getSysDate, getTableColumns, getTableColumns, getTextFieldType, getTimestampFieldType, isBlobType, isColumnPresent, isConstraintViolation, isQueryConversionRequired, isSequencePresent, isTablePresent, prepareQueryTextForNonLockingRead, prepareQueryTextForWorkQueuePeeking, prepareQueryTextForWorkQueueReading, provideFirstRowsHintAfterFirstKeyword, provideIndexHintAfterFirstKeyword, provideTrailingFirstRowsHint, splitQuery, warnConvertQueryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.frankframework.dbms.IDbmsSupport
canFetchStatementParameterMetaData, getCursorSqlType, getDbmsName, isRowVersionTimestamp
-
Constructor Details
-
PostgresqlDbmsSupport
public PostgresqlDbmsSupport()
-
-
Method Details
-
getDbms
- Specified by:
getDbmsin interfaceIDbmsSupport- Overrides:
getDbmsin classGenericDbmsSupport
-
isParameterTypeMatchRequired
public boolean isParameterTypeMatchRequired()- Specified by:
isParameterTypeMatchRequiredin interfaceIDbmsSupport- Overrides:
isParameterTypeMatchRequiredin classGenericDbmsSupport
-
hasSkipLockedFunctionality
public boolean hasSkipLockedFunctionality()- Specified by:
hasSkipLockedFunctionalityin interfaceIDbmsSupport- Overrides:
hasSkipLockedFunctionalityin classGenericDbmsSupport
-
getDatetimeLiteral
- Specified by:
getDatetimeLiteralin interfaceIDbmsSupport- Overrides:
getDatetimeLiteralin classGenericDbmsSupport
-
getTimestampAsDate
- Specified by:
getTimestampAsDatein interfaceIDbmsSupport- Overrides:
getTimestampAsDatein classGenericDbmsSupport
-
getDateAndOffset
- Specified by:
getDateAndOffsetin interfaceIDbmsSupport- Overrides:
getDateAndOffsetin classGenericDbmsSupport
-
isClobType
- Specified by:
isClobTypein interfaceIDbmsSupport- Overrides:
isClobTypein classGenericDbmsSupport- Throws:
SQLException
-
getClobReader
- Specified by:
getClobReaderin interfaceIDbmsSupport- Overrides:
getClobReaderin classGenericDbmsSupport- Throws:
SQLException
-
getClobReader
- Specified by:
getClobReaderin interfaceIDbmsSupport- Overrides:
getClobReaderin classGenericDbmsSupport- Throws:
SQLException
-
getClobHandle
- Specified by:
getClobHandlein interfaceIDbmsSupport- Overrides:
getClobHandlein classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
getClobHandle
- Specified by:
getClobHandlein interfaceIDbmsSupport- Overrides:
getClobHandlein classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
getClobWriter
- Specified by:
getClobWriterin interfaceIDbmsSupport- Overrides:
getClobWriterin classGenericDbmsSupport- Throws:
SQLException
-
getClobWriter
public Writer getClobWriter(PreparedStatement stmt, int column, Object clobHandle) throws SQLException - Specified by:
getClobWriterin interfaceIDbmsSupport- Overrides:
getClobWriterin classGenericDbmsSupport- Throws:
SQLException
-
updateClob
public void updateClob(ResultSet rs, int column, Object clobHandle) throws SQLException, DbmsException - Specified by:
updateClobin interfaceIDbmsSupport- Overrides:
updateClobin classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
updateClob
public void updateClob(ResultSet rs, String column, Object clobHandle) throws SQLException, DbmsException - Specified by:
updateClobin interfaceIDbmsSupport- Overrides:
updateClobin classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
applyClobParameter
public void applyClobParameter(PreparedStatement stmt, int column, Object clobHandle) throws SQLException - Specified by:
applyClobParameterin interfaceIDbmsSupport- Overrides:
applyClobParameterin classGenericDbmsSupport- Throws:
SQLException
-
getBlobFieldType
- Specified by:
getBlobFieldTypein interfaceIDbmsSupport- Overrides:
getBlobFieldTypein classGenericDbmsSupport
-
getBlobInputStream
- Specified by:
getBlobInputStreamin interfaceIDbmsSupport- Overrides:
getBlobInputStreamin classGenericDbmsSupport- Throws:
SQLException
-
getBlobInputStream
- Specified by:
getBlobInputStreamin interfaceIDbmsSupport- Overrides:
getBlobInputStreamin classGenericDbmsSupport- Throws:
SQLException
-
getBlobHandle
- Specified by:
getBlobHandlein interfaceIDbmsSupport- Overrides:
getBlobHandlein classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
getBlobHandle
- Specified by:
getBlobHandlein interfaceIDbmsSupport- Overrides:
getBlobHandlein classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
getBlobOutputStream
public OutputStream getBlobOutputStream(ResultSet rs, int column, Object blobHandle) throws SQLException - Specified by:
getBlobOutputStreamin interfaceIDbmsSupport- Overrides:
getBlobOutputStreamin classGenericDbmsSupport- Throws:
SQLException
-
getBlobOutputStream
public OutputStream getBlobOutputStream(PreparedStatement stmt, int column, Object blobHandle) throws SQLException - Specified by:
getBlobOutputStreamin interfaceIDbmsSupport- Overrides:
getBlobOutputStreamin classGenericDbmsSupport- Throws:
SQLException
-
updateBlob
public void updateBlob(ResultSet rs, int column, Object blobHandle) throws SQLException, DbmsException - Specified by:
updateBlobin interfaceIDbmsSupport- Overrides:
updateBlobin classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
updateBlob
public void updateBlob(ResultSet rs, String column, Object blobHandle) throws SQLException, DbmsException - Specified by:
updateBlobin interfaceIDbmsSupport- Overrides:
updateBlobin classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
applyBlobParameter
public void applyBlobParameter(PreparedStatement stmt, int column, Object blobHandle) throws SQLException - Specified by:
applyBlobParameterin interfaceIDbmsSupport- Overrides:
applyBlobParameterin classGenericDbmsSupport- Throws:
SQLException
-
getSchema
- Specified by:
getSchemain interfaceIDbmsSupport- Overrides:
getSchemain classGenericDbmsSupport- Throws:
DbmsException
-
getTableColumns
public ResultSet getTableColumns(Connection conn, String schemaName, String tableName, String columnNamePattern) throws DbmsException - Specified by:
getTableColumnsin interfaceIDbmsSupport- Overrides:
getTableColumnsin classGenericDbmsSupport- Throws:
DbmsException
-
isTablePresent
public boolean isTablePresent(Connection conn, String schemaName, String tableName) throws DbmsException - Specified by:
isTablePresentin interfaceIDbmsSupport- Overrides:
isTablePresentin classGenericDbmsSupport- Throws:
DbmsException
-
isColumnPresent
public boolean isColumnPresent(Connection conn, String schemaName, String tableName, String columnName) throws DbmsException - Specified by:
isColumnPresentin interfaceIDbmsSupport- Overrides:
isColumnPresentin classGenericDbmsSupport- Throws:
DbmsException
-
hasIndexOnColumn
public boolean hasIndexOnColumn(Connection conn, String schemaOwner, String tableName, String columnName) throws DbmsException - Specified by:
hasIndexOnColumnin interfaceIDbmsSupport- Overrides:
hasIndexOnColumnin classGenericDbmsSupport- Throws:
DbmsException
-
hasIndexOnColumns
public boolean hasIndexOnColumns(Connection conn, String schemaOwner, String tableName, List<String> columns) throws DbmsException - Specified by:
hasIndexOnColumnsin interfaceIDbmsSupport- Overrides:
hasIndexOnColumnsin classGenericDbmsSupport- Throws:
DbmsException
-
prepareQueryTextForWorkQueueReading
public String prepareQueryTextForWorkQueueReading(int batchSize, String selectQuery, int wait) throws DbmsException - Specified by:
prepareQueryTextForWorkQueueReadingin interfaceIDbmsSupport- Overrides:
prepareQueryTextForWorkQueueReadingin classGenericDbmsSupport- Throws:
DbmsException
-
prepareQueryTextForWorkQueuePeeking
public String prepareQueryTextForWorkQueuePeeking(int batchSize, String selectQuery, int wait) throws DbmsException - Specified by:
prepareQueryTextForWorkQueuePeekingin interfaceIDbmsSupport- Overrides:
prepareQueryTextForWorkQueuePeekingin classGenericDbmsSupport- Throws:
DbmsException
-
alterAutoIncrement
public int alterAutoIncrement(Connection connection, String tableName, int startWith) throws DbmsException - Throws:
DbmsException
-
getAutoIncrementKeyFieldType
- Specified by:
getAutoIncrementKeyFieldTypein interfaceIDbmsSupport- Overrides:
getAutoIncrementKeyFieldTypein classGenericDbmsSupport
-
isStoredProcedureResultSetSupported
public boolean isStoredProcedureResultSetSupported()Description copied from interface:IDbmsSupportDBMS 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.
-