[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/emacsql ed86b098ce 197/427: Add prefix arg to emacsql-show
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/emacsql ed86b098ce 197/427: Add prefix arg to emacsql-show-last-sql. |
Date: |
Tue, 13 Dec 2022 02:59:41 -0500 (EST) |
branch: elpa/emacsql
commit ed86b098ce341997058e6fa4c06a84c96ed7ee2d
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>
Add prefix arg to emacsql-show-last-sql.
---
emacsql.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/emacsql.el b/emacsql.el
index 623c340a25..e8f4a36a02 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -272,9 +272,13 @@ A statement can be a list, containing a statement with its
arguments."
collect (intern (format "$%d" i))))))
;;;###autoload
-(defun emacsql-show-last-sql ()
- "Display the compiled SQL of the s-expression SQL expression before point."
- (interactive)
- (emacsql-show-sql (emacsql-flatten-sql (preceding-sexp))))
+(defun emacsql-show-last-sql (&optional prefix)
+ "Display the compiled SQL of the s-expression SQL expression before point.
+A prefix argument causes the SQL to be printed into the current buffer."
+ (interactive "P")
+ (let ((sql (emacsql-flatten-sql (preceding-sexp))))
+ (if prefix
+ (insert sql)
+ (emacsql-show-sql ))))
;;; emacsql.el ends here
- [nongnu] elpa/emacsql 53b2e98515 131/427: Fill out README for new schema table constraints., (continued)
- [nongnu] elpa/emacsql 53b2e98515 131/427: Fill out README for new schema table constraints., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 364c3cacb6 133/427: More advanced :from sources, again., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 99a8069389 135/427: Add support for foreign keys., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql e6ab07e16b 140/427: Switch to a friendlier name., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql bec6af6940 148/427: Add VACUUM., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 03aebdecd1 160/427: Rename :log option to :debug., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql bb221f6134 161/427: Drop .print command flushing., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 72b34f6522 173/427: Add some more autoloading., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 3229cd41af 180/427: Change the requirements for front-end implementations., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 431a3b325f 200/427: Toss "reap" and switch to new finalize with Cask., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql ed86b098ce 197/427: Add prefix arg to emacsql-show-last-sql.,
ELPA Syncer <=
- [nongnu] elpa/emacsql 027c5df94e 209/427: Organize all the keywords in the README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 1ebbc22411 212/427: Disable undo in process buffers., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 5bef799b6b 220/427: Make some tweaks to accommodate Windows., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 0cb9e47d24 227/427: Test all available backends., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 730e4d882a 235/427: Fix up the README., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4b45472ffa 240/427: Don't copy the binary every time., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql c89ccf82df 241/427: Make a reconnect generic method., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 159195690d 245/427: Include bin/ in the package., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql f98ee5e7cd 246/427: Use no-undo buffers., ELPA Syncer, 2022/12/13
- [nongnu] elpa/emacsql 4b58a6717e 250/427: Don't use temporary tables in foreign key test., ELPA Syncer, 2022/12/13