persistent-2.13.2.1: Type-safe, multi-backend data serialization.
Safe HaskellNone
LanguageHaskell2010

Database.Persist.Class.DeleteCascade

Description

Deprecated: The DeleteCascade module is deprecated. You can now set cascade behavior directly on entities in the quasiquoter.

Synopsis

Documentation

class (PersistStoreWrite backend, PersistEntity record, BaseBackend backend ~ PersistEntityBackend record) => DeleteCascade record backend where Source #

For combinations of backends and entities that support cascade-deletion. “Cascade-deletion” means that entries that depend on other entries to be deleted will be deleted as well.

Methods

deleteCascade :: MonadIO m => Key record -> ReaderT backend m () Source #

Perform cascade-deletion of single database entry.

deleteCascadeWhere :: forall record backend m. (MonadIO m, DeleteCascade record backend, PersistQueryWrite backend) => [Filter record] -> ReaderT backend m () Source #

Cascade-deletion of entries satisfying given filters.