diff options
author | Thanos Apollo <[email protected]> | 2024-11-21 01:09:14 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-11-21 01:09:14 +0200 |
commit | 57c7caad79cfac72c19bda309ba36e3c3ed0e4f5 (patch) | |
tree | 9967297a1f75edf1cda7d0940e174eba75883b4a /org-gnosis.el | |
parent | 93318e4f5dd70177451dacfa83e01c5a900a5ba7 (diff) |
db: Add delete value & drop table functions
Diffstat (limited to 'org-gnosis.el')
-rw-r--r-- | org-gnosis.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/org-gnosis.el b/org-gnosis.el index acedb26..363bc4f 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) |