Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

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

  1. GetJustEntity :: forall record . PersistRecordBackend record SqlBackend => Key record -> SqlQueryRep record (Entity record)

    persistent-mtl Database.Persist.Monad.TestUtils

    Constructor corresponding to getJustEntity

  2. belongsToJust :: (PersistEntity record1, PersistRecordBackend record2 SqlBackend, Typeable record1, Typeable record2, MonadSqlQuery m) => (record1 -> Key record2) -> record1 -> m record2

    persistent-mtl Database.Persist.Sql.Shim

    The lifted version of belongsToJust

  3. getJust :: (PersistRecordBackend record SqlBackend, Typeable record, MonadSqlQuery m) => Key record -> m record

    persistent-mtl Database.Persist.Sql.Shim

    The lifted version of getJust

  4. getJustEntity :: (PersistRecordBackend record SqlBackend, Typeable record, MonadSqlQuery m) => Key record -> m (Entity record)

    persistent-mtl Database.Persist.Sql.Shim

    The lifted version of getJustEntity

  5. belongsToJust :: forall ent1 ent2 backend (m :: Type -> Type) . (PersistStoreRead backend, PersistEntity ent1, PersistRecordBackend ent2 backend, MonadIO m) => (ent1 -> Key ent2) -> ent1 -> ReaderT backend m ent2

    persistent-redis Database.Persist.Redis

    Same as belongsTo, but uses getJust and therefore is similarly unsafe.

  6. getJust :: forall record backend (m :: Type -> Type) . (PersistStoreRead backend, PersistRecordBackend record backend, MonadIO m) => Key record -> ReaderT backend m record

    persistent-redis Database.Persist.Redis

    Same as get, but for a non-null (not Maybe) foreign key. Unsafe unless your database is enforcing that the foreign key is valid.

    Example usage

    With schema-1 and dataset-1,
    getJustSpj :: MonadIO m => ReaderT SqlBackend m User
    getJustSpj = getJust spjId
    
    spj <- getJust spjId
    
    The above query when applied on dataset-1, will get this record:
    +----+------+-----+
    | id | name | age |
    +----+------+-----+
    |  1 | SPJ  |  40 |
    +----+------+-----+
    
    getJustUnknown :: MonadIO m => ReaderT SqlBackend m User
    getJustUnknown = getJust unknownId
    
    mrx <- getJustUnknown This just throws an error.

  7. getJustEntity :: forall record backend (m :: Type -> Type) . (PersistEntityBackend record ~ BaseBackend backend, MonadIO m, PersistEntity record, PersistStoreRead backend) => Key record -> ReaderT backend m (Entity record)

    persistent-redis Database.Persist.Redis

    Same as getJust, but returns an Entity instead of just the record.

    Example usage

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

  8. adjust :: (a -> a) -> Word -> Patricia a -> Patricia a

    radix-tree Data.Patricia.Word.Lazy

    Apply a function to a value in the tree at the given key.

  9. adjustL :: (a -> a) -> Word -> Patricia a -> Patricia a

    radix-tree Data.Patricia.Word.Lazy

    Apply a function to every value for which the key is smaller than or equal to the given one.

  10. adjustLWithKey :: (Word -> a -> a) -> Word -> Patricia a -> Patricia a

    radix-tree Data.Patricia.Word.Lazy

    Apply a function to every value for which the key is smaller than or equal to the given one.

Page 137 of many | Previous | Next