Liking cljdoc? Tell your friends :D

cmql-core.internal.convert.commands


add-and-filtersclj/s

(add-and-filters filters)
source

add-and-qfiltersclj/s

(add-and-qfilters filters)
source

add-stage?clj/s

(add-stage? m)
source

args->query-updateOperators-optionsclj/s

(args->query-updateOperators-options args command-keys)

Seperates update arguments to [query update-pipeline options] Its used from update command,and from others like delete(dq) , that dont have pipeline just query and options

Seperates update arguments to [query update-pipeline options]
Its used from update command,and from others like delete(dq) , that dont have pipeline just query and options
sourceraw docstring

args->query-updatePipeline-optionsclj/s

(args->query-updatePipeline-options args command-keys)

Seperates update arguments to [query update-pipeline options] Its used from update command,and from others like delete(dq) , that dont have pipeline just query and options

Seperates update arguments to [query update-pipeline options]
Its used from update command,and from others like delete(dq) , that dont have pipeline just query and options
sourceraw docstring

cmql-filters->match-stageclj/s

(cmql-filters->match-stage filters)

Many filters(aggregate operators) combined to a match $exprs using $and operators

Many filters(aggregate operators) combined to a match $exprs using $and operators
sourceraw docstring

cmql-map->mql-mapclj/s

(cmql-map->mql-map m)

Converts a smongo query a valid mongo query (removes the smongo symbols)

Variables :aname- => '$$aname' :aname-.afield => '$$aname.afield' :- => anonymous variable converts to '$$m'

Keyword in key poistion => field name {:f ''} => {'f' ''}

Keyword not in key position => field reference :v => '$v' (can be as value in a map,a value in a vector,or out of a collection)

else no change

Converts a smongo query a valid mongo query (removes the smongo symbols)

Variables
  :aname-        =>   '$$aname'
  :aname-.afield =>   '$$aname.afield'
  :-            => anonymous variable converts to '$$__m__'

Keyword in key poistion => field name
  {:f ''}  => {'f' ''}

Keyword not in key position => field reference
  :v => '$v'   (can be as value in a map,a value in a vector,or out of a collection)

else
  no change
sourceraw docstring

cmql-pipeline->mql-pipelineclj/s

(cmql-pipeline->mql-pipeline cmql-pipeline)

Converts a cmql-pipeline to a mongo pipeline (1 vector with members stage operators) [],{}../nil => empty stages or nil stages are removed [[] []] => [] [] flatten of stages (used when one stage produces more than 1 stages) cmql-filters combined => $match stage with $and [] projects => $project

Converts a cmql-pipeline to a mongo pipeline (1 vector with members stage operators)
[],{}../nil  => empty stages or nil stages are removed
[[] []] => [] []   flatten of stages (used when one stage produces more than 1 stages)
cmql-filters combined =>  $match stage with $and
[] projects  => $project
sourceraw docstring

cmql-specific-optionsclj/s

source

cmql-vector->mql-vectorclj/s

(cmql-vector->mql-vector v)
source

command-keysclj/s

(command-keys command-def)
source

command-option?clj/s

(command-option? option command-keys)
source

get-pipeline-optionsclj/s

(get-pipeline-options args command-keys)
source

group-add-and-to-filtersclj/s

(group-add-and-to-filters cmql-filters)
source

project-field?clj/s

(project-field? field)
source

project-stage?clj/s

(project-stage? m)
source

qfilter-stage?clj/s

(qfilter-stage? stage)
source

seperate-bulkclj/s

(seperate-bulk bulk-key args)

Used in bulk deletes/updates seperate the bulk queries from the args ({:dq ...} {:dq ...} arg1 arg2 ...) => [ [{:dq ...} {:dq ...}] [arg1 arg2 ...] ]

Used in bulk deletes/updates seperate the bulk queries from the args
({:dq ...} {:dq ...} arg1 arg2 ...) => [ [{:dq ...} {:dq ...}] [arg1 arg2 ...] ]
sourceraw docstring

split-db-namespaceclj/s

(split-db-namespace db-namespace)

Arguments can be :db-name.coll-name :db-name :.coll-name ;;db-name will be '',the default db will be added later in the command Seperator can be the . or /

Arguments can be
:db-name.coll-name
:db-name
:.coll-name     ;;db-name will be '',the default db will be added later in the command
Seperator can be the . or /
sourceraw docstring

stage-operator?clj/s

(stage-operator? stage)
source

stage-operatorsclj/s

source

update-pipeline-stage?clj/s

(update-pipeline-stage? stage)
source

upsert-docclj/s

(upsert-doc args)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close