                       (cl-ecase kind
                         (:identifier (emacsql-escape thing))
                         (:value (emacsql-escape-value thing))
+                        (:vector (emacsql-escape-vector thing))
                         (:auto (if (symbolp thing)
                                    (emacsql-escape thing)
                                  (emacsql-escape-value thing)))))))))

   "%" "%%" (cl-case kind
              (:value (emacsql-escape-value thing))
              (:identifier (emacsql-escape thing))
              (otherwise thing))))

(defvar emacsql--vars ()

          ((numberp value) (prin1-to-string value))
          ((emacsql-escape (prin1-to-string value) t)))))

(defun emacsql-escape-vector (vector)
  "Encode VECTOR into a SQL vector scalar."
  (cl-etypecase vector
    (list   (mapconcat #'emacsql-escape-vector vector ", "))
    (vector (concat "(" (mapconcat #'emacsql-escape-value vector ", ") ")"))))

;; SQL Expansion:

