A statement cache used to lookup statements that have already been prepared for a given query.
Modulepersistent-2.14.6.3Haskell2010
Database.Persist.SqlBackend.StatementCache
- 3 types
- 3 values
- Packagepersistent-2.14.6.3
- Exports6
- LanguageHaskell2010
- LicenceMIT
- SourceStatementCache.hs
Construct a StatementCacheKey from a raw SQL query.
Configuration parameters for creating a custom statement cache
Constructors
MkStatementCachestatementCacheLookup :: StatementCacheKey -> IO (Maybe Statement)Retrieve a statement from the cache, or return nothing if it is not found.
statementCacheInsert :: StatementCacheKey -> Statement -> IO ()Put a new statement into the cache. An immediate lookup of the statement MUST return the inserted statement for the given cache key. Depending on the implementation, the statement cache MAY choose to evict other statements from the cache within this function.
statementCacheClear :: IO ()Remove all statements from the cache. Implementations of this should be sure to call stmtFinalize on all statements removed from the cache.
statementCacheSize :: IO IntGet the current size of the cache.
Make a simple statement cache that will cache statements if they are not currently cached.
Create a statement cache.