alfateam/orange-orm

[ENHANCEMENT]: aggregates

lroal opened this issue · 0 comments

Feature Description

const order = await db.order.aggregate({
  customerId: x => x.customerId,
  totalAmount: x => x.sum(x => x.lines.amount),
  lineCount: x => x.count(x => x.lines),
  where:  x => x.customer.isActive.equal(true)
});