Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
New DQL Criteria API
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  Messages 1 - 25 of 32 - Collapse all  -  Translate all to Translated (View all originals)   Newer >
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Guilherme Blanco  
View profile   Translate to Translated (View Original)
(1 user)  More options 28 May, 18:55
From: Guilherme Blanco <guilhermebla...@gmail.com>
Date: Thu, 28 May 2009 14:55:04 -0300
Local: Thurs 28 May 2009 18:55
Subject: New DQL Criteria API
Hi guys,

We're talking a lot about Doctrine 2.0 and this time I'm coming here
to talk about DQL changes.
String processing is something really weird, and we want to remove,
since it's extremely error-prone.

Basically the purpose of this email is about WHERE conditions.
We end up with a lot of possibilities, and we want all of you to give
us suggestions about which way we should move to.
Here are the possibilities we came so far: http://pastebin.com/f4f6c2aa0

If you have any other suggestions, include them here too.
We expect to find the simplest way to build a query without adding too
much WTF factor inside.

So, what's your ideas?

Cheers,

--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9215-8480
MSN: guilhermebla...@hotmail.com
URL: http://blog.bisna.com
São Paulo - SP/Brazil


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Huttler  
View profile   Translate to Translated (View Original)
(1 user)  More options 28 May, 18:58
From: "Adam Huttler" <adam.hutt...@fracturedatlas.org>
Date: Thu, 28 May 2009 13:58:35 -0400 (EDT)
Local: Thurs 28 May 2009 18:58
Subject: RE: [doctrine-dev] New DQL Criteria API

Possibility #1 is the most expressive and easiest to read, IMO. I like the
variant, even though it's more verbose, because it feels a little more
flexible.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Borschel  
View profile   Translate to Translated (View Original)
(1 user)  More options 28 May, 19:12
From: Roman Borschel <r.borsc...@gmx.net>
Date: Thu, 28 May 2009 20:12:55 +0200
Local: Thurs 28 May 2009 19:12
Subject: Re: [doctrine-dev] Re: New DQL Criteria API

I only want to clarify what this discussion is about.

We have the Query class. It accepts full DQL strings. You can always  
build any DQL query through string concatenation.
The issue with that is just that *conditional* query construction (if  
parameter A set condition X, if parameter B, set condition B OR C)
is cumbersome using string concatenation.

That is what the QueryBuilder class should be useful for.

And what we're now wondering is what the best and safest way is to  
construct expressions with the QueryBuilder API.

It does add nothing in terms of functionality. Just a different way to  
construct queries that is more suitable if the construction is based  
on conditions.

Regards

Roman

On May 28, 2009, at 7:58 PM, Adam Huttler wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Miloslav Kmeť  
View profile   Translate to Translated (View Original)
(1 user)  More options 28 May, 20:00
From: Miloslav Kmeť <miloslav.k...@gmail.com>
Date: Thu, 28 May 2009 21:00:59 +0200
Local: Thurs 28 May 2009 20:00
Subject: Re: [doctrine-dev] Re: New DQL Criteria API
I think that #2 and #3 are the best options for me. They are well
known from the 1.* branch, so it will be also easier to migrate.

