Does that help? I asket ChatGPT ^^ I don't know Esqueleto though.
If you want to delete all the rows from a table using Esqueleto.Experimental
,
you can use the E.delete
function without any WHERE
clause. Here's an example:
haskell
import qualified Database.Esqueleto.Experimental as E myHandler :: Handler Value myHandler = do runDB $ E.delete $ E.from $ E.Table @Vogel return someValue
In the example above, the E.delete
function is
called with a query that selects all rows from the Vogel
table using the E.from
function. The E.Table
function is used to indicate the table name explicitly. Since
there is no WHERE
clause, all rows in the table will
be deleted.
--
You received this message because you are subscribed to the Google Groups "Yesod Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yesodweb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/yesodweb/c351b6ef-c612-4f23-b091-82e037d0f16cn%40googlegroups.com.