Browse Source

updated MongoStatement to return retval on db.eval

master
Anton Grebnev 13 years ago
parent
commit
a950ff688f
  1. 7
      model/MongoStatement.php

7
model/MongoStatement.php

@ -60,6 +60,9 @@ class MongoStatement extends DbStatement
if (!$this->result) {
return false;
}
if (isset($this->result['retval'])) {
return $this->result['retval'];
}
$row = false;
switch ($style) {
@ -112,6 +115,8 @@ class MongoStatement extends DbStatement
} else {
return false;
}
} elseif (is_int($this->result)) {
return $this->result;
}
return false;
}
@ -151,6 +156,8 @@ class MongoStatement extends DbStatement
if (is_array($result) && isset($result['values'])) {
$this->result = $result['values'];
}
} elseif (is_int($result)) {
$this->result = $result;
}
if ($request instanceof InsertMongoCommand) {
$this->insertId = $request->getInsertId();

Loading…
Cancel
Save