File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737 :? [0 0 ]}))
3838
3939; ;; Test Metadata.
40- (expect { :doc " Just selects the current time.\n Nothing fancy."
41- :arglists ( list '[]
42- '[{} {:keys [connection]}])}
43- (in ( meta (var current-time-query) )))
40+ (expect ( more-> " Just selects the current time.\n Nothing fancy." :doc
41+ 'current-time-query :name
42+ ( list '[] '[{} {:keys [connection]}]) :arglists )
43+ (meta (var current-time-query)))
4444
45- (expect {:doc " Here's a query with some named and some anonymous parameters.\n (...and some repeats.)"
46- :name 'mixed-parameters-query
47- :arglists (list '[{:keys [? value2 value1]}]
48- '[{:keys [? value2 value1]} {:keys [connection]}])}
49- (in (meta (var mixed-parameters-query))))
45+ (expect (more-> " Here's a query with some named and some anonymous parameters.\n (...and some repeats.)" :doc
46+ 'mixed-parameters-query :name
47+ true (-> :arglists list?)
48+ ; ; TODO We could improve the clarity of what this is testing.
49+ 2 (-> :arglists count)
50+
51+ 1 (-> :arglists first count)
52+ #{'? 'value1 'value2} (-> :arglists first first :keys set)
53+
54+ 2 (-> :arglists second count)
55+ #{'? 'value1 'value2} (-> :arglists second first :keys set)
56+ #{'connection} (-> :arglists second second :keys set))
57+ (meta (var mixed-parameters-query)))
5058
5159; ; Running a query in a transaction and using the result outside of it should work as expected.
5260(expect-let [[{time :time }] (jdbc/with-db-transaction [connection derby-db]
You can’t perform that action at this time.
0 commit comments