branch: elpa/emacsql
commit a306de980ac720634666c12c215f5c7c79769205
Author: Christopher Wellons <[email protected]>
Commit: Christopher Wellons <[email protected]>
Add :delete keyword.
---
README.md | 8 ++++++++
emacsql.el | 3 +++
2 files changed, 11 insertions(+)
diff --git a/README.md b/README.md
index 62e19530bf..7a58addfe3 100644
--- a/README.md
+++ b/README.md
@@ -132,6 +132,14 @@ Provides `FROM`.
[... :from employees]
```
+#### :delete
+
+Provides `DELETE`.
+
+```el
+[:delete :from employees :where ...]
+```
+
### Templates
To make statement compilation faster, and to avoid making you build up
diff --git a/emacsql.el b/emacsql.el
index d3e11e97c0..dff4e2e130 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -473,6 +473,9 @@ definitions for return from a `emacsql-defexpander'."
(emacsql-with-vars "DROP TABLE "
(var table :identifier)))
+(emacsql-defexpander :delete ()
+ (list "DELETE"))
+
(provide 'emacsql)
;;; emacsql.el ends here