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.
-
persistent-mtl Database.Persist.Monad.TestUtils Constructor corresponding to getJustEntity
-
persistent-mtl Database.Persist.Sql.Shim The lifted version of belongsToJust
-
persistent-mtl Database.Persist.Sql.Shim The lifted version of getJust
-
persistent-mtl Database.Persist.Sql.Shim The lifted version of getJustEntity
-
persistent-redis Database.Persist.Redis Same as belongsTo, but uses getJust and therefore is similarly unsafe.
-
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. -
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 | +----+------+-----+
adjust :: (a -> a) -> Word -> Patricia a -> Patricia aradix-tree Data.Patricia.Word.Lazy Apply a function to a value in the tree at the given key.
adjustL :: (a -> a) -> Word -> Patricia a -> Patricia aradix-tree Data.Patricia.Word.Lazy Apply a function to every value for which the key is smaller than or equal to the given one.
adjustLWithKey :: (Word -> a -> a) -> Word -> Patricia a -> Patricia aradix-tree Data.Patricia.Word.Lazy Apply a function to every value for which the key is smaller than or equal to the given one.