public class InsertParser extends Object implements SQLParser<InsertStatement,InsertStatementBuilder>
The SQL statement parser of the Insert, which contains the logic for parsing the insert statement. After parsing, it will return the parsing result object of the insert.
| 限定符和类型 | 字段和说明 |
|---|---|
protected static Pattern |
INSERT_PATTERN
其中第一个括号匹配的是表名称,第二个括号匹配的是表字段,第三个括号匹配的是插入模式value或values,第四个括号匹配的是插入的数据
|
| 构造器和说明 |
|---|
InsertParser() |
| 限定符和类型 | 方法和说明 |
|---|---|
static InsertParser |
getInstance()
获取到全局唯一的解析器对象,通过该函数,可以从管理者中获取到该解析器对象,如果管理者中不存在,该函数会在管理者中注册一个新组件。
|
String |
getName() |
InsertStatement |
parseSql(String sql)
开始解析一个sql语句
|
InsertStatement |
parseSqlByWord(InsertStatementBuilder insertStatementBuilder,
int startIndex,
String sql,
String sqlWord)
解析一个sql语句中的指定sql解析词相关的子sql语句
|
protected static final Pattern INSERT_PATTERN
public static InsertParser getInstance()
Get the globally unique parser object. With this function, you can get the parser object from the manager. If the manager does not exist, this function will register a new component in the manager.
public String getName()
getName 在接口中 SQLParser<InsertStatement,InsertStatementBuilder>Get the name of the parser, which is also used for the registration of the component in the manager, so you can also get the component object through the manager
public InsertStatement parseSql(String sql)
parseSql 在接口中 SQLParser<InsertStatement,InsertStatementBuilder>sql - 需要被解析的sql语句public InsertStatement parseSqlByWord(InsertStatementBuilder insertStatementBuilder, int startIndex, String sql, String sqlWord)
parseSqlByWord 在接口中 SQLParser<InsertStatement,InsertStatementBuilder>insertStatementBuilder - 累计的sql语句结果的建造类startIndex - 解析词开始出现的索引位置sql - 完整的sql语句sqlWord - 需要被解析的sql解析词Copyright © 2022. All rights reserved.