summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-07-16 09:47:23 +0300
committerThanos Apollo <[email protected]>2024-07-16 09:47:23 +0300
commit176f892230a57dd567bb83300d48be4d8a79e867 (patch)
tree9f5e99e0d313b75987265e0c034d02eda008ee72
parent3437f5d583840b966b82188e62e7f46c9ef401bf (diff)
New function: Add gnosis-get-type.
Return the type of note ID
-rw-r--r--gnosis.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 0e7e375..09d86d2 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -291,6 +291,10 @@ Example:
"Return caar of VALUE from TABLE, optionally with where RESTRICTIONS."
(caar (gnosis-select value table restrictions)))
+(defun gnosis-get-type (id)
+ "Return note for note ID."
+ (car (gnosis-select-id 'type 'notes id)))
+
(defun gnosis--delete (table value)
"From TABLE use where to delete VALUE."
(emacsql gnosis-db `[:delete :from ,table :where ,value]))