* @param int $idValue
* @param string $sequenceName
*/
- public function insert($sql, $arg1=null, $arg2=null, $pk=null, $idValue=null, $sequenceName=null)
+ 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]);
if (!$column)
return parent::quote($value, $column);
- if (is_string($value) && $column->getType() == 'binary' && method_exists($column, 'stringToBinary')) {
+ if (is_string($value) && ($column->getType() == 'binary')) {
/*@TODO test blobs/bytea fields with postgres/pdo and figure out how
this should work */
return $this->quotedStringPrefix() . "'" . $column->stringToBinary($value) . "'";