Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

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

  1. getPersistMap :: PersistValue -> Either Text [(Text, PersistValue)]

    persistent-mtl Database.Persist.Sql.Shim

    FIXME Add documentation to that.

  2. getStmtConn :: SqlBackend -> Text -> IO Statement

    persistent-mtl Database.Persist.Sql.Shim

    No documentation available.

  3. getTableName :: (PersistRecordBackend record SqlBackend, Typeable record, MonadSqlQuery m) => record -> m Text

    persistent-mtl Database.Persist.Sql.Shim

    The lifted version of getTableName

  4. getPage :: forall record backend typ (m :: Type -> Type) . (PersistRecordBackend record backend, PersistQueryRead backend, Ord typ, PersistField typ, MonadIO m) => [Filter record] -> EntityField record typ -> PageSize -> SortOrder -> DesiredRange typ -> ReaderT backend m (Maybe (Page record typ))

    persistent-pagination Database.Persist.Pagination

    Get the first Page according to the given criteria. This returns a Maybe Page, because there may not actually be any records that correspond to the query you issue. You can call pageRecords on the result object to get the row of records for this page, and you can call nextPage with the Page object to get the next page, if one exists. This function gives you lower level control over pagination than the streamEntities function.

  5. getBy :: forall record (m :: Type -> Type) . (PersistUniqueRead backend, MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m (Maybe (Entity record))

    persistent-redis Database.Persist.Redis

    Get a record by unique key, if available. Returns also the identifier.

    Example usage

    With schema-1 and dataset-1:
    getBySpjName :: MonadIO m  => ReaderT SqlBackend m (Maybe (Entity User))
    getBySpjName = getBy $ UniqueUserName "SPJ"
    
    mSpjEnt <- getBySpjName
    
    The above query when applied on dataset-1, will get this entity:
    +----+------+-----+
    | id | name | age |
    +----+------+-----+
    |  1 | SPJ  |  40 |
    +----+------+-----+
    

  6. getByValue :: forall record (m :: Type -> Type) backend . (MonadIO m, PersistUniqueRead backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record) => record -> ReaderT backend m (Maybe (Entity record))

    persistent-redis Database.Persist.Redis

    A modification of getBy, which takes the PersistEntity itself instead of a Unique record. Returns a record matching one of the unique keys. This function makes the most sense on entities with a single Unique constructor.

    Example usage

    With schema-1 and dataset-1, getBySpjValue :: MonadIO m => ReaderT SqlBackend m (Maybe (Entity User)) getBySpjValue = getByValue $ User SPJ 999
    mSpjEnt <- getBySpjValue
    
    The above query when applied on dataset-1, will get this record:
    +----+------+-----+
    | id | name | age |
    +----+------+-----+
    |  1 | SPJ  |  40 |
    +----+------+-----+
    

  7. getEntity :: forall e backend (m :: Type -> Type) . (PersistStoreRead backend, PersistRecordBackend e backend, MonadIO m) => Key e -> ReaderT backend m (Maybe (Entity e))

    persistent-redis Database.Persist.Redis

    Like get, but returns the complete Entity.

    Example usage

    With schema-1 and dataset-1,
    getSpjEntity :: MonadIO m => ReaderT SqlBackend m (Maybe (Entity User))
    getSpjEntity = getEntity spjId
    
    mSpjEnt <- getSpjEntity
    
    The above query when applied on dataset-1, will get this entity:
    +----+------+-----+
    | id | name | age |
    +----+------+-----+
    |  1 | SPJ  |  40 |
    +----+------+-----+
    

  8. getEntityComments :: EntityDef -> Maybe Text

    persistent-redis Database.Persist.Redis

    No documentation available.

  9. getEntityDBName :: EntityDef -> EntityNameDB

    persistent-redis Database.Persist.Redis

    Return the database name for the given entity.

  10. getEntityExtra :: EntityDef -> Map Text [[Text]]

    persistent-redis Database.Persist.Redis

    No documentation available.

Page 12 of many | Previous | Next