-
Notifications
You must be signed in to change notification settings - Fork 11
Support to Query and Projection Operators
Bindaas Mongo data source provider naturally supports all the query and projection operators.
Bindaas also supports comparison query operators such as $gt.
{ "_operation" : "find" , "_operation_args" : { "query" : {'qty': {$gt: 50}} , "fields" :{ 'type' : 0 }, "skip" : 0, "limit" : 1000, "sort" : {'qty': -1, '_id':1} } }
Bindaas supports the element query operators, $exists and $type.
{ "_operation" : "find" , "_operation_args" : { "query" : {'qty': { $exists: true }} , "fields" :{}, "skip" : 0, "limit" : 1000 } }
The above query returns the documents where the property 'qty' exists.
{ "_operation" : "find" , "_operation_args" : { "query" : {'qty': { $type: double }} , "fields" :{}, "skip" : 0, "limit" : 1000 } }
The above query returns the documents where the property 'qty' consists of a value type of double.
Bindaas supports regular expressions ($regex).
{ "_operation" : "find" , "_operation_args" : { "query" : { 'item' : {$regex: "$item$", $options: "i"}, 'type' : {$regex: "$type$", $options: ""}} , "fields" :{ '_id' : 0 }, "skip" : 1, "limit" : 1000, "sort" : {'qty': -1, '_id':1} } }
Bindaas supports projection operators such as $meta.
{ "_operation" : "find" , "_operation_args" : { "query" : {}, "fields" :{'item': {$meta:'textScore'}}, "skip" : 0, "limit" : 1000, "sort" : {'qty': -1, '_id':1} } }