persistent-2.17.1.0: 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 Source #

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 Source #

Constructors

StatementCacheKey |

Fields

- cacheKey :: Text

mkCacheKeyFromQuery :: Text -> StatementCacheKey Source #

Construct a `StatementCacheKey` from a raw SQL query.