[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql 3f3c36a403 341/427: Expand identifier vectors when
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql 3f3c36a403 341/427: Expand identifier vectors when passed as parameters (#7). |
Date: |
Tue, 13 Dec 2022 03:00:00 -0500 (EST) |
branch: elpa/emacsql
commit 3f3c36a4031bdf9561fb030450f468439f0f9b46
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Expand identifier vectors when passed as parameters (#7).
---
emacsql-compiler.el | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/emacsql-compiler.el b/emacsql-compiler.el
index 2fb55407f3..2f5b596f4e 100644
--- a/emacsql-compiler.el
+++ b/emacsql-compiler.el
@@ -59,19 +59,22 @@
"Escape an identifier, if needed, for SQL."
(when (or (null identifier)
(keywordp identifier)
- (not (symbolp identifier)))
+ (not (or (symbolp identifier)
+ (vectorp identifier))))
(emacsql-error "Invalid identifier: %S" identifier))
- (let ((name (symbol-name identifier)))
- (if (string-match-p ":" name)
- (mapconcat #'emacsql-escape-identifier
- (mapcar #'intern (split-string name ":")) ".")
- (let ((print (replace-regexp-in-string "-" "_" (format "%S" identifier)))
- (special "[]-\000-\040!\"#%&'()*+,./:;<=>?@[\\^`{|}~\177]"))
- (if (or (string-match-p special print)
- (string-match-p "^[0-9$]" print)
- (emacsql-reserved-p print))
- (emacsql-quote-identifier print)
- print)))))
+ (if (vectorp identifier)
+ (mapconcat #'emacsql-escape-identifier identifier ", ")
+ (let ((name (symbol-name identifier)))
+ (if (string-match-p ":" name)
+ (mapconcat #'emacsql-escape-identifier
+ (mapcar #'intern (split-string name ":")) ".")
+ (let ((print (replace-regexp-in-string "-" "_" (format "%S"
identifier)))
+ (special "[]-\000-\040!\"#%&'()*+,./:;<=>?@[\\^`{|}~\177]"))
+ (if (or (string-match-p special print)
+ (string-match-p "^[0-9$]" print)
+ (emacsql-reserved-p print))
+ (emacsql-quote-identifier print)
+ print))))))
(defun emacsql-escape-scalar (value)
"Escape VALUE for sending to SQLite."
- [nongnu] elpa/emacsql 5818000c7d 412/427: make: Update pg repository url, (continued)
- [nongnu] elpa/emacsql 5818000c7d 412/427: make: Update pg repository url, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 0da3f06e89 416/427: Fix docstring typo, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 20cdad6fe6 417/427: Include sqlite error code in error data, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1becb00945 419/427: Define a few constants as such, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 40c41d0d97 421/427: Release version 3.1.0, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql bfbd0c3a73 422/427: Resume development, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5c4aa1030b 415/427: Do not warn about missing pg functions, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql be95788334 214/427: Use global timeout in tests., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 944de63e9d 298/427: Add functions to fix vector indentation., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e061847083 302/427: Improve emacsql-fix-vector-indentation., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3f3c36a403 341/427: Expand identifier vectors when passed as parameters (#7).,
ELPA Syncer <=
- [nongnu] elpa/emacsql 1de10e8ad4 357/427: Fix warning in emacsql-sqlite initialize-instance (#38), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 488e7ebbb5 380/427: Change defvar to defconst for emacsql-version (fix #53), ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e80281487b 399/427: Bump back-ends' dependency on emacsql, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ec4f3d091b 424/427: Resume development, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c1a44076c0 423/427: Release version 3.1.1, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6b2e65bdf7 427/427: Use new version string format for unreleased revisions, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 08eb5aed26 406/427: Update to SQLite 3.39.3, ELPA Syncer, 2022/12/13