Revert addition of write_db directly to the Horde_Db_Adapter_Base object, along
authorChuck Hagenbuch <chuck@horde.org>
Sun, 30 May 2010 01:35:41 +0000 (21:35 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sun, 30 May 2010 01:49:02 +0000 (21:49 -0400)
with executeWrite() which is unnecessary at this level.

Revert "Add ability to define a write DB for use with split-DB installations"

This reverts commit 0c369fee9b6ef70bdd92f1141635699d5ad9707b.

Conflicts:

framework/Core/lib/Horde/Core/Binder/Db.php
framework/Db/lib/Horde/Db/Adapter/Base.php
framework/Db/package.xml

Revert "Add executeWrite()."

These queries should always go to the write db

This reverts commit 556ca7c259f179d69a1bace18224280720889acc.

Conflicts:

framework/Db/lib/Horde/Db/Adapter/Base.php

remove executeWrite() calls from Oracle schema

13 files changed:
framework/Core/lib/Horde/Core/Binder/Db.php
framework/Core/lib/Horde/Core/Factory/Db.php
framework/Db/lib/Horde/Db/Adapter/Base.php
framework/Db/lib/Horde/Db/Adapter/Base/Schema.php
framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
framework/Db/lib/Horde/Db/Adapter/Mysqli.php
framework/Db/lib/Horde/Db/Adapter/Oracle/Schema.php
framework/Db/lib/Horde/Db/Adapter/Pdo/Base.php
framework/Db/lib/Horde/Db/Adapter/Pdo/Mysql.php
framework/Db/lib/Horde/Db/Adapter/Pdo/Pgsql.php
framework/Db/lib/Horde/Db/Adapter/Postgresql/Schema.php
framework/Db/lib/Horde/Db/Adapter/Sqlite/Schema.php
framework/Db/package.xml

index a581eaf..3a14503 100644 (file)
@@ -14,5 +14,4 @@ class Horde_Core_Binder_Db implements Horde_Injector_Binder
     {
         return false;
     }
-
 }
index 2cbf684..bedd704 100644 (file)
@@ -149,5 +149,4 @@ class Horde_Core_Factory_Db
 
         throw new Horde_Exception('Adapter class "' . $class . '" not found');
     }
-
 }
index 8ff8af6..0b6b5de 100644 (file)
@@ -100,13 +100,6 @@ abstract class Horde_Db_Adapter_Base
      */
     protected $_schemaMethods = array();
 
-    /**
-     * Write DB
-     *
-     * @var Horde_Db_Adapter_Base
-     */
-    protected $_write;
-
 
     /*##########################################################################
     # Construct/Destruct
@@ -118,7 +111,6 @@ abstract class Horde_Db_Adapter_Base
      * @param array $config  Configuration options and optional objects:
      * <pre>
      * 'charset' - (string) TODO
-     * 'write_db' - (Horde_Db_Adapter_Base) Use this DB for write operations.
      * </pre>
      */
     public function __construct($config)
@@ -545,26 +537,6 @@ abstract class Horde_Db_Adapter_Base
     }
 
     /**
-     * Executes the SQL statement in the context of this connection.
-     * Uses the write DB if necessary.
-     *
-     * @param string $sql   SQL statement.
-     * @param mixed $arg1   Either an array of bound parameters or a query
-     *                      name.
-     * @param string $arg2  If $arg1 contains bound parameters, the query
-     *                      name.
-     *
-     * @return Traversable
-     * @throws Horde_Db_Exception
-     */
-    public function executeWrite($sql, $arg1 = null, $arg2 = null)
-    {
-        return $this->_write
-            ? $this->_write->execute($sql, $arg1, $arg2)
-            : $this->execute($sql, $arg1, $arg2);
-    }
-
-    /**
      * Returns the last auto-generated ID from the affected table.
      *
      * @param string $sql           SQL statement.
@@ -582,10 +554,6 @@ abstract class Horde_Db_Adapter_Base
     public function insert($sql, $arg1 = null, $arg2 = null, $pk = null,
                            $idValue = null, $sequenceName = null)
     {
-        if ($this->_write) {
-            return $this->_write->insert($sql, $arg1, $arg2, $pk, $idValue, $sequenceName);
-        }
-
         $this->execute($sql, $arg1, $arg2);
 
         return isset($idValue)
@@ -607,10 +575,6 @@ abstract class Horde_Db_Adapter_Base
      */
     public function update($sql, $arg1 = null, $arg2 = null)
     {
-        if ($this->_write) {
-            return $this->_write->update($sql, $arg1, $arg2);
-        }
-
         $this->execute($sql, $arg1, $arg2);
         return $this->_rowCount;
     }
