From 09670c8e1f4b4347ca40264c4524abd985b5a8b3 Mon Sep 17 00:00:00 2001 From: Jon Doane Date: Thu, 14 Apr 2016 15:17:50 -0400 Subject: [PATCH] Update README to have an example of doing quoted function calls. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 68aeb0a..5350a38 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,16 @@ To be able to use dashes in quoted names, you can pass ```:allow-dashed-names tr => ["SELECT \"f\".\"foo-id\", \"f\".\"foo-name\" FROM \"foo-bar\" \"f\" WHERE \"f\".\"foo-id\" = 12345"] ``` +In some cases, you may want to quote function calls. To do this, you can use the +```sql/call-quoted``` function instead of the ```sql/call``` function. + +```clj +(sql/format + {:select (sql/quoted-call :my-schema.some-function 1 2 3)} + :quoting :ansi :allow-quoted-names? true) +=> ["SELECT \"my-schema\".\"some-function\"(1, 2, 3)"] +``` + Here's a big, complicated query. Note that Honey SQL makes no attempt to verify that your queries make any sense. It merely renders surface syntax. ```clj