Thread: class?
View Single Post
Old 11-02-2010, 09:45 AM   #5 (permalink)
Gibou
The Contributor
 
Gibou's Avatar
 
Join Date: Nov 2007
Location: France, near Paris
Posts: 53
Thanks: 6
Gibou is on a distinguished road
Default

I would have done the same as Tony.
A class with methods "Query", "Where", "Limit", etc... + a property "Results" pointing on a private collection storing the results of the query.
The method "Query" puts the results of the query in the private collection and then, the methods "Where" and "Limit" make the limitations in the collection.

The bad thing in that is that it can returns a lot of unnecessary data but for the case you don't want to apply a "where" clause after the "Query", it's ok.
__________________
Wedus project's Website
Send a message via MSN to Gibou
Gibou is offline  
Reply With Quote