From cf9fc0e66a2ef778f28bd28bff20786f6e533951 Mon Sep 17 00:00:00 2001 From: stardiviner Date: Thu, 9 May 2024 21:42:19 +0800 Subject: [PATCH] Clean and delete all empty explanation rows in database --- org-tag-eldoc-database.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/org-tag-eldoc-database.el b/org-tag-eldoc-database.el index ab17940..2038298 100644 --- a/org-tag-eldoc-database.el +++ b/org-tag-eldoc-database.el @@ -63,6 +63,13 @@ ;; Still return the `explanation' after save to database. explanation)) +(defun org-tag-eldoc-database-clean-empty-rows () + "Clean and delete all empty explanation rows in database." + (interactive) + (org-tag-eldoc-database--execute-with-db + (sqlite-execute db (format "DELETE FROM 'org-tag-eldoc' WHERE explanation is null or explanation = '';"))) + (message "[org-tag-eldoc] Clean & deleted all empty records in database 'org-tag-eldoc'.")) + (provide 'org-tag-eldoc-database) -- 2.11.4.GIT