emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/emacsql 213bb71b7a 152/427: Add :having expander.


From: ELPA Syncer
Subject: [nongnu] elpa/emacsql 213bb71b7a 152/427: Add :having expander.
Date: Tue, 13 Dec 2022 02:59:37 -0500 (EST)

branch: elpa/emacsql
commit 213bb71b7a1a6bbacd8e6b4e3955a6cd7788b58f
Author: Christopher Wellons <wellons@nullprogram.com>
Commit: Christopher Wellons <wellons@nullprogram.com>

    Add :having expander.
---
 README.md  | 5 +++--
 emacsql.el | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index d6d22ed5fa..bd92bb97f1 100644
--- a/README.md
+++ b/README.md
@@ -200,12 +200,13 @@ Provides `FROM`.
 [... :from [(as (:select ...) s1) (as (:select ...) s2)]]
 ```
 
-#### :where `<expr>`
+#### :where `<expr>`, :having `<expr>`
 
-Provides `WHERE`.
+Provides `WHERE` and `HAVING`.
 
 ```el
 [... :where (< count 10)]
+[... :having (= size 10)]
 ```
 
 #### :group-by `<expr>`
diff --git a/emacsql.el b/emacsql.el
index 0056f4050c..f9de57cc91 100644
--- a/emacsql.el
+++ b/emacsql.el
@@ -609,6 +609,10 @@ definitions for return from a `emacsql-defexpander'."
   (emacsql-with-vars "WHERE "
     (expr expr)))
 
+(emacsql-defexpander :having (expr)
+  (emacsql-with-vars "HAVING "
+    (expr expr)))
+
 (emacsql-defexpander :group-by (expr)
   (emacsql-with-vars "GROUP BY "
     (expr expr)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]