Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SQL Query Generation



On 10.08.2007, at 16:12, Michael Xenakis wrote:

Unfortunately, the where clause being generated by .whereClauseString() is parameterized, e.g.,
SELECT COUNT(*) FROM PLAYLIST t0, CONTENT_PROVIDER T1 WHERE (((t0.FIRST_PRODUCTION_RELEASE is not ? AND t0.LAST_PRODUCTION_RELEASE is ?) AND T1.CONTENT_PROVIDER_ID = ?) AND UPPER(t0.NAME) LIKE UPPER(?) ESCAPE '\')


What I can't seem to figure is how to get the string returned w/ the parameters replaced w/ the actual bound values.

So, first, am I heading down the right path or is there a better way?

If I am headed in the right direction, what am I missing?

Are you using Wonder? If yes, you can use

ERXEOControlUtilities.objectCountForQualifier

If not, it seems you use the PostgreSQL plugin - so, if that is okay for you, you can try turning on off the variable binding with:

com.webobjects.jdbcadaptor.PostgresqlExpression.disableBindVariables = true

cug
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden
References: 
 >SQL Query Generation (From: Michael Xenakis <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.