Skip to content

Aggregate expressions now allowed  #7

@protobi-pieter

Description

@protobi-pieter

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"]}]
      }
    })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions