This commit is contained in:
evgen-d 2014-08-05 10:12:32 +04:00
parent 39ab65c8ec
commit 32f7ae9046
2 changed files with 6 additions and 6 deletions

View File

@ -117,7 +117,7 @@ class ActiveQuery extends Query implements ActiveQueryInterface
public function all($db = null)
{
$statement = $this->createCommand();
$statement = $this->createCommand($db);
$token = $this->getRawAql($statement);
Yii::info($token, 'devgroup\arangodb\Query::query');
try {

View File

@ -65,7 +65,7 @@ class Query extends Component implements QueryInterface
return $db->getStatement($options);
}
public function createCommand($options = [])
public function createCommand($db = null, $options = [])
{
list ($aql, $params) = $this->buildQuery($this);
@ -77,7 +77,7 @@ class Query extends Component implements QueryInterface
]
);
return $this->getStatement($options);
return $this->getStatement($options, $db);
}
public function update($collection, $columns, $condition, $params)
@ -489,7 +489,7 @@ class Query extends Component implements QueryInterface
public function all($db = null)
{
$statement = $this->createCommand();
$statement = $this->createCommand($db);
$token = $this->getRawAql($statement);
Yii::info($token, 'devgroup\arangodb\Query::query');
try {
@ -506,7 +506,7 @@ class Query extends Component implements QueryInterface
public function one($db = null)
{
$this->limit(1);
$statement = $this->createCommand();
$statement = $this->createCommand($db);
$token = $this->getRawAql($statement);
Yii::info($token, 'devgroup\arangodb\Query::query');
try {
@ -540,7 +540,7 @@ class Query extends Component implements QueryInterface
public function count($q = '*', $db = null)
{
$statement = $this->createCommand();
$statement = $this->createCommand($db);
$statement->setCount(true);
$token = $this->getRawAql($statement);
Yii::info($token, 'devgroup\arangodb\Query::query');