| net.sourceforge.squirrel_sql.fw.dialects.DB2Dialect net.sourceforge.squirrel_sql.fw.dialects.DerbyDialect
Method Summary | |
public boolean | canPasteTo(IDatabaseObjectInfo info) | public String[] | getAddPrimaryKeySQL(String pkName, TableColumnInfo[] colInfos, ITableInfo ti) Returns the SQL that forms the command to add a primary key to the
specified table composed of the given column names. | public String[] | getColumnAddSQL(TableColumnInfo info) Returns the SQL statement to use to add a column to the specified table
using the information about the new column specified by info. | public String | getColumnCommentAlterSQL(TableColumnInfo info) Returns the SQL statement to use to add a comment to the specified
column of the specified table. | public String | getColumnDefaultAlterSQL(TableColumnInfo info) Returns the SQL command to change the specified column's default value
Parameters: info - the column to modify and it's default value. | public String | getColumnDropSQL(String tableName, String columnName) Returns the SQL that forms the command to drop the specified colum in the
specified table.
ALTER TABLE table-Name DROP [ COLUMN ] column-name [ CASCADE | RESTRICT ]
Parameters: tableName - the name of the table that has the column Parameters: columnName - the name of the column to drop. throws: UnsupportedOperationException - if the database doesn't support dropping columns. | public int | getColumnLength(int columnSize, int dataType) | public String | getColumnNameAlterSQL(TableColumnInfo from, TableColumnInfo to) Returns the SQL that is used to change the column name. | public String | getColumnNullableAlterSQL(TableColumnInfo info) | public List<String> | getColumnTypeAlterSQL(TableColumnInfo from, TableColumnInfo to) Returns the SQL that is used to change the column type.
ALTER [ COLUMN ] column-Name SET DATA TYPE VARCHAR(integer)
Note: Only allowed to increase size of existing varchar as long as it is
not a member of a PK that is a parent of a FK. | public String | getDisplayName() The string which identifies this dialect in the dialect chooser. | public String | getDropForeignKeySQL(String fkName, String tableName) Returns the SQL command to drop the specified table's foreign key
constraint. | public String | getDropPrimaryKeySQL(String pkName, String tableName) Returns the SQL command to drop the specified table's primary key. | public int | getMaxPrecision(int dataType) | public int | getMaxScale(int dataType) | public List<String> | getTableDropSQL(ITableInfo iTableInfo, boolean cascadeConstraints, boolean isMaterializedView) Returns the SQL that forms the command to drop the specified table. | public boolean | supportsAlterColumnDefault() Returns a boolean value indicating whether or not this database dialect
supports changing a column's default value. | public boolean | supportsAlterColumnNull() Returns a boolean value indicating whether or not this database dialect
supports changing a column from null to not-null and vice versa. | public boolean | supportsAlterColumnType() Returns a boolean value indicating whether or not this dialect supports
modifying a columns type. | public boolean | supportsColumnComment() Returns a boolean value indicating whether or not this dialect supports
adding comments to columns. | public boolean | supportsDropColumn() Returns a boolean value indicating whether or not this database dialect
supports dropping columns from tables. | public boolean | supportsProduct(String databaseProductName, String databaseProductVersion) Returns boolean value indicating whether or not this dialect supports the
specified database product/version. | public boolean | supportsRenameColumn() Returns a boolean value indicating whether or not this database dialect
supports renaming columns. | public boolean | supportsSchemasInTableDefinition() |
DerbyDialect | public DerbyDialect()(Code) | | |
getAddPrimaryKeySQL | public String[] getAddPrimaryKeySQL(String pkName, TableColumnInfo[] colInfos, ITableInfo ti)(Code) | | Returns the SQL that forms the command to add a primary key to the
specified table composed of the given column names.
Parameters: pkName - the name of the constraint Parameters: columnInfos - the columns that form the key |
getColumnAddSQL | public String[] getColumnAddSQL(TableColumnInfo info) throws UnsupportedOperationException(Code) | | Returns the SQL statement to use to add a column to the specified table
using the information about the new column specified by info.
Parameters: info - information about the new column such as type, name, etc. throws: UnsupportedOperationException - if the database doesn't support adding columns after a table has already been created. |
getColumnDefaultAlterSQL | public String getColumnDefaultAlterSQL(TableColumnInfo info)(Code) | | Returns the SQL command to change the specified column's default value
Parameters: info - the column to modify and it's default value. SQL to make the change |
getColumnDropSQL | public String getColumnDropSQL(String tableName, String columnName)(Code) | | Returns the SQL that forms the command to drop the specified colum in the
specified table.
ALTER TABLE table-Name DROP [ COLUMN ] column-name [ CASCADE | RESTRICT ]
Parameters: tableName - the name of the table that has the column Parameters: columnName - the name of the column to drop. throws: UnsupportedOperationException - if the database doesn't support dropping columns. |
getColumnLength | public int getColumnLength(int columnSize, int dataType)(Code) | | |
getColumnNameAlterSQL | public String getColumnNameAlterSQL(TableColumnInfo from, TableColumnInfo to)(Code) | | Returns the SQL that is used to change the column name.
RENAME COLUMN table-Name.simple-Column-Name TO simple-Column-Name
Parameters: from - the TableColumnInfo as it is Parameters: to - the TableColumnInfo as it wants to be the SQL to make the change |
getColumnNullableAlterSQL | public String getColumnNullableAlterSQL(TableColumnInfo info)(Code) | | Returns the SQL used to alter the specified column to not allow null
values
ALTER TABLE table-Name ALTER [ COLUMN ] column-name [ NOT ] NULL
Parameters: info - the column to modify the SQL to execute |
getColumnTypeAlterSQL | public List<String> getColumnTypeAlterSQL(TableColumnInfo from, TableColumnInfo to) throws UnsupportedOperationException(Code) | | Returns the SQL that is used to change the column type.
ALTER [ COLUMN ] column-Name SET DATA TYPE VARCHAR(integer)
Note: Only allowed to increase size of existing varchar as long as it is
not a member of a PK that is a parent of a FK. Also not allowed to
change the type to anything else. Oh, and only during a full moon
while chanting - sheesh! I think I'll need a dozen or so methods
to describe all of those restrictions.
Parameters: from - the TableColumnInfo as it is Parameters: to - the TableColumnInfo as it wants to be the SQL to make the change |
getDisplayName | public String getDisplayName()(Code) | | The string which identifies this dialect in the dialect chooser.
a descriptive name that tells the user what database this dialectis design to work with. |
getDropForeignKeySQL | public String getDropForeignKeySQL(String fkName, String tableName)(Code) | | Returns the SQL command to drop the specified table's foreign key
constraint.
Parameters: fkName - the name of the foreign key that should be dropped Parameters: tableName - the name of the table whose foreign key should be dropped |
getDropPrimaryKeySQL | public String getDropPrimaryKeySQL(String pkName, String tableName)(Code) | | Returns the SQL command to drop the specified table's primary key.
Parameters: pkName - the name of the primary key that should be dropped Parameters: tableName - the name of the table whose primary key should be dropped |
getMaxPrecision | public int getMaxPrecision(int dataType)(Code) | | |
getMaxScale | public int getMaxScale(int dataType)(Code) | | |
getTableDropSQL | public List<String> getTableDropSQL(ITableInfo iTableInfo, boolean cascadeConstraints, boolean isMaterializedView)(Code) | | Returns the SQL that forms the command to drop the specified table. If
cascade contraints is supported by the dialect and cascadeConstraints is
true, then a drop statement with cascade constraints clause will be
formed.
Parameters: iTableInfo - the table to drop Parameters: cascadeConstraints - whether or not to drop any FKs that may reference the specified table. the drop SQL command. |
supportsAlterColumnDefault | public boolean supportsAlterColumnDefault()(Code) | | Returns a boolean value indicating whether or not this database dialect
supports changing a column's default value.
true if the database supports modifying column defaults; false otherwise |
supportsAlterColumnNull | public boolean supportsAlterColumnNull()(Code) | | Returns a boolean value indicating whether or not this database dialect
supports changing a column from null to not-null and vice versa.
true if the database supports dropping columns; false otherwise. |
supportsAlterColumnType | public boolean supportsAlterColumnType()(Code) | | Returns a boolean value indicating whether or not this dialect supports
modifying a columns type.
true if supported; false otherwise |
supportsColumnComment | public boolean supportsColumnComment()(Code) | | Returns a boolean value indicating whether or not this dialect supports
adding comments to columns.
true if column comments are supported; false otherwise. |
supportsDropColumn | public boolean supportsDropColumn()(Code) | | Returns a boolean value indicating whether or not this database dialect
supports dropping columns from tables.
true if the database supports dropping columns; false otherwise. |
supportsProduct | public boolean supportsProduct(String databaseProductName, String databaseProductVersion)(Code) | | Returns boolean value indicating whether or not this dialect supports the
specified database product/version.
Parameters: databaseProductName - the name of the database as reported by DatabaseMetaData.getDatabaseProductName() Parameters: databaseProductVersion - the version of the database as reported byDatabaseMetaData.getDatabaseProductVersion() true if this dialect can be used for the specified product nameand version; false otherwise. |
supportsRenameColumn | public boolean supportsRenameColumn()(Code) | | Returns a boolean value indicating whether or not this database dialect
supports renaming columns.
true if the database supports changing the name of columns; false otherwise. |
supportsSchemasInTableDefinition | public boolean supportsSchemasInTableDefinition()(Code) | | |
Methods inherited from net.sourceforge.squirrel_sql.fw.dialects.DB2Dialect | public boolean canPasteTo(IDatabaseObjectInfo info)(Code)(Java Doc) public String[] getAddPrimaryKeySQL(String pkName, TableColumnInfo[] columns, ITableInfo ti)(Code)(Java Doc) public String[] getColumnAddSQL(TableColumnInfo info) throws UnsupportedOperationException(Code)(Java Doc) public String getColumnCommentAlterSQL(String tableName, String columnName, String comment) throws UnsupportedOperationException(Code)(Java Doc) public String getColumnCommentAlterSQL(TableColumnInfo info) throws UnsupportedOperationException(Code)(Java Doc) public String getColumnDefaultAlterSQL(TableColumnInfo info)(Code)(Java Doc) public String getColumnDropSQL(String tableName, String columnName)(Code)(Java Doc) public int getColumnLength(int columnSize, int dataType)(Code)(Java Doc) public String getColumnNameAlterSQL(TableColumnInfo from, TableColumnInfo to)(Code)(Java Doc) public String getColumnNullableAlterSQL(TableColumnInfo info)(Code)(Java Doc) public List<String> getColumnTypeAlterSQL(TableColumnInfo from, TableColumnInfo to) throws UnsupportedOperationException(Code)(Java Doc) public List<String> getCreateTableSQL(List<ITableInfo> tables, ISQLDatabaseMetaData md, CreateScriptPreferences prefs, boolean isJdbcOdbc) throws SQLException(Code)(Java Doc) public String getDisplayName()(Code)(Java Doc) public String getDropForeignKeySQL(String fkName, String tableName)(Code)(Java Doc) public String getDropPrimaryKeySQL(String pkName, String tableName)(Code)(Java Doc) public String getLengthFunction(int dataType)(Code)(Java Doc) public String getMaxFunction()(Code)(Java Doc) public int getMaxPrecision(int dataType)(Code)(Java Doc) public int getMaxScale(int dataType)(Code)(Java Doc) public int getPrecisionDigits(int columnSize, int dataType)(Code)(Java Doc) public List<String> getTableDropSQL(ITableInfo iTableInfo, boolean cascadeConstraints, boolean isMaterializedView)(Code)(Java Doc) public boolean supportsAlterColumnDefault()(Code)(Java Doc) public boolean supportsAlterColumnNull()(Code)(Java Doc) public boolean supportsAlterColumnType()(Code)(Java Doc) public boolean supportsColumnComment()(Code)(Java Doc) public boolean supportsDropColumn()(Code)(Java Doc) public boolean supportsProduct(String databaseProductName, String databaseProductVersion)(Code)(Java Doc) public boolean supportsRenameColumn()(Code)(Java Doc) public boolean supportsSchemasInTableDefinition()(Code)(Java Doc)
|
|
|