merge mongo with master

This commit is contained in:
Anton Grebnev
2011-12-05 20:11:20 +04:00
72 changed files with 575 additions and 441 deletions

View File

@ -80,7 +80,7 @@ class MySQLiStatement extends DbStatement
/**
* Fetches single row
*
*
* @param mixed $style
* @return mixed
*/
@ -89,7 +89,7 @@ class MySQLiStatement extends DbStatement
if (!$this->result) {
return false;
}
$row = false;
switch ($style) {
case Db::FETCH_OBJ:
@ -105,11 +105,11 @@ class MySQLiStatement extends DbStatement
$row = $this->result->fetch_array(MYSQLI_BOTH);
break;
default:
throw new Exception('Invalid fetch mode "' . $style . '" specified');
throw new GeneralException('Invalid fetch mode "' . $style . '" specified');
}
return $row;
}
/**
* @param string $class
*/
@ -129,7 +129,7 @@ class MySQLiStatement extends DbStatement
}
return $data;
}
public function close()
{
if ($this->result !== null) {
@ -137,12 +137,12 @@ class MySQLiStatement extends DbStatement
$this->result = null;
}
}
public function affectedRows()
{
return $this->driver->getConnection()->affected_rows;
}
public function numRows()
{
if ($this->result) {
@ -150,7 +150,7 @@ class MySQLiStatement extends DbStatement
}
return false;
}
protected function driverExecute($request)
{
/**
@ -166,7 +166,7 @@ class MySQLiStatement extends DbStatement
}
if ($result === false) {
$message = $mysqli->error . "\nQuery: \"" . $request . '"';
throw new Exception($message, $mysqli->errno);
throw new GeneralException($message, $mysqli->errno);
}
if ($result instanceof MySQLi_Result) {
$this->result = $result;