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. updateGet :: forall record (m :: Type -> Type) . (PersistStoreWrite backend, MonadIO m, PersistRecordBackend record backend) => Key record -> [Update record] -> ReaderT backend m record

    persistent-redis Database.Persist.Redis

    Update individual fields on a specific record, and retrieve the updated value from the database. Note that this function will throw an exception if the given key is not found in the database.

    Example usage

    With schema-1 and dataset-1,
    updateGetSpj :: MonadIO m => [Update User] -> ReaderT SqlBackend m User
    updateGetSpj updates = updateGet spjId updates
    
    spj <- updateGetSpj [UserAge +=. 100]
    
    The above query when applied on dataset-1, will produce this:
    +-----+------+-----+
    |id   |name  |age  |
    +-----+------+-----+
    |1    |SPJ   |140  |
    +-----+------+-----+
    |2    |Simon |41   |
    +-----+------+-----+
    

Page 18 of many | Previous | Next