Lukas Kahwe Smith | 1 Mar 16:58 2007

Re: GSoC 2007 ideas

David Coallier wrote:
> I would probably want to see something along those lines:
> 
> http://sourceforge.net/projects/daophp5/
> 
> And I don't want anyone to say anything about DB_DO, I know about it,
> and I do not want something that builds queries. I want a real good
> DAO for pear. Something reliable, simple, fast, working.

Speaking of which:
http://svn.phpontrax.com/browser/trunk/trax/vendor/trax/active_record.php

That was posted to my blog a few days ago.

regards,
Lukas

--

-- 
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

David Coallier | 1 Mar 19:53 2007
Picon
Picon

Re: GSoC 2007 ideas

See the problem I see with things like this that *help* you build you
queries is when you want to extend yoru queries and send them to a
second level for instance

SELECT STRAIGHT_JOIN
 t1.fieldName as FieldOne,
 t2.fieldName as FieldTwo,
 t3.fieldName as FieldThree
  FROM tableOne t1
  INNER JOIN tableTwo t2 USING (commonFieldID)
  LEFT JOIN tableThree t3 USING (secondCommonFieldID)

and not simply

SELECT
 t1.fieldName as FieldOne,
 t2.fieldName as FieldTwo,
 t3.fieldName as FieldThree
  FROM tableOne t1
  INNER JOIN tableTwo t2  t1.fieldID = t2.commonFieldID
  LEFT JOIN tableThree t3 t2.fieldID = t3.secondCommonFieldID

I mean, it's good if you don't want to push your code too far,
however, mysql has now functions build like USING() STRAIGHT_JOIN, and
many others to help with performances etc. And I am not sure this is
all supported by the current ActiveRecord classes or DB_DO, etc.

Anyhoo, might just be me.. i might just be too picky..

$0.02
(Continue reading)


Gmane