queryWritableItems()function

queryWritableItems(items: Iterable<T>, query: Query<T>): Iterable<T>
ParamType
itemsIterable<T>
The iterable of data items to query. required
queryQuery<T>
The query to apply (filters, sort order, and limit). required
Return
Iterable<T>
Iterable of matching items (skips sorting when the query has no limit).

Query a set of data items for writing using a query.

  • If no limit is set on the data sorting can be avoided too for performance reasons.

Examples

Array.from(queryWritableItems(items, { name: "Alice" })) // matching items (unsorted)