Question about querying

Topics: Developer Forum
Oct 31, 2008 at 12:34 PM
Hello,
First of all, congratulation for your beautiful piece of code , it seems very powerful and very complete.

I have a question regarding queries:
Is it possible of separating queryconditions from the query ?
I explain it :
if i want to query a productlist i write for example

Producslist.Find( CK.K["Name"] == "Mike"))

Is it possible to create the where condition outside of the query
like this (in pseudo code) 

dim myQuery1 as whereCondition = ......... 
dim myQuery2 as whereCondition = .........

and finally query the list like this

Producslist.Find (myQuery1 )
or
Producslist.Find (myQuery2 )


Thank you in advance.


Coordinator
Oct 31, 2008 at 2:21 PM
yes, just use:

WhereCondition  myQuery1 = CK.K["Name"] == "Mike";
if(wantMoreCondition)
{
    myQuery1 &= CK.K["Age"] > 18;
}
Producslist.Find (myQuery1);
Oct 31, 2008 at 2:55 PM
Brilliant ! It works !!

Thank you Sir!