cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Huss <johnth...@gmail.com>
Subject Re: new fluent API
Date Wed, 15 Apr 2015 14:58:12 GMT
I'm not on the very latest, but unless it changed "and()" is a var-args
method, so you can pass all your expressions in a comma separated list for
even better syntax.

On Wed, Apr 15, 2015 at 4:08 AM Aristedes Maniatis <ari@maniatis.org> wrote:

> On 15/04/2015 6:57pm, Andrus Adamchik wrote:
> > From my experience I am also leaning towards append-only API. I think it
> is worth changing the API with some deprecation to eliminate "override". I
> guess the only case where I am 50/50 on keeping override is "where".
>
> Deprecation might be awkward here and still keep nice short clear names.
> For me I'm very much in favour of 'where' being append-only. In fact that
> was the use case that started my thinking in the first place. On the plus
> side:
>
> 1. It works like Rails
> 2. It makes sense when read aloud as English:
> query.where(something).where(somethingElse).
> 3. It makes adding queries in a loop/conditionals easier
>
>
> On the other side:
>
> 1. You can still write all your code with "and" and never use "where"
> 2. There is some use case I can't think of where you want to replace your
> query before you execute it.
>
>
>
> Ari
>
>
> --
> -------------------------->
> Aristedes Maniatis
> GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message