Database.Persist.SqlBackend.Internal.StatementCache

persistent-2.14.6.3: Type-safe, multi-backend data serialization.

Safe Haskell | None
Language | Haskell2010

Database.Persist.SqlBackend.Internal.StatementCache

Synopsis

- data StatementCache = StatementCache {
  - statementCacheLookup :: StatementCacheKey -> IO (Maybe Statement)
  - statementCacheInsert :: StatementCacheKey -> Statement -> IO ()
  - statementCacheClear :: IO ()
  - statementCacheSize :: IO Int
  }
- newtype StatementCacheKey = StatementCacheKey {
  - cacheKey :: Text
  }
- mkCacheKeyFromQuery :: Text -> StatementCacheKey

# Documentation

data StatementCache #

A statement cache used to lookup statements that have already been prepared for a given query.

Since: 2.13.3

Constructors

StatementCache |
Fields statementCacheLookup :: StatementCacheKey -> IO (Maybe Statement) statementCacheInsert :: StatementCacheKey -> Statement -> IO () statementCacheClear :: IO () statementCacheSize :: IO Int

newtype StatementCacheKey #

Constructors

StatementCacheKey |
Fields cacheKey :: Text

mkCacheKeyFromQuery :: Text -> StatementCacheKey #

Construct a `StatementCacheKey` from a raw SQL query.