We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45c0e72 commit d8ff142Copy full SHA for d8ff142
test/com/wotbrew/cinq/group_test.clj
@@ -0,0 +1,15 @@
1
+(ns com.wotbrew.cinq.group-test
2
+ (:require [clojure.test :refer :all]
3
+ [com.wotbrew.cinq :as c]
4
+ [com.wotbrew.cinq.column]))
5
+
6
+(deftest accessible-as-coll-test
7
+ (is (= [1 2 3] (c/rel-first (c/q [a [1 2 3] :group []] (vec a)))))
8
+ (is (= [[1 3] [2]] (vec (c/q [a [1 2 3] :group [even (even? a)] :order [even :asc]] (vec a))))))
9
10
+(deftest type-is-column-test
11
+ (is (instance? com.wotbrew.cinq.column.Column (c/rel-first (c/q [a [] :group []] a)))))
12
13
+(deftest can-mix-aggregate-col-test
14
+ (is (= [[1 2 3] 6] (c/rel-first (c/q [a [1 2 3] :group []] [(vec a) (c/sum a)])))))
15
0 commit comments