public interface Parser
A SQL parser.
- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescription@NotNull QueriesParse a SQL string into a set ofQueries.@NotNull QueriesParse a SQL string with bind variables into a set ofQueries.@NotNull ConditionparseCondition(String sql) Parse a SQL string into aCondition.@NotNull ConditionparseCondition(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 NameParse a SQL string into a nameName.@NotNull NameParse a SQL string with bind variables into a nameName.@Nullable QueryparseQuery(String sql) Parse a SQL string into aQuery.@Nullable QueryparseQuery(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 RowParse a SQL string into aRow.@NotNull RowParse a SQL string with bind variables into aRow.@Nullable Select<?> parseSelect(String sql) Parse a SQL string into aSelectstatement.@Nullable Select<?> parseSelect(String sql, Object... bindings) Parse a SQL string into aSelectstatement.@Nullable StatementparseStatement(String sql) Parse a SQL string into a proceduralStatement.@Nullable StatementparseStatement(String sql, Object... bindings) Parse a SQL string with bind variables into a proceduralStatement.@NotNull BlockparseStatements(String sql) Parse a SQL string into a proceduralBlockstatement.@NotNull BlockparseStatements(String sql, Object... bindings) Parse a SQL string with bind variables into a proceduralBlockstatement.@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 proceduralBlockstatement.- Parameters:
sql- The SQL string- Throws:
ParserException- If the SQL string could not be parsed into a proceduralBlockstatement.
-
parseStatements
@NotNull @Support @PlainSQL @Pro @NotNull Block parseStatements(String sql, Object... bindings) throws ParserException Parse a SQL string with bind variables into a proceduralBlockstatement.- Parameters:
sql- The SQL stringbindings- The bind variables- Throws:
ParserException- If the SQL string could not be parsed into a proceduralBlockstatement.
-
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 aSelectstatement.- Parameters:
sql- The SQL string- Throws:
ParserException- If the SQL string could not be parsed into aSelectstatement.
-
parseSelect
@Nullable @Support @PlainSQL @Nullable Select<?> parseSelect(String sql, Object... bindings) throws ParserException Parse a SQL string into aSelectstatement.- Parameters:
sql- The SQL stringbindings- The bind variables- Throws:
ParserException- If the SQL string could not be parsed into aSelectstatement.
-
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.
-