diff options
author | Thanos Apollo <[email protected]> | 2024-08-07 21:28:39 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-08-07 21:28:39 +0300 |
commit | d16942df7e3830cbdf7d81d8dfdd0b73712d9325 (patch) | |
tree | 3bae328d9a572eed0834affe3a003dabcc08f0fc | |
parent | bc0d2a3ec6195d79903ad7badec10a26538763c2 (diff) |
[fix] drop-table: Seperate verification.
* gnosis--drop-table won't check if table exists, which seems to be
buggy in new emacsql version
* To check if a table exists, use gnosis-drop-table, although when
combined with emacsql-with-transaction macro it might not be needed
altogether.
-rw-r--r-- | gnosis.el | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -317,8 +317,12 @@ Optional argument FLATTEN, when non-nil, flattens the result." (cl-defun gnosis--drop-table (table) "Drop TABLE from `gnosis-db'." + (emacsql gnosis-db `[:drop-table ,table])) + +(cl-defun gnosis-drop-table (table) + "Drop TABLE from `gnosis-db'." (when (gnosis-table-exists-p table) - (emacsql gnosis-db `[:drop-table ,table]))) + (gnosis--drop-table table))) (cl-defun gnosis--insert-into (table values) "Insert VALUES to TABLE." |