Hoogle Search

Within LTS Haskell 24.2 (ghc-9.10.2)

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

  1. selectSourceRes :: forall record (m1 :: Type -> Type) (m2 :: Type -> Type) . (PersistQueryRead backend, PersistRecordBackend record backend, MonadIO m1, MonadIO m2) => [Filter record] -> [SelectOpt record] -> ReaderT backend m1 (Acquire (ConduitM () (Entity record) m2 ()))

    classy-prelude-yesod ClassyPrelude.Yesod

    Get all records matching the given criterion in the specified order. Returns also the identifiers. NOTE: This function returns an Acquire and a ConduitM, which implies that it streams from the database. It does not. Please use selectList to simplify the code. If you want streaming behavior, consider persistent-pagination which efficiently chunks a query into ranges, or investigate a backend-specific streaming solution.

  2. SelectSourceRes :: forall (m2 :: Type -> Type) record . (MonadIO m2, PersistRecordBackend record SqlBackend) => [Filter record] -> [SelectOpt record] -> SqlQueryRep record (Acquire (ConduitM () (Entity record) m2 ()))

    persistent-mtl Database.Persist.Monad.SqlQueryRep

    Constructor corresponding to selectSourceRes

  3. SelectSourceRes :: forall (m2 :: Type -> Type) record . (MonadIO m2, PersistRecordBackend record SqlBackend) => [Filter record] -> [SelectOpt record] -> SqlQueryRep record (Acquire (ConduitM () (Entity record) m2 ()))

    persistent-mtl Database.Persist.Monad.TestUtils

    Constructor corresponding to selectSourceRes

  4. rawSelectSource :: forall a r (m1 :: Type -> Type) (m2 :: Type -> Type) backend . (SqlSelect a r, MonadIO m1, MonadIO m2, SqlBackendCanRead backend) => Mode -> SqlQuery a -> ReaderT backend m1 (Acquire (ConduitT () r m2 ()))

    esqueleto Database.Esqueleto.Internal.Internal

    (Internal) Execute an esqueleto SELECT SqlQuery inside persistent's SqlPersistT monad.

  5. mockSelectSource :: Typeable record => ([Filter record] -> [SelectOpt record] -> Maybe [Entity record]) -> MockQuery

    persistent-mtl Database.Persist.Monad.TestUtils

    A helper for mocking a selectSource or selectSourceRes call. Usage:

    mockSelectSource $ \filters opts ->
    if null filters && null opts
    then
    let person1 = [Entity (toSqlKey 1) $ Person "Alice"]
    person2 = [Entity (toSqlKey 2) $ Person "Bob"]
    in Just [person1, person2]
    else Nothing
    
    

Page 3 of many | Previous | Next