[Bb-trac] Re: [bbPress] #689: More flexible joining of topic meta tables in BB_Query class

bbPress bb-trac at lists.bbpress.org
Fri Jul 13 05:34:27 GMT 2007


#689: More flexible joining of topic meta tables in BB_Query class
-------------------------+--------------------------------------------------
 Reporter:  sambauers    |        Owner:  mdawaffe         
     Type:  enhancement  |       Status:  new              
 Priority:  high         |    Milestone:  0.8.3 & XML-RPC  
Component:  Back-end     |      Version:  1.0-alpha (trunk)
 Severity:  major        |   Resolution:                   
 Keywords:  has-patch    |  
-------------------------+--------------------------------------------------
Comment (by mdawaffe):

 I'd rather not have a join_type option.  This problem only exists in
 topicmeta (at the moment anyway), so it seems a bit over the top to have
 more options.  Why don't we just detect which join we want by
 {{{strpos}}}ing for 'NULL'?

 Also, what do you think about doing the null stuff outside of
 {{{parse_value()}}}?  That method gets called a lot (so the less it does
 the better), and (at the moment anyway) we only care about null stuff on
 topicmeta joins.  Something like

 {{{
 $val = $q['meta_value'] but without any null stuff;
 $meta_where = $this->parse_value( $val );
 if ( there's null stuff ) {
     $join = " LEFT $join";
     $meta_where = "(" . $meta_where . "null stuff)";
     $where .= $meta_where;
 }
 }}}

 inside the meta_key/meta_value conditional block.

-- 
Ticket URL: <http://trac.bbpress.org/ticket/689#comment:3>
bbPress <http://bbpress.org/>
Innovative forum development


More information about the Bb-trac mailing list