• 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: creating my EOQualifier in code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating my EOQualifier in code


  • Subject: Re: creating my EOQualifier in code
  • From: Simon McLean <email@hidden>
  • Date: Sun, 24 Feb 2008 14:41:25 +0000

NSMutableArray qualifiers = new NSMutableArray();
qualifiers.addObject(new EOKeyValueQualifier("myKeyPath1", EOQualifier.QualifierOperatorEqualTo, blah1));
qualifiers.addObject(new EOKeyValueQualifier("myKeyPath2", EOQualifier.QualifierOperatorLessThanOrEqualTo, blah2));
qualifiers.addObject(new EOKeyValueQualifier("myKeyPath3", EOQualifier.QualifierOperatorGreaterThan, blah3));
qualifiers.addObject(new EOKeyValueQualifier("myKeyPath4", EOQualifier.QualifierOperatorNotEqualTo, blah4));
EOAndQualifier q = new EOAndQualifier(qualifiers);



Simon

On 24 Feb 2008, at 14:32, Theodore Petrosky wrote:

Could you give an example? I was reading the
documentation on this and from apple I only see
webobject 4.5 references. Is this deprecated?

Ted


--- Simon McLean <email@hidden> wrote:

Ted -

I tend to always use EOKeyValueQualifier instead.
It's a couple of
extra lines because your would have to create the 2
expressions
separately and then and them together, but i find it
more predictable.

SImon

On 24 Feb 2008, at 10:36, Theodore Petrosky wrote:

Thanks, but I seem to have a problem with the
variable
in the expression:

EOQualifier newQual =
EOQualifier.qualifierWithQualifierFormat("(client
caseInsensitiveLike %@) AND (isComplete = 0)",
arg1);

if I put the trailing '%' as a wildcard the expressions fails with:

Reason:	 Lexical error at line 1, column 32.
Encountered: ")" (41), after : "%"

my sql example... we answered the case
insensitivity
but not the wildcard....

select * from adlist where lower(client) like
lower('s%')

maybe I need to escape the trailing %....

Ted




--- David Elliott <email@hidden> wrote:

Theodore,

Try the "caseInsensitiveLike" selector instead of
the "like" selector.

-Dave

On Feb 24, 2008, at 1:07 AM, Theodore Petrosky
wrote:

I don't get this.. I am following the example in
the
Marker book (pg 230).

EOQualifier newQual =

EOQualifier.qualifierWithQualifierFormat("(client
like
%@) AND (isComplete = 0)", arg1);
EOFetchSpecification fs = new
EOFetchSpecification
("AsAdSched", newQual, null);

This is working fine... I get the resultant data
I
expect... I am trying to figure out the 'like'
and
escape for pattern matching...

what i want in the SQL is:

select * from adlist where lower(client) like
lower('s%')

it will not matter whether you type upper nor
lower
case....

Ted










______________________________________________________________________

______________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.
http://

mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

_______________________________________________ Do not post admin requests to the list. They will
be ignored.
Webobjects-dev mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:



40mac.com

This email sent to email@hidden





______________________________________________________________________ ______________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/ newsearch/category.php?category=shopping

_______________________________________________ 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
References: 
 >Re: creating my EOQualifier in code (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: Re: creating my EOQualifier in code
  • Next by Date: Re: creating my EOQualifier in code
  • Previous by thread: Re: creating my EOQualifier in code
  • Next by thread: Re: creating my EOQualifier in code
  • Index(es):
    • Date
    • Thread