branch: elpa/emacsql commit a742687cfb4e84dbc1bedb6ac30c642d58ab5735 Author: Christopher Wellons <well...@nullprogram.com> Commit: Christopher Wellons <well...@nullprogram.com>
Add funcall operator. --- README.md | 2 +- emacsql-compiler.el | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dd81a92cf6..07af67621f 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ exactly like so in a structured Emacsql statement. In addition, Emacsql has these operators. - quote as not + quote as not funcall The `<=` and `>=` operators accept 2 or 3 operands, transforming into a SQL `_ BETWEEN _ AND _` operator as appropriate. diff --git a/emacsql-compiler.el b/emacsql-compiler.el index 0d21aa7554..aa7cf9c724 100644 --- a/emacsql-compiler.el +++ b/emacsql-compiler.el @@ -344,6 +344,12 @@ definitions for return from a `emacsql-defexpander'." (cl-case (length args) (1 (var (nth 0 args) :value)) (otherwise (nops op)))) + ;; funcall special case + ((funcall) + (cl-case (length args) + (2 (format "%s(%s)" (var (nth 0 args) :identifier) (recur 1))) + (otherwise + (emacsql-error "Wrong number of operands for %s" op)))) ;; IN special case ((in) (cl-case (length args)