[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql a742687cfb 192/427: Add funcall operator.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql a742687cfb 192/427: Add funcall operator. |
Date: |
Tue, 13 Dec 2022 02:59:41 -0500 (EST) |
branch: elpa/emacsql
commit a742687cfb4e84dbc1bedb6ac30c642d58ab5735
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@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)
- [nongnu] elpa/emacsql 6d999ba39d 400/427: Update library headers, (continued)
- [nongnu] elpa/emacsql 6d999ba39d 400/427: Update library headers, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a29b9e7ea5 388/427: No longer needlessly require url and url-http, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 20e390ea06 401/427: Add FAQ to README.md, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 30912aa69e 404/427: Include ../.config.mk in sqlite/Makefile, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql f5da68e5f9 391/427: Fix quoting in docstring, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a4d01edd71 411/427: Adjust emacsql-pg to new pg version from original author, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql f179ba928a 047/427: Add :drop-table expander., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 458b8a6acd 074/427: Add :insert and :values expanders., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 2faed63b20 107/427: Prime emacsql-expand for substatements., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 13cfbeeaba 186/427: Tidy up the constructors., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a742687cfb 192/427: Add funcall operator.,
ELPA Syncer <=
- [nongnu] elpa/emacsql 8fa1ca451c 238/427: Fix schema mistake in unit test., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ea613c5191 360/427: Push other sub-packages up to Emacs 25 as well, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql fbda94e6b5 339/427: Improve some doc-strings., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6f1e375a2e 367/427: Better escaping of NUL and control characters (#42), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3dc6971829 190/427: Add ALTER TABLE stuff., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ef976b8649 189/427: Add package target for Makefile., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 672963ae53 191/427: Add DISTINCT option to :select., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b1da2ba9d2 297/427: Change compiler flag order (work around old gcc bug)., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql d21cc86540 188/427: Add lexical binding to tests., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3d556608ef 394/427: emacsql-mysql: Abort if mysql cannot be found, ELPA Syncer, 2022/12/13