Document % function shorthand

This commit is contained in:
Sean Corfield 2021-02-13 21:17:25 -08:00
parent 2d9ceb73a6
commit 645ce897c5

View file

@ -127,6 +127,17 @@ Some examples:
`:inline` is an example of "special syntax" and it renders its `:inline` is an example of "special syntax" and it renders its
(single) argument as part of the SQL string generated by `format`. (single) argument as part of the SQL string generated by `format`.
Another form of special syntax that is treated as function calls
is keywords or symbols that begin with `%`. Such keywords (or symbols)
are split at `.` and turned into function calls:
```clojure
%now ;=> NOW()
%count.* ;=> COUNT(*)
%max.foo ;=> MAX(foo)
%f.a.b ;=> F(a,b)
```
## SQL Parameters ## SQL Parameters
As indicated in the preceding sections, values found in the DSL data structure As indicated in the preceding sections, values found in the DSL data structure