t×tecexpressby TeKOcloud
DEv0.7.1
API & types / VUE

txQuery.

Synchronously processes local data: filter/search, sort/group, page and project. The input array is preserved.

Parameters: input = source list, o/options = TxLoadOptions. Synchronous result: TxLoadResult with flat data, totalCount before paging and optional groups/groupCount. Grouping does not change the shape of data. Getter/projection errors propagate; Dart skip/take must not be negative.

ts
function txQuery<T>(input: readonly T[], o: TxLoadOptions<T>): TxLoadResult<T>
ts
import { txQuery } from '@tekocloud.de/tecexpress'
console.log(txQuery([{ id: 2 }, { id: 1 }], { sort: [{ selector: 'id' }], take: 1 })) // data: [{ id: 1 }], totalCount: 2