[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql afef528d81 179/427: Fix memoization to include typ
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql afef528d81 179/427: Fix memoization to include type map. |
Date: |
Tue, 13 Dec 2022 02:59:40 -0500 (EST) |
branch: elpa/emacsql
commit afef528d8110809e587d6aee5dd4e18401fc7477
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Fix memoization to include type map.
---
emacsql.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/emacsql.el b/emacsql.el
index 85ddf5dc12..05c4f97747 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -342,7 +342,8 @@ a list of (<string> [arg-pos] ...)."
(defun emacsql-expand (sql &optional subsql-p)
"Expand SQL into a SQL-consumable string, with variables."
(let* ((cache emacsql-expander-cache)
- (cached (and cache (gethash sql cache))))
+ (key (cons emacsql-type-map sql))
+ (cached (and cache (gethash key cache))))
(or cached
(cl-loop with items = (cl-coerce sql 'list)
while (not (null items))
@@ -358,7 +359,7 @@ a list of (<string> [arg-pos] ...)."
(if subsql-p ")" ";")))
(vars (apply #'nconc (mapcar #'cdr parts))))
(cl-return (if cache
- (setf (gethash sql cache) (cons string vars))
+ (setf (gethash key cache) (cons string vars))
(cons string vars))))))))
(defun emacsql-format (expansion &rest args)
- [nongnu] elpa/emacsql fe0c7004fc 146/427: Add :begin, :commit, and :rollback., (continued)
- [nongnu] elpa/emacsql fe0c7004fc 146/427: Add :begin, :commit, and :rollback., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 2550196816 162/427: Drop SQLite version requirements., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 9a1b4209ba 164/427: Add PostgreSQL front-end., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5f4c2ed5a7 166/427: Add emacsql-psql-unavailable-p., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1d0ef4011c 167/427: Make emacsql-connection abstract., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 64c3a03d62 169/427: Flesh out some more README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 9f6c10eca0 172/427: Move error checking out to helper mix-in., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4f76b94f7c 168/427: Set psql to print nil for NULL., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 7434263d82 174/427: Oops, drop leftover function call., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ca62adc4b2 177/427: Add debug argument to emacsql-psql., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql afef528d81 179/427: Fix memoization to include type map.,
ELPA Syncer <=
- [nongnu] elpa/emacsql b2f2dd37cf 178/427: Allow connection to specify their own types., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4aa889882d 182/427: Fix slot allocation on emacsql-connection., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 769abe20fa 183/427: Don't rely on a closure in cleanup hook., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e9efb0803e 185/427: Oops, include the reap source., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5962268f83 184/427: Split off reaper code., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql f8c3d9fce2 369/427: Silence Emacs 25's byte-compiler, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 8e34660ba1 370/427: Allow `gcc` as a separate option for C compilation., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 739c24cab6 389/427: Add kludge to work around `cl-defmethod' bug, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 18b40213fd 403/427: No longer use obsolete generalized variable `point', ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6d999ba39d 400/427: Update library headers, ELPA Syncer, 2022/12/13