public class AlterStatement extends Statement
SQL statement object, which contains parameter information about the "create" statement in SQL.
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
ADD_INFO_WORD |
static int |
ADD_WORD |
static int |
ALTER_MOD_WORD |
static int |
ALTER_WORD |
static int |
CHANGE_WORD |
static int |
DROP_WORD |
static int |
FIELD_WORD |
static short |
hashNum |
static int |
INDEX_WORD |
static int |
PRIMARY_WORD |
static int |
RENAME_WORD |
static int |
TABLE_WORD |
static int |
UNIQUE_WORD |
COMMA_PATTERN, fieldNames, SPACE_PATTERN, tableName| 构造器和说明 |
|---|
AlterStatement(String tableName,
String fieldStr,
String mod,
String alterStr,
String addStr,
String indexName,
String addINFO,
String dropStr,
String renameStr,
String changeStr,
String sql) |
| 限定符和类型 | 方法和说明 |
|---|---|
static AlterStatementBuilder |
builder()
开始构建语句类对象,调用该方法也就意味着开始该类的建造,会返回对应的建造者对象。
|
String |
getSqlStr() |
String[] |
getStatementArrayByWord(String sqlWord)
按照SQL解析词获取到目标解析词下的sql语句
|
String |
getStatementStrByWord(String sqlWord)
按照SQL解析词获取到目标解析词下的sql语句
|
protected int |
getWordNum(String sqlWord)
获取到解析词在sql语句中的编号数值,用于将解析词按照hash与阈值一起映射成为数值后,再进行解析词的匹配,这样的匹配性能会优秀很多,其中的编号数值阈值默认为当前语句对象的hashNum。
|
getFieldNames, getTableName, getWordNumpublic static final short hashNum
public static final int ALTER_WORD
public static final int ALTER_MOD_WORD
public static final int ADD_INFO_WORD
public static final int TABLE_WORD
public static final int ADD_WORD
public static final int DROP_WORD
public static final int RENAME_WORD
public static final int CHANGE_WORD
public static final int INDEX_WORD
public static final int PRIMARY_WORD
public static final int UNIQUE_WORD
public static final int FIELD_WORD
public static AlterStatementBuilder builder()
Start building statement class objects. Calling this method means starting the construction of this class, and the corresponding constructor object will be returned.
Generally speaking, if you do not extend the parser, the method will be called by the parser and the construction result will be returned to you.
protected int getWordNum(String sqlWord)
Get the number value of the parsed word in the sql statement, which is used to map the parsed word into a number by hash and threshold value, and then match the parsed word. The matching performance will be much better. The number value threshold value is the hashNum of the current statement object by default.
getWordNum 在类中 StatementsqlWord - 需要被转换的sql词public String getStatementStrByWord(String sqlWord)
getStatementStrByWord 在类中 StatementsqlWord - 需要获取的sql语句所属的解析词public String[] getStatementArrayByWord(String sqlWord)
getStatementArrayByWord 在类中 StatementsqlWord - 需要获取的sql语句所属的解析词Copyright © 2022. All rights reserved.