Hoogle Search
Within LTS Haskell 24.51 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
persistent Database.Persist.Class.PersistStore Same as belongsTo, but uses getJust and therefore is similarly unsafe.
-
persistent Database.Persist.Class.PersistStore 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 Database.Persist.Class.PersistStore 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 | +----+------+-----+
catchJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m alifted-base Control.Exception.Lifted Generalized version of catchJust. Note, when the given computation throws an exception any monadic side effects in m will be discarded.
handleJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> (b -> m a) -> m a -> m alifted-base Control.Exception.Lifted Generalized version of handleJust. Note, when the given computation throws an exception any monadic side effects in m will be discarded.
tryJust :: (MonadBaseControl IO m, Exception e) => (e -> Maybe b) -> m a -> m (Either b a)lifted-base Control.Exception.Lifted Generalized version of tryJust. Note, when the given computation throws an exception any monadic side effects in m will be discarded.
adjust :: (a -> a) -> Key -> CharMap a -> CharMap aregex-tdfa Data.IntMap.CharMap2 No documentation available.
adjustWithKey :: (Key -> a -> a) -> Key -> CharMap a -> CharMap aregex-tdfa Data.IntMap.CharMap2 No documentation available.
adjust :: Enum key => (a -> a) -> key -> EnumMap key a -> EnumMap key aregex-tdfa Data.IntMap.EnumMap2 No documentation available.
adjustWithKey :: Enum key => (key -> a -> a) -> key -> EnumMap key a -> EnumMap key aregex-tdfa Data.IntMap.EnumMap2 No documentation available.