add erase-from helper #532
Signed-off-by: Sean Corfield <sean@corfield.org>
This commit is contained in:
parent
129239a742
commit
09fa8afefe
1 changed files with 9 additions and 0 deletions
|
|
@ -592,6 +592,15 @@
|
||||||
[& args]
|
[& args]
|
||||||
(generic :delete-from 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
|
(defn truncate
|
||||||
"Accepts a single table name to truncate."
|
"Accepts a single table name to truncate."
|
||||||
{:arglists '([table])}
|
{:arglists '([table])}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue