public class OracleSqlProcessorImpl extends SqlProcessorImpl
Modifier and Type | Field and Description |
---|---|
protected String |
currentDbSchema |
protected static String |
FORMAT_FUNCTION_STR |
COLUMN_DEF, COLUMN_NAME, COLUMN_SIZE, DATA_TYPE, DECIMAL_DIGITS, INDEX_NON_UNIQUE, NULLABLE, REMARKS, TYPE_NAME
Constructor and Description |
---|
OracleSqlProcessorImpl() |
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 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 String |
dealDateType(String value)
处理日期类型
因为初始化数据是字符串类型,而实际是date类型,有些数据库需要进行转换。
|
protected void |
dealDefaultValueUpdate(StringBuffer alterTypeBuffer,
String fieldDefaultValue,
String columnDef) |
protected void |
dealNotNullSql(StringBuffer alterTypeBuffer,
TableField field,
boolean dbNullAble) |
protected void |
getChangedFooterComment(Connection connection,
Table table,
List<String> list) |
List<String> |
getClearTableSql(Table table,
Connection connection) |
protected String |
getDatabaseType() |
protected String |
getDropForeignSql(String dropConstraint,
Table table) |
protected String |
getDropIndexBaseSql(String dropIndexName,
String tableName) |
protected String |
getQueryForeignSql(Table table,
String schema) |
protected String |
getSchema(String schema,
Connection connection) |
protected List<String> |
getSeqTriggerSql(Table table,
String packageName)
创建seq和trigger语句
|
protected void |
getSeqTriggerUpdate(Connection connection,
Table table,
List<String> list) |
static TableSqlProcessor |
getTableSqlProcessor() |
appendBody, appendColumnUpdate, appendDefaultValue, appendField, appendFooterComment, appendIncrease, appendPrimarySql, appendTableSpace, appendTypeAndDefault, char2DbLen, checkDefSame, checkTableColumn, checkTableExist, checkUniqueSame, dealAddFields, dealConstraintIndex, dealDropFields, dealExistFields, dealTableName, defaultChangedFooterComment, delimiter, getColumns, getComment, getCreateSql, getDbColumnColumnDef, getDbColumnRemarks, getDbColumnType, getDbForeignList, getDbIndexColumns, getDefaultValue, getDropSql, getFieldStdFieldName, getForeignKeySqls, getForeignKeySqls, getForeignUpdate, getIndexCreateSql, getIndexName, getIndexUpdate, getKeysBuffer, getOneFkSql, getOtherUpdate, getQuerySchemaName, getSchema, getTableColumnUpdate, getTableCreateSql, getTableName, getTableProcessor, getUpdateSql, initChar2Byte, notNeedDropIndex, setTableProcessor
protected static final String FORMAT_FUNCTION_STR
protected String currentDbSchema
public static TableSqlProcessor getTableSqlProcessor()
protected String getDatabaseType()
getDatabaseType
in class SqlProcessorImpl
protected String getQueryForeignSql(Table table, String schema)
getQueryForeignSql
in class SqlProcessorImpl
protected String createAlterTypeSql(String tableName, String fieldName, String tableDataType)
createAlterTypeSql
in class SqlProcessorImpl
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 boolean checkTypeSame(String dbColumnType, String tableDataType, String dbDataType)
SqlProcessorImpl
checkTypeSame
in class SqlProcessorImpl
dbColumnType
- tableDataType
- protected String getSchema(String schema, Connection connection) throws SQLException
getSchema
in class SqlProcessorImpl
SQLException
protected List<String> getSeqTriggerSql(Table table, String packageName)
SqlProcessorImpl
getSeqTriggerSql
in class SqlProcessorImpl
protected void getChangedFooterComment(Connection connection, Table table, List<String> list) throws SQLException
getChangedFooterComment
in class SqlProcessorImpl
SQLException
protected void getSeqTriggerUpdate(Connection connection, Table table, List<String> list) throws SQLException
getSeqTriggerUpdate
in class SqlProcessorImpl
SQLException
protected String getDropForeignSql(String dropConstraint, Table table)
getDropForeignSql
in class SqlProcessorImpl
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
protected String dealDateType(String value)
SqlProcessorImpl
dealDateType
in class SqlProcessorImpl
Copyright © 2006–2018 TinyGroup. All rights reserved.