I guess along these same lines, I'd be curious how this setup is tested without being able to obtain these individual parts... A quick glance into the 0.2 code base showed no tests for these directly.
To be honest, I wanted this visibility in being able to validate my own design... Maybe I come from too much of a software quality background, but I've noticed this limitation in general for the framework. David On 12/13/06, Shekar C Reddy <[EMAIL PROTECTED]> wrote:
I see these methods return $this for fluent interfaces. I guess providing get*() methods to return arrays (by reference) would leave their functionality intact. We particularly need access to where, from and join clauses so a single/ universal method, say - getPart(), should do the trick. Eg: $where =& $select->getPart( 'where' ) TIA On 12/13/06, Shekar C Reddy <[EMAIL PROTECTED]> wrote: > > I wish I were in a better position to elaborate on this one but my responses are limited due to NDA.I was pulled over recently for not honoring my contract :-( For now, I'll suffice it to say that we merge/consolidate from, join and where clauses dynamically based on some conditions. This is just to say the issue was not vague and I'll leave it to the discretion of Zend developers to implement it or not. Even if these methods return the previously set values as-is (eg: arrays), that would reduce a large chunk of code in our application. As it is, these methods in the select component function as set-methods while the get methods are missing and I thought we could toggle their functionality to return the originally set values if the arguments passed while invoking them were empty. > > Regards, > > > > > > On 12/11/06, Dale McNeill <[EMAIL PROTECTED] > wrote: > > Could you give us a use case? Why would this be very useful? > > > > Thanks, > > > > Dale > > > > Shekar C Reddy wrote: > > > Currently, the select component only accepts arguments to store for > > > statement composition later: > > > > > > $select->from( ... ) > > > $select->where( ... ) > > > $select->join( ... ) > > > $sql = $select->__toString() > > > > > > > > > It would be very useful for the select component to return the > > > *invidual parts *as return values if invoked with *no *arguments. In > > > other words, the following behavior - after the above function calls: > > > > > > $from = $select->from(); > > > eg: SELECT id, name FROM user ... > > > > > > $where = $select->where(); > > > eg: WHERE id = 1 AND ... > > > > > > $join = $select->join(); > > > eg: JOIN admin a ON u.id <http://u.id> = a.id <http://a.id> ... > > > > > > > > > Here are some other methods: > > > > > > $select->orWhere(); > > > $select->group(); > > > $select->having(); > > > $select->limit(); > > > $select->limitPage(); > > > $select->order(); > > > > > > > > > Thoughts...? > > > > > > http://framework.zend.com/issues/browse/ZF-635 > > > > > > > > > > > > >
