\ReadWriteSQLiteDatabase
A read/write splitting mysql database
Implements custom versions of
<ul>
<li>query</li>
<li>manipulate</li>
<li>getGeneratedID</li>
<li>affectedRows</li>
</ul>
- Author: <marcus@silverstripe.com.au>
- License: BSD License http://www.silverstripe.org/bsd-license
Synopsis
class ReadWriteSQLiteDatabase
extends SQLite3Database
{
- // members
- public SS_Database $writeDatabase;
- public array $writeQueries = ;
- private boolean $writePerformed = false;
- // methods
- public MySQLQuery query()
- public void manipulate()
- public int getGeneratedID()
- public int affectedRows()
- protected SS_Database writeDb()
Hierarchy
Extends
- SQLite3Database
Members
Methods
protected
- writeDb() — Retrieve the write DB
public
- affectedRows() — affectedRows is only relevant in context of a write statement, which must have been pushed to the write dB
- getGeneratedID() — getGeneratedID is only relevant in context of a write statement, which must have been pushed to the write dB
- manipulate() — Manipulate is _always_ a write query
- query() — If a write query is detected, hand it off to the configured write database