stack-2.14.0: The Haskell Tool Stack
Safe HaskellSafe-Inferred
LanguageGHC2021

Stack.Storage.Util

Description

Utils for the other Stack.Storage modules

Synopsis

Documentation

updateList :: (PersistEntityBackend record ~ BaseBackend backend, PersistField parentid, Ord value, PersistEntity record, MonadIO m, PersistQueryWrite backend, SafeToInsert record) => (parentid -> Int -> value -> record) -> EntityField record parentid -> parentid -> EntityField record Int -> [value] -> [value] -> ReaderT backend m () Source #

Efficiently update a list of values stored in a database table.

updateSet :: (PersistEntityBackend record ~ BaseBackend backend, PersistField parentid, PersistField value, Ord value, PersistEntity record, MonadIO m, PersistQueryWrite backend, SafeToInsert record) => (parentid -> value -> record) -> EntityField record parentid -> parentid -> EntityField record value -> Set value -> Set value -> ReaderT backend m () Source #

Efficiently update a set of values stored in a database table