[turba] imp name expansion - turba sql problem

Chuck Hagenbuch chuck@horde.org
Mon, 19 Aug 2002 18:39:39 -0400


Quoting liamr@umich.edu:

> I've been thinking about this a bit..  I guess it comes down to the
> question of what are "strict" searches for?

Anything in the strict array must be matched exactly, instead of with a 
LIKE. That's all it means.

> - to be used when you want an exact match in one of the fields your
> searching?
>   (as opposed to an ldap query for *blah*, or a sql query for %blah%).

Yup, this one.

> Say we were only searching turba's sql tablespace for one "strict" field,
> and nothing else...  currently, the query would be:
> 
>     select ... from turba_objects where
>     (object_alias = 'alias' AND owner_id = 'liamr')
> 
> I think I can better illustrate what I think the groupings should be if I
> play with the parentheses:
> 
>     select ... from turba_objects where
>     (owner_id = 'liamr') AND (object_alias = 'alias')
> 
> because as soon as you start adding on other fields into the search, they
> should be added to the query after that initial AND.
> 
> Does this make sense?  Or do I not understand the purpose of "strict"
> fields?

I think what you're saying makes sense, though the grouping has to do with 
AND/OR and needing the owner_id to not be OR'ed...

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"After a few minutes the most aromatic and nice smelling Italian coffee 
 will come out of the exhaustpipe." - Our stove-top espresso pot