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, setTableProcessorprotected static final String FORMAT_FUNCTION_STR
protected String currentDbSchema
public static TableSqlProcessor getTableSqlProcessor()
protected String getDatabaseType()
getDatabaseType in class SqlProcessorImplprotected String getQueryForeignSql(Table table, String schema)
getQueryForeignSql in class SqlProcessorImplprotected String createAlterTypeSql(String tableName, String fieldName, String tableDataType)
createAlterTypeSql in class SqlProcessorImplprotected void appendComment(String comment, StringBuffer ddlBuffer)
protected void appendFooter(StringBuffer ddlBuffer, Table table, List<String> list)
appendFooter in class SqlProcessorImplprotected void appendComment(String comment, StringBuffer ddlBuffer, List<String> list)
appendComment in class SqlProcessorImplcomment - ddlBuffer - list - protected boolean checkCommentSame(String standardComment, String remarks)
checkCommentSame in class SqlProcessorImplstandardComment - remarks - protected boolean checkTypeSame(String dbColumnType, String tableDataType, String dbDataType)
SqlProcessorImplcheckTypeSame in class SqlProcessorImpldbColumnType - tableDataType - protected String getSchema(String schema, Connection connection) throws SQLException
getSchema in class SqlProcessorImplSQLExceptionprotected List<String> getSeqTriggerSql(Table table, String packageName)
SqlProcessorImplgetSeqTriggerSql in class SqlProcessorImplprotected void getChangedFooterComment(Connection connection, Table table, List<String> list) throws SQLException
getChangedFooterComment in class SqlProcessorImplSQLExceptionprotected void getSeqTriggerUpdate(Connection connection, Table table, List<String> list) throws SQLException
getSeqTriggerUpdate in class SqlProcessorImplSQLExceptionprotected String getDropForeignSql(String dropConstraint, Table table)
getDropForeignSql in class SqlProcessorImplprotected String getDropIndexBaseSql(String dropIndexName, String tableName)
getDropIndexBaseSql in class SqlProcessorImplpublic List<String> getClearTableSql(Table table, Connection connection) throws SQLException
getClearTableSql in interface TableSqlProcessorgetClearTableSql in class SqlProcessorImplSQLExceptionprotected void dealDefaultValueUpdate(StringBuffer alterTypeBuffer, String fieldDefaultValue, String columnDef)
dealDefaultValueUpdate in class SqlProcessorImplprotected void dealNotNullSql(StringBuffer alterTypeBuffer, TableField field, boolean dbNullAble)
dealNotNullSql in class SqlProcessorImplprotected boolean checkIndexBaseSame(Index tableIndex, Map<String,String> dbIndexMap, Connection con)
SqlProcessorImplcheckIndexBaseSame in class SqlProcessorImplprotected void appendIndexReverse(StringBuffer ddlBuffer, Index index)
appendIndexReverse in class SqlProcessorImplprotected String dealDateType(String value)
SqlProcessorImpldealDateType in class SqlProcessorImplCopyright © 2006–2018 TinyGroup. All rights reserved.