korma / Korma

Tasty SQL for Clojure.
http://sqlkorma.com
1.48k stars 222 forks source link

ability to parse extra parameters to mysql jdbc #374

Open mprokopov opened 7 years ago

mprokopov commented 7 years ago

Allows specify extra parameters for mysql jdbc driver in map under key :extra

example:

(def db-params (mysql {:host "localhost"
                   :db "itservice"
                   :user "root"
                   :extra {:useLegacyDatetimeCode false
                           :serverTimezone "UTC"
                           :useSSL false}}))

this appends "?useLegacyDatetimeCode&serverTimezone=UTC&useSSL=false" to subname

jiacai2050 commented 6 years ago

Is there anyone looking into this ?

venantius commented 6 years ago

In general this approach seems fine, but it needs tests before we'll be able to consider merging it.

zjjfly commented 6 years ago

though we can specify extra parameters in :db,this pr offers much better clearity