Hi All,
If anyone's interested in using it, I made a little S-SQL extension
(def-sql-op :=if (a b) `(,@(case a (:null (sql-expand `(:is-null ,b))) (nil (sql-expand t)) (otherwise (sql-expand `(:= ,a ,b))))))
I find it convenient when writing queries that take optional parameters where if the parameter is not specified, you want to return the row regardless of what value b takes. Does anyone else write little extensions like these? Should we collect them in a contrib?
Hi Andy,
If you want, you can create a wiki page on the Postmodern github wiki [1] for people to collect such snippets. There's not no huge community around Postmodern, so I'm not sure how much of a market there is for sharing snipptets, but it can't hurt to preserve them somewhere.
[1]: https://github.com/marijnh/postmodern/wiki
Best, Marijn
postmodern-devel@common-lisp.net