cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Chainable SelectQuery
Date Wed, 08 Oct 2014 12:00:41 GMT

On Oct 7, 2014, at 7:41 PM, Aristedes Maniatis <> wrote:

>>> Can't we parse without any ambiguity:
>>>   exp("artist.dateOfBirth < $date", c.getTime());
>> In case of a single parameter you are right. Good point! 
> In the case of multiple parameters could we just as easily pass parameters in order for
a cleaner syntax?
>    exp("artist.dateOfBirth < $date and = $name", c.getTime(), "adam");
> There are lots of APIs that follow this approach right back to the C printf function.

Hmm, we need to somehow avoid confusing named parameters with positional parameters. EJBQL
(JPA-inspired) has separate notation for named and positional (not that it is particularly
smart .. to me their positional is really named , just that the name is a number .. am I wrong?).
But I guess in this context we can treat named as positional, ignoring the name (so e.g. if
the same var name repeats twice, we'd require 2 separate args for the binding). So you are
right again :)


View raw message