branch: elpa/emacsql
commit afa9aa5194c8b4c701c091f79a69a1cbb86847b8
Author: Christopher Wellons <[email protected]>
Commit: Christopher Wellons <[email protected]>
Add :into expander.
---
README.md | 8 ++++++++
emacsql.el | 5 +++++
2 files changed, 13 insertions(+)
diff --git a/README.md b/README.md
index 748696bab8..560959af0f 100644
--- a/README.md
+++ b/README.md
@@ -132,6 +132,14 @@ Provides `FROM`.
[... :from employees]
```
+#### :into `<table>`
+
+Provides `INTO`.
+
+```el
+[... :into employees]
+```
+
#### :delete
Provides `DELETE`.
diff --git a/emacsql.el b/emacsql.el
index dff4e2e130..49d87b0715 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -460,6 +460,11 @@ definitions for return from a `emacsql-defexpander'."
(emacsql-with-vars "FROM "
(var table :identifier)))
+(emacsql-defexpander :into (table)
+ "Expands to the INTO keyword."
+ (emacsql-with-vars "INTO "
+ (var table :identifier)))
+
(emacsql-defexpander :where (expr)
(emacsql-with-vars "WHERE "
(combine (emacsql--expr expr))))