File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 4545 :offset 210
4646 :lock 215
4747 :values 220
48- :query-values 250 }
48+ :query-values 221 }
4949 custom-additions))
5050
5151(defn override-default-clause-priority
Original file line number Diff line number Diff line change 77 add-column partition-by insert-into-as
88 create-table rename-table drop-table
99 window create-view over with-columns]]
10- [honeysql.helpers :as sqlh :refer [insert-into values where select
11- from order-by update sset]]
10+ [honeysql.helpers :as sqlh :refer [insert-into values where select columns
11+ from order-by update sset query-values ]]
1212 [honeysql.core :as sql]
1313 [clojure.test :as test :refer [deftest is testing]]))
1414
4545 (values [{:did 23 :dname " Foo Distributors" }])
4646 (on-conflict :did )
4747 (do-update-set! [:dname " EXCLUDED.dname || ' (formerly ' || d.dname || ')'" ])
48+ sql/format)))
49+ (is (= [" INSERT INTO distributors (did, dname) (SELECT ?, ?) ON CONFLICT ON CONSTRAINT distributors_pkey DO NOTHING" 1 " whatever" ]
50+ (-> (insert-into :distributors )
51+ (columns :did :dname )
52+ (query-values (select 1 " whatever" ))
53+ (upsert (-> (on-conflict-constraint :distributors_pkey )
54+ do-nothing))
4855 sql/format)))))
4956
5057
You can’t perform that action at this time.
0 commit comments