public class Parser extends Object
| 构造器和说明 |
|---|
Parser()
Creates a new instance of parser for special use cases.
|
Parser(SessionLocal session)
Creates a new instance of parser.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
formatNonKeywords(BitSet nonKeywords)
Formats a comma-separated list of keywords.
|
int |
getLastParseIndex()
Returns the last parse index.
|
static AlterTableAddConstraint |
newPrimaryKeyConstraintCommand(SessionLocal session,
Schema schema,
String tableName,
Column column)
Create a new alter table command.
|
Object |
parseColumnList(String sql,
int offset)
Parses a list of column names or numbers in parentheses.
|
Expression |
parseDomainConstraintExpression(String sql)
Parse a SQL code snippet that represents an expression for a domain constraint.
|
Expression |
parseExpression(String sql)
Parse a SQL code snippet that represents an expression.
|
static BitSet |
parseNonKeywords(String[] nonKeywords)
Parses the specified collection of non-keywords.
|
Table |
parseTableName(String sql)
Parse a SQL code snippet that represents a table name.
|
Prepared |
prepare(String sql)
Parse the statement and prepare it for execution.
|
Command |
prepareCommand(String sql)
Parse a statement or a list of statements, and prepare it for execution.
|
Query |
prepareQueryExpression(String sql)
Parse a query and prepare its expressions.
|
static String |
quoteIdentifier(String s,
int sqlFlags)
Add double quotes around an identifier if required.
|
void |
setLiteralsChecked(boolean literalsChecked) |
void |
setRightsChecked(boolean rightsChecked) |
void |
setSuppliedParameters(ArrayList<Parameter> suppliedParameters) |
String |
toString() |
public Parser(SessionLocal session)
session - the sessionpublic Parser()
public static BitSet parseNonKeywords(String[] nonKeywords)
nonKeywords - array of non-keywords in upper casenullpublic static String formatNonKeywords(BitSet nonKeywords)
nonKeywords - bit set of non-keywords, or nullpublic Prepared prepare(String sql)
sql - the SQL statement to parsepublic Query prepareQueryExpression(String sql)
sql - the SQL statement to parsepublic Command prepareCommand(String sql)
sql - the SQL statement to parsepublic static AlterTableAddConstraint newPrimaryKeyConstraintCommand(SessionLocal session, Schema schema, String tableName, Column column)
session - the sessionschema - the schematableName - the tablecolumn - the columnpublic static String quoteIdentifier(String s, int sqlFlags)
s - the identifiersqlFlags - formatting flagspublic void setLiteralsChecked(boolean literalsChecked)
public void setRightsChecked(boolean rightsChecked)
public Expression parseExpression(String sql)
sql - the code snippetpublic Expression parseDomainConstraintExpression(String sql)
sql - the code snippetpublic Table parseTableName(String sql)
sql - the code snippetpublic Object parseColumnList(String sql, int offset)
sql - the source SQLoffset - the initial offsetString[]) or numbers
(int[])DbException - on syntax errorpublic int getLastParseIndex()
Copyright © 2022. All rights reserved.