esqueleto
-Database.Esqueleto.Internal.Sql
<p>Execute an <code>esqueleto</code> <code>DELETE</code> query inside <code>persistent</code>'s
<code><a href="/?query=%28%28name%3A%28%21SqlPersistT%29%20package%3A%28%21persistent%29%20module%3A%28%21Database.Persist.Sql%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21SqlPersistT%29%20package%3A%28%21persistent%29%29%5E10.0%29%20OR%20name%3A%28%21SqlPersistT%29">SqlPersistT</a></code> monad. Note that currently there are no type
checks for statements that should not appear on a <code>DELETE</code>
query.</p><p>Example of usage:</p><pre><code><a href="/?query=%28%28name%3A%28%21delete%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Sql%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21delete%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21delete%29">delete</a></code> $
<code><a href="/?query=%28%28name%3A%28%21from%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Language%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21from%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21from%29">from</a></code> $ \appointment ->
<code><a href="/?query=%28%28name%3A%28%21where_%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Language%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21where_%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21where_%29">where_</a></code> (appointment <code><a href="/?query=%28%28name%3A%28%21%27%5E.%27%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Language%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21%27%5E.%27%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21%27%5E.%27%29">^.</a></code> AppointmentDate <code><a href="/?query=%28%28name%3A%28%21%3C.%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Language%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21%3C.%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21%3C.%29"><.</a></code> <code><a href="/?query=%28%28name%3A%28%21val%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Language%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21val%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21val%29">val</a></code> now)
</pre><p>Unlike <code><a href="/?query=%28%28name%3A%28%21select%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Sql%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21select%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21select%29">select</a></code>, there is a useful way of using <code><a href="/?query=%28%28name%3A%28%21delete%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Sql%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21delete%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21delete%29">delete</a></code> that
will lead to type ambiguities. If you want to delete all rows
(i.e., no <code><a href="/?query=%28%28name%3A%28%21where_%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Language%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21where_%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21where_%29">where_</a></code> clause), you'll have to use a type signature:</p><pre><code><a href="/?query=%28%28name%3A%28%21delete%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Sql%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21delete%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21delete%29">delete</a></code> $
<code><a href="/?query=%28%28name%3A%28%21from%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Language%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21from%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21from%29">from</a></code> $ \(appointment :: <code><a href="/?query=%28%28name%3A%28%21SqlExpr%29%20package%3A%28%21esqueleto%29%20module%3A%28%21Database.Esqueleto.Internal.Sql%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21SqlExpr%29%20package%3A%28%21esqueleto%29%29%5E10.0%29%20OR%20name%3A%28%21SqlExpr%29">SqlExpr</a></code> (<code><a href="/?query=%28%28name%3A%28%21Entity%29%20package%3A%28%21persistent%29%20module%3A%28%21Database.Persist.Types%29%29%5E100.0%29%20OR%20%28%28name%3A%28%21Entity%29%20package%3A%28%21persistent%29%29%5E10.0%29%20OR%20name%3A%28%21Entity%29">Entity</a></code> Appointment)) ->
return ()
</pre>