[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql 1a84c983cf 013/427: No named results by default.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql 1a84c983cf 013/427: No named results by default. |
Date: |
Tue, 13 Dec 2022 02:59:23 -0500 (EST) |
branch: elpa/emacsql
commit 1a84c983cf5115a95389d4a3ad8683b5393fea89
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
No named results by default.
---
README.md | 2 +-
emacsql.el | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 901e91926d..1cf833ea4b 100644
--- a/README.md
+++ b/README.md
@@ -26,7 +26,7 @@ Requires Emacs 24 or later.
;; The high-level SELECT interface is a work in progress.
(emacsql-select-raw db (concat "SELECT name, id FROM ':employees' "
"WHERE salary > 60000;"))
-;; => (((name . "Susan") (id . 1001)))
+;; => (("Susan" 1001))
```
## Limitations
diff --git a/emacsql.el b/emacsql.el
index 35834fb399..b9778ea84f 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -39,7 +39,7 @@
;; (emacsql-select-raw db (concat "SELECT name, id FROM ':employees' "
;; "WHERE salary > 60000;"))
-;; ;; => (((name . "Susan") (id . 1001)))
+;; ;; => (("Susan" 1001))
;; Limitations:
@@ -154,9 +154,9 @@ buffer. This is for debugging purposes."
(buffer-substring
(- (point-max) 2) (point-max)))))))
-(defun emacsql--parse (emacsql &rest flatten)
+(defun emacsql--parse (emacsql &rest named)
"Parse a query result into an s-expression.
-If FLATTEN is non-nil, don't include column names."
+If NAMED is non-nil, don't include column names."
(with-current-buffer (emacsql-buffer emacsql)
(let ((standard-input (current-buffer)))
(setf (point) (point-min))
@@ -164,8 +164,8 @@ If FLATTEN is non-nil, don't include column names."
for name = (read)
do (forward-char 3)
for value = (read)
- when flatten collect value into row
- else collect (cons name value) into row
+ when named collect (cons name value) into row
+ else collect value into row
do (forward-char)
when (or (looking-at "\n") (looking-at "#"))
collect row into rows and do (setf row ())
- [nongnu] elpa/emacsql 9c3293c57e 020/427: Add a docstring to emacsql struct., (continued)
- [nongnu] elpa/emacsql 9c3293c57e 020/427: Add a docstring to emacsql struct., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 178a31d5ca 024/427: Lock in the coding system., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 85076dfe0f 027/427: Flesh out example more., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c9854331c0 028/427: Add (un)license header., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 896bb7ce52 035/427: Start adding SQL expanders., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 9272d13ace 036/427: Add some tests for the expanders., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3511a0df1d 037/427: Add a top-level query function, emacsql., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 7e18a43da1 039/427: Add a template example., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 8b2cf8c208 041/427: Fix up :where., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c92c56ce55 003/427: Add a close buffer sentinel., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1a84c983cf 013/427: No named results by default.,
ELPA Syncer <=
- [nongnu] elpa/emacsql 76a430032e 014/427: Fix up old test., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 36c6aae4b5 042/427: Drop raw select., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 77ae713186 046/427: Create table expander., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e859204451 064/427: Flesh out more README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 35676bb560 065/427: Fix README examples., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 847f3bd87f 078/427: Add new keywords to listing., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a9b9d6bfc8 083/427: Fix typo in README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 29f65b3b8e 093/427: Update Windows statement in the README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b447994514 033/427: Change table type recommendation., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4fa57ba758 051/427: Fully drop named parsing., ELPA Syncer, 2022/12/13