Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [propel-dev] Criteria proposal

propel
Discussion topic

Back to topic list

Re: [propel-dev] Criteria proposal

Reply

Author hlellelid
Full name Hans Lellelid
Date 2006-05-30 07:48:57 PDT
Message That is correct, yes. I didn't put up any examples of the Query yet,
although you can see one in the ticket comments.

Basically Query holds stuff that isn't strictly a "criteria". Of
course, the line is a little grey when it comes to things like HAVING
clause, which is a criteria ... but in those cases, the logic is that
Query holds things that don't make sense nested like Criteria.

I'm implementing the doInsert(), doUpdate(), and doDelete() now. When
I'm done I may check in that code, but that will mean that old Criteria
will cease to exist (or at least be usable) in trunk. That may be fine.

I did some preliminary benchmarking and found the new Criteria system to
be a bit quicker, but really there's not a lot of difference. The new
system is more logically complex & involves many more method calls /
object creation -- but then involves a lot less string parsing and code
in general. These seem to even out in the end, making for only a few
hundred microsecs improvement in the new implementation.

(I haven't done any benchmarking of overall query performance in 1.2
branch vs. trunk.)

Hans

P.S. I'd like to add the spl_autoload stuff in 2.0; I think you had some
patches? We can also put this in a 1.3 if you like, but I have hopes
that 2.0 is not going to be such a long development cycle as you think;
I intend to use Propel 2.0 in an app I'm developing to be deployed by
the end of the summer.

Alan Pinstein wrote:
> Nice... looking good.
>
> So I suppose that Criteria2 needs to go hand-in-hand with Query as well?
> And that's where improved Join support, sorting, pagination, etc. will go?
>
> Alan
>
> On May 30, 2006, at 9:24 AM, Hans Lellelid wrote:
>
>> Hi Alan,
>>
>> I added some more examples to the wiki page.
>>
>> -H
>>
>> Alan Pinstein wrote:
>>> Thanks for kicking this off.
>>>
>>> I posted something about a year ago (I can't believe I've been using
>>> Propel for a year!) and I think most of the comments are still relevant:
>>>
>>> http://propel.tigris​.org/servlets/ReadMs​g?list=dev&msgNo​=609
>>>
>>> You've got a good start, but as you've mentioned, Criteria is currently
>>> good at simple things but not a complex ones. Yet your examples on the
>>> planning page are still relatively simply queries.
>>>
>>> I think we should think about the interface for the more complicated
>>> parts as well:
>>>
>>> 1) Joining and table aliasing
>>> 2) Sorting and pagination
>>>
>>> Can you explain the Query* classes more?
>>>
>>> I'd be happy to contribute time to flushing out design over the next few
>>> weeks.
>>>
>>> Thanks!
>>>
>>> Alan
>>>
>>> On May 26, 2006, at 2:37 PM, Hans Lellelid wrote:
>>>
>>>> Hi -
>>>>
>>>> I put together a rough proposal/strategy for a new Criteria API on the
>>>> wiki page.
>>>>
>>>> http://propel.phpdb.​org/trac/wiki/Develo​pment/Criteria
>>>>
>>>> The implementation is still only very loosely conceptual and it doesn't
>>>> address all the functionality of the current system yet. It does,
>>>> however, provide a more consistent & somewhat more intuitive system
>>>> (both to use & to develop, in my opinion). The design is based loosely
>>>> on the Hibernate Criteria API and the way that the logical expressions
>>>> are handled by Phing's Condition system.
>>>>
>>>> I think it's a good starting point, and would be interested in any
>>>> comments at this point.
>>>>
>>>> Hans
>>>>
>>>> --------------------​--------------------​--------------------​---------
>>>> To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
>>>> For additional commands, e-mail: dev-help at propel dot tigris dot org
>>>>
>>>
>>> --------------------​--------------------​--------------------​---------
>>> To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
>>> For additional commands, e-mail: dev-help at propel dot tigris dot org
>>>
>>
>> --------------------​--------------------​--------------------​---------
>> To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
>> For additional commands, e-mail: dev-help at propel dot tigris dot org
>>
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
> For additional commands, e-mail: dev-help at propel dot tigris dot org
>

« Previous message in topic | 13 of 25 | Next message in topic »

Messages

Show all messages in topic

Criteria proposal hlellelid Hans Lellelid 2006-05-26 11:37:28 PDT
     Re: [propel-dev] Criteria proposal Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2006-05-26 22:12:34 PDT
         Re: [propel-dev] Criteria proposal =?ISO-8859-1?Q?David_Z=FClke?= <dz at bitxtender dot com> =?ISO-8859-1?Q?David_Z=FClke?= <dz at bitxtender dot com> 2006-05-27 04:30:33 PDT
             Re: [propel-dev] Criteria proposal Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2006-05-27 05:02:31 PDT
                 Re: [propel-dev] Criteria proposal =?ISO-8859-1?Q?David_Z=FClke?= <dz at bitxtender dot com> =?ISO-8859-1?Q?David_Z=FClke?= <dz at bitxtender dot com> 2006-05-27 08:17:09 PDT
                     Re: [propel-dev] Criteria proposal hlellelid Hans Lellelid 2006-05-27 09:43:15 PDT
     Re: [propel-dev] Criteria proposal Ants Aasma <ants dot aasma at gmail dot com> Ants Aasma <ants dot aasma at gmail dot com> 2006-05-27 12:47:55 PDT
         Re: [propel-dev] Criteria proposal hlellelid Hans Lellelid 2006-05-27 14:21:23 PDT
     Re: [propel-dev] Criteria proposal Alan Pinstein <apinstein at mac dot com> Alan Pinstein <apinstein at mac dot com> 2006-05-29 09:03:50 PDT
         Re: [propel-dev] Criteria proposal hlellelid Hans Lellelid 2006-05-29 11:51:30 PDT
         Re: [propel-dev] Criteria proposal hlellelid Hans Lellelid 2006-05-30 06:24:56 PDT
             Re: [propel-dev] Criteria proposal Alan Pinstein <apinstein at mac dot com> Alan Pinstein <apinstein at mac dot com> 2006-05-30 07:16:34 PDT
                 Re: [propel-dev] Criteria proposal hlellelid Hans Lellelid 2006-05-30 07:48:57 PDT
                     Re: [propel-dev] Criteria proposal Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2006-05-30 17:09:25 PDT
                     Re: [propel-dev] Criteria proposal Alan Pinstein <apinstein at mac dot com> Alan Pinstein <apinstein at mac dot com> 2006-05-30 17:34:24 PDT
                         Re: [propel-dev] Criteria proposal Cameron Brunner <cameron dot brunner at gmail dot com> Cameron Brunner <cameron dot brunner at gmail dot com> 2006-05-30 17:46:52 PDT
                         Re: [propel-dev] Criteria proposal hlellelid Hans Lellelid 2006-05-30 18:43:06 PDT
                             Re: [propel-dev] Criteria proposal tamcy <7am dot online at gmail dot com> tamcy <7am dot online at gmail dot com> 2006-05-31 00:02:11 PDT
                                 Re: [propel-dev] Criteria proposal hlellelid Hans Lellelid 2006-05-31 04:36:50 PDT
                             Re: [propel-dev] Criteria proposal Ants Aasma <ants dot aasma at gmail dot com> Ants Aasma <ants dot aasma at gmail dot com> 2006-05-31 04:06:51 PDT
                                 Re: [propel-dev] Criteria proposal Alan Pinstein <apinstein at mac dot com> Alan Pinstein <apinstein at mac dot com> 2006-05-31 05:12:11 PDT
                                 Re: [propel-dev] Criteria proposal hlellelid Hans Lellelid 2006-05-31 05:49:59 PDT
                                     Re: [propel-dev] Criteria proposal Alan Pinstein <apinstein at mac dot com> Alan Pinstein <apinstein at mac dot com> 2006-05-31 06:05:32 PDT
                                         Re: [propel-dev] Criteria proposal hlellelid Hans Lellelid 2006-05-31 06:21:31 PDT
                                         Re: [propel-dev] Criteria proposal Ants Aasma <ants dot aasma at gmail dot com> Ants Aasma <ants dot aasma at gmail dot com> 2006-05-31 09:09:12 PDT
Messages per page: