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.
getPersistMap :: PersistValue -> Either Text [(Text, PersistValue)]persistent-mtl Database.Persist.Sql.Shim FIXME Add documentation to that.
getStmtConn :: SqlBackend -> Text -> IO Statementpersistent-mtl Database.Persist.Sql.Shim No documentation available.
-
persistent-mtl Database.Persist.Sql.Shim The lifted version of getTableName
-
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.
-
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 | +----+------+-----+
-
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 999mSpjEnt <- getBySpjValue
The above query when applied on dataset-1, will get this record:+----+------+-----+ | id | name | age | +----+------+-----+ | 1 | SPJ | 40 | +----+------+-----+
-
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 | +----+------+-----+
getEntityComments :: EntityDef -> Maybe Textpersistent-redis Database.Persist.Redis No documentation available.
getEntityDBName :: EntityDef -> EntityNameDBpersistent-redis Database.Persist.Redis Return the database name for the given entity.
getEntityExtra :: EntityDef -> Map Text [[Text]]persistent-redis Database.Persist.Redis No documentation available.