public class SelectParser extends Object implements SQLParser<SelectStatement,SelectStatementBuilder>
Database Select statement parser. This component can provide the resolution of the Select statement, and provide the resolution and if to the outside world.
| 限定符 | 构造器和说明 |
|---|---|
protected |
SelectParser() |
| 限定符和类型 | 方法和说明 |
|---|---|
static SelectParser |
getInstance()
获取到全局唯一的解析器对象,通过该函数,可以从管理者中获取到该解析器对象,如果管理者中不存在,该函数会在管理者中注册一个新组件。
|
String |
getName() |
SelectStatement |
parseSql(String sql)
开始解析一个sql语句
|
SelectStatement |
parseSqlByWord(SelectStatementBuilder selectStatementBuilder,
int startIndex,
String sql,
String sqlWord)
解析一个sql语句中的指定sql解析词相关的子sql语句
|
public static SelectParser 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<SelectStatement,SelectStatementBuilder>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 SelectStatement parseSql(String sql)
parseSql 在接口中 SQLParser<SelectStatement,SelectStatementBuilder>sql - 需要被解析的sql语句public SelectStatement parseSqlByWord(SelectStatementBuilder selectStatementBuilder, int startIndex, String sql, String sqlWord)
parseSqlByWord 在接口中 SQLParser<SelectStatement,SelectStatementBuilder>selectStatementBuilder - 正在被构建的sql语句对象建造者类startIndex - 解析的sql命令的起始索引位置,该数值会作为解析的起始位置sql - 完整的sql语句sqlWord - 需要被解析的sql解析词Copyright © 2023. All rights reserved.