query
query copied to clipboard
Aggregate expressions now allowed
Basic aggregate expressions are now allowed in queries with $expr
paralleling MongoDB. Currently only a few of myriad expressions are implemented here, including $sum
, $min
, $max
and a non-standard extension $same
var rows = [
{x0: 0, x1: 50, x2: 30},
{x0: 10, x1: 50, x2: 40},
{x0: 25, x1: 50, x2: 30},
{x0: 40, x1: 50, x2: 10},
]
var r1 = Query.query(rows, {
$expr: {
$eq: [100, {$sum: ["x0", "x1", "x2"]}]
}
})