From d16942df7e3830cbdf7d81d8dfdd0b73712d9325 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 7 Aug 2024 21:28:39 +0300 Subject: [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. --- gnosis.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnosis.el b/gnosis.el index 8790d5e..f08e1c9 100644 --- a/gnosis.el +++ b/gnosis.el @@ -316,9 +316,13 @@ Optional argument FLATTEN, when non-nil, flattens the result." (emacsql gnosis-db `[:create-table ,table ,values]))) (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." -- cgit v1.2.3