Class CachingSqlParser

java.lang.Object
org.jdbi.v3.core.statement.CachingSqlParser
All Implemented Interfaces:
SqlParser
Direct Known Subclasses:
ColonPrefixSqlParser, HashPrefixSqlParser

public abstract class CachingSqlParser extends Object implements SqlParser
  • Field Details

    • PARSED_SQL_CACHE_SIZE

      public static final int PARSED_SQL_CACHE_SIZE
      The default size of the parsed SQL cache.
      See Also:
  • Method Details

    • 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 <T> T cacheStats()
      Returns cache statistics for the internal sql parser cache. This returns a cache specific object, so the user needs to know what caching library is in use.