*/
public function __call($method, $args)
{
- return call_user_func_array(array($this->_write, $method), $args);
+ $result = call_user_func_array(array($this->_write, $method), $args);
+ $this->last_query = $this->_write->last_query;
+ return $result;
}
/**
*/
public function select($sql, $arg1 = null, $arg2 = null)
{
- return $this->_read->select($sql, $arg1, $arg2);
+ $result = $this->_read->select($sql, $arg1, $arg2);
+ $this->last_query = $this->_read->last_query;
+ return $result;
}
/**
*/
public function selectAll($sql, $arg1 = null, $arg2 = null)
{
- return $this->_read->selectAll($sql, $arg1, $arg2);
+ $result = $this->_read->selectAll($sql, $arg1, $arg2);
+ $this->last_query = $this->_read->last_query;
+ return $result;
}
/**
*/
public function selectOne($sql, $arg1 = null, $arg2 = null)
{
- return $this->_read->selectOne($sql, $arg1, $arg2);
+ $result = $this->_read->selectOne($sql, $arg1, $arg2);
+ $this->last_query = $this->_read->last_query;
+ return $result;
}
/**
*/
public function selectValue($sql, $arg1 = null, $arg2 = null)
{
- return $this->_read->selectValue($sql, $arg1, $arg2);
+ $result = $this->_read->selectValue($sql, $arg1, $arg2);
+ $this->last_query = $this->_read->last_query;
+ return $result;
}
/**
*/
public function selectValues($sql, $arg1 = null, $arg2 = null)
{
- return $this->_read->selectValues($sql, $arg1, $arg2);
+ $result = $this->_read->selectValues($sql, $arg1, $arg2);
+ $this->last_query = $this->_read->last_query;
+ return $result;
}
/**
*/
public function selectAssoc($sql, $arg1 = null, $arg2 = null)
{
- return $this->_read->selectAssoc($sql, $arg1, $arg2);
+ $result = $this->_read->selectAssoc($sql, $arg1, $arg2);
+ $this->last_query = $this->_read->last_query;
+ return $result;
}
/**
public function execute($sql, $arg1 = null, $arg2 = null)
{
// Can't assume this will always be a read action, use _write.
- return $this->_write->execute($sql, $arg1, $arg2);
+ $result = $this->_write->execute($sql, $arg1, $arg2);
+ $this->last_query = $this->_write->last_query;
+ return $result;
}
/**
public function insert($sql, $arg1 = null, $arg2 = null, $pk = null,
$idValue = null, $sequenceName = null)
{
- return $this->_write->insert($sql, $arg1, $arg2, $pk, $idValue, $sequenceName);
+ $result = $this->_write->insert($sql, $arg1, $arg2, $pk, $idValue, $sequenceName);
+ $this->last_query = $this->_write->last_query;
+ return $result;
}
/**
*/
public function update($sql, $arg1 = null, $arg2 = null)
{
- return $this->_write->update($sql, $arg1, $arg2);
+ $result = $this->_write->update($sql, $arg1, $arg2);
+ $this->last_query = $this->_write->last_query;
+ return $result;
}
/**
*/
public function delete($sql, $arg1 = null, $arg2 = null)
{
- return $this->_write->delete($sql, $arg1, $arg2);
+ $result = $this->_write->delete($sql, $arg1, $arg2);
+ $this->last_query = $this->_write->last_query;
+ return $result;
}
/**
*/
public function transactionStarted()
{
- return $this->_write->transactionStarted();
+ $result = $this->_write->transactionStarted();
+ $this->last_query = $this->_write->last_query;
+ return $result;
}
/**
* Begins the transaction (and turns off auto-committing).
*/
public function beginDbTransaction()
{
- return $this->_write->beginDbTransaction();
+ $result = $this->_write->beginDbTransaction();
+ $this->last_query = $this->_write->last_query;
+ return $result;
}
/**
*/
public function commitDbTransaction()
{
- return $this->_write->commitDbTransaction();
+ $result = $this->_write->commitDbTransaction();
+ $this->last_query = $this->_write->last_query;
+ return $result;
}
/**
*/
public function rollbackDbTransaction()
{
- return $this->_write->rollbackDbTransaction();
+ $result = $this->_write->rollbackDbTransaction();
+ $this->last_query = $this->_write->last_query;
+ return $result;
}
/**
*/
public function addLimitOffset($sql, $options)
{
- return $this->_read->addLimitOffset($sql, $options);
+ $result = $this->_read->addLimitOffset($sql, $options);
+ $this->last_query = $this->_write->last_query;
+ return $result;
}
/**
public function addLock(&$sql, array $options = array())
{
$this->_write->addLock($sql, $options);
+ $this->last_query = $this->_write->last_query;
}
-
}