File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 6060 " Returns non-nil if string NAME is a SQL keyword."
6161 (gethash (upcase name) emacsql-reserved))
6262
63+ (defvar emacsql-work-buffer nil )
6364(defun emacsql-quote-scalar-dangerous (string )
6465 " Single-quote (scalar) STRING for use in a SQL expression."
66+ (cl-assert (eq (current-buffer ) emacsql-work-buffer))
6567 (erase-buffer )
6668 (insert " '" string)
6769 (goto-char 2 )
@@ -548,7 +550,8 @@ Only use within `emacsql-with-params'!"
548550 (cl-destructuring-bind (format . vars) expansion
549551 (let ((print-level nil )
550552 (print-length nil ))
551- (with-temp-buffer
553+ (with-current-buffer (setq emacsql-work-buffer
554+ (get-buffer-create " *emacsql-throwaway*" t ))
552555 (apply #'format format
553556 (cl-loop for (i . kind) in vars collect
554557 (let ((thing (nth i args)))
You can’t perform that action at this time.
0 commit comments