Skip to content

Pointer Query Operations

Malcolm Groves edited this page Jan 9, 2014 · 4 revisions

FluentQuery supports the following operations when querying pointers from a container (eg, a TList, or a TList<Pointer>):

Operation Bound Unbound Terminating Description
First Yes Yes Enumerate the first pointer, ignoring the remainder.
From Yes From allows you to specify the source of the data you are querying. It is also From which transforms an Unbound Query into a Bound Query.
IsAssigned Yes Yes Enumerates non-nil pointers.
Skip Yes Yes Skip will bypass the specified number of pointers from the start of the enumeration, after which it will enumerate the remaining pointers as normal.
SkipWhile Yes Yes SkipWhile will bypass pointers at the start of the enumeration while the supplied Predicate evaluates True. Once the Predicate evaluates false, all remaining pointers will be enumerated as normal.
Take Yes Yes Take will enumerate up to the specified number of pointers, then ignore the remainder.
TakeWhile Yes Yes TakeWhile will continue enumerating pointers while the supplied Predicate evaluates True, after which it will ignore the remaining pointers.
Where Yes Yes Filter the pointers enumerated to only those that evaluate true when passed into the supplied Predicate

Clone this wiki locally