Preparing Stream for Alternate Database Drivers#865
Preparing Stream for Alternate Database Drivers#865faishal wants to merge 26 commits intoxwp:developfrom
Conversation
Stream 3.0.4
abstracted db class interface, so it is configurable
Conflicts: classes/class-db.php classes/class-query.php
…p, since that work was moved a level deeper
…erent dummy data id
|
As we talked earlier on this, This branch is forked from Also we tested this with |
|
Hey XWP, any update on this? |
|
Will test it today, but can you fix the unit test that's failing? |
| $wpdb->streammeta = $this->table_meta; | ||
|
|
||
| // Hack for get_metadata | ||
| $wpdb->recordmeta = $this->table_meta; |
There was a problem hiding this comment.
Too much spacing after each of these properties. They can be aligned with less spaces.
| * @return array | ||
| */ | ||
| public function get_column_values( $column ); | ||
|
|
There was a problem hiding this comment.
Extra line here can be removed.
|
@faishal This is looking really strong. I've made a whole bunch of comments, including some really small spacing changes (sorry about that). There's three major things that need to happen before this can be merged:
|
|
This PR can be closed out in favor of #881. |
WP_Stream\Plugin::__construct(), Replaced the hard-codedWP_Stream\DBreference with a value that can be filtered, defaulting to the WordPress Database.WP_Stream\DB_Driverinterface, which help to implement Driver classesWP_Stream\DB_Driver_WPDBclass and implementedWP_Stream\DB_Driverinterface, Moved all WordPress database related operation and query into driver class.WP_Stream\DBclass to use driver passed in constructor. Class contains wrapper function to communicate with driver, Moved all query related function into database driver file.WP_Stream\List_Tableto useWP_Stream\DBwrapper method instead ofWP_Stream\Queryclass methods.