public interface Parser
A SQL parser.
- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescription@NotNull Queries
Parse a SQL string to a set of queries.@NotNull Queries
Parse a SQL string with bind variables to a set of queries.@NotNull Condition
parseCondition(String sql)
Parse a SQL string to a condition.@NotNull Condition
parseCondition(String sql, Object... bindings)
Parse a SQL string with bind variables to a condition.@NotNull Field<?>
parseField(String sql)
Parse a SQL string to a field.@NotNull Field<?>
parseField(String sql, Object... bindings)
Parse a SQL string with bind variables to a field.@NotNull Name
Parse a SQL string to a name.@NotNull Name
Parse a SQL string with bind variables to a name.@Nullable Query
parseQuery(String sql)
Parse a SQL string to a query.@Nullable Query
parseQuery(String sql, Object... bindings)
Parse a SQL string with bind variables to a query.@Nullable ResultQuery<?>
parseResultQuery(String sql)
Parse a SQL string to a result query.@Nullable ResultQuery<?>
parseResultQuery(String sql, Object... bindings)
Parse a SQL string with bind variables to a result query.@NotNull Row
Parse a SQL string to a row.@NotNull Row
Parse a SQL string with bind variables to a row.@Nullable Select<?>
parseSelect(String sql)
Parse a SQL string to a select statement.@Nullable Select<?>
parseSelect(String sql, Object... bindings)
Parse a SQL string to a select statement.@Nullable Statement
parseStatement(String sql)
Parse a SQL string to a procedural statement.@Nullable Statement
parseStatement(String sql, Object... bindings)
Parse a SQL string with bind variables to a procedural statement.@NotNull Block
parseStatements(String sql)
Parse a SQL string to a set of procedural statements.@NotNull Block
parseStatements(String sql, Object... bindings)
Parse a SQL string with bind variables to a set of procedural statements.@NotNull Table<?>
parseTable(String sql)
Parse a SQL string to a table.@NotNull Table<?>
parseTable(String sql, Object... bindings)
Parse a SQL string with bind variables to a table.
-
Method Details
-
parse
Parse a SQL string to a set of queries.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parse
@NotNull @Support @PlainSQL @NotNull Queries parse(String sql, Object... bindings) throws ParserExceptionParse a SQL string with bind variables to a set of queries.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseQuery
Parse a SQL string to a query.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseQuery
@Nullable @Support @PlainSQL @Nullable Query parseQuery(String sql, Object... bindings) throws ParserExceptionParse a SQL string with bind variables to a query.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseStatement
Parse a SQL string to a procedural statement.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseStatement
@Nullable @Support @PlainSQL @Nullable Statement parseStatement(String sql, Object... bindings) throws ParserExceptionParse a SQL string with bind variables to a procedural statement.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseStatements
Parse a SQL string to a set of procedural statements.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseStatements
@NotNull @Support @PlainSQL @Pro @NotNull Block parseStatements(String sql, Object... bindings) throws ParserExceptionParse a SQL string with bind variables to a set of procedural statements.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseResultQuery
@Nullable @Support @PlainSQL @Nullable ResultQuery<?> parseResultQuery(String sql) throws ParserExceptionParse a SQL string to a result query.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseResultQuery
@Nullable @Support @PlainSQL @Nullable ResultQuery<?> parseResultQuery(String sql, Object... bindings) throws ParserExceptionParse a SQL string with bind variables to a result query.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseSelect
Parse a SQL string to a select statement.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseSelect
@Nullable @Support @PlainSQL @Nullable Select<?> parseSelect(String sql, Object... bindings) throws ParserExceptionParse a SQL string to a select statement.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseTable
Parse a SQL string to a table.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseTable
@NotNull @Support @PlainSQL @NotNull Table<?> parseTable(String sql, Object... bindings) throws ParserExceptionParse a SQL string with bind variables to a table.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseField
Parse a SQL string to a field.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseField
@NotNull @Support @PlainSQL @NotNull Field<?> parseField(String sql, Object... bindings) throws ParserExceptionParse a SQL string with bind variables to a field.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseRow
Parse a SQL string to a row.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseRow
@NotNull @Support @PlainSQL @NotNull Row parseRow(String sql, Object... bindings) throws ParserExceptionParse a SQL string with bind variables to a row.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseCondition
Parse a SQL string to a condition.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseCondition
@NotNull @Support @PlainSQL @NotNull Condition parseCondition(String sql, Object... bindings) throws ParserExceptionParse a SQL string with bind variables to a condition.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseName
Parse a SQL string to a name.- Parameters:
sql
- The SQL string- Throws:
ParserException
- If the SQL string could not be parsed.
-
parseName
@NotNull @Support @PlainSQL @NotNull Name parseName(String sql, Object... bindings) throws ParserExceptionParse a SQL string with bind variables to a name.- Parameters:
sql
- The SQL stringbindings
- The bind variables- Throws:
ParserException
- If the SQL string could not be parsed.
-