Tuples encapsulate the data that Cascalog queries. An individual tuple contains a field name and a value. It is represented as a map. So tuples are just a sequence of maps, and an example is: [{'?num' 1} {'?num' 2}].
Tuples encapsulate the data that Cascalog queries. An individual tuple contains a field name and a value. It is represented as a map. So tuples are just a sequence of maps, and an example is: [{'?num' 1} {'?num' 2}].
(cross-join coll-of-tuples)
Input a collection of a collection of tuples like [[{:b 2}] [{:a 1} {:a 3}] And you'll get a result like: [{:a 1 :b 2} {:a 3 :b 2}]
Input a collection of a collection of tuples like [[{:b 2}] [{:a 1} {:a 3}] And you'll get a result like: [{:a 1 :b 2} {:a 3 :b 2}]
(empty-tuple fields)
Creates a tuple with a nil value for all of the fields
Creates a tuple with a nil value for all of the fields
(map-select-values fields tuples)
Creates a collection of vectors for the values of the fields you have selected
Creates a collection of vectors for the values of the fields you have selected
(project tuples fields)
(project tuples input-fields output-fields)
(select-values fields tuple)
Creates a list of the values of the tuples you want and if the field isn't found, its value is the name of the field. For examples: (select-values [:b :a 100] {:a 1 :b 2 :c 3}) => (2 1 100)
Creates a list of the values of the tuples you want and if the field isn't found, its value is the name of the field. For examples: (select-values [:b :a 100] {:a 1 :b 2 :c 3}) => (2 1 100)
(sort tuples sort-fields reverse?)
(to-tuple names v)
(to-tuples names coll-of-seqs)
turns ["n"] and [[1] [2]] into [{"n" 1} {"n" 2}]
turns ["n"] and [[1] [2]] into [{"n" 1} {"n" 2}]
(to-tuples-filter-nullable names coll-of-seqs)
Turns ["n"] and [[1] [2]] into [{"n" 1} {"n" 2}]
Turns ["n"] and [[1] [2]] into [{"n" 1} {"n" 2}]
(valid? tuple)
Verifies that non-nullable vars aren't null.
Verifies that non-nullable vars aren't null.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close