branch: elpa/emacsql commit 4fa57ba758fd17e508ffdb949e268836e00f4bbc Author: Christopher Wellons <well...@nullprogram.com> Commit: Christopher Wellons <well...@nullprogram.com>
Fully drop named parsing. This is because I'd rather support expressions inside queries. --- emacsql.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/emacsql.el b/emacsql.el index 1c22769a2b..eb6866b143 100644 --- a/emacsql.el +++ b/emacsql.el @@ -169,18 +169,15 @@ buffer. This is for debugging purposes." (buffer-substring (- (point-max) 2) (point-max))))))) -(defun emacsql--parse (conn &rest named) - "Parse a query result into an s-expression. -If NAMED is non-nil, don't include column names." +(defun emacsql--parse (conn) + "Parse a query result into an s-expression." (with-current-buffer (emacsql-buffer conn) (let ((standard-input (current-buffer))) (setf (point) (point-min)) (cl-loop until (looking-at "#") - for name = (read) - do (forward-char 3) + do (search-forward "=") for value = (read) - when named collect (cons name value) into row - else collect value into row + collect value into row do (forward-char) when (or (looking-at "\n") (looking-at "#")) collect row into rows and do (setf row ())