public class Db2SqlProcessorImpl extends SqlProcessorImpl
Modifier and Type | Field and Description |
---|---|
protected String |
currentDbSchema |
COLUMN_DEF, COLUMN_NAME, COLUMN_SIZE, DATA_TYPE, DECIMAL_DIGITS, INDEX_NON_UNIQUE, NULLABLE, REMARKS, TYPE_NAME
Constructor and Description |
---|
Db2SqlProcessorImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendComment(String comment,
StringBuffer ddlBuffer) |
protected void |
appendComment(String comment,
StringBuffer ddlBuffer,
List<String> list)
添加oracle的字段备注信息
|
protected void |
appendFooter(StringBuffer ddlBuffer,
Table table,
List<String> list) |
protected String |
appendIncrease() |
protected void |
appendIndexReverse(StringBuffer ddlBuffer,
Index index) |
protected boolean |
checkCommentSame(String standardComment,
String remarks)
oracle注释在foot上
不需要在字段中体现变化
|
protected boolean |
checkIndexBaseSame(Index tableIndex,
Map<String,String> dbIndexMap,
Connection con)
index基本信息是否一致
|
protected boolean |
checkTypeSame(String dbColumnType,
String tableDataType,
String dbDataType)
检查数据类型是否相同
|
protected String |
createAlterTypeSql(String tableName,
String fieldName,
String tableDataType) |
protected void |
dealDefaultValueUpdate(StringBuffer alterTypeBuffer,
String fieldDefaultValue,
String columnDef) |
protected void |
dealNotNullSql(StringBuffer alterTypeBuffer,
TableField field,
boolean dbNullAble) |
protected String |
dealTableName(String tableName) |
protected void |
getChangedFooterComment(Connection connection,
Table table,
List<String> list) |
List<String> |
getClearTableSql(Table table,
Connection connection) |
protected String |
getDatabaseType() |
protected String |
getDropIndexBaseSql(String dropIndexName,
String tableName) |
protected String |
getSchema(String schema,
Connection connection) |
protected String |
getSchema(Table table,
DatabaseMetaData metadata) |
static TableSqlProcessor |
getTableSqlProcessor() |
appendBody, appendColumnUpdate, appendDefaultValue, appendField, appendFooterComment, appendPrimarySql, appendTableSpace, appendTypeAndDefault, char2DbLen, checkDefSame, checkTableColumn, checkTableExist, checkUniqueSame, dealAddFields, dealConstraintIndex, dealDateType, dealDropFields, dealExistFields, defaultChangedFooterComment, delimiter, getColumns, getComment, getCreateSql, getDbColumnColumnDef, getDbColumnRemarks, getDbColumnType, getDbForeignList, getDbIndexColumns, getDefaultValue, getDropForeignSql, getDropSql, getFieldStdFieldName, getForeignKeySqls, getForeignKeySqls, getForeignUpdate, getIndexCreateSql, getIndexName, getIndexUpdate, getKeysBuffer, getOneFkSql, getOtherUpdate, getQueryForeignSql, getQuerySchemaName, getSeqTriggerSql, getSeqTriggerUpdate, getTableColumnUpdate, getTableCreateSql, getTableName, getTableProcessor, getUpdateSql, initChar2Byte, notNeedDropIndex, setTableProcessor
protected String currentDbSchema
public static TableSqlProcessor getTableSqlProcessor()
protected String getDatabaseType()
getDatabaseType
in class SqlProcessorImpl
protected String appendIncrease()
appendIncrease
in class SqlProcessorImpl
protected String createAlterTypeSql(String tableName, String fieldName, String tableDataType)
createAlterTypeSql
in class SqlProcessorImpl
protected String getSchema(String schema, Connection connection) throws SQLException
getSchema
in class SqlProcessorImpl
SQLException
protected void getChangedFooterComment(Connection connection, Table table, List<String> list) throws SQLException
getChangedFooterComment
in class SqlProcessorImpl
SQLException
protected String dealTableName(String tableName)
dealTableName
in class SqlProcessorImpl
protected boolean checkTypeSame(String dbColumnType, String tableDataType, String dbDataType)
checkTypeSame
in class SqlProcessorImpl
dbColumnType
- tableDataType
- protected String getSchema(Table table, DatabaseMetaData metadata) throws SQLException
getSchema
in class SqlProcessorImpl
SQLException
protected void appendComment(String comment, StringBuffer ddlBuffer)
protected void appendFooter(StringBuffer ddlBuffer, Table table, List<String> list)
appendFooter
in class SqlProcessorImpl
protected void appendComment(String comment, StringBuffer ddlBuffer, List<String> list)
appendComment
in class SqlProcessorImpl
comment
- ddlBuffer
- list
- protected boolean checkCommentSame(String standardComment, String remarks)
checkCommentSame
in class SqlProcessorImpl
standardComment
- remarks
- protected String getDropIndexBaseSql(String dropIndexName, String tableName)
getDropIndexBaseSql
in class SqlProcessorImpl
public List<String> getClearTableSql(Table table, Connection connection) throws SQLException
getClearTableSql
in interface TableSqlProcessor
getClearTableSql
in class SqlProcessorImpl
SQLException
protected void dealDefaultValueUpdate(StringBuffer alterTypeBuffer, String fieldDefaultValue, String columnDef)
dealDefaultValueUpdate
in class SqlProcessorImpl
protected void dealNotNullSql(StringBuffer alterTypeBuffer, TableField field, boolean dbNullAble)
dealNotNullSql
in class SqlProcessorImpl
protected boolean checkIndexBaseSame(Index tableIndex, Map<String,String> dbIndexMap, Connection con)
SqlProcessorImpl
checkIndexBaseSame
in class SqlProcessorImpl
protected void appendIndexReverse(StringBuffer ddlBuffer, Index index)
appendIndexReverse
in class SqlProcessorImpl
Copyright © 2006–2018 TinyGroup. All rights reserved.