Title: Spam:RE: [CFCDev] Ad-hoc queries using Data Gateway objects
In my world the Filter object is pretty dumb and doesn't make the decision on which items are OR'd or AND'd it just stores the values that can be OR'd or AND'd.  The decision on how to group the values w/in the Filter is left up to someone else.  For example, one implementation is to have a different method call which runs a different query if I need to perform the color = blue or (size = large and shape=triangle) example below and a 2nd query to perform the (color = blue and size=large) or shape=triangle.  An idea though would be to have a property within the Filter to store the possible combinations and allow users to set which search combination to use. E.g. color or (size & shape) | (color or size) & shape | color or size or shape | color & size & shape, etc.  Then the method doing the query could dynamically build by switching the SQL build based on this property in the Filter. We don't implement an extremely dynamic search filter like this b/c we have found most of our users get too confused when presented w/ this many options.  So we just give them 1 (the AND approach) and let them filter from there. 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of RADEMAKERS Tanguy
Sent: Wednesday, January 11, 2006 9:22 AM
To: [email protected]
Subject: RE: [CFCDev] Ad-hoc queries using Data Gateway objects

Hello,
 
I've got a question about using these filter/criteria objects.
 
Say i have three basic attributes to filter on:
- color
- size
- shape
 
How would i use a filter/criteria object to indicate that i want a record set of all widgets "...where color=blue or (size=large and shape=triangular)"?
 
I can see how to make all criteria AND or OR together, but how would i mix and match?
 
Regs,
/t
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to