emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql f512300aba 054/427: Fix a few things in emacsql-ex


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql f512300aba 054/427: Fix a few things in emacsql-expr.
Date: Tue, 13 Dec 2022 02:59:27 -0500 (EST)

branch: elpa/emacsql
commit f512300abafa580abe5e8f7d125babb248e4fad0
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    Fix a few things in emacsql-expr.
---
 emacsql.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/emacsql.el b/emacsql.el
index cd7606bf92..23ba6c7f68 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -402,14 +402,14 @@ definitions for return from a `emacsql-defexpander'."
              (cl-ecase (length args)
                (2 (format "%s %s %s" (recur 0) op (recur 1)))
                (3 (format "%s BETWEEN %s AND %s"
-                          (recur 1)
-                          (recur (if (eq op '<=) 2 0))
-                          (recur (if (eq op '<=) 0 2))))))
+                          (recur 1) (recur 0) (recur 2)))))
             ((< > = != like glob is and or * / % << >> + - & |)
-             (format "%s %s %s"
-                     (recur 0)
-                     (if (eq op '%) '%% (upcase (symbol-name op)))
-                     (recur 1)))))))))
+             (if (= 2 (length args))
+                 (format "%s %s %s"
+                         (recur 0)
+                         (if (eq op '%) '%% (upcase (symbol-name op)))
+                         (recur 1))
+               (error "Wrong number of operands for %s" op)))))))))
 
 ;; SQL Expansion Functions:
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]