[wp-trac] [WordPress Trac] #11799: WPDB code improvements

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 8 05:02:30 UTC 2010


#11799: WPDB code improvements
-------------------------+--------------------------------------------------
 Reporter:  hakre        |       Owner:  ryan     
     Type:  enhancement  |      Status:  new      
 Priority:  normal       |   Milestone:  3.0      
Component:  Database     |     Version:  3.0      
 Severity:  normal       |    Keywords:  has-patch
-------------------------+--------------------------------------------------
Changes (by hakre):

  * keywords:  => has-patch


Comment:

 Finally I'm able to upload a first patch. I did not implement all of the
 changes I suggested in other patches around so that the changes are not so
 immersive. The focus is more on the general memory problems WPDB is having
 and the code quality. I was able to remove duplicate code blocks and to
 reduce complexity of many functions. The readablity did get a benefit as
 well. Docblocks have been extended / created and I tried to adopt the code
 to the coding standards.

 Under the hood the class internally now uses arrays to store the
 resultset. That will lower the required memory. From the outside there is
 no difference, every public member can be used as it could before.

 When was it introduced (compiled this for some @since tags )?

  * ''num_rows''  - In [1180].
  * ''suppress_errors'' - In [7269].
  * ''last_error'' - In [7431].

 While refactoring, I noticed the following things:

  * #11804 - Object Access Violation in repair.php
  * #11819 - mysql_real_escape_string available now / PHP 4.3 are minimum
 system requirements since 2.9

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


More information about the wp-trac mailing list