|
|
@ -3,7 +3,8 @@
|
|
|
|
[wanijo.framework.devmode :as devmode]
|
|
|
|
[wanijo.framework.devmode :as devmode]
|
|
|
|
[clj-time.format :as time-format]
|
|
|
|
[clj-time.format :as time-format]
|
|
|
|
[clj-time.local :as time-local]
|
|
|
|
[clj-time.local :as time-local]
|
|
|
|
[clojure.spec.alpha :as spec])
|
|
|
|
[clojure.spec.alpha :as spec]
|
|
|
|
|
|
|
|
[clojure.string :as cljs])
|
|
|
|
(:import (java.util UUID)))
|
|
|
|
(:import (java.util UUID)))
|
|
|
|
|
|
|
|
|
|
|
|
(spec/def ::date-str
|
|
|
|
(spec/def ::date-str
|
|
|
@ -27,11 +28,11 @@
|
|
|
|
(defn butiful-query [qry]
|
|
|
|
(defn butiful-query [qry]
|
|
|
|
(->> qry
|
|
|
|
(->> qry
|
|
|
|
str
|
|
|
|
str
|
|
|
|
clojure.string/trim-newline
|
|
|
|
cljs/trim-newline
|
|
|
|
clojure.string/split-lines
|
|
|
|
cljs/split-lines
|
|
|
|
(map clojure.string/trim)
|
|
|
|
(map cljs/trim)
|
|
|
|
(filter #(pos? (count %)))
|
|
|
|
(filter #(pos? (count %)))
|
|
|
|
(clojure.string/join \newline)))
|
|
|
|
(cljs/join \newline)))
|
|
|
|
|
|
|
|
|
|
|
|
(defn exec-query! [qry params]
|
|
|
|
(defn exec-query! [qry params]
|
|
|
|
(with-open [session (db/get-session @conn)]
|
|
|
|
(with-open [session (db/get-session @conn)]
|
|
|
|