public final class PostgresAdaptor extends OpenSourceDbAdaptor
| Constructor and Description |
|---|
PostgresAdaptor(ConnectionPool connectionPool,
DdlConsumer ddlConsumer) |
| Modifier and Type | Method and Description |
|---|---|
void |
createSysObjects(Connection conn,
String sysSchemaName)
Creates or recreates other system objects (stored procedures, functions)
needed for Celesta functioning on current RDBMS.
|
DbColumnInfo |
getColumnInfo(Connection conn,
Column<?> c)
Returns information on a column.
|
int |
getCurrentIdent(Connection conn,
BasicTable t)
Returns current identity value for the table.
|
int |
getDBPid(Connection conn)
Returns process id of current database connection.
|
List<DbFkInfo> |
getFKInfo(Connection conn,
Grain g)
Returns information on the foreign keys from grain.
|
Map<String,DbIndexInfo> |
getIndices(Connection conn,
Grain g)
Returns a set of indices referring to tables specified in the indicated grain.
|
String |
getInFilterClause(DataGrainElement dge,
DataGrainElement otherDge,
List<String> fields,
List<String> otherFields,
String otherWhere) |
PreparedStatement |
getInsertRecordStatement(Connection conn,
BasicTable t,
boolean[] nullsMask,
List<ParameterSetter> program)
Creates a PreparedStatement object for an INSERT statement to insert a record into a table.
|
List<String> |
getParameterizedViewList(Connection conn,
Grain g) |
DbPkInfo |
getPKInfo(Connection conn,
TableElement t)
Returns information on the primary key of a table.
|
DbSequenceInfo |
getSequenceInfo(Connection conn,
SequenceElement s)
Returns information on a sequence.
|
DBType |
getType()
Returns current database type.
|
ZonedDateTime |
prepareZonedDateTimeForParameterSetter(Connection conn,
ZonedDateTime z) |
boolean |
supportsCortegeComparing()
Whether DB supports cortege comparing.
|
boolean |
triggerExists(Connection conn,
TriggerQuery query)
Checks if trigger exists in the DB.
|
deleteRecordSetStatement, getColumns, getDeleteRecordStatement, getNavigationStatement, getOneFieldStatement, getOneRecordStatement, nextSequenceValue, nullsFirst, sequenceExists, tableExistsalterSequence, compareStrings, createColumn, createFK, createIndex, createParameterizedView, createPK, createSchemaIfNotExists, createSequence, createTable, createTableTriggersForMaterializedViews, createView, dropFK, dropIndex, dropParameterizedView, dropPk, dropSequence, dropTable, dropTableTriggersForMaterializedViews, dropTrigger, dropView, executeNative, getCallFunctionSql, getRecordSetStatement, getSetCountStatement, getTriggerBody, getUpdateRecordStatement, getViewList, getViewSQLGenerator, initDataForMaterializedView, isValidConnection, pkConstraintString, selectStaticStrings, sequenceString, tableString, translateDate, updateColumn, updateVersioningTrigger, userTablesExistpublic PostgresAdaptor(ConnectionPool connectionPool, DdlConsumer ddlConsumer)
public int getCurrentIdent(Connection conn, BasicTable t)
DBAdaptorgetCurrentIdent in class DBAdaptorconn - DB connectiont - tablepublic PreparedStatement getInsertRecordStatement(Connection conn, BasicTable t, boolean[] nullsMask, List<ParameterSetter> program)
DBAdaptorgetInsertRecordStatement in class DBAdaptorconn - DB connectiont - tablenullsMask - null-flags (if set the corresponding field at n-th position becomes null)program - collects parameters that can be set with the querypublic DbColumnInfo getColumnInfo(Connection conn, Column<?> c)
DBAdaptorgetColumnInfo in class DBAdaptorconn - DB connectionc - columnpublic String getInFilterClause(DataGrainElement dge, DataGrainElement otherDge, List<String> fields, List<String> otherFields, String otherWhere)
public List<String> getParameterizedViewList(Connection conn, Grain g)
getParameterizedViewList in class DBAdaptorpublic DbPkInfo getPKInfo(Connection conn, TableElement t)
DBAdaptorpublic List<DbFkInfo> getFKInfo(Connection conn, Grain g)
DBAdaptorpublic Map<String,DbIndexInfo> getIndices(Connection conn, Grain g)
DBAdaptorgetIndices in class DBAdaptorconn - DB connectiong - Grain the tables of which have to be traversed for the indices.public void createSysObjects(Connection conn, String sysSchemaName)
DBAdaptorcreateSysObjects in class DBAdaptorconn - DB connectionsysSchemaName - system schema namepublic boolean triggerExists(Connection conn, TriggerQuery query) throws SQLException
DBAdaptortriggerExists in class DBAdaptorconn - DB connection.query - trigger query parametersSQLException - thrown if resulting query failspublic int getDBPid(Connection conn)
DBAdaptorpublic ZonedDateTime prepareZonedDateTimeForParameterSetter(Connection conn, ZonedDateTime z)
prepareZonedDateTimeForParameterSetter in interface QueryBuildingHelperprepareZonedDateTimeForParameterSetter in class DBAdaptorpublic DBType getType()
DBAdaptorpublic boolean supportsCortegeComparing()
DBAdaptorsupportsCortegeComparing in interface QueryBuildingHelpersupportsCortegeComparing in class DBAdaptorpublic DbSequenceInfo getSequenceInfo(Connection conn, SequenceElement s)
DBAdaptorgetSequenceInfo in class DBAdaptorconn - DB connections - sequenceCopyright © 2020 CURS. All rights reserved.