@@ -629,10 +593,6 @@ abstract class Horde_Db_Adapter_Base
      */
     public function delete($sql, $arg1 = null, $arg2 = null)
     {
-        if ($this->_write) {
-            return $this->_write->delete($sql, $arg1, $arg2);
-        }
-
         $this->execute($sql, $arg1, $arg2);
         return $this->_rowCount;
     }
@@ -644,9 +604,7 @@ abstract class Horde_Db_Adapter_Base
      */
     public function transactionStarted()
     {
-        return $this->_write
-            ? $this->_write->transactionStarted()
-            : $this->_transactionStarted;
+        return $this->_transactionStarted;
     }
 
     /**
@@ -654,12 +612,8 @@ abstract class Horde_Db_Adapter_Base
      */
     public function beginDbTransaction()
     {
-        if ($this->_write) {
-            $this->_write->beginDbTransaction();
-        } elseif (!$this->_transactionStarted) {
-            $this->_transactionStarted = true;
-            $this->_connection->beginTransaction();
-        }
+        $this->_transactionStarted = true;
+        $this->_connection->beginTransaction();
     }
 
     /**
@@ -667,12 +621,8 @@ abstract class Horde_Db_Adapter_Base
      */
     public function commitDbTransaction()
     {
-        if ($this->_write) {
-            $this->_write->commitDbTransaction();
-        } elseif ($this->_transactionStarted) {
-            $this->_connection->commit();
-            $this->_transactionStarted = false;
-        }
+        $this->_connection->commit();
+        $this->_transactionStarted = false;
     }
 
     /**
@@ -681,12 +631,10 @@ abstract class Horde_Db_Adapter_Base
      */
     public function rollbackDbTransaction()
     {
-        if ($this->_write) {
-            $this->_write->rollbackDbTransaction();
-        } elseif ($this->_transactionStarted) {
-            $this->_connection->rollBack();
-            $this->_transactionStarted = false;
-        }
+        if (! $this->_transactionStarted) { return; }
+
+        $this->_connection->rollBack();
+        $this->_transactionStarted = false;
     }
 
     /**
@@ -748,10 +696,6 @@ abstract class Horde_Db_Adapter_Base
      */
     public function insertFixture($fixture, $tableName)
     {
-        if ($this->_write) {
-            return $this->_write->insertFixture($fixture, $tableName);
-        }
-
         /*@TODO*/
         return $this->execute("INSERT INTO #{quote_table_name(table_name)} (#{fixture.key_list}) VALUES (#{fixture.value_list})", 'Fixture Insert');
     }
index 932af89..db30667 100644 (file)
@@ -420,7 +420,7 @@ abstract class Horde_Db_Adapter_Base_Schema
         $sql  = "CREATE $temp TABLE ".$this->quoteTableName($tableDefinition->getName())." (\n".
                   $tableDefinition->toSql()."\n".
                 ") $opts";
-        return $this->executeWrite($sql);
+        return $this->execute($sql);
     }
 
     /**
@@ -441,7 +441,7 @@ abstract class Horde_Db_Adapter_Base_Schema
     public function dropTable($name)
     {
         $this->_clearTableCache($name);
-        return $this->executeWrite('DROP TABLE ' . $this->quoteTableName($name));
+        return $this->execute('DROP TABLE ' . $this->quoteTableName($name));
     }
 
     /**
@@ -466,7 +466,7 @@ abstract class Horde_Db_Adapter_Base_Schema
             ' ADD '.$this->quoteColumnName($columnName) .
             ' '.$this->typeToSql($type, $limit, $precision, $scale, $unsigned);
         $sql = $this->addColumnOptions($sql, $options);
-        return $this->executeWrite($sql);
+        return $this->execute($sql);
     }
 
     /**
@@ -482,7 +482,7 @@ abstract class Horde_Db_Adapter_Base_Schema
         $this->_clearTableCache($tableName);
 
         $sql = 'ALTER TABLE ' . $this->quoteTableName($tableName).' DROP '.$this->quoteColumnName($columnName);
-        return $this->executeWrite($sql);
+        return $this->execute($sql);
     }
 
     /**
@@ -574,7 +574,7 @@ abstract class Horde_Db_Adapter_Base_Schema
         $quotedColumnNames = implode(', ', $quotedCols);
         $sql = "CREATE $indexType INDEX ".$this->quoteColumnName($indexName).
             'ON '.$this->quoteTableName($tableName) . " ($quotedColumnNames)";
-        return $this->executeWrite($sql);
+        return $this->execute($sql);
     }
 
     /**
@@ -600,7 +600,7 @@ abstract class Horde_Db_Adapter_Base_Schema
 
         $index = $this->indexName($tableName, $options);
         $sql = "DROP INDEX ".$this->quoteColumnName($index).' ON ' . $this->quoteTableName($tableName);
-        return $this->executeWrite($sql);
+        return $this->execute($sql);
     }
 
     /**
index 4d34e81..24b3263 100644 (file)
@@ -94,7 +94,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema
      */
     public function createDatabase($name)
     {
-        return $this->executeWrite("CREATE DATABASE `$name`");
+        return $this->execute("CREATE DATABASE `$name`");
     }
 
     /**
@@ -104,7 +104,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema
      */
     public function dropDatabase($name)
     {
-        return $this->executeWrite("DROP DATABASE IF EXISTS `$name`");
+        return $this->execute("DROP DATABASE IF EXISTS `$name`");
     }
 
     /**
@@ -275,7 +275,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema
     {
         $this->_clearTableCache($name);
 
-        return $this->executeWrite('ALTER TABLE '.$this->quoteTableName($name).' RENAME '.$this->quoteTableName($newName));
+        return $this->execute('ALTER TABLE '.$this->quoteTableName($name).' RENAME '.$this->quoteTableName($newName));
     }
 
     /**
@@ -297,7 +297,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema
         $default = $this->quote($default);
         $sql = "ALTER TABLE $quotedTableName CHANGE $quotedColumnName $quotedColumnName
                 $currentType DEFAULT $default";
-        return $this->executeWrite($sql);
+        return $this->execute($sql);
     }
 
     /**
@@ -327,7 +327,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema
 
         $sql = "ALTER TABLE $quotedTableName CHANGE $quotedColumnName $quotedColumnName $typeSql";
         $sql = $this->addColumnOptions($sql, $options);
-        $this->executeWrite($sql);
+        $this->execute($sql);
     }
 
     /**
@@ -350,7 +350,7 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema
                 $quotedColumnName.' '.
                 $this->quoteColumnName($newColumnName)." ".
                 $currentType;
-        return $this->executeWrite($sql);
+        return $this->execute($sql);
     }
 
     /**
index 013f2fb..cba44d1 100644 (file)
@@ -336,7 +336,7 @@ class Horde_Db_Adapter_Mysqli extends Horde_Db_Adapter_Base
      */
     public function insert($sql, $arg1=null, $arg2=null, $pk=null, $idValue=null, $sequenceName=null)
     {
-        $this->executeWrite($sql, $arg1, $arg2);
+        $this->execute($sql, $arg1, $arg2);
         return isset($idValue) ? $idValue : $this->_insertId;
     }
 
index f269d0b..9f47bfe 100644 (file)
@@ -77,8 +77,8 @@ class Horde_Db_Adapter_Oracle_Schema extends Horde_Db_Adapter_Base_Schema
         $trigger_name = $tableName . '_' . $columnName . '_trigger';
 
         $this->beginDbTransaction();
-        $this->executeWrite('CREATE SEQUENCE ' . $seq_name);
-        $this->executeWrite(
+        $this->execute('CREATE SEQUENCE ' . $seq_name);
+        $this->execute(
             'CREATE TRIGGER ' . $trigger_name . ' ' .
             'BEFORE INSERT ON ' . $this->quoteTableName($tableName) . ' ' .
             'FOR EACH ROW '
index bd57ba2..1eb5133 100644 (file)
@@ -226,7 +226,6 @@ abstract class Horde_Db_Adapter_Pdo_Base extends Horde_Db_Adapter_Base
             $dsnOpts['persistent'],
             $dsnOpts['charset'],
             $dsnOpts['phptype'],
-            $dsnOpts['write_db']
         );
 
         // return DSN and user/pass for connection
@@ -235,5 +234,4 @@ abstract class Horde_Db_Adapter_Pdo_Base extends Horde_Db_Adapter_Base
             $this->_config['username'],
             $this->_config['password']);
     }
-
 }
index 256b980..f05a267 100644 (file)
@@ -95,7 +95,6 @@ class Horde_Db_Adapter_Pdo_Mysql extends Horde_Db_Adapter_Pdo_Base
             $dsnOpts['adapter'],
             $dsnOpts['username'],
             $dsnOpts['password'],
-            $dsnOpts['write_db']
         );
         $dsnOpts = $this->_normalizeConfig($dsnOpts);
 
@@ -117,5 +116,4 @@ class Horde_Db_Adapter_Pdo_Mysql extends Horde_Db_Adapter_Pdo_Base
             $this->_config['username'],
             $this->_config['password']);
     }
-
 }
index 15c6b2b..4e35c57 100644 (file)
@@ -141,10 +141,6 @@ class Horde_Db_Adapter_Pdo_Pgsql extends Horde_Db_Adapter_Pdo_Base
     public function insert($sql, $arg1 = null, $arg2 = null, $pk = null,
                            $idValue = null, $sequenceName = null)
     {
-        if ($this->_write) {
-            return $this->_write->insert($sql, $arg1, $arg2, $pk, $idValue, $sequenceName);
-        }
-
         // Extract the table from the insert sql. Yuck.
         $temp = explode(' ', $sql, 4);
         $table = str_replace('"', '', $temp[2]);
@@ -254,5 +250,4 @@ class Horde_Db_Adapter_Pdo_Pgsql extends Horde_Db_Adapter_Pdo_Base
     {
         return (int)$this->selectValue('SELECT currval('.$this->quoteSequenceName($sequenceName).')');
     }
-
 }
index 7ca6940..4a585cd 100644 (file)
@@ -154,7 +154,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema
             }
         }
 
-        return $this->executeWrite('CREATE DATABASE ' . $this->quoteTableName($name) . $optionString);
+        return $this->execute('CREATE DATABASE ' . $this->quoteTableName($name) . $optionString);
     }
 
     /**
@@ -166,10 +166,10 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema
     public function dropDatabase($name)
     {
         if ($this->postgresqlVersion() >= 80200) {
-            return $this->executeWrite('DROP DATABASE IF EXISTS ' . $this->quoteTableName($name));
+            return $this->execute('DROP DATABASE IF EXISTS ' . $this->quoteTableName($name));
         } else {
             try {
-                return $this->executeWrite('DROP DATABASE ' . $this->quoteTableName($name));
+                return $this->execute('DROP DATABASE ' . $this->quoteTableName($name));
             } catch (Horde_Db_Exception $e) {
                 if ($this->_logger) { $this->_logger->warn("$name database doesn't exist"); }
             }
@@ -430,7 +430,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema
     {
         $this->_clearTableCache($name);
 
-        return $this->executeWrite('ALTER TABLE ' . $this->quoteTableName($name) . ' RENAME TO ' . $this->quoteTableName($newName));
+        return $this->execute('ALTER TABLE ' . $this->quoteTableName($name) . ' RENAME TO ' . $this->quoteTableName($newName));
     }
 
     /**
@@ -464,7 +464,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema
         }
 
         // Add the column.
-        $this->executeWrite('ALTER TABLE ' . $this->quoteTableName($tableName) . ' ADD COLUMN ' . $this->quoteColumnName($columnName) . ' ' . $sqltype);
+        $this->execute('ALTER TABLE ' . $this->quoteTableName($tableName) . ' ADD COLUMN ' . $this->quoteColumnName($columnName) . ' ' . $sqltype);
 
         $default = isset($options['default']) ? $options['default'] : null;
         $notnull = isset($options['null']) && $options['null'] === false;
@@ -493,7 +493,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema
         $quotedTableName = $this->quoteTableName($tableName);
 
         try {
-            $this->executeWrite('ALTER TABLE '.$quotedTableName.' ALTER COLUMN '.$this->quoteColumnName($columnName).' TYPE '.$this->typeToSql($type, $limit, $precision, $scale));
+            $this->execute('ALTER TABLE '.$quotedTableName.' ALTER COLUMN '.$this->quoteColumnName($columnName).' TYPE '.$this->typeToSql($type, $limit, $precision, $scale));
         } catch (Horde_Db_Exception $e) {
             // This is PostgreSQL 7.x, or the old type could not be coerced to
             // the new type, so we have to use a more arcane way of doing it.
@@ -518,9 +518,9 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema
                 $this->addColumn($tableName, $tmpColumnName, $type, $options);
 
                 if ($oldType == 'boolean') {
-                    $this->update('UPDATE '.$quotedTableName.' SET '.$this->quoteColumnName($tmpColumnName).' = CAST(CASE WHEN '.$this->quoteColumnName($columnName).' IS TRUE THEN 1 ELSE 0 END AS '.$this->typeToSql($type, $limit, $precision, $scale).')');
+                    $this->execute('UPDATE '.$quotedTableName.' SET '.$this->quoteColumnName($tmpColumnName).' = CAST(CASE WHEN '.$this->quoteColumnName($columnName).' IS TRUE THEN 1 ELSE 0 END AS '.$this->typeToSql($type, $limit, $precision, $scale).')');
                 } else {
-                    $this->update('UPDATE '.$quotedTableName.' SET '.$this->quoteColumnName($tmpColumnName).' = CAST('.$this->quoteColumnName($columnName).' AS '.$this->typeToSql($type, $limit, $precision, $scale).')');
+                    $this->execute('UPDATE '.$quotedTableName.' SET '.$this->quoteColumnName($tmpColumnName).' = CAST('.$this->quoteColumnName($columnName).' AS '.$this->typeToSql($type, $limit, $precision, $scale).')');
                 }
 
                 $this->removeColumn($tableName, $columnName);
@@ -537,7 +537,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema
 
         if ($autoincrement) {
             $seq_name = $this->quoteSequenceName($this->defaultSequenceName($tableName, $columnName));
-            $this->executeWrite('CREATE SEQUENCE ' . $seq_name);
+            $this->execute('CREATE SEQUENCE ' . $seq_name);
             $this->changeColumnDefault($tableName, $columnName, 'NEXTVAL(' . $seq_name . ')');
         } elseif (array_key_exists('default', $options)) {
             $this->changeColumnDefault($tableName, $columnName, $default);
@@ -554,16 +554,16 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema
     public function changeColumnDefault($tableName, $columnName, $default)
     {
         $this->_clearTableCache($tableName);
-        return $this->executeWrite('ALTER TABLE '.$this->quoteTableName($tableName). ' ALTER COLUMN '.$this->quoteColumnName($columnName).' SET DEFAULT '.$this->quote($default));
+        return $this->execute('ALTER TABLE '.$this->quoteTableName($tableName). ' ALTER COLUMN '.$this->quoteColumnName($columnName).' SET DEFAULT '.$this->quote($default));
     }
 
     public function changeColumnNull($tableName, $columnName, $null, $default = null)
     {
         $this->_clearTableCache($tableName);
         if (!($null || is_null($default))) {
-            $this->update('UPDATE '.$this->quoteTableName($tableName).' SET '.$this->quoteColumnName($columnName).' = '.$this->quote($default).' WHERE '.$this->quoteColumnName($columnName).' IS NULL');
+            $this->execute('UPDATE '.$this->quoteTableName($tableName).' SET '.$this->quoteColumnName($columnName).' = '.$this->quote($default).' WHERE '.$this->quoteColumnName($columnName).' IS NULL');
         }
-        return $this->executeWrite('ALTER TABLE '.$this->quoteTableName($tableName).' ALTER '.$this->quoteColumnName($columnName).' '.($null ? 'DROP' : 'SET').' NOT NULL');
+        return $this->execute('ALTER TABLE '.$this->quoteTableName($tableName).' ALTER '.$this->quoteColumnName($columnName).' '.($null ? 'DROP' : 'SET').' NOT NULL');
     }
 
     /**
@@ -572,7 +572,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema
     public function renameColumn($tableName, $columnName, $newColumnName)
     {
         $this->_clearTableCache($tableName);
-        return $this->executeWrite('ALTER TABLE '.$this->quoteTableName($tableName).' RENAME COLUMN '.$this->quoteColumnName($columnName).' TO '.$this->quoteColumnName($newColumnName));
+        return $this->execute('ALTER TABLE '.$this->quoteTableName($tableName).' RENAME COLUMN '.$this->quoteColumnName($columnName).' TO '.$this->quoteColumnName($newColumnName));
     }
 
     /**
@@ -581,7 +581,7 @@ class Horde_Db_Adapter_Postgresql_Schema extends Horde_Db_Adapter_Base_Schema
     public function removeIndex($tableName, $options = array())
     {
         $this->_clearTableCache($tableName);
-        return $this->executeWrite('DROP INDEX '.$this->indexName($tableName, $options));
+        return $this->execute('DROP INDEX '.$this->indexName($tableName, $options));
     }
 
     /**
index 76c5b2f..76a1d79 100644 (file)
@@ -193,7 +193,7 @@ class Horde_Db_Adapter_Sqlite_Schema extends Horde_Db_Adapter_Base_Schema
     {
         $this->_clearTableCache($name);
 
-        return $this->executeWrite('ALTER TABLE ' . $this->quoteTableName($name) . ' RENAME TO ' . $this->quoteTableName($newName));
+        return $this->execute('ALTER TABLE ' . $this->quoteTableName($name) . ' RENAME TO ' . $this->quoteTableName($newName));
     }
 
     /**
@@ -216,7 +216,7 @@ class Horde_Db_Adapter_Sqlite_Schema extends Horde_Db_Adapter_Base_Schema
         parent::addColumn($tableName, $columnName, $type, $options);
 
         // See last paragraph on http://www.sqlite.org/lang_altertable.html
-        $this->executeWrite('VACUUM');
+        $this->execute('VACUUM');
     }
 
     /**
@@ -304,7 +304,7 @@ class Horde_Db_Adapter_Sqlite_Schema extends Horde_Db_Adapter_Base_Schema
 
         $index = $this->indexName($tableName, $options);
         $sql = 'DROP INDEX '.$this->quoteColumnName($index);
-        return $this->executeWrite($sql);
+        return $this->execute($sql);
     }
 
 
@@ -436,6 +436,6 @@ class Horde_Db_Adapter_Sqlite_Schema extends Horde_Db_Adapter_Base_Schema
         $quotedFrom = $this->quoteTableName($from);
         $quotedFromColumns = implode(', ', array_map(array($this, 'quoteColumnName'), $fromColumns));
 
-        $this->insert("INSERT INTO $quotedTo ($quotedToColumns) SELECT $quotedFromColumns FROM $quotedFrom");
+        $this->execute("INSERT INTO $quotedTo ($quotedToColumns) SELECT $quotedFromColumns FROM $quotedFrom");
     }
 }
index ee6ac00..837919d 100644 (file)
@@ -31,7 +31,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
  </stability>
  <license uri="http://opensource.org/licenses/bsd-license.php">BSD</license>
  <notes>* Add support for adding autoincrement to a column.
- * Add ability to define a write DB for use with split-DB installations.
  * Initial release
  </notes>
  <contents>