public abstract class SqlParser<R,C> extends Object
Functions,
Engine.createFunction
| Modifier and Type | Field and Description |
|---|---|
protected SQLDateParser |
dateParser |
| Constructor and Description |
|---|
SqlParser() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
asterisk() |
protected Statement<R,C> |
batchStatement(List<Statement<R,C>> list,
Deque<List<Table<R,C>>> tableListStack,
LinkedHashMap<String,Placeholder> placeholderMap,
Engine<R,C> engine) |
protected Statement<R,C> |
beginWork(LinkedHashMap<String,Placeholder<R,C>> placeholderMap,
Engine<R,C> engine) |
protected Condition |
betweenPredicate1(RowValue rv1,
RowValue rv2,
RowValue rv3,
Deque<List<Table<R,C>>> tableListStack) |
protected Condition |
betweenPredicate2(RowValue rv1,
RowValue rv2,
RowValue rv3,
Deque<List<Table<R,C>>> tableListStack) |
protected Condition |
booleanFactor1(Condition test) |
protected Condition |
booleanFactor2(Condition test) |
protected Condition |
booleanPredicate(Condition predicate) |
protected Condition |
booleanPrimary(Condition predicate) |
protected Condition |
booleanTerm(Condition factor) |
protected Condition |
booleanTerm(Condition term,
Condition factor) |
protected Condition |
booleanTest1(Condition primary) |
protected Condition |
booleanTest2(Condition primary,
TruthValue tvl) |
protected Condition |
booleanTest3(Condition primary,
TruthValue tvl) |
protected Condition |
booleanValueExpression(Condition term) |
protected Condition |
booleanValueExpression(Condition expression,
Condition term) |
protected void |
cComment(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator) |
protected abstract void |
check(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator) |
protected abstract void |
check(String sql,
SQLLocator locator) |
protected abstract String |
column(String column) |
protected ColumnReference |
columnReference(String part,
List<String> list,
String title) |
protected Statement<R,C> |
commitWork(LinkedHashMap<String,Placeholder<R,C>> placeholderMap,
Engine<R,C> engine) |
protected Condition |
comparisonPredicate1(RowValue rv1,
RowValue rv2,
Deque<List<Table<R,C>>> tableListStack) |
protected Condition |
comparisonPredicate2(RowValue rv1,
RowValue rv2,
Deque<List<Table<R,C>>> tableListStack) |
protected Condition |
comparisonPredicate3(RowValue rv1,
RowValue rv2,
Deque<List<Table<R,C>>> tableListStack) |
protected Condition |
comparisonPredicate4(RowValue rv1,
RowValue rv2,
Deque<List<Table<R,C>>> tableListStack) |
protected Condition |
comparisonPredicate5(RowValue rv1,
RowValue rv2,
Deque<List<Table<R,C>>> tableListStack) |
protected Condition |
comparisonPredicate6(RowValue rv1,
RowValue rv2,
Deque<List<Table<R,C>>> tableListStack) |
protected C |
currentTimestampValue(Engine<R,C> engine) |
protected C |
currentYearValue(Engine<R,C> engine) |
protected Literal<R,C> |
dateLiteral(C date,
Engine<R,C> engine) |
protected C |
dateValue(String string,
Engine<R,C> engine) |
protected Number |
decimal(String value) |
protected void |
deleteStart(Deque<List<Table<R,C>>> tableListStack) |
protected Statement<R,C> |
deleteStatementSearched(Table<R,C> table,
Condition<R,C> condition,
LinkedHashMap<String,Placeholder<R,C>> placeholderMap,
Engine<R,C> engine,
Deque<List<Table<R,C>>> tableListStack) |
protected Statement<R,C> |
deleteStatementSearched(Table<R,C> table,
LinkedHashMap<String,Placeholder<R,C>> placeholderMap,
Engine<R,C> engine,
Deque<List<Table<R,C>>> tableListStack) |
protected Statement |
describeSpecification(String identifier,
LinkedHashMap<String,Placeholder> placeholderMap,
Engine<R,C> engine) |
protected void |
doubleSlashComment(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator) |
protected TruthValue |
falseL(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator) |
protected void |
fromClause(Table<R,C> table,
List<Table<R,C>> list) |
protected InsertColumnsAndSource<R,C> |
fromConstructor(String column,
List<String> columnList,
Literal<R,C> literal,
List<Literal<R,C>> valueList) |
protected InsertColumnsAndSource<R,C> |
fromSubQuery(String column,
List<String> columnList,
Statement subSelect) |
protected abstract String |
function(String func) |
protected void |
hashComment(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator) |
protected abstract String |
identifier(String value) |
protected Condition |
inPredicate1(RowValue rv,
Collection<RowValue> inValues,
Deque<List<Table<R,C>>> tableListStack) |
protected Condition |
inPredicate2(RowValue rv,
Collection<RowValue> inValues,
Deque<List<Table<R,C>>> tableListStack) |
protected abstract Collection<RowValue> |
inPredicateValue1(Collection<RowValue> inValues) |
protected abstract InsertColumnsAndSource<R,C> |
insertColumnsAndSource(InsertColumnsAndSource<R,C> insertColumnsAndSource) |
protected void |
insertStart(Deque<List<Table<R,C>>> tableListStack) |
protected Statement<R,C> |
insertStatement(Table<R,C> table,
InsertColumnsAndSource<R,C> insertColumnsAndSource,
LinkedHashMap<String,Placeholder<R,C>> placeholderMap,
Engine<R,C> engine,
Deque<List<Table<R,C>>> tableListStack) |
protected Number |
integer(String value) |
protected Collection<RowValue> |
inValueList(Collection<RowValue> inValues,
RowValue rv) |
protected Collection<RowValue> |
inValueList(RowValue rv) |
protected Condition |
likePredicate1(RowValue rv,
String pattern) |
protected Condition |
likePredicate2(RowValue rv,
String pattern,
String escape) |
protected Condition |
likePredicate3(RowValue rv,
String pattern) |
protected Condition |
likePredicate4(RowValue rv,
String pattern,
String escape) |
protected abstract Literal<R,C> |
literal(Literal<R,C> placeholder) |
protected Literal<R,C> |
literal(Number number,
Engine<R,C> engine) |
protected Literal<R,C> |
literal(String string,
Engine<R,C> engine) |
protected Condition |
newComparisonCondition(RowValue rv1,
Relation relation,
RowValue rv2,
List<Table<R,C>> tableList) |
protected Condition |
nullPredicate1(RowValue rv) |
protected Condition |
nullPredicate2(RowValue rv) |
protected List<SortSpecification> |
orderByClause(SortSpecification ss,
List<SortSpecification> list) |
protected Condition |
parenthesizedBooleanValueExpression(Condition predicate) |
protected abstract Statement |
parse(InputStream is,
Engine<R,C> engine,
Deque<List<Table<R,C>>> tableListStack,
LinkedHashMap<String,Placeholder> placeholderMap,
SQLLocator locator) |
protected abstract Statement |
parse(String sql,
Engine<R,C> engine,
Deque<List<Table<R,C>>> tableListStack,
LinkedHashMap<String,Placeholder> placeholderMap,
SQLLocator locator) |
protected Literal<R,C> |
placeholder(String identifier,
Class<? extends C> type,
Map<String,Placeholder> placeholderMap) |
protected Literal<R,C> |
placeholder(String identifier,
Literal<R,C> lit,
Map<String,Placeholder> placeholderMap) |
protected Literal<R,C> |
placeholder(String identifier,
Statement query,
Map<String,Placeholder> placeholderMap) |
protected Class<? extends C> |
placeholderType(Engine<R,C> engine) |
protected abstract Condition |
predicate(Condition predicate) |
protected Statement |
querySpecification(List<ColumnReference> selectList,
TableExpression tableExpression,
LinkedHashMap<String,Placeholder> placeholderMap,
Engine<R,C> engine,
Deque<List<Table<R,C>>> tableListStack) |
protected void |
reservedWords(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator) |
protected void |
reservedWords2(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator) |
protected Statement<R,C> |
rollbackWork(LinkedHashMap<String,Placeholder<R,C>> placeholderMap,
Engine<R,C> engine) |
protected RowValue |
rowValuePredicant1(ColumnReference columnReference) |
protected RowValue |
rowValuePredicant3(Literal<R,C> literal,
Engine<R,C> engine) |
protected Condition |
searchCondition(Condition expression) |
protected List<ColumnReference> |
selectList(ColumnReference columnReference,
List<ColumnReference> selectList) |
protected List<ColumnReference> |
selectList(Engine<R,C> engine) |
protected void |
selectStart(Deque<List<Table<R,C>>> tableListStack) |
protected abstract ColumnReference |
selectSublist(ColumnReference columnReference) |
protected ColumnReference |
selectSublist(String funcName,
ColumnReference inner,
List<String> args,
String title,
org.vesalainen.parser.util.InputReader reader,
Engine<R,C> engine) |
protected ColumnReference |
selectSublist(String funcName,
ColumnReference inner,
Number number,
List<Number> args,
String title,
org.vesalainen.parser.util.InputReader reader,
Engine<R,C> engine) |
protected SetClause<R,C> |
setClause(String identifier,
Literal<R,C> literal) |
protected Statement |
showSpecification(String identifier,
LinkedHashMap<String,Placeholder> placeholderMap,
Engine<R,C> engine) |
protected SortSpecification |
sortSpecification1(RowValue rv) |
protected SortSpecification |
sortSpecification2(RowValue rv) |
protected SortSpecification |
sortSpecification3(RowValue rv) |
protected abstract Statement<R,C> |
statement(Statement<R,C> statement) |
protected List<Statement<R,C>> |
statementList(List<Statement<R,C>> list,
Statement<R,C> statement) |
protected List<Statement<R,C>> |
statementList(Statement<R,C> statement) |
protected String |
string(String value) |
protected abstract String |
stringConstant1(String str) |
protected abstract String |
stringConstant2(String str) |
protected TableExpression |
tableExpression(Condition condition,
List<SortSpecification> sortSpecificationList,
Deque<List<Table<R,C>>> tableListStack) |
protected Table<R,C> |
tableReference(String schema,
String tablename,
String correlationName,
Engine<R,C> engine,
Deque<List<Table<R,C>>> tableListStack) |
protected C |
timestampValue(String string,
Engine<R,C> engine) |
protected C |
timeValue(String string,
Engine<R,C> engine) |
protected TruthValue |
trueL(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator) |
protected TruthValue |
truthValue(TruthValue tvl) |
protected TruthValue |
unknown(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator) |
protected void |
updateStart(Deque<List<Table<R,C>>> tableListStack) |
protected Statement<R,C> |
updateStatementSearched(Table<R,C> table,
SetClause<R,C> setClause,
List<SetClause<R,C>> setClauseList,
Condition<R,C> condition,
LinkedHashMap<String,Placeholder<R,C>> placeholderMap,
Engine<R,C> engine,
Deque<List<Table<R,C>>> tableListStack) |
protected Statement<R,C> |
updateStatementSearched(Table<R,C> table,
SetClause<R,C> setClause,
List<SetClause<R,C>> setClauseList,
LinkedHashMap<String,Placeholder<R,C>> placeholderMap,
Engine<R,C> engine) |
protected Condition |
whereClause(Condition condition) |
protected abstract void |
whiteSpace() |
protected SQLDateParser dateParser
protected abstract void check(String sql, SQLLocator locator)
sql - locator - protected abstract void check(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator)
reader - locator - protected abstract Statement parse(String sql, Engine<R,C> engine, Deque<List<Table<R,C>>> tableListStack, LinkedHashMap<String,Placeholder> placeholderMap, SQLLocator locator)
sql - engine - placeholderMap - locator - protected abstract Statement parse(InputStream is, Engine<R,C> engine, Deque<List<Table<R,C>>> tableListStack, LinkedHashMap<String,Placeholder> placeholderMap, SQLLocator locator)
is - engine - placeholderMap - locator - protected Statement<R,C> batchStatement(List<Statement<R,C>> list, Deque<List<Table<R,C>>> tableListStack, LinkedHashMap<String,Placeholder> placeholderMap, Engine<R,C> engine)
protected List<Statement<R,C>> statementList(List<Statement<R,C>> list, Statement<R,C> statement)
protected Statement<R,C> beginWork(LinkedHashMap<String,Placeholder<R,C>> placeholderMap, Engine<R,C> engine)
protected Statement<R,C> commitWork(LinkedHashMap<String,Placeholder<R,C>> placeholderMap, Engine<R,C> engine)
protected Statement<R,C> rollbackWork(LinkedHashMap<String,Placeholder<R,C>> placeholderMap, Engine<R,C> engine)
protected Statement<R,C> updateStatementSearched(Table<R,C> table, SetClause<R,C> setClause, List<SetClause<R,C>> setClauseList, LinkedHashMap<String,Placeholder<R,C>> placeholderMap, Engine<R,C> engine)
protected Statement<R,C> updateStatementSearched(Table<R,C> table, SetClause<R,C> setClause, List<SetClause<R,C>> setClauseList, Condition<R,C> condition, LinkedHashMap<String,Placeholder<R,C>> placeholderMap, Engine<R,C> engine, Deque<List<Table<R,C>>> tableListStack)
protected Statement<R,C> deleteStatementSearched(Table<R,C> table, LinkedHashMap<String,Placeholder<R,C>> placeholderMap, Engine<R,C> engine, Deque<List<Table<R,C>>> tableListStack)
protected Statement<R,C> deleteStatementSearched(Table<R,C> table, Condition<R,C> condition, LinkedHashMap<String,Placeholder<R,C>> placeholderMap, Engine<R,C> engine, Deque<List<Table<R,C>>> tableListStack)
protected Statement<R,C> insertStatement(Table<R,C> table, InsertColumnsAndSource<R,C> insertColumnsAndSource, LinkedHashMap<String,Placeholder<R,C>> placeholderMap, Engine<R,C> engine, Deque<List<Table<R,C>>> tableListStack)
protected abstract InsertColumnsAndSource<R,C> insertColumnsAndSource(InsertColumnsAndSource<R,C> insertColumnsAndSource)
protected InsertColumnsAndSource<R,C> fromSubQuery(String column, List<String> columnList, Statement subSelect)
protected InsertColumnsAndSource<R,C> fromConstructor(String column, List<String> columnList, Literal<R,C> literal, List<Literal<R,C>> valueList)
protected Statement showSpecification(String identifier, LinkedHashMap<String,Placeholder> placeholderMap, Engine<R,C> engine)
protected Statement describeSpecification(String identifier, LinkedHashMap<String,Placeholder> placeholderMap, Engine<R,C> engine)
protected Statement querySpecification(List<ColumnReference> selectList, TableExpression tableExpression, LinkedHashMap<String,Placeholder> placeholderMap, Engine<R,C> engine, Deque<List<Table<R,C>>> tableListStack)
protected List<ColumnReference> selectList(Engine<R,C> engine)
protected List<ColumnReference> selectList(ColumnReference columnReference, List<ColumnReference> selectList)
protected void asterisk()
protected abstract ColumnReference selectSublist(ColumnReference columnReference)
protected ColumnReference columnReference(String part, List<String> list, String title)
protected ColumnReference selectSublist(String funcName, ColumnReference inner, List<String> args, String title, org.vesalainen.parser.util.InputReader reader, Engine<R,C> engine)
protected ColumnReference selectSublist(String funcName, ColumnReference inner, Number number, List<Number> args, String title, org.vesalainen.parser.util.InputReader reader, Engine<R,C> engine)
protected TableExpression tableExpression(Condition condition, List<SortSpecification> sortSpecificationList, Deque<List<Table<R,C>>> tableListStack)
protected Table<R,C> tableReference(String schema, String tablename, String correlationName, Engine<R,C> engine, Deque<List<Table<R,C>>> tableListStack)
protected Condition booleanValueExpression(Condition expression, Condition term)
protected Condition booleanTest2(Condition primary, TruthValue tvl)
protected Condition booleanTest3(Condition primary, TruthValue tvl)
protected TruthValue truthValue(TruthValue tvl)
protected Condition parenthesizedBooleanValueExpression(Condition predicate)
protected Condition comparisonPredicate1(RowValue rv1, RowValue rv2, Deque<List<Table<R,C>>> tableListStack)
protected Condition comparisonPredicate2(RowValue rv1, RowValue rv2, Deque<List<Table<R,C>>> tableListStack)
protected Condition comparisonPredicate3(RowValue rv1, RowValue rv2, Deque<List<Table<R,C>>> tableListStack)
protected Condition comparisonPredicate4(RowValue rv1, RowValue rv2, Deque<List<Table<R,C>>> tableListStack)
protected Condition comparisonPredicate5(RowValue rv1, RowValue rv2, Deque<List<Table<R,C>>> tableListStack)
protected Condition comparisonPredicate6(RowValue rv1, RowValue rv2, Deque<List<Table<R,C>>> tableListStack)
protected Condition newComparisonCondition(RowValue rv1, Relation relation, RowValue rv2, List<Table<R,C>> tableList)
protected RowValue rowValuePredicant1(ColumnReference columnReference)
protected Condition betweenPredicate1(RowValue rv1, RowValue rv2, RowValue rv3, Deque<List<Table<R,C>>> tableListStack)
protected Condition betweenPredicate2(RowValue rv1, RowValue rv2, RowValue rv3, Deque<List<Table<R,C>>> tableListStack)
protected Condition inPredicate1(RowValue rv, Collection<RowValue> inValues, Deque<List<Table<R,C>>> tableListStack)
protected Condition inPredicate2(RowValue rv, Collection<RowValue> inValues, Deque<List<Table<R,C>>> tableListStack)
protected abstract Collection<RowValue> inPredicateValue1(Collection<RowValue> inValues)
protected Collection<RowValue> inValueList(RowValue rv)
protected Collection<RowValue> inValueList(Collection<RowValue> inValues, RowValue rv)
protected Literal<R,C> placeholder(String identifier, Class<? extends C> type, Map<String,Placeholder> placeholderMap)
protected Literal<R,C> placeholder(String identifier, Literal<R,C> lit, Map<String,Placeholder> placeholderMap)
protected Literal<R,C> placeholder(String identifier, Statement query, Map<String,Placeholder> placeholderMap)
protected List<SortSpecification> orderByClause(SortSpecification ss, List<SortSpecification> list)
protected SortSpecification sortSpecification1(RowValue rv)
protected SortSpecification sortSpecification2(RowValue rv)
protected SortSpecification sortSpecification3(RowValue rv)
protected void reservedWords(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator)
protected void reservedWords2(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator)
protected TruthValue trueL(org.vesalainen.parser.util.InputReader reader, SQLLocator locator)
protected TruthValue falseL(org.vesalainen.parser.util.InputReader reader, SQLLocator locator)
protected TruthValue unknown(org.vesalainen.parser.util.InputReader reader, SQLLocator locator)
protected abstract void whiteSpace()
protected void doubleSlashComment(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator)
protected void hashComment(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator)
protected void cComment(org.vesalainen.parser.util.InputReader reader,
SQLLocator locator)
Copyright © 2014. All rights reserved.