• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: DB Plugin Question...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: DB Plugin Question...
      • From: Chuck Hill <email@hidden>
References: 
 >DB Plugin Question... (From: James Cicenia <email@hidden>)
 >Re: DB Plugin Question... (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: DB Plugin Question...
  • Next by Date: WOResourceManager and Memory Usage
  • Previous by thread: Re: DB Plugin Question...
  • Next by thread: Re: DB Plugin Question...
  • Index(es):
    • Date
    • Thread