summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-07-16 09:46:54 +0300
committerThanos Apollo <[email protected]>2024-07-16 09:46:54 +0300
commit3437f5d583840b966b82188e62e7f46c9ef401bf (patch)
tree353aef267a6dc63e37c463dea5e8ba0c6fe16553
parent8fffcd9bff83652f03bc38e0a26bb17c98a02858 (diff)
new func: Add gnosis-select-id
Select notes by id.
-rw-r--r--gnosis.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 44e3097..0e7e375 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -264,6 +264,10 @@ Optional argument FLATTEN, when non-nil, flattens the result."
(apply #'append output)
output)))
+(defun gnosis-select-id (value table id)
+ "Select VALUE from TABLE for note ID."
+ (gnosis-select value table `(= id ,id) t))
+
(cl-defun gnosis--create-table (table &optional values)
"Create TABLE for VALUES."
(emacsql gnosis-db `[:create-table ,table ,values]))