Class HashPrefixSqlParser

java.lang.Object
org.jdbi.v3.core.statement.HashPrefixSqlParser
All Implemented Interfaces:
SqlParser

public class HashPrefixSqlParser extends Object
SQL parser which recognizes named parameter tokens of the form #tokenName.
  • Constructor Details

    • HashPrefixSqlParser

      public HashPrefixSqlParser()
    • HashPrefixSqlParser

      @Beta public HashPrefixSqlParser(com.github.benmanes.caffeine.cache.Caffeine<Object,Object> cache)
  • Method Details

    • nameParameter

      public String nameParameter(String rawName, StatementContext ctx)
      Description copied from interface: SqlParser
      Convert rawName to a name as recognized by this parser
      Parameters:
      rawName - the raw name to transform
      ctx - The statement context for the statement being executed
      Returns:
      a name appropriate for being identified a a named parameter by this parser
    • parse

      public ParsedSql parse(String sql, StatementContext ctx)
      Description copied from interface: SqlParser
      Parses the given SQL statement, and returns the ParsedSql for the statement.
      Specified by:
      parse in interface SqlParser
      Parameters:
      sql - The SQL statement to parse
      ctx - 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)
    • cacheStats

      @Beta public com.github.benmanes.caffeine.cache.stats.CacheStats cacheStats()