leoc11 / elcy

ORM for Typescript and Javascript with Linq-like query syntax.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support assignment operator in select statement.

leoc11 opened this issue · comments

Useful for accumulative sum. example:

let total = 0;
const accumulateResult = await db.table1Set.setParameters({ total }).select(o => ({
 column1: o.column1,
 accumulativeSum: total += o.column1
})).toArray();

Note: total variable will not be affected.