From 09fa8afefe4e497c6b8da05d18a0b9b3ad61c5dc Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Fri, 22 Nov 2024 23:17:16 -0800 Subject: [PATCH] add erase-from helper #532 Signed-off-by: Sean Corfield --- src/honey/sql/helpers.cljc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/honey/sql/helpers.cljc b/src/honey/sql/helpers.cljc index 680a33d..f2e2016 100644 --- a/src/honey/sql/helpers.cljc +++ b/src/honey/sql/helpers.cljc @@ -592,6 +592,15 @@ [& args] (generic :delete-from args)) +(defn erase-from + "For erasing (hard delete) from a single table (XTDB). + Accepts a single table name to erase from. + + (-> (erase-from :films) (where [:= :id 1]))" + {:arglists '([table])} + [& args] + (generic :erase-from args)) + (defn truncate "Accepts a single table name to truncate." {:arglists '([table])}