diff options
author | Thanos Apollo <[email protected]> | 2023-12-30 10:07:11 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-30 10:07:11 +0200 |
commit | 425aea91564acda7bafa89f03710bfa3e7100c9d (patch) | |
tree | 35c1ea074958ff9e347e73ed4ffec7fb8c994202 /gnosis.el | |
parent | 9f86a5c875b4c43725833fcaf29a1e5efc06eef0 (diff) |
Make sure gnosis-db has been in/zed before selecting/inserting value
Add gnosis-db-init to gnosis--insert-into & gnosis-select
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -63,6 +63,7 @@ WARNING: Do not change this value!") (cl-defun gnosis-select (value table &optional (restrictions '1=1)) "Select VALUE from TABLE, optionally with RESTRICTIONS." + (gnosis-db-init) (emacsql gnosis-db `[:select ,value :from ,table :where ,restrictions])) (cl-defun gnosis--create-table (table &optional values) @@ -75,6 +76,7 @@ WARNING: Do not change this value!") (cl-defun gnosis--insert-into (table values) "Insert VALUES to TABLE." + (gnosis-db-init) (emacsql gnosis-db `[:insert :into ,table :values ,values])) (cl-defun gnosis-update (table value where) |