From 376856600ec8e4e29bc17a37b767a3c7436e78b1 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Sun, 31 Mar 2019 17:29:21 -0700 Subject: [PATCH] Add quoted entity functions --- src/next/jdbc/quoted.clj | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/next/jdbc/quoted.clj diff --git a/src/next/jdbc/quoted.clj b/src/next/jdbc/quoted.clj new file mode 100644 index 0000000..2b5f0a8 --- /dev/null +++ b/src/next/jdbc/quoted.clj @@ -0,0 +1,16 @@ +;; copyright (c) 2019 Sean Corfield, all rights reserved + +(ns next.jdbc.quoted + "Provides functions for use with the :entities option that define + how SQL entities should be quoted in strings constructed from + Clojure data.") + +(defn ansi "ANSI \"quoting\"" [s] (str \" s \")) + +(defn mysql "MySQL `quoting`" [s] (str \` s \`)) + +(defn sql-server "SQL Server [quoting]" [s] (str \[ s \])) + +(def oracle "Oracle \"quoting\" (ANSI)" ansi) + +(def postgres "PostgreSQL \"quoting\" (ANSI)" ansi)