Add quoted entity functions
This commit is contained in:
parent
ac95379bce
commit
376856600e
1 changed files with 16 additions and 0 deletions
16
src/next/jdbc/quoted.clj
Normal file
16
src/next/jdbc/quoted.clj
Normal file
|
|
@ -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)
|
||||
Loading…
Reference in a new issue