From 94765ca7dbd4dfa054b97ece3a892fd9143a3915 Mon Sep 17 00:00:00 2001 From: Yehonathan Sharvit Date: Tue, 15 Dec 2020 14:21:07 +0200 Subject: [PATCH] Mention how to disable paremeterization --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index c4ed4db..3e819dd 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,13 @@ to jdbc: (jdbc/query conn (sql/format sqlmap)) ``` +If you want to format the query as a string with no parameters (e.g. to use the SQL statement in a SQL console), pass `:parameterizer :none` to the `sql/format`: + +```clj +(sql/format sqlmap :parameterizer :none) +=> ["SELECT a, b, c FROM foo WHERE f.a = baz"] +``` + ### `build` You can build up SQL maps yourself or use helper functions. `build` is the Swiss Army Knife helper. It lets you leave out brackets here and there: