[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql dd3f153406 089/427: Drop old with-errors macro.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql dd3f153406 089/427: Drop old with-errors macro. |
Date: |
Tue, 13 Dec 2022 02:59:31 -0500 (EST) |
branch: elpa/emacsql
commit dd3f15340641be0dc345c4b51297f342943976c3
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Drop old with-errors macro.
---
emacsql.el | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/emacsql.el b/emacsql.el
index 7a5e4d895c..1b62b5c4b7 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -124,6 +124,13 @@ buffer. This is for debugging purposes."
(when (and process (process-live-p process))
(process-send-string process ".exit\n"))))
+(defmacro emacsql-with-connection (conn-spec &rest body)
+ (declare (indent 1))
+ `(let ((,(car conn-spec) (emacsql-connect ,@(cdr conn-spec))))
+ (unwind-protect
+ (progn ,@body)
+ (emacsql-close ,(car conn-spec)))))
+
(defun emacsql-buffer (conn)
"Get proccess buffer for CONN."
(process-buffer (emacsql-process conn)))
@@ -222,14 +229,6 @@ buffer. This is for debugging purposes."
(not (emacsql--complete-p conn)))
(accept-process-output (emacsql-process conn) timeout))))
-(defmacro emacsql-with-errors (conn &rest body)
- "Run BODY checking for errors from SQLite after completion."
- (declare (indent 1))
- `(progn
- (emacsql--clear ,conn)
- ,@body
- (emacsql--check-error ,conn)))
-
(defun emacsql--column-to-string (column)
"Convert COLUMN schema into a SQL string."
(let ((name (emacsql-escape (pop column)))
@@ -284,9 +283,7 @@ buffer. This is for debugging purposes."
(defun emacsql-add-expander (keyword arity function)
"Register FUNCTION for KEYWORD as a SQL expander.
FUNCTION should accept the keyword's arguments and should return
-a list of (<string> [arg-pos] ...).
-
-See also `emacsql-with-errors'."
+a list of (<string> [arg-pos] ...)."
(prog1 keyword
(clrhash emacsql-expander-cache)
(push (list keyword arity function) emacsql-expanders)))
- [nongnu] elpa/emacsql a5a0c2f838 323/427: Fix typo, (continued)
- [nongnu] elpa/emacsql a5a0c2f838 323/427: Fix typo, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e6ce8ded45 326/427: Require url when running emacsql-sqlite-download, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 01f3d3eb2b 316/427: Fallback to buffer-file-name when load-file-name is nil, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 02acd07072 328/427: Ensure executable variable is defined at compile time., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 2ffcc95c67 338/427: Fix a typo in the doc-string of emacsql-with-params., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 74bd11bc09 334/427: Fix up package description headers., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5df2891557 349/427: Use cl-generic package, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e8c090e11f 353/427: Improve Makefile portability and dump Cask, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 0ba12b89d5 084/427: Drop "work in progress.", ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 364bf466ea 086/427: Linkify the issue in the README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql dd3f153406 089/427: Drop old with-errors macro.,
ELPA Syncer <=
- [nongnu] elpa/emacsql 72c1954517 096/427: Block on connection until the output has flushed., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1e9857ccc4 103/427: Allow variables inside vectors., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 8a66563af6 105/427: Combine :insert and :into., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql d04ef64ce0 109/427: Add IF NOT EXISTS and TEMPORARY to CREATE TABLE., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 58641b9827 115/427: Fill out keywords in README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql fc941d7c75 118/427: Capture a common identifier vector pattern., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql a09911a205 125/427: Add LIMIT and OFFSET expanders., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 8945af0dd8 129/427: Add :check and allow schemas to have variables., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4206b17f39 134/427: Add support for AS with CREATE TABLE., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 6c32f02139 137/427: Add emacsql-thread macro., ELPA Syncer, 2022/12/13