Re: DB Plugin Question...
Re: DB Plugin Question...
- Subject: Re: DB Plugin Question...
- From: James Cicenia <email@hidden>
- Date: Mon, 11 Apr 2005 20:14:08 -0500
Well, I need to change the sql it is sending to db2. Caseinsensitive like creates
a bit of sql like so from this:
<x-tad-bigger>qualifier=((companyName caseinsensitivelike '117*') and (contactName caseinsensitivelike 'abc*')),
</x-tad-bigger> t0 WHERE (UPPER(t0.company_name) LIKE UPPER(?) ESCAPE '\' AND UPPER(t0.contact_name) LIKE UPPER(?) ESCAPE '\')"
I want it to be like such that I convert it to
t0 WHERE (UPPER(t0.company_name) LIKE (?) ESCAPE '\' AND UPPER(t0.contact_name) LIKE (?) ESCAPE '\')"
Notice the missing upper on the binding. I think this will cure a DB2 woe. So the question is where does wo convert key, etc., to UPPER? My
strategy was such:
if(sel.equals(EOQualifier.QualifierOperatorCaseInsensitiveLike) && value instanceof String) {
theQualifier = new EOKeyValueQualifier(key, EOQualifier.QualifierOperatorLike, ((String)value).toUpperCase());
}
else {
theQualifier = qualifier;
}
which is good so far.. just now need to apply UPPER on the key when it gets generated.
Does this make sense? Any great paths to look into?
I think I need to find where it converts keys to columns? or better yet when in converts keys to columns for each qualifier.
- James
On Apr 11, 2005, at 7:29 PM, Chuck Hill wrote:
I'm not sure there is one. Column names are usually case insensitive.
Chuck
On Apr 11, 2005, at 5:20 PM, James Cicenia wrote:
I am trying to convert the key to something like UPPER(key),
however I can't use EOKeyValueQualifier to set it and I need to
explicitly set it.
Is there a place where I can intercept WebObjects moment
where it converts key to a sql column?
I can't seem to find it in the javadocs.
Thanks,
James Cicenia
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden