(cmql-addFields->mql-addFields & fields)
fields = [{:c ''} {:!d ''}] add :c replace :d (its always replace by default except add document to array place)
fields = [{:c ''} {:!d ''}] add :c replace :d (its always replace by default except add document to array place)
(cmql-project->mql-project & fields)
cmql-project [:a :!_id {:c ''} {:!d ''}] keep a dont keep _id add :c replace :d (its always replace by default except add document to array place)
cmql-project [:a :!_id {:c ''} {:!d ''}] keep a dont keep _id add :c replace :d (its always replace by default except add document to array place)
(cmql-vector->cmql-map fields replace-v)
Used in Sort/Project/Index makes the members maps(if they are :k or :!k),and merge all to 1 map cmql-vector = [:k1 :!k2 :k3 {:k4 ''}] => {:k1 1 :k2 v :k3 1 {:k4 ''}} Used in sort/project/index etc, in sort v=-1,in project v=0 Adds literal,can't be used as normal mongo project {:field 1} means here {:field (literal- 1)}
Used in Sort/Project/Index makes the members maps(if they are :k or :!k),and merge all to 1 map cmql-vector = [:k1 :!k2 :k3 {:k4 ''}] => {:k1 1 :k2 v :k3 1 {:k4 ''}} Used in sort/project/index etc, in sort v=-1,in project v=0 Adds literal,can't be used as normal mongo project {:field 1} means here {:field (literal- 1)}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close