[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql ca62adc4b2 177/427: Add debug argument to emacsql-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql ca62adc4b2 177/427: Add debug argument to emacsql-psql. |
Date: |
Tue, 13 Dec 2022 02:59:39 -0500 (EST) |
branch: elpa/emacsql
commit ca62adc4b271f6fbdc41d49c5282e7bc80d6d6a5
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Add debug argument to emacsql-psql.
---
TODO.md | 8 ++++++++
emacsql-psql.el | 5 ++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/TODO.md b/TODO.md
new file mode 100644
index 0000000000..63e1b881f1
--- /dev/null
+++ b/TODO.md
@@ -0,0 +1,8 @@
+## Important
+ * ALTER TABLE
+ * indexes
+ * views
+ * schema lookup
+ * distinct (select)
+
+## Bonus
diff --git a/emacsql-psql.el b/emacsql-psql.el
index 47ed1e0eb7..1f23407018 100644
--- a/emacsql-psql.el
+++ b/emacsql-psql.el
@@ -32,7 +32,7 @@
(:documentation "A connection to a PostgreSQL database."))
;;;###autoload
-(cl-defun emacsql-psql (dbname &key username hostname port)
+(cl-defun emacsql-psql (dbname &key username hostname port debug)
"Connect to a PostgreSQL server using the psql command line program."
(let ((args (list dbname)))
(when username
@@ -54,6 +54,9 @@
(prog1 connection
(setf (process-sentinel process)
(lambda (_proc _) (kill-buffer buffer)))
+ (when debug
+ (setf (emacsql-log-buffer connection)
+ (generate-new-buffer "*emacsql-log*")))
(emacsql-register connection)
(mapc (apply-partially #'emacsql-send-string connection)
'("\\pset pager off"
- [nongnu] elpa/emacsql 42c2fd7569 145/427: Tweak limitation wording., (continued)
- [nongnu] elpa/emacsql 42c2fd7569 145/427: Tweak limitation wording., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql fe0c7004fc 146/427: Add :begin, :commit, and :rollback., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 2550196816 162/427: Drop SQLite version requirements., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 9a1b4209ba 164/427: Add PostgreSQL front-end., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5f4c2ed5a7 166/427: Add emacsql-psql-unavailable-p., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1d0ef4011c 167/427: Make emacsql-connection abstract., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 64c3a03d62 169/427: Flesh out some more README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 9f6c10eca0 172/427: Move error checking out to helper mix-in., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4f76b94f7c 168/427: Set psql to print nil for NULL., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 7434263d82 174/427: Oops, drop leftover function call., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ca62adc4b2 177/427: Add debug argument to emacsql-psql.,
ELPA Syncer <=
- [nongnu] elpa/emacsql afef528d81 179/427: Fix memoization to include type map., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql b2f2dd37cf 178/427: Allow connection to specify their own types., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4aa889882d 182/427: Fix slot allocation on emacsql-connection., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 769abe20fa 183/427: Don't rely on a closure in cleanup hook., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e9efb0803e 185/427: Oops, include the reap source., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5962268f83 184/427: Split off reaper code., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql f8c3d9fce2 369/427: Silence Emacs 25's byte-compiler, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 8e34660ba1 370/427: Allow `gcc` as a separate option for C compilation., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 739c24cab6 389/427: Add kludge to work around `cl-defmethod' bug, ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 18b40213fd 403/427: No longer use obsolete generalized variable `point', ELPA Syncer, 2022/12/13