Hoogle Search

Within LTS Haskell 22.21 (ghc-9.6.5)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. delete :: (MonadIO m, SqlBackendCanWrite backend) => SqlQuery () -> ReaderT backend m ()

    esqueleto Database.Esqueleto

    Execute an esqueleto DELETE query inside persistent's SqlPersistT monad. Note that currently there are no type checks for statements that should not appear on a DELETE query. Example of usage:

    delete $
    from $ \appointment ->
    where_ (appointment ^. AppointmentDate <. val now)
    
    Unlike select, there is a useful way of using delete that will lead to type ambiguities. If you want to delete all rows (i.e., no where_ clause), you'll have to use a type signature:
    delete $
    from $ \(appointment :: SqlExpr (Entity Appointment)) ->
    return ()
    

    Database.Esqueleto.Experimental:

    delete $ do
    userFeature <- from $ table @UserFeature
    where_ ((userFeature ^. UserFeatureFeature) notIn valList allKnownFeatureFlags)
    

  2. delete :: (MonadIO m, SqlBackendCanWrite backend) => SqlQuery () -> ReaderT backend m ()

    esqueleto Database.Esqueleto.Experimental

    Execute an esqueleto DELETE query inside persistent's SqlPersistT monad. Note that currently there are no type checks for statements that should not appear on a DELETE query. Example of usage:

    delete $
    from $ \appointment ->
    where_ (appointment ^. AppointmentDate <. val now)
    
    Unlike select, there is a useful way of using delete that will lead to type ambiguities. If you want to delete all rows (i.e., no where_ clause), you'll have to use a type signature:
    delete $
    from $ \(appointment :: SqlExpr (Entity Appointment)) ->
    return ()
    

    Database.Esqueleto.Experimental:

    delete $ do
    userFeature <- from $ table @UserFeature
    where_ ((userFeature ^. UserFeatureFeature) notIn valList allKnownFeatureFlags)
    

  3. delete :: (MonadIO m, SqlBackendCanWrite backend) => SqlQuery () -> ReaderT backend m ()

    esqueleto Database.Esqueleto.Internal.Internal

    Execute an esqueleto DELETE query inside persistent's SqlPersistT monad. Note that currently there are no type checks for statements that should not appear on a DELETE query. Example of usage:

    delete $
    from $ \appointment ->
    where_ (appointment ^. AppointmentDate <. val now)
    
    Unlike select, there is a useful way of using delete that will lead to type ambiguities. If you want to delete all rows (i.e., no where_ clause), you'll have to use a type signature:
    delete $
    from $ \(appointment :: SqlExpr (Entity Appointment)) ->
    return ()
    

    Database.Esqueleto.Experimental:

    delete $ do
    userFeature <- from $ table @UserFeature
    where_ ((userFeature ^. UserFeatureFeature) notIn valList allKnownFeatureFlags)
    

  4. delete :: (MonadIO m, SqlBackendCanWrite backend) => SqlQuery () -> ReaderT backend m ()

    esqueleto Database.Esqueleto.Legacy

    Execute an esqueleto DELETE query inside persistent's SqlPersistT monad. Note that currently there are no type checks for statements that should not appear on a DELETE query. Example of usage:

    delete $
    from $ \appointment ->
    where_ (appointment ^. AppointmentDate <. val now)
    
    Unlike select, there is a useful way of using delete that will lead to type ambiguities. If you want to delete all rows (i.e., no where_ clause), you'll have to use a type signature:
    delete $
    from $ \(appointment :: SqlExpr (Entity Appointment)) ->
    return ()
    

    Database.Esqueleto.Experimental:

    delete $ do
    userFeature <- from $ table @UserFeature
    where_ ((userFeature ^. UserFeatureFeature) notIn valList allKnownFeatureFlags)
    

  5. DELETE :: Mode

    esqueleto Database.Esqueleto.Internal.Internal

    No documentation available.

  6. deleteBy :: forall record (m :: Type -> Type) . (PersistUniqueWrite backend, MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m ()

    esqueleto Database.Esqueleto

    Delete a specific record by unique key. Does nothing if no record matches.

    Example usage

    With schema-1 and dataset-1,
    deleteBySpjName :: MonadIO m => ReaderT SqlBackend m ()
    deleteBySpjName = deleteBy UniqueUserName "SPJ"
    
    The above query when applied on dataset-1, will produce this:
    +-----+------+-----+
    |id   |name  |age  |
    +-----+------+-----+
    |2    |Simon |41   |
    +-----+------+-----+
    

  7. deleteCount :: (MonadIO m, SqlBackendCanWrite backend) => SqlQuery () -> ReaderT backend m Int64

    esqueleto Database.Esqueleto

    Same as delete, but returns the number of rows affected.

  8. deleteKey :: (PersistStore backend, BaseBackend backend ~ PersistEntityBackend val, MonadIO m, PersistEntity val) => Key val -> ReaderT backend m ()

    esqueleto Database.Esqueleto

    Synonym for delete that does not clash with esqueleto's delete.

  9. deleteWhere :: forall (m :: Type -> Type) record . (PersistQueryWrite backend, MonadIO m, PersistRecordBackend record backend) => [Filter record] -> ReaderT backend m ()

    esqueleto Database.Esqueleto

    Delete all records matching the given criterion.

  10. deleteBy :: forall record (m :: Type -> Type) . (PersistUniqueWrite backend, MonadIO m, PersistRecordBackend record backend) => Unique record -> ReaderT backend m ()

    esqueleto Database.Esqueleto.Experimental

    Delete a specific record by unique key. Does nothing if no record matches.

    Example usage

    With schema-1 and dataset-1,
    deleteBySpjName :: MonadIO m => ReaderT SqlBackend m ()
    deleteBySpjName = deleteBy UniqueUserName "SPJ"
    
    The above query when applied on dataset-1, will produce this:
    +-----+------+-----+
    |id   |name  |age  |
    +-----+------+-----+
    |2    |Simon |41   |
    +-----+------+-----+
    

Page 1 of many | Next