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 GenericDbmsSupport
KEYWORD_SELECT, log, sqlTranslators -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintalterAutoIncrement(Connection connection, String tableName, int startWith) voidapplyBlobParameter(@NonNull PreparedStatement stmt, int column, @NonNull Object blobHandle) voidapplyClobParameter(@NonNull PreparedStatement stmt, int column, @NonNull Object clobHandle) @NonNull ObjectgetBlobHandle(@NonNull PreparedStatement stmt, int column) @NonNull ObjectgetBlobHandle(@NonNull ResultSet rs, int column) @Nullable InputStreamgetBlobInputStream(@NonNull ResultSet rs, int column) @Nullable InputStreamgetBlobInputStream(@NonNull ResultSet rs, String column) @NonNull OutputStreamgetBlobOutputStream(@NonNull PreparedStatement stmt, int column, @NonNull Object blobHandle) @NonNull OutputStreamgetBlobOutputStream(@NonNull ResultSet rs, int column, @NonNull Object blobHandle) @NonNull ObjectgetClobHandle(@NonNull PreparedStatement stmt, int column) @NonNull ObjectgetClobHandle(@NonNull ResultSet rs, int column) @Nullable ReadergetClobReader(ResultSet rs, int column) @Nullable ReadergetClobReader(ResultSet rs, String column) @NonNull WritergetClobWriter(@NonNull PreparedStatement stmt, int column, @NonNull Object clobHandle) @NonNull WritergetClobWriter(@NonNull ResultSet rs, int column, @NonNull 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(@NonNull ResultSet rs, int column, @NonNull Object blobHandle) voidupdateBlob(@NonNull ResultSet rs, @NonNull String column, @NonNull Object blobHandle) voidupdateClob(@NonNull ResultSet rs, int column, @NonNull Object clobHandle) voidupdateClob(@NonNull ResultSet rs, String column, @NonNull Object clobHandle) Methods inherited from class GenericDbmsSupport
autoIncrementInsertValue, autoIncrementKeyMustBeInserted, autoIncrementUsesSequenceObject, convertQuery, createTranslator, doHasIndexOnColumns, doIsColumnPresent, doIsTablePresent, getBlobOutputStream, getFormattedDate, getFromForTablelessSelect, getSqlTranslator, getSysDate, getTableColumns, getTableColumns, getTimestampFieldType, isBlobType, isColumnPresent, isConstraintViolation, isQueryConversionRequired, isSequencePresent, isTablePresent, prepareQueryTextForNonLockingRead, prepareQueryTextForWorkQueuePeeking, prepareQueryTextForWorkQueueReading, provideFirstRowsHintAfterFirstKeyword, provideIndexHintAfterFirstKeyword, provideTrailingFirstRowsHint, splitQuery, warnConvertQueryMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IDbmsSupport
canFetchStatementParameterMetaData, getBooleanValue, getCursorSqlType, getDbmsName, getLength, getTargetSqlDialect, getTextFieldType, isRowVersionTimestamp
-
Constructor Details
-
PostgresqlDbmsSupport
public PostgresqlDbmsSupport()
-
-
Method Details
-
getDbms
- Specified by:
getDbmsin interfaceIDbmsSupport- Overrides:
getDbmsin classGenericDbmsSupport
-
isParameterTypeMatchRequired
public boolean isParameterTypeMatchRequired() -
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
public @NonNull Object getClobHandle(@NonNull ResultSet rs, int column) throws SQLException, DbmsException - Specified by:
getClobHandlein interfaceIDbmsSupport- Overrides:
getClobHandlein classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
getClobHandle
public @NonNull Object getClobHandle(@NonNull PreparedStatement stmt, int column) throws SQLException, DbmsException - Specified by:
getClobHandlein interfaceIDbmsSupport- Overrides:
getClobHandlein classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
getClobWriter
public @NonNull Writer getClobWriter(@NonNull ResultSet rs, int column, @NonNull Object clobHandle) throws SQLException - Specified by:
getClobWriterin interfaceIDbmsSupport- Overrides:
getClobWriterin classGenericDbmsSupport- Throws:
SQLException
-
getClobWriter
public @NonNull Writer getClobWriter(@NonNull PreparedStatement stmt, int column, @NonNull Object clobHandle) throws SQLException - Specified by:
getClobWriterin interfaceIDbmsSupport- Overrides:
getClobWriterin classGenericDbmsSupport- Throws:
SQLException
-
updateClob
public void updateClob(@NonNull ResultSet rs, int column, @NonNull Object clobHandle) throws SQLException, DbmsException - Specified by:
updateClobin interfaceIDbmsSupport- Overrides:
updateClobin classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
updateClob
public void updateClob(@NonNull ResultSet rs, String column, @NonNull Object clobHandle) throws SQLException, DbmsException - Specified by:
updateClobin interfaceIDbmsSupport- Overrides:
updateClobin classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
applyClobParameter
public void applyClobParameter(@NonNull PreparedStatement stmt, int column, @NonNull Object clobHandle) throws SQLException - Specified by:
applyClobParameterin interfaceIDbmsSupport- Overrides:
applyClobParameterin classGenericDbmsSupport- Throws:
SQLException
-
getBlobFieldType
- Specified by:
getBlobFieldTypein interfaceIDbmsSupport- Overrides:
getBlobFieldTypein classGenericDbmsSupport
-
getBlobInputStream
public @Nullable InputStream getBlobInputStream(@NonNull ResultSet rs, int column) throws SQLException - Specified by:
getBlobInputStreamin interfaceIDbmsSupport- Overrides:
getBlobInputStreamin classGenericDbmsSupport- Throws:
SQLException
-
getBlobInputStream
public @Nullable InputStream getBlobInputStream(@NonNull ResultSet rs, String column) throws SQLException - Specified by:
getBlobInputStreamin interfaceIDbmsSupport- Overrides:
getBlobInputStreamin classGenericDbmsSupport- Throws:
SQLException
-
getBlobHandle
public @NonNull Object getBlobHandle(@NonNull ResultSet rs, int column) throws SQLException, DbmsException - Specified by:
getBlobHandlein interfaceIDbmsSupport- Overrides:
getBlobHandlein classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
getBlobHandle
public @NonNull Object getBlobHandle(@NonNull PreparedStatement stmt, int column) throws SQLException, DbmsException - Specified by:
getBlobHandlein interfaceIDbmsSupport- Overrides:
getBlobHandlein classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
getBlobOutputStream
public @NonNull OutputStream getBlobOutputStream(@NonNull ResultSet rs, int column, @NonNull Object blobHandle) throws SQLException - Specified by:
getBlobOutputStreamin interfaceIDbmsSupport- Overrides:
getBlobOutputStreamin classGenericDbmsSupport- Throws:
SQLException
-
getBlobOutputStream
public @NonNull OutputStream getBlobOutputStream(@NonNull PreparedStatement stmt, int column, @NonNull Object blobHandle) throws SQLException - Specified by:
getBlobOutputStreamin interfaceIDbmsSupport- Overrides:
getBlobOutputStreamin classGenericDbmsSupport- Throws:
SQLException
-
updateBlob
public void updateBlob(@NonNull ResultSet rs, int column, @NonNull Object blobHandle) throws SQLException, DbmsException - Specified by:
updateBlobin interfaceIDbmsSupport- Overrides:
updateBlobin classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
updateBlob
public void updateBlob(@NonNull ResultSet rs, @NonNull String column, @NonNull Object blobHandle) throws SQLException, DbmsException - Specified by:
updateBlobin interfaceIDbmsSupport- Overrides:
updateBlobin classGenericDbmsSupport- Throws:
SQLExceptionDbmsException
-
applyBlobParameter
public void applyBlobParameter(@NonNull PreparedStatement stmt, int column, @NonNull 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.
-