public final class FirebirdAdaptor extends DBAdaptor
| Constructor and Description |
|---|
FirebirdAdaptor(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.
|
PreparedStatement |
deleteRecordSetStatement(Connection conn,
TableElement t,
String where)
Creates a PreparedStatement object for a DELETE statement for deleting a set of records that
satisfy a condition.
|
void |
dropSequence(Connection conn,
SequenceElement s)
Drops sequence from the database.
|
DbColumnInfo |
getColumnInfo(Connection conn,
Column<?> c)
Returns information on a column.
|
Set<String> |
getColumns(Connection conn,
TableElement t)
Returns a set of column names for a specific table.
|
int |
getCurrentIdent(Connection conn,
BasicTable t)
Returns current identity value for the table.
|
int |
getDBPid(Connection conn)
Returns process id of current database connection.
|
PreparedStatement |
getDeleteRecordStatement(Connection conn,
TableElement t,
String where)
Creates a PreparedStatement object for a DELETE statement for deleting a set of records that
satisfy a condition.
|
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 whereForOtherTable) |
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.
|
PreparedStatement |
getNavigationStatement(Connection conn,
FromClause from,
String orderBy,
String navigationWhereClause,
Set<String> fields,
long offset)
Returns navigable PreparedStatement by a filtered set of records.
|
PreparedStatement |
getOneFieldStatement(Connection conn,
Column<?> c,
String where)
Creates a PreparedStatement object for a SELECT statement of a single column containing
at most one record.
|
PreparedStatement |
getOneRecordStatement(Connection conn,
TableElement t,
String where,
Set<String> fields)
Creates a PreparedStatement object for a SELECT statement containing at most one record.
|
List<String> |
getParameterizedViewList(Connection conn,
Grain g)
Get names of existing parameterized views.
|
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.
|
List<String> |
getViewList(Connection conn,
Grain g)
Returns list of view names in the grain.
|
long |
nextSequenceValue(Connection conn,
SequenceElement s)
Retrieves next value from the sequence.
|
boolean |
nullsFirst()
Does RDBMS sort nulls first?
|
String |
pkConstraintString(TableElement tableElement)
Returns DB specific PK constraint name for a table element.
|
ZonedDateTime |
prepareZonedDateTimeForParameterSetter(Connection conn,
ZonedDateTime z) |
static String |
sequenceCurValueProcString(String schemaName,
String sequenceName) |
boolean |
sequenceExists(Connection conn,
String schema,
String name)
Checks if sequence exists in the DB.
|
static String |
sequenceNextValueProcString(String schemaName,
String sequenceName) |
String |
sequenceString(String schemaName,
String sequenceName)
Returns template by sequence name.
|
boolean |
tableExists(Connection conn,
String schema,
String name)
Checks if table exists in the DB.
|
String |
tableString(String schemaName,
String tableName)
Returns template by table name.
|
boolean |
triggerExists(Connection conn,
TriggerQuery query)
Checks if trigger exists in the DB.
|
alterSequence, compareStrings, createColumn, createFK, createIndex, createParameterizedView, createPK, createSchemaIfNotExists, createSequence, createTable, createTableTriggersForMaterializedViews, createView, dropFK, dropIndex, dropParameterizedView, dropPk, dropTable, dropTableTriggersForMaterializedViews, dropTrigger, dropView, executeNative, getCallFunctionSql, getRecordSetStatement, getSetCountStatement, getTriggerBody, getUpdateRecordStatement, getViewSQLGenerator, initDataForMaterializedView, isValidConnection, selectStaticStrings, supportsCortegeComparing, translateDate, updateColumn, updateVersioningTrigger, userTablesExistpublic FirebirdAdaptor(ConnectionPool connectionPool, DdlConsumer ddlConsumer)
public PreparedStatement getNavigationStatement(Connection conn, FromClause from, String orderBy, String navigationWhereClause, Set<String> fields, long offset)
DBAdaptorgetNavigationStatement in class DBAdaptorconn - Connectionfrom - From clauseorderBy - Sorting order (ascending or descending)navigationWhereClause - Navigable set condition (from current record)fields - Fields of selectionoffset - First record offsetpublic boolean tableExists(Connection conn, String schema, String name)
DBAdaptortableExists in class DBAdaptorconn - DB connectionschema - schema namename - table namepublic boolean triggerExists(Connection conn, TriggerQuery query) throws SQLException
DBAdaptortriggerExists in class DBAdaptorconn - DB connection.query - trigger query parametersSQLException - thrown if resulting query failspublic Set<String> getColumns(Connection conn, TableElement t)
DBAdaptorgetColumns in class DBAdaptorconn - DB connectiont - Table to look the columns in.public PreparedStatement getOneRecordStatement(Connection conn, TableElement t, String where, Set<String> fields)
DBAdaptorgetOneRecordStatement in class DBAdaptorconn - DB connectiont - tablewhere - WHERE conditionfields - fields of selectionpublic PreparedStatement getOneFieldStatement(Connection conn, Column<?> c, String where)
DBAdaptorgetOneFieldStatement in class DBAdaptorconn - DB connectionc - column to selectwhere - WHERE conditionpublic PreparedStatement deleteRecordSetStatement(Connection conn, TableElement t, String where)
DBAdaptordeleteRecordSetStatement in class DBAdaptorconn - DB connectiont - tablewhere - conditionpublic 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 int getCurrentIdent(Connection conn, BasicTable t)
DBAdaptorgetCurrentIdent in class DBAdaptorconn - DB connectiont - tablepublic PreparedStatement getDeleteRecordStatement(Connection conn, TableElement t, String where)
DBAdaptorgetDeleteRecordStatement in class DBAdaptorconn - DB connectiont - tablewhere - condition (can be null)public DbColumnInfo getColumnInfo(Connection conn, Column<?> c)
DBAdaptorgetColumnInfo in class DBAdaptorconn - DB connectionc - columnpublic 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 List<String> getParameterizedViewList(Connection conn, Grain g)
DBAdaptorgetParameterizedViewList in class DBAdaptorconn - connectiong - current grainpublic int getDBPid(Connection conn)
DBAdaptorpublic DBType getType()
DBAdaptorpublic long nextSequenceValue(Connection conn, SequenceElement s)
DBAdaptornextSequenceValue in class DBAdaptorconn - DB connections - sequencepublic ZonedDateTime prepareZonedDateTimeForParameterSetter(Connection conn, ZonedDateTime z)
prepareZonedDateTimeForParameterSetter in interface QueryBuildingHelperprepareZonedDateTimeForParameterSetter in class DBAdaptorpublic void dropSequence(Connection conn, SequenceElement s)
DBAdaptordropSequence in class DBAdaptorconn - DB connections - sequence elementpublic static String sequenceCurValueProcString(String schemaName, String sequenceName)
public static String sequenceNextValueProcString(String schemaName, String sequenceName)
public boolean sequenceExists(Connection conn, String schema, String name)
DBAdaptorsequenceExists in class DBAdaptorconn - DB connectionschema - schema namename - sequence namepublic DbSequenceInfo getSequenceInfo(Connection conn, SequenceElement s)
DBAdaptorgetSequenceInfo in class DBAdaptorconn - DB connections - sequencepublic boolean nullsFirst()
QueryBuildingHelperpublic String getInFilterClause(DataGrainElement dge, DataGrainElement otherDge, List<String> fields, List<String> otherFields, String whereForOtherTable)
public void createSysObjects(Connection conn, String sysSchemaName)
DBAdaptorcreateSysObjects in class DBAdaptorconn - DB connectionsysSchemaName - system schema namepublic List<String> getViewList(Connection conn, Grain g)
DBAdaptorgetViewList in class DBAdaptorconn - DB connectiong - Grain for which the list of view names have to be returned.public String tableString(String schemaName, String tableName)
DBAdaptortableString in class DBAdaptorschemaName - schema nametableName - table namepublic String pkConstraintString(TableElement tableElement)
DBAdaptorpkConstraintString in class DBAdaptortableElement - table elementCopyright © 2023 CURS. All rights reserved.