Class DdlAdaptor
java.lang.Object
ru.curs.celesta.dbutils.adaptors.ddl.DdlAdaptor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidalterSequence(Connection conn, SequenceElement s) Alters sequence in the database.voidcreateColumn(Connection conn, Column<?> c) Adds a new column to the table.voidcreateFk(Connection conn, ForeignKey fk) Creates foreign key in the DB.voidcreateIndex(Connection conn, Index index) Creates a table index in the grain.voidvoidcreatePk(Connection conn, TableElement t) Creates primary key in the table according to meta description.voidcreateSchema(Connection conn, String name) Creates DB schema.voidcreateSequence(Connection conn, SequenceElement s) Creates a sequence in the database.voidcreateTable(Connection conn, TableElement te) Creates a table "from scratch" in the database.voidvoidcreateView(Connection conn, View v) Creates a view in the database from metadata.voiddropFK(Connection conn, String schemaName, String tableName, String fkName) Drops foreign key of table in a scheme.voiddropIndex(Connection conn, Grain g, DbIndexInfo dBIndexInfo) Drops index of a grain.voiddropParameterizedView(Connection conn, String schemaName, String viewName) voiddropPk(Connection conn, TableElement t, String pkName) Drops primary key from the table by using known name of the primary key.voiddropTable(Connection conn, TableElement t) Deletes table from RDBMS.voidvoiddropTrigger(Connection conn, TriggerQuery query) Drops a trigger from DB.voiddropView(Connection conn, String schemaName, String viewName) Drops view from a DB schema.voidexecuteNative(Connection conn, String sql) Executes native SQL query.voidvoidupdateColumn(Connection conn, Column<?> c, DbColumnInfo actual) Updates a table column.void
-
Constructor Details
-
DdlAdaptor
-
-
Method Details
-
createSchema
Creates DB schema.- Parameters:
conn- DB connectionname- schema name
-
dropView
Drops view from a DB schema.- Parameters:
conn- DB connectionschemaName- schema nameviewName- view name
-
dropParameterizedView
-
dropIndex
Drops index of a grain.- Parameters:
conn- DB connectiong- graindBIndexInfo- index information
-
dropFK
Drops foreign key of table in a scheme.- Parameters:
conn- DB connectionschemaName- grain nametableName- table name for column(s) of which FK is declaredfkName- name of foreign key
-
dropTrigger
Drops a trigger from DB.- Parameters:
conn- Connectionquery- Trigger query
-
createSequence
Creates a sequence in the database.- Parameters:
conn- DB connections- sequence element
-
alterSequence
Alters sequence in the database.- Parameters:
conn- DB connections- sequence element
-
createTable
Creates a table "from scratch" in the database.- Parameters:
conn- Connectionte- Table for creation (accepts also table in case if such table exists)
-
updateVersioningTrigger
-
dropPk
Drops primary key from the table by using known name of the primary key.- Parameters:
conn- DB connectiont- tablepkName- primary key name
-
updateColumn
Updates a table column.- Parameters:
conn- DB connectionc- Column to updateactual- Actual column info
-
createColumn
Adds a new column to the table.- Parameters:
conn- DB connectionc- column
-
createPk
Creates primary key in the table according to meta description.- Parameters:
conn- database connectiont- table
-
createIndex
Creates a table index in the grain.- Parameters:
conn- DB connectionindex- index description
-
createFk
Creates foreign key in the DB.- Parameters:
conn- DB connectionfk- foreign key from score
-
createView
Creates a view in the database from metadata.- Parameters:
conn- DB connectionv- View from score
-
getViewSQLGenerator
-
createParameterizedView
-
dropTable
Deletes table from RDBMS.- Parameters:
conn- Connection to use.t- TableElement metadata of deletable table provided by Celesta.
-
initDataForMaterializedView
-
dropTableTriggersForMaterializedViews
-
createTableTriggersForMaterializedViews
-
executeNative
Executes native SQL query.- Parameters:
conn- DB connectionsql- SQL to execute
-