Skip to content

v3.8.0

Compare
Choose a tag to compare
@lroal lroal released this 04 May 06:06
· 78 commits to master since this release

Aggregate operators

  const orders = await db.order.getAll({
    numberOfLines: x => x.count(x => x.lines.id),
    totalAmount: x => x.sum(x => x.lines.amount),
    minAmount: x => x.min(x => x.lines.amount),
    maxAmount: x => x.max(x => x.lines.amount),
    avgAmount: x => x.avg(x => x.lines.amount),
  });