Package org.jdbi.v3.core.statement
Interface SqlParser
- All Known Implementing Classes:
ColonPrefixSqlParser
,HashPrefixSqlParser
public interface SqlParser
Parses the named parameters out of an SQL statement, and returns the
ParsedSql
containing the JDBC-ready SQL statement, along with the
type of parameters used (named or positional), the number, and the parameter
name for each position (if applicable).-
Method Summary
Modifier and TypeMethodDescriptionnameParameter
(String rawName, StatementContext ctx) Convert rawName to a name as recognized by this parserparse
(String sql, StatementContext ctx) Parses the given SQL statement, and returns theParsedSql
for the statement.
-
Method Details
-
parse
Parses the given SQL statement, and returns theParsedSql
for the statement.- Parameters:
sql
- The SQL statement to parsectx
- The statement context for the statement being executed- Returns:
- the parsed SQL representing the SQL statement itself along with information about the parameters which should be bound (number and names)
-
nameParameter
Convert rawName to a name as recognized by this parser- Parameters:
rawName
- the raw name to transformctx
- The statement context for the statement being executed- Returns:
- a name appropriate for being identified a a named parameter by this parser
-