I hope that it will be still possible to write conditions in the old way:
->addWhere('(m.attr1 = ? AND (m.attr2 = ? OR m.attr2 = ?)) OR m.attr3
= ?', array($var, ...));

instead of separating each part of the condition into separate
parameter of where functions.

I like doctrine beacuse of the DQL it have. It is clear and very
similar to SQL.

~
adrive

2009/5/28 Roman Borschel <r.borsc...@gmx.net>:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jorge Pereira  
View profile   Translate to Translated (View Original)
(1 user)  More options 28 May, 20:17
From: Jorge Pereira <jpereira...@gmail.com>
Date: Thu, 28 May 2009 12:17:41 -0700 (PDT)
Local: Thurs 28 May 2009 20:17
Subject: Re: New DQL Criteria API
Hi,

This is an interesting topic.

To make the new API useful, one should bear in mind that:
- you'll want to preserve the mental process people use to write a
query, which includes the order of conditions
- "OR" and "AND" are binary operations taking an argument on each side
- you'll want to maintain the monadic behavior, so operations can be
chained

These base assumptions kind of discard option #1, which would force
you to reorder the way you write a query.

Option #2 is a good start, but   ->where('('))   and   ->where(')')
will be used so often that they could use a proper name. Which leads
us to Option #3.

Option #3 seems the best insofar, but I would consider "Block" instead
of "Sub" - it makes more sense because two pairs of parenthesis with
an operation in between are not "subs" seeing as they are at the same
level. Example: ((A and B) OR (C and D))

If you do add a beginBlock, please also add a beginBlockIf(boolean).
It would allow constructing queries in one go, as opposed to breaking
the chain to interpose if() calls.

In both Option #3 and #4 I would make ->or() and ->and() a top-level
function, which would lead us to the Variants

Possibility #4 is also good, but I would maybe replace ->add('OR')
with a simple ->or():

I took the liberty of adding #3.1 and #4.2 to illustrate these points.

Thank you for taking the time to have this discussion, it's
appreciated.

Best regards,
- Jorge Pereira

On 28 May, 19:12, Roman Borschel <r.borsc...@gmx.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Guilherme Blanco  
View profile   Translate to Translated (View Original)
(1 user)  More options 28 May, 20:21
From: Guilherme Blanco <guilhermebla...@gmail.com>
Date: Thu, 28 May 2009 16:21:04 -0300
Local: Thurs 28 May 2009 20:21
Subject: Re: [doctrine-dev] Re: New DQL Criteria API
I finally made my final decision (it's not yet the official one of
Doctrine)... I'd go with #4 variation.
I was in doubt between #1 variant and #4 variant.

About DQL as string support... we can include the support to this (in
my personal decision):

$w = Expr::where();
$w->add(Expr::literal('m.attr1 = ?0 AND m.attr2 = ?1')) // WHERE
m.attr1 = ?0 AND m.attr2 = ?1
$q->add($w); // $q is instance of Query

Let's wait for others to give feedback

2009/5/28 Miloslav Kmeť <miloslav.k...@gmail.com>:

--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9215-8480
MSN: guilhermebla...@hotmail.com
URL: http://blog.bisna.com
São Paulo - SP/Brazil

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Guilherme Blanco  
View profile   Translate to Translated (View Original)
 More options 28 May, 20:24
From: Guilherme Blanco <guilhermebla...@gmail.com>
Date: Thu, 28 May 2009 16:24:25 -0300
Local: Thurs 28 May 2009 20:24
Subject: Re: [doctrine-dev] Re: New DQL Criteria API
You need to paste the link it generates here... otherwise we can't see
your approach.

Cheers,

--
Guilherme Blanco - Web Developer
CBC - Certified Bindows Consultant
Cell Phone: +55 (16) 9215-8480
MSN: guilhermebla...@hotmail.com
URL: http://blog.bisna.com
São Paulo - SP/Brazil

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jorge Pereira  
View profile   Translate to Translated (View Original)
(1 user)  More options 28 May, 20:27
From: Jorge Pereira <jpereira...@gmail.com>
Date: Thu, 28 May 2009 12:27:26 -0700 (PDT)
Local: Thurs 28 May 2009 20:27
Subject: Re: New DQL Criteria API
Here's a wishlist, as a summary, sorted by perceived priority (imho):

1. Use option #3 as a base
2. Use ->or(), ->and()
3. Allow ->where('m.attr2', '=', '?')
4. Allow ->beginBlockIf(boolean)
5. Allow ->where(Expr::eq('m.attr2', '?'))
6. Allow ->in(Array)
7. Allow ->in()->beginBlock()->... subquery ... ->endBlock()

Best regards,
- Jorge Pereira

On 28 May, 19:12, Roman Borschel <r.borsc...@gmx.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Borschel  
View profile   Translate to Translated (View Original)
 More options 28 May, 20:27
From: Roman Borschel <r.borsc...@gmx.net>
Date: Thu, 28 May 2009 21:27:59 +0200
Local: Thurs 28 May 2009 20:27
Subject: Re: [doctrine-dev] Re: New DQL Criteria API
http://pastebin.com/m5cc82b46

There is a link at the top of your paste Guilherme. "View followups  
from guilhermeblanco and Jorge Pereira"

Roman

On May 28, 2009, at 9:24 PM, Guilherme Blanco wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jorge Pereira  
View profile   Translate to Translated (View Original)
 More options 28 May, 20:30
From: Jorge Pereira <jpereira...@gmail.com>
Date: Thu, 28 May 2009 12:30:17 -0700 (PDT)
Local: Thurs 28 May 2009 20:30
Subject: Re: New DQL Criteria API
Hi,

Sorry, here it is:
   http://pastebin.com/d790611a9

Also, diffs to the original:
   http://pastebin.com/m5cc82b46

Regards,

On 28 May, 20:24, Guilherme Blanco <guilhermebla...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jorge Pereira  
View profile   Translate to Translated (View Original)
(1 user)  More options 28 May, 20:35
From: Jorge Pereira <jpereira...@gmail.com>
Date: Thu, 28 May 2009 12:35:22 -0700 (PDT)
Local: Thurs 28 May 2009 20:35
Subject: Re: New DQL Criteria API
One small detail, in all #3 variants, there is a missing ->and() after
the first ->where('m.attr1', '=', '?')

Alternatively, 'and' could be the default. Also notice that you can
allow both Expr::eq(,) and (field, op, value).

I'm unsure if this isn't already implemented, but the ability to put ?
1, ?2 and ?3 is helpful, and a need if you have beginBlockIf().

Regards,

On 28 May, 20:27, Roman Borschel <r.borsc...@gmx.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joaquin Bravo Contreras  
View profile   Translate to Translated (View Original)
 More options 28 May, 22:45
From: Joaquin Bravo Contreras <jackbr...@gmail.com>
Date: Thu, 28 May 2009 16:45:55 -0500
Local: Thurs 28 May 2009 22:45
Subject: Re: [doctrine-dev] Re: New DQL Criteria API

I really really like the beginBlockIf(boolean) suggestion.

Also, i'd go with possibility number 3.

- Joaquín

On Thu, May 28, 2009 at 2:27 PM, Jorge Pereira <jpereira...@gmail.com>wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugene Janusov  
View profile   Translate to Translated (View Original)
 More options 29 May, 09:15
From: Eugene Janusov <esy...@gmail.com>
Date: Fri, 29 May 2009 18:15:19 +1000
Local: Fri 29 May 2009 09:15
Subject: Re: [doctrine-dev] New DQL Criteria API
I'm agree that #1 way is the most flexible, expressive and readable.

I remember, some time ago there were lots of discussions on the same  
subject in the Propel's development mailing list. Don't know what  
became the final decision, but the original plan implied implementing  
Hibernate-like expressions. And that is the right way, IMO.

Obviously, Doctrine is already quite similar to Hibernate, and I think  
it's not a bad idea to copy mature and time proven solutions.

In addition, I have had some experience in implementing Criteria  
pattern, and have to say that expressions allow more abstraction that  
simplifies underlying RDBMS-specific layers.

On 29.05.2009, at 3:55, Guilherme Blanco wrote:

> We're talking a lot about Doctrine 2.0 and this time I'm coming here
> to talk about DQL changes.
> String processing is something really weird, and we want to remove,
> since it's extremely error-prone.

> Basically the purpose of this email is about WHERE conditions.
> We end up with a lot of possibilities, and we want all of you to give
> us suggestions about which way we should move to.
> Here are the possibilities we came so far: http://pastebin.com/f4f6c2aa0

> If you have any other suggestions, include them here too.
> We expect to find the simplest way to build a query without adding too
> much WTF factor inside.

> So, what's your ideas?

--
Best regards,
Eugene Janusov

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jorge Pereira  
View profile   Translate to Translated (View Original)
 More options 29 May, 12:32
From: Jorge Pereira <jpereira...@gmail.com>
Date: Fri, 29 May 2009 04:32:58 -0700 (PDT)
Local: Fri 29 May 2009 12:32
Subject: Re: New DQL Criteria API
@Eugene Do you have any idea on how to change #1 so that you can write
the query with the usual order, and not have to change the way you
think about queries? Also, how would you go about adding conditional
parts to a query? It seems that with this option you'd need to build
it all in one go, unlike with #3, but I may be missing something.

On 29 May, 09:15, Eugene Janusov <esy...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jorge Pereira  
View profile   Translate to Translated (View Original)
 More options 29 May, 12:42
From: Jorge Pereira <jpereira...@gmail.com>
Date: Fri, 29 May 2009 04:42:25 -0700 (PDT)
Local: Fri 29 May 2009 12:42
Subject: Re: New DQL Criteria API
After a bit more thinking, I'd say that #3 and #4 aren't all that
different, and maybe #4 is even simpler (repeating "add" makes more
sense than repeating "where").

Still, I'd consider the following:
* It may be worth it to use ->and() and ->or() instead of relying on a
generic add with strings, even if that's what it actually does.
* If we're splitting query construction until each condition is a
method call, wouldn't it make sence to forget the ? and have ->add
('m.attr2', '=', $value)
* Why have a generic add and then use constants inside for
expressions? You could use a generic add() for those who like to use
strings, but have specific methods for clarity

Please consider this option:
   http://pastebin.com/d40b8f439

Regards,

On 28 May, 20:21, Guilherme Blanco <guilhermebla...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Borschel  
View profile   Translate to Translated (View Original)
(1 user)  More options 29 May, 12:53
From: Roman Borschel <r.borsc...@gmx.net>
Date: Fri, 29 May 2009 13:53:42 +0200
Local: Fri 29 May 2009 12:53
Subject: Re: [doctrine-dev] Re: New DQL Criteria API
Here is an example of conditional query construction with option #1

http://pastie.org/493835

Any QueryBuilder API is practically useless if it's not good in  
conditional query construction. Thats why I find many of the examples  
that all construct a query in one go very misleading. Please consider  
that.

Roman

On May 29, 2009, at 1:32 PM, Jorge Pereira wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Borschel  
View profile   Translate to Translated (View Original)
 More options 29 May, 13:00
From: Roman Borschel <r.borsc...@gmx.net>
Date: Fri, 29 May 2009 14:00:29 +0200
Local: Fri 29 May 2009 13:00
Subject: Re: [doctrine-dev] Re: New DQL Criteria API
And that's also why most of the examples here: http://pastebin.com/f4f6c2aa0
  dont really show much, because which option is the shortest, most  
readable, most concise there? Clear, the comment at the top! (// WHERE  
(m.attr1 = ? AND (m.attr2 = ? OR m.attr2 = ?)) OR m.attr3 = ?)

I hope I made my point. I do not have a particular preference to  
option #1, I am open to anything but please don't forget that the  
resulting API should be especially good in conditional query  
construction, not just the prettiest one out of mostly ugly solutions  
to construct a query in one go. Because for that, a plain DQL string  
can not be beaten.

Roman

On May 29, 2009, at 1:53 PM, Roman Borschel wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugene Janusov  
View profile   Translate to Translated (View Original)
 More options 29 May, 13:17
From: Eugene Janusov <esy...@gmail.com>
Date: Fri, 29 May 2009 22:17:03 +1000
Local: Fri 29 May 2009 13:17
Subject: Re: [doctrine-dev] Re: New DQL Criteria API
Yep, that is exactly what I've meant, and it is very similar to how it  
works in Hibernate (I, personally, will be even more happier with  
Hibernate's class names) and .NET's LINQ.

> Here is an example of conditional query construction with option #1
> http://pastie.org/493835

> Any QueryBuilder API is practically useless if it's not good in
> conditional query construction. Thats why I find many of the examples
> that all construct a query in one go very misleading. Please consider
> that.

>> @Eugene Do you have any idea on how to change #1 so that you can  
>> write
>> the query with the usual order, and not have to change the way you
>> think about queries? Also, how would you go about adding conditional
>> parts to a query? It seems that with this option you'd need to build
>> it all in one go, unlike with #3, but I may be missing something.

--
Best regards,
Eugene Janusov

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jorge Pereira  
View profile   Translate to Translated (View Original)
(1 user)  More options 29 May, 15:06
From: Jorge Pereira <jpereira...@gmail.com>
Date: Fri, 29 May 2009 07:06:31 -0700 (PDT)
Local: Fri 29 May 2009 15:06
Subject: Re: New DQL Criteria API
Hi,

The issue imho is that you loose all sense of order with that,
compared to a standard query. If PHP allowed you to define functions
as operators (eg, such as in Prolog or Lisp) it wouldn't be much of a
problem. But it's second nature to anyone familiar with SQL that an OR
takes a left and a right argument, which makes writing an expression
linear. With option #1, you're forcing the programmer to write queries
in an hierarchical manner, and you're adding visual noise with the
Expr:: prefix.

In option #1, how would you go about doing an OR between 3 variables?
Would Expr::or accept a variable number of arguments? If not, that's a
big fail right there - forcing the programmers to forgo a descriptive
language to adopt another way of structuring their queries.

Also, although beginBlockIf would be a good shortcut, it's not
necessarily a good idea to reinvent the wheel and build into the DQL
API the equivalent to PHP's standard control structures such as
complex 'if'. Still, an equivalent to what Roman Borschel suggests in
http://pastie.org/493835 would be http://pastebin.com/d2f414d3e

Please notice that either you make this simple and easy to read and
relate to standard SQL, or only the Anointed Ones will use it. :)

On 29 May, 13:00, Roman Borschel <r.borsc...@gmx.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fixe  
View profile   Translate to Translated (View Original)
(1 user)  More options 29 May, 15:12
From: Fixe <tiago.ribe...@gmail.com>
Date: Fri, 29 May 2009 07:12:23 -0700 (PDT)
Local: Fri 29 May 2009 15:12
Subject: Re: New DQL Criteria API
+1 for Jorge Pereira approach.

On 29 May, 15:06, Jorge Pereira <jpereira...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Colin Darie  
View profile   Translate to Translated (View Original)
(1 user)  More options 29 May, 15:32
From: Colin Darie <colinda...@gmail.com>
Date: Fri, 29 May 2009 16:32:28 +0200
Local: Fri 29 May 2009 15:32
Subject: Re: [doctrine-dev] Re: New DQL Criteria API

+1 too, I really think it's the best way to build complex queries easily.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugene Janusov  
View profile   Translate to Translated (View Original)
 More options 29 May, 15:41
From: Eugene Janusov <esy...@gmail.com>
Date: Sat, 30 May 2009 00:41:38 +1000
Local: Fri 29 May 2009 15:41
Subject: Re: [doctrine-dev] Re: New DQL Criteria API

> In option #1, how would you go about doing an OR between 3 variables?
> Would Expr::or accept a variable number of arguments?

I think it's acceptable to use var-arg for Expr::or, but there is no  
such thing as "OR between 3 variables". OR is a binary operator, and  
the order in which conditions are evaluated is significant.

> Also, although beginBlockIf would be a good shortcut, it's not
> necessarily a good idea to reinvent the wheel and build into the DQL
> API the equivalent to PHP's standard control structures such as
> complex 'if'. Still, an equivalent to what Roman Borschel suggests in
> http://pastie.org/493835 would be http://pastebin.com/d2f414d3e

PHP's control structures are а matter of PHP's interpreter, and who  
will be responsible for such things:

$qb->if($cond1)
     ->eq('f.attr',42);

// bunch of some irrelevant code

$qb->build()->getResultList();

?

--
Best regards,
Eugene Janusov


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Roman Borschel  
View profile   Translate to Translated (View Original)
(1 user)  More options 29 May, 16:26
From: Roman Borschel <r.borsc...@gmx.net>
Date: Fri, 29 May 2009 17:26:48 +0200
Local: Fri 29 May 2009 16:26
Subject: Re: [doctrine-dev] Re: New DQL Criteria API

I have to say that I really don't like cluttering the API with basic  
control structures (if/then/else/...)
It looks unnatural and is really an abuse of fluent interfaces in my  
eyes.

Roman

On May 29, 2009, at 4:32 PM, Colin Darie wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Huttler  
View profile   Translate to Translated (View Original)
 More options 29 May, 16:27
From: "Adam Huttler" <adam.hutt...@fracturedatlas.org>
Date: Fri, 29 May 2009 11:27:48 -0400 (EDT)
Local: Fri 29 May 2009 16:27
Subject: RE: [doctrine-dev] Re: New DQL Criteria API

I agree with Roman. PHP already has control structures on a language
level. These feel very awkward to me.

From: doctrine-dev@googlegroups.com [mailto:doctrine-dev@googlegroups.com]
On Behalf Of Roman Borschel
Sent: Friday, May 29, 2009 11:27 AM
To: doctrine-dev@googlegroups.com
Subject: [doctrine-dev] Re: New DQL Criteria API

I have to say that I really don't like cluttering the API with basic
control structures (if/then/else/...)

It looks unnatural and is really an abuse of fluent interfaces in my eyes.

Roman

On May 29, 2009, at 4:32 PM, Colin Darie wrote:

+1 too, I really think it's the best way to build complex queries easily.

On Fri, May 29, 2009 at 4:12 PM, Fixe <tiago.ribe...@gmail.com> wrote:

+1 for Jorge Pereira approach.

On 29 May, 15:06, Jorge Pereira <jpereira...@gmail.com> wrote:

inhttp://pastie.org/493835would behttp://pastebin.com/d2f414d3e

> Please notice that either you make this simple and easy to read and
> relate to standard SQL, or only the Anointed Ones will use it. :)

> On 29 May, 13:00, Roman Borschel <r.borsc...@gmx.net> wrote:

> > And that's also why most of the examples

here:http://pastebin.com/f4f6c2aa0

far:http://pastebin.com/f4f6c2aa0


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eugene Janusov  
View profile   Translate to Translated (View Original)
 More options 29 May, 16:32
From: Eugene Janusov <esy...@gmail.com>
Date: Sat, 30 May 2009 01:32:50 +1000
Local: Fri 29 May 2009 16:32
Subject: Re: [doctrine-dev] Re: New DQL Criteria API

> It looks unnatural and is really an abuse of fluent interfaces in my  
> eyes.

Totally agree.
And not only fluent interfaces, but object-oriented and structured  
approach in general.

--
Best regards,
Eugene Janusov


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Messages 1 - 25 of 32   Newer >
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google