public interface Parser
A SQL parser.
- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescription@NotNull Queries
Parse a SQL string into a set ofQueries
.@NotNull Queries
Parse a SQL string with bind variables into a set ofQueries
.@NotNull Condition
parseCondition
(String sql) Parse a SQL string into aCondition
.@NotNull Condition
parseCondition
(String sql, Object... bindings) Parse a SQL string with bind variables into aCondition
.@NotNull Field
<?> parseField
(String sql) Parse a SQL string into aField
.@NotNull Field
<?> parseField
(String sql, Object... bindings) Parse a SQL string with bind variables into aField
.@NotNull Name
Parse a SQL string into a nameName
.@NotNull Name
Parse a SQL string with bind variables into a nameName
.@Nullable Query
parseQuery
(String sql) Parse a SQL string into aQuery
.@Nullable Query
parseQuery
(String sql, Object... bindings) Parse a SQL string with bind variables into aQuery
.@Nullable ResultQuery
<?> parseResultQuery
(String sql) Parse a SQL string into aResultQuery
.@Nullable ResultQuery
<?> parseResultQuery
(String sql, Object... bindings) Parse a SQL string with bind variables into aResultQuery
.@NotNull Row
Parse a SQL string into aRow
.@NotNull Row
Parse a SQL string with bind variables into aRow
.@Nullable Select
<?> parseSelect
(String sql) Parse a SQL string into aSelect
statement.@Nullable Select
<?> parseSelect
(String sql, Object... bindings) Parse a SQL string into aSelect
statement.@Nullable Statement
parseStatement
(String sql) Parse a SQL string into a proceduralStatement
.@Nullable Statement
parseStatement
(String sql, Object... bindings) Parse a SQL string with bind variables into a proceduralStatement
.@NotNull Block
parseStatements
(String sql) Parse a SQL string into a proceduralBlock
statement.@NotNull Block
parseStatements
(String sql, Object... bindings) Parse a SQL string with bind variables into a proceduralBlock
statement.@NotNull Table
<?> parseTable
(String sql) Parse a SQL string into aTable
.@NotNull Table
<?> parseTable
(String sql, Object... bindings) Parse a SQL string with bind variables into aTable
.
-
Method Details
-
parse
Parse a SQL string into a set ofQueries
.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into a set ofQueries
.
-
parse
@NotNull @Support @PlainSQL @NotNull Queries parse(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into a set ofQueries
.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into a set ofQueries
.
-
parseQuery
Parse a SQL string into aQuery
.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into aQuery
.
-
parseQuery
@Nullable @Support @PlainSQL @Nullable Query parseQuery(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into aQuery
.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into aQuery
.
-
parseStatement
Parse a SQL string into a proceduralStatement
.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into a proceduralStatement
.
-
parseStatement
@Nullable @Support @PlainSQL @Nullable Statement parseStatement(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into a proceduralStatement
.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into a proceduralStatement
.
-
parseStatements
Parse a SQL string into a proceduralBlock
statement.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into a proceduralBlock
statement.
-
parseStatements
@NotNull @Support @PlainSQL @Pro @NotNull Block parseStatements(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into a proceduralBlock
statement.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into a proceduralBlock
statement.
-
parseResultQuery
@Nullable @Support @PlainSQL @Nullable ResultQuery<?> parseResultQuery(String sql) throws ParserException Parse a SQL string into aResultQuery
.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into aResultQuery
.
-
parseResultQuery
@Nullable @Support @PlainSQL @Nullable ResultQuery<?> parseResultQuery(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into aResultQuery
.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into aResultQuery
.
-
parseSelect
Parse a SQL string into aSelect
statement.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into aSelect
statement.
-
parseSelect
@Nullable @Support @PlainSQL @Nullable Select<?> parseSelect(String sql, Object... bindings) throws ParserException Parse a SQL string into aSelect
statement.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into aSelect
statement.
-
parseTable
Parse a SQL string into aTable
.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into aTable
.
-
parseTable
@NotNull @Support @PlainSQL @NotNull Table<?> parseTable(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into aTable
.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into aTable
.
-
parseField
Parse a SQL string into aField
.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into aField
.
-
parseField
@NotNull @Support @PlainSQL @NotNull Field<?> parseField(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into aField
.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into aField
.
-
parseRow
Parse a SQL string into aRow
.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into aRow
.
-
parseRow
@NotNull @Support @PlainSQL @NotNull Row parseRow(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into aRow
.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into aRow
.
-
parseCondition
Parse a SQL string into aCondition
.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into aCondition
.
-
parseCondition
@NotNull @Support @PlainSQL @NotNull Condition parseCondition(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into aCondition
.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into aCondition
.
-
parseName
Parse a SQL string into a nameName
.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed into a nameName
.
-
parseName
@NotNull @Support @PlainSQL @NotNull Name parseName(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into a nameName
.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed into a nameName
.
-