Result Transformers
Ex: avg="balance", avg="balance:myBalance", avg="balance, total", avg=["balance","total"]// Using native approach for one projection only
var results = c.like("firstName","Lui%")
.and(
c.restrictions.between( "balance", 200, 300),
c.restrictions.eq("department", "development")
)
.setProjection( c.projections.rowCount() )
.get();
// Using the withProjections() method, which enables you to do more than 1 projection
var results = c.like("firstName","Lui%")
.and(
c.restrictions.between( "balance", 200, 300),
c.restrictions.eq("department", "development")
)
.withProjections(rowCount=1)
.get();
var results = c.like("firstName","Lui%")
.and(
c.restrictions.between( "balance", 200, 5000),
c.restrictions.eq("department", "development")
)
.withProjections(avg="balance,total",max="total:maxTotal")
.gt("maxTotal",500)
.list();Last updated
Was this helpful?