updated MongoStatement to return retval on db.eval
This commit is contained in:
@ -60,6 +60,9 @@ class MongoStatement extends DbStatement
|
|||||||
if (!$this->result) {
|
if (!$this->result) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (isset($this->result['retval'])) {
|
||||||
|
return $this->result['retval'];
|
||||||
|
}
|
||||||
|
|
||||||
$row = false;
|
$row = false;
|
||||||
switch ($style) {
|
switch ($style) {
|
||||||
@ -112,6 +115,8 @@ class MongoStatement extends DbStatement
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} elseif (is_int($this->result)) {
|
||||||
|
return $this->result;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -151,6 +156,8 @@ class MongoStatement extends DbStatement
|
|||||||
if (is_array($result) && isset($result['values'])) {
|
if (is_array($result) && isset($result['values'])) {
|
||||||
$this->result = $result['values'];
|
$this->result = $result['values'];
|
||||||
}
|
}
|
||||||
|
} elseif (is_int($result)) {
|
||||||
|
$this->result = $result;
|
||||||
}
|
}
|
||||||
if ($request instanceof InsertMongoCommand) {
|
if ($request instanceof InsertMongoCommand) {
|
||||||
$this->insertId = $request->getInsertId();
|
$this->insertId = $request->getInsertId();
|
||||||
|
Reference in New Issue
Block a user