palio.connectors.schema.generators
Class MSSQL2kGenerator
java.lang.Object
palio.connectors.schema.generators.AbstractSQLGenerator
palio.connectors.schema.generators.MSSQL2kGenerator
public class MSSQL2kGenerator
- extends AbstractSQLGenerator
- 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)
MSSQL does not support only not null constraint change |
boolean |
areConstraintsViolateColumnDataTypeChange()
Note! |
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 |
MSSQL2kGenerator
public MSSQL2kGenerator()
areConstraintsViolateColumnDataTypeChange
public boolean areConstraintsViolateColumnDataTypeChange()
- Description copied from class:
AbstractSQLGenerator
- Note! Implementations should not create indexes for foreign keys as there are automatically created outside createTable routime.
- Overrides:
areConstraintsViolateColumnDataTypeChange
in class AbstractSQLGenerator
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)
- MSSQL does not support only not null constraint change
- 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