[wp-trac] [WordPress Trac] #18176: $wpdb should store the database engine and request this of drop-ins

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 21 22:05:25 UTC 2011


#18176: $wpdb should store the database engine and request this of drop-ins
--------------------------+------------------
 Reporter:  nacin         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.3
Component:  Database      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------

Comment (by nacin):

 Wondering if $is_mysql = true is better than $engine = 'mysql', otherwise
 we won't have much of a standard for other engines that may wish to
 implement this.

 One problem though, is anyone currently inheriting the wpdb class, will
 end up with $engine, even if they don't implement MySQL. While I can't
 imagine why someone would even bother to inherit it at that point, I could
 see that being a problem.

 Thoughts on how to solve that problem? I thought about a class constant or
 private variable but that would prevent it from being overridden at all.
 We'd need to implement some methods in order to allow them to properly
 communicate to the base class what engine they are.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18176#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list