Hoogle Search

Within LTS Haskell 24.3 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. runSqlPersistM :: BackendCompatible SqlBackend backend => ReaderT backend (NoLoggingT (ResourceT IO)) a -> backend -> IO a

    persistent Database.Persist.Sql

    No documentation available.

  2. runSqlPersistMPool :: BackendCompatible SqlBackend backend => ReaderT backend (NoLoggingT (ResourceT IO)) a -> Pool backend -> IO a

    persistent Database.Persist.Sql

    No documentation available.

  3. connStmtMap :: SqlBackend -> StatementCache

    persistent Database.Persist.Sql.Types.Internal

    A reference to the cache of statements. Statements are keyed by the Text queries that generated them.

  4. connStmtMap :: MkSqlBackendArgs -> IORef (Map Text Statement)

    persistent Database.Persist.SqlBackend

    A reference to the cache of statements. Statements are keyed by the Text queries that generated them.

  5. connStmtMap :: SqlBackend -> StatementCache

    persistent Database.Persist.SqlBackend.Internal

    A reference to the cache of statements. Statements are keyed by the Text queries that generated them.

  6. connStmtMap :: MkSqlBackendArgs -> IORef (Map Text Statement)

    persistent Database.Persist.SqlBackend.Internal.MkSqlBackend

    A reference to the cache of statements. Statements are keyed by the Text queries that generated them.

  7. persistManyFileWith :: PersistSettings -> [FilePath] -> Q Exp

    persistent Database.Persist.TH

    Same as persistFileWith, but uses several external files instead of one. Splitting your Persistent definitions into multiple modules can potentially dramatically speed up compile times. The recommended file extension is .persistentmodels.

    Examples

    Split your Persistent definitions into multiple files (models1, models2), then create a new module for each new file and run mkPersist there:
    -- Model1.hs
    share
    [mkPersist sqlSettings]
    $(persistFileWith lowerCaseSettings "models1")
    
    -- Model2.hs
    share
    [mkPersist sqlSettings]
    $(persistFileWith lowerCaseSettings "models2")
    
    Use persistManyFileWith to create your migrations:
    -- Migrate.hs
    mkMigrate "migrateAll"
    $(persistManyFileWith lowerCaseSettings ["models1.persistentmodels","models2.persistentmodels"])
    
    Tip: To get the same import behavior as if you were declaring all your models in one file, import your new files as Name into another file, then export module Name. This approach may be used in the future to reduce memory usage during compilation, but so far we've only seen mild reductions. See persistent#778 and persistent#791 for more details.

  8. persistManyFileWith :: PersistSettings -> [FilePath] -> Q Exp

    persistent Database.Persist.TH.Internal

    Same as persistFileWith, but uses several external files instead of one. Splitting your Persistent definitions into multiple modules can potentially dramatically speed up compile times. The recommended file extension is .persistentmodels.

    Examples

    Split your Persistent definitions into multiple files (models1, models2), then create a new module for each new file and run mkPersist there:
    -- Model1.hs
    share
    [mkPersist sqlSettings]
    $(persistFileWith lowerCaseSettings "models1")
    
    -- Model2.hs
    share
    [mkPersist sqlSettings]
    $(persistFileWith lowerCaseSettings "models2")
    
    Use persistManyFileWith to create your migrations:
    -- Migrate.hs
    mkMigrate "migrateAll"
    $(persistManyFileWith lowerCaseSettings ["models1.persistentmodels","models2.persistentmodels"])
    
    Tip: To get the same import behavior as if you were declaring all your models in one file, import your new files as Name into another file, then export module Name. This approach may be used in the future to reduce memory usage during compilation, but so far we've only seen mild reductions. See persistent#778 and persistent#791 for more details.

  9. PersistMap :: [(Text, PersistValue)] -> PersistValue

    persistent Database.Persist.Types

    No documentation available.

  10. PersistMarshalError :: Text -> PersistException

    persistent Database.Persist.Types

    No documentation available.

Page 26 of many | Previous | Next