palio.connectors.schema.generators
Class DeprecatedPostgreSQLGenerator
java.lang.Object
palio.connectors.schema.generators.AbstractSQLGenerator
palio.connectors.schema.generators.DeprecatedPostgreSQLGenerator
public class DeprecatedPostgreSQLGenerator
- extends AbstractSQLGenerator
This generator is used for PostgreSQL databases for series 7 or older.
- Author:
- Szymon Kuklewicz
Method Summary |
void |
alterTableAddColumn(SQLBatch sqls,
java.lang.String table,
java.lang.String column,
TableColumnDataType dataType,
java.lang.Object defaultValue,
boolean notNull)
|
void |
alterTableAddKey(SQLBatch sqls,
java.lang.String table,
ConstraintType constraintType,
java.lang.String constraintName,
java.lang.String columns,
java.lang.String additional)
|
void |
alterTableAlterColumn(SQLBatch sqls,
java.lang.String table,
java.lang.String column,
TableColumnDataType dataType,
java.lang.Object defaultValue,
boolean changeNotNull,
boolean shouldBeNotNull)
Parameter notNull may be null if state of "not null constraint" is not to be changed |
void |
alterTableDropKey(SQLBatch sqls,
java.lang.String table,
ConstraintType constraintType,
java.lang.String constraintName)
|
void |
alterTableSetNotNull(SQLBatch sqls,
java.lang.String table,
java.lang.String column,
TableColumnDataType currentDataType,
java.lang.Object currentDefaultValue,
boolean notNull)
Some databases require repeating of column data type where some don't so user should not expect that this operation may change column data type as well. |
void |
createSequence(SQLBatch sqls,
java.lang.String name)
|
void |
createTable(SQLBatch sqls,
Table table)
|
void |
dropSequence(SQLBatch sqls,
java.lang.String sequenceToDrop)
|
void |
dropTable(SQLBatch sqls,
java.lang.String tableToDrop)
|
DatabaseSchema |
scanDatabase(SQLConnector connector,
SQLScannerFilter filter)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DeprecatedPostgreSQLGenerator
public DeprecatedPostgreSQLGenerator(Instance instance)
createTable
public void createTable(SQLBatch sqls,
Table table)
- Specified by:
createTable
in class AbstractSQLGenerator
createSequence
public void createSequence(SQLBatch sqls,
java.lang.String name)
- Specified by:
createSequence
in class AbstractSQLGenerator
alterTableAddKey
public void alterTableAddKey(SQLBatch sqls,
java.lang.String table,
ConstraintType constraintType,
java.lang.String constraintName,
java.lang.String columns,
java.lang.String additional)
- Specified by:
alterTableAddKey
in class AbstractSQLGenerator
alterTableDropKey
public void alterTableDropKey(SQLBatch sqls,
java.lang.String table,
ConstraintType constraintType,
java.lang.String constraintName)
- Specified by:
alterTableDropKey
in class AbstractSQLGenerator
alterTableAddColumn
public void alterTableAddColumn(SQLBatch sqls,
java.lang.String table,
java.lang.String column,
TableColumnDataType dataType,
java.lang.Object defaultValue,
boolean notNull)
- Specified by:
alterTableAddColumn
in class AbstractSQLGenerator
alterTableAlterColumn
public void alterTableAlterColumn(SQLBatch sqls,
java.lang.String table,
java.lang.String column,
TableColumnDataType dataType,
java.lang.Object defaultValue,
boolean changeNotNull,
boolean shouldBeNotNull)
- Description copied from class:
AbstractSQLGenerator
- Parameter notNull may be null if state of "not null constraint" is not to be changed
- Specified by:
alterTableAlterColumn
in class AbstractSQLGenerator
alterTableSetNotNull
public void alterTableSetNotNull(SQLBatch sqls,
java.lang.String table,
java.lang.String column,
TableColumnDataType currentDataType,
java.lang.Object currentDefaultValue,
boolean notNull)
- Description copied from class:
AbstractSQLGenerator
- Some databases require repeating of column data type where some don't so user should not expect that this operation may change column data type as well.
- Specified by:
alterTableSetNotNull
in class AbstractSQLGenerator
dropSequence
public void dropSequence(SQLBatch sqls,
java.lang.String sequenceToDrop)
- Specified by:
dropSequence
in class AbstractSQLGenerator
dropTable
public void dropTable(SQLBatch sqls,
java.lang.String tableToDrop)
- Specified by:
dropTable
in class AbstractSQLGenerator
scanDatabase
public DatabaseSchema scanDatabase(SQLConnector connector,
SQLScannerFilter filter)
throws palio.PalioException
- Overrides:
scanDatabase
in class AbstractSQLGenerator
- Throws:
palio.PalioException