you could do:

    s : String()
    eval(s == "foo)

with an expander/DSL, so you have sojmething like

{var} : StringValue({s})=={var} : String() eval({var}.equals({s}))

so it looks like in a rule:

s : StringValue("foo")


but thats not quite ideal, as that is binding a variable still.

Perhaps a more general predicate structure like:

Object(this -> ( /** semantic predicate here */ ) )

or some other shorthand. The key is that "this" tells the predicate to
operate on the Column itself. This may suffer from the same problem of
implicitly binding variables (which is what I am trying to avoid).

Note this is very much 3.1 territory now.

Michael.







On 3/29/06, Greg Barton <[EMAIL PROTECTED]> wrote:
>
> --- Michael Neale <[EMAIL PROTECTED]> wrote:
>
> > Its not entirely true that you can't assert non java
> > beans like string, you
> > can, you just can't do column constraints on them
> > (but you can do eval).
>
> How hard would it be to implement the following
> notation:
>
> rule
>   when
>     String(== "foo")
>   then
>     ...
> end
>
> Being equivalent to:
>
> rule
>   when
>     s : String()
>     eval(s == "foo)
>   then
>     ...
> end
>
> And similar tests like
>
> ObjectClass(<operator> <value>)
>
> Would this be difficult to implement?
>
> Thanks,
> GreG
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>

Reply via email to