branch: externals/org-gnosis
commit 57c7caad79cfac72c19bda309ba36e3c3ed0e4f5
Author: Thanos Apollo <pub...@thanosapollo.org>
Commit: Thanos Apollo <pub...@thanosapollo.org>

    db: Add delete value & drop table functions
---
 org-gnosis.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/org-gnosis.el b/org-gnosis.el
index acedb2652d..363bc4f5c3 100644
--- a/org-gnosis.el
+++ b/org-gnosis.el
@@ -66,6 +66,14 @@ Optional argument FLATTEN, when non-nil, flattens the 
result."
   "Insert VALUES to TABLE."
   (emacsql org-gnosis-db `[:insert :into ,table :values ,values]))
 
+(defun org-gnosis--delete (table value)
+  "From TABLE use where to delete VALUE."
+  (emacsql org-gnosis-db `[:delete :from ,table :where ,value]))
+
+(cl-defun org-gnosis--drop-table (table)
+  "Drop TABLE from `gnosis-db'."
+  (emacsql org-gnosis-db `[:drop-table ,table]))
+
 (defun org-gnosis-get-current-node-title ()
   "Return the title of the current node."
   (when (derived-mode-p 'org-mode)

Reply via email to