Package org.jdbi.v3.core.statement
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 java.lang.Object implements SqlParser
-
-
Field Summary
Fields Modifier and Type Field Description static intPARSED_SQL_CACHE_SIZEThe default size of the parsed SQL cache.private JdbiCache<java.lang.String,ParsedSql>parsedSqlCache
-
Constructor Summary
Constructors Constructor Description CachingSqlParser()CachingSqlParser(JdbiCacheBuilder cacheBuilder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> TcacheStats()Returns cache statistics for the internal sql parser cache.(package private) abstract ParsedSqlinternalParse(java.lang.String sql)ParsedSqlparse(java.lang.String sql, StatementContext ctx)Parses the given SQL statement, and returns theParsedSqlfor the statement.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jdbi.v3.core.statement.SqlParser
nameParameter
-
-
-
-
Field Detail
-
PARSED_SQL_CACHE_SIZE
public static final int PARSED_SQL_CACHE_SIZE
The default size of the parsed SQL cache.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CachingSqlParser
CachingSqlParser()
-
CachingSqlParser
CachingSqlParser(JdbiCacheBuilder cacheBuilder)
-
-
Method Detail
-
parse
public ParsedSql parse(java.lang.String sql, StatementContext ctx)
Description copied from interface:SqlParserParses the given SQL statement, and returns theParsedSqlfor the statement.
-
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.
-
internalParse
abstract ParsedSql internalParse(java.lang.String sql)
-
-