Re: EO Raw Row Query
Re: EO Raw Row Query
- Subject: Re: EO Raw Row Query
- From: Jonathan Rochkind <email@hidden>
- Date: Wed, 18 Dec 2002 13:07:17 -0600
I don't completely understand what you want to do. But there are two parts
to it:
1) Parsing what they've entered in a text box into some data structure that
has a meaning to our code.
2) Creating an EOQualifier that will find what we want.
These two kind of can collapse into one, because the data structure we
create from parsing their text COULD be an EOQualifier---or it could be an
intermediate form that will be turned into an EOQualifier. But in either
case, there are really two distinct problems here. How we succesfully parse
their text entry, and how we create a database query that will resolve
their text entry.
I don't really understand what is you want to do though. You want them to
enter "music japan", and then that should return... maybe for example: all
Products that have a "category" whose "name" is "music", OR have a
"country" whose "name" is "japan"? But there could be a category named
"japan" too, theoretically---or even a country named "music"
theoretically---although we know that's not going to happen, there's no
good way for our code to mean that. So really we mean we want all Products
which have a "category" of "music" OR "japan", OR a "country" of "music" or
"japan"? Is that right? Also, every place that says "OR" could
potentially say "AND" too---it depends on what you want. Or you could even
allow the user to enter boolean operators in the text box to specify
whether they want AND or OR.
In general, it's going to be dificult to do what you want, more dificult
depending on how complex what you want is. In general, the nature of
relational database querries is such that choosing 'AND' above makes things
somewhat simpler than choosing 'OR'. But explain exactly what you want, as
clearly as you can---and there may or may not be a good way to do it.
At 10:34 PM 12/17/2002 +0000, you wrote:
I have a singe search box that I would like to be able to find items
from different entities (which I am achieving ok through my EO
bindings), but what I am failing to achieve is being able to put
several queries in the box for it to find eg. "music" + "japan".
Although these are properties in one or more tables/enterties that
can be found in seperate queries, i can not mix the two like you
would in a top search engine, I can only put in "music" and the do
my search which results in a list of items with that category,
or "japan" which will result with item of that country.
How do I do this - join the two or three or four? You get my drift.
Kind regards
Jonathan
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.