#70 ✓resolved
cacaodev

CPPredicate suite

Reported by cacaodev | 2008-09-23 13:47:57 UTC

Almost complete except: - predicateWithFormat: > relies on CPScanner - Some new 10.5 methods - Some functions in CPExpression_function.j - MATCHES[d] (regex match diacritic insensitive) - expressions constants are not casted

Needs a lot of testing. A basic test case will follow.

Comments and changes to this ticket

  • cacaodev

    cacaodev 2008-09-23 13:55:48 UTC

    Very basic Test case for CPPredicate.

    Creates various CPExpression (constant, keypath, function, aggregate) Creates a CPCompoundPredicate from 2 CPComparisonPredicate Filters an array with the predicate.

  • cacaodev

    cacaodev 2008-10-08 08:47:10 UTC

    Improved version. - fixed bugs in CPComparisonPredicate evaluation for strings - Support for CPMacthPredicateOperatorType (javascript regex) - Partial support for CPDiacriticInsensitive option. Not covering all diacritics. - cleaned code in evaluation of compound predicates. - Added aggregate expression

    Coming next: unionset, minusset, subquery expressions. (10.5 new methods in NSPredicate).

    Feel free to implement predicateWithFormat: . We need a parser for that so it could be CPScanner or another way to parse (lex ?).

    I will post a ojunit test later if needed.

  • cacaodev

    cacaodev 2008-11-08 04:58:20 UTC

    • Tag changed from “foundation” to “foundation, patch”
    • Assigned user changed from “Francisco Tolmasky” to “Ross Boucher”

    This is the last version with a lot of code style cleaning. Also supports for unionset, intersectset, minusset. predicateWithFormat: still missing.

    These are raw files are in a zip. I can also give you a patch against Foundation but anyway you will have to add import directives in Foundation.j yourself because I'm not sure what's the right way.

    Included: CPPredicateTest.j importing CPPredicate from Foundation.

    If you have any comments, even code style, I prefer that you post it bellow.

  • cacaodev

    cacaodev 2009-02-11 04:22:15 UTC

    An updated version of CPPredicate & al with a test case have been pushed into my fork.

    http://github.com/cacaodev/cappu...

  • cacaodev

    cacaodev 2009-02-14 05:04:38 UTC

    • Tag changed from “foundation, patch” to “@to-review, foundation, patch”

    Please forget the previous comment.

    Here is the commit url in my fork: http://github.com/cacaodev/cappu...

    And attached is a new patch matching this commit:

  • admin (at 280north)

    admin (at 280north) 2010-04-09 11:38:41 UTC

    • State changed from “new” to “resolved”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Cappuccino Web Framework, including AppKit, Foundation, and Objective-J.

Shared Ticket Bins

Attachments

Referenced by

Pages