The .at() is used in conjunction with the .update(), .delete() predicates and will always follow the .update() or .delete(). The .at() works similar to the .where(), but instead of filtering out the rows to return, the .at() defines what rows should be processed in the preceding .update() or .delete() predicate.

Parameter-less

The .at() can contain no parameters. When no parameters are passed then every row is passed to the .update() or .delete() predicate for processing.

at()
at(): jinqJs;

Predicate Parameter

The predicate() function will receive two arguments that is the collection currently being iterated over and its current index number. This allowing you to perform complex logic to determine if the row should be passed to the update predicate for processing. The predicate() function must return true or false.

at( Function( collection, index ) )
type Collection<T> = T[];
type PredicateCollection<T> = (collection: Collection<T>, index: number) => boolean;

at<T>(predicate: PredicateCollection<T>): jinqJs;

Sample doing in-place update

Update using predicate

Parameter As String Condition

Deleting records based on a condition