Skip to content

Commit

Permalink
Detect empty SQL vectors (better error messages).
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeto committed Jan 29, 2014
1 parent cc92c15 commit 3f38b35
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions emacsql-compiler.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
(defun emacsql-escape-vector (vector)
"Encode VECTOR into a SQL vector scalar."
(cl-typecase vector
(null (emacsql-error "Empty SQL vector expression."))
(list (mapconcat #'emacsql-escape-vector vector ", "))
(vector (concat "(" (mapconcat #'emacsql-escape-value vector ", ") ")"))
(otherwise (emacsql-error "Invalid vector %S" vector))))
Expand Down

0 comments on commit 3f38b35

Please sign in to comment.