public class SQLStatementParser extends SQLParser
| 限定符和类型 | 字段和说明 |
|---|---|
protected SQLExprParser |
exprParser |
protected InsertColumnsCache |
insertColumnsCache |
protected boolean |
parseCompleteValues |
protected int |
parseValuesSize |
protected SQLSelectListCache |
selectListCache |
| 限定符 | 构造器和说明 |
|---|---|
protected |
SQLStatementParser(Lexer lexer,
String dbType) |
|
SQLStatementParser(SQLExprParser exprParser) |
|
SQLStatementParser(String sql) |
|
SQLStatementParser(String sql,
String dbType) |
accept, acceptIdentifier, acceptInteger, alias, as, config, getDbType, getLexer, identifierEquals, isEnabled, match, newCreateStatement, printError, setErrorEndPos, tableAlias, tableAliasprotected SQLExprParser exprParser
protected boolean parseCompleteValues
protected int parseValuesSize
protected SQLSelectListCache selectListCache
protected InsertColumnsCache insertColumnsCache
public SQLStatementParser(String sql)
public SQLStatementParser(SQLExprParser exprParser)
public boolean isKeepComments()
public void setKeepComments(boolean keepComments)
public SQLExprParser getExprParser()
public List<SQLStatement> parseStatementList()
public List<SQLStatement> parseStatementList(SQLObject parent)
public void parseStatementList(List<SQLStatement> statementList)
public void parseStatementList(List<SQLStatement> statementList, int max)
public void parseStatementList(List<SQLStatement> statementList, int max, SQLObject parent)
public SQLStatement parseDump()
public SQLStatement parseDrop()
protected SQLStatement parseDropServer()
protected SQLStatement parseDropLogFileGroup()
protected SQLStatement parseDropEvent()
protected SQLStatement parseAlterFunction()
public SQLStatement parseKill()
public SQLStatement parseCase()
public SQLStatement parseIf()
public SQLStatement parseWhile()
public SQLStatement parseDeclare()
public SQLStatement parseRepeat()
public SQLStatement parseLeave()
public SQLStatement parseReturn()
public SQLStatement parseUpsert()
public SQLRollbackStatement parseRollback()
public SQLStatement parseCommit()
public SQLStatement parseShow()
public SQLUseStatement parseUse()
public SQLGrantStatement parseGrant()
public SQLRevokeStatement parseRevoke()
public SQLStatement parseSavePoint()
public SQLStatement parseReleaseSavePoint()
public SQLStatement parseAlter()
protected SQLAlterTableItem parseAlterTableRename()
protected SQLAlterTableAlterColumn parseAlterColumn()
public void parseAlterDrop(SQLAlterTableStatement stmt)
protected SQLAlterTableDropPartition parseAlterTableDropPartition(boolean ifExists)
public SQLStatement parseRename()
protected SQLDropTableStatement parseDropTable(boolean acceptDrop)
protected SQLDropSequenceStatement parseDropSequence(boolean acceptDrop)
protected SQLDropTriggerStatement parseDropTrigger(boolean acceptDrop)
protected SQLDropViewStatement parseDropView(boolean acceptDrop)
protected SQLDropDatabaseStatement parseDropDatabase(boolean acceptDrop)
protected SQLDropFunctionStatement parseDropFunction(boolean acceptDrop)
protected SQLDropTableSpaceStatement parseDropTablespace(boolean acceptDrop)
protected SQLDropProcedureStatement parseDropProcedure(boolean acceptDrop)
public SQLStatement parseTruncate()
public SQLStatement parseInsert()
protected void parseInsert0(SQLInsertInto insertStatement)
protected void parseInsert0_hinits(SQLInsertInto insertStatement)
protected void parseInsert0(SQLInsertInto insertStatement, boolean acceptSubQuery)
protected void parseInsertColumns(SQLInsertInto insert)
public boolean parseStatementListDialect(List<SQLStatement> statementList)
public SQLDropUserStatement parseDropUser()
public SQLStatement parseDropIndex()
public SQLCallStatement parseCall()
public SQLStatement parseSet()
public void parseAssignItems(List<? super SQLAssignItem> items, SQLObject parent)
public SQLStatement parseCreatePackage()
public SQLStatement parseCreate()
public SQLStatement parseCreateType()
public SQLStatement parseCreateUser()
public SQLCreateFunctionStatement parseCreateFunction()
public SQLStatement parseCreateMaterializedView()
public SQLStatement parseCreateDbLink()
public SQLStatement parseCreateSynonym()
public SQLStatement parseCreateTrigger()
public SQLStatement parseBlock()
public SQLStatement parseCreateDatabase()
public SQLCreateProcedureStatement parseCreateProcedure()
public SQLStatement parseCreateSequence(boolean acceptCreate)
public SQLStatement parseCreateIndex(boolean acceptCreate)
public SQLCreateTableParser getSQLCreateTableParser()
public SQLStatement parseSelect()
public SQLSelectParser createSQLSelectParser()
public SQLUpdateStatement parseUpdateStatement()
protected void parseUpdateSet(SQLUpdateStatement update)
protected SQLUpdateStatement createUpdateStatement()
public SQLDeleteStatement parseDeleteStatement()
public SQLCreateTableStatement parseCreateTable()
public SQLCreateViewStatement parseCreateView()
public SQLCommentStatement parseComment()
protected SQLAlterTableAddColumn parseAlterTableAddColumn()
public SQLStatement parseStatement()
public SQLStatement parseStatement(boolean tryBest)
tryBest - - 为true去解析并忽略之后的错误
强制建议除非明确知道可以忽略才传tryBest=true,
不然会忽略语法错误,且截断sql,导致update和delete无where条件下执行!!!public SQLExplainStatement parseExplain()
protected SQLAlterTableAddIndex parseAlterTableAddIndex()
public SQLOpenStatement parseOpen()
public SQLFetchStatement parseFetch()
public SQLStatement parseClose()
public boolean isParseCompleteValues()
public void setParseCompleteValues(boolean parseCompleteValues)
public int getParseValuesSize()
public void setParseValuesSize(int parseValuesSize)
public SQLStatement parseMerge()
protected SQLErrorLoggingClause parseErrorLoggingClause()
public SQLStatement parseDescribe()
public SQLWithSubqueryClause parseWithQuery()
public SQLStatement parseWith()
protected void parseValueClause(List<SQLInsertStatement.ValuesClause> valueClauseList, int columnSize, SQLObject parent)
protected HiveInsertStatement parseHiveInsertStmt()
protected HiveInsert parseHiveInsert()
public SQLSelectListCache getSelectListCache()
public void setSelectListCache(SQLSelectListCache selectListCache)
Copyright © 2013–2019 Alibaba Group. All rights reserved.