fixing connection use

This commit is contained in:
_alvian 2017-10-09 11:19:40 +07:00
parent 2f4c725b51
commit 9c704db451

View File

@ -3,13 +3,13 @@
namespace explosivebit\arangodb;
use Yii;
use triagens\ArangoDb\CollectionHandler;
//use triagens\ArangoDb\ConnectionOptions;
use ArangoDBClient\CollectionHandler;
use ArangoDBClient\ConnectionOptions;
use triagens\ArangoDb\Document;
use triagens\ArangoDb\DocumentHandler;
use triagens\ArangoDb\Statement;
use triagens\ArangoDb\UpdatePolicy;
use ArangoDBClient\Document;
use ArangoDBClient\DocumentHandler;
use ArangoDBClient\Statement;
use ArangoDBClient\UpdatePolicy;
use yii\base\Object;
@ -53,8 +53,8 @@ class Connection extends Object
Yii::info($token, 'explosivebit\arangodb\Connection::open');
Yii::beginProfile($token, 'explosivebit\arangodb\Connection::open');
$this->connection = new \ArangoDBClient\Connection($this->connectionOptions);
$this->collectionHandler = new \ArangoDBClient\CollectionHandler($this->connection);
$this->documentHandler = new \ArangoDBClient\DocumentHandler($this->connection);
$this->collectionHandler = new CollectionHandler($this->connection);
$this->documentHandler = new DocumentHandler($this->connection);
Yii::endProfile($token, 'explosivebit\arangodb\Connection::open');
} catch (\Exception $ex) {
Yii::endProfile($token, 'explosivebit\arangodb\Connection::open');
@ -103,6 +103,6 @@ class Connection extends Object
*/
public function getStatement($options = [])
{
return new \ArangoDBClient\Statement($this->connection, $options);
return new Statement($this->connection, $options);
}
}