summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-12-14 20:53:59 +0200
committerThanos Apollo <[email protected]>2023-12-14 20:53:59 +0200
commitc22409d05c32bee7a4376d4d3cecab798d74b282 (patch)
tree12fd04a0463ee2625ec77cf331289b5e0a6a773e
parent3648d8b8cae071897c20159b37e1b99791de720d (diff)
gnosis-get: change to cl-defun & set defaults value for where
-rw-r--r--gnosis.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnosis.el b/gnosis.el
index 2a71646..451eeca 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -90,7 +90,7 @@ Example:
(gnosis-update 'notes '(= main \"NEW VALUE\") '(= id 12))"
(emacsql gnosis-db `[:update ,table :set ,value :where ,where]))
-(defun gnosis-get (value table &optional restrictions)
+(cl-defun gnosis-get (value table &optional (restrictions '1=1))
"Get VALUE from TABLE, optionally with where RESTRICTIONS."
(caar (gnosis--select value table restrictions)))