branch: elpa/emacsql commit f512300abafa580abe5e8f7d125babb248e4fad0 Author: Christopher Wellons <well...@nullprogram.com> Commit: Christopher Wellons <well...@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: