diff --git a/ActiveQuery.php b/ActiveQuery.php index 73b379a..bdf704f 100644 --- a/ActiveQuery.php +++ b/ActiveQuery.php @@ -1,6 +1,6 @@ createCommand($db); $token = $this->getRawAql($statement); - Yii::info($token, 'devgroup\arangodb\Query::query'); + Yii::info($token, 'explosivebit\arangodb\Query::query'); try { - Yii::beginProfile($token, 'devgroup\arangodb\Query::query'); + Yii::beginProfile($token, 'explosivebit\arangodb\Query::query'); $cursor = $statement->execute(); $rows = $cursor->getAll(); - Yii::endProfile($token, 'devgroup\arangodb\Query::query'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); } catch (\Exception $ex) { - Yii::endProfile($token, 'devgroup\arangodb\Query::query'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } if (!empty($rows)) { diff --git a/ActiveRecord.php b/ActiveRecord.php index bd4abec..8e1f0f0 100644 --- a/ActiveRecord.php +++ b/ActiveRecord.php @@ -1,6 +1,6 @@ connectionOptions[ConnectionOptions::OPTION_ENDPOINT]; try { - Yii::info($token, 'devgroup\arangodb\Connection::open'); - Yii::beginProfile($token, 'devgroup\arangodb\Connection::open'); + Yii::info($token, 'explosivebit\arangodb\Connection::open'); + Yii::beginProfile($token, 'explosivebit\arangodb\Connection::open'); $this->connection = new \triagens\ArangoDb\Connection($this->connectionOptions); $this->collectionHandler = new CollectionHandler($this->connection); $this->documentHandler = new DocumentHandler($this->connection); - Yii::endProfile($token, 'devgroup\arangodb\Connection::open'); + Yii::endProfile($token, 'explosivebit\arangodb\Connection::open'); } catch (\Exception $ex) { - Yii::endProfile($token, 'devgroup\arangodb\Connection::open'); + Yii::endProfile($token, 'explosivebit\arangodb\Connection::open'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } } diff --git a/Exception.php b/Exception.php index 6e0b4ad..8ee97ba 100644 --- a/Exception.php +++ b/Exception.php @@ -1,6 +1,6 @@ getStatement($options); $token = $this->getRawAql($statement); - Yii::info($token, 'devgroup\arangodb\Query::query'); + Yii::info($token, 'explosivebit\arangodb\Query::query'); try { - Yii::beginProfile($token, 'devgroup\arangodb\Query::query'); + Yii::beginProfile($token, 'explosivebit\arangodb\Query::query'); $cursor = $statement->execute(); - Yii::endProfile($token, 'devgroup\arangodb\Query::query'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); } catch (\Exception $ex) { - Yii::endProfile($token, 'devgroup\arangodb\Query::query'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } return $this->prepareResult($cursor->getAll()); @@ -619,13 +619,13 @@ class Query extends Component implements QueryInterface { $statement = $this->createCommand($db); $token = $this->getRawAql($statement); - Yii::info($token, 'devgroup\arangodb\Query::query'); + Yii::info($token, 'explosivebit\arangodb\Query::query'); try { - Yii::beginProfile($token, 'devgroup\arangodb\Query::query'); + Yii::beginProfile($token, 'explosivebit\arangodb\Query::query'); $cursor = $statement->execute(); - Yii::endProfile($token, 'devgroup\arangodb\Query::query'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); } catch (\Exception $ex) { - Yii::endProfile($token, 'devgroup\arangodb\Query::query'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } return $this->prepareResult($cursor->getAll()); @@ -641,13 +641,13 @@ class Query extends Component implements QueryInterface $this->limit(1); $statement = $this->createCommand($db); $token = $this->getRawAql($statement); - Yii::info($token, 'devgroup\arangodb\Query::query'); + Yii::info($token, 'explosivebit\arangodb\Query::query'); try { - Yii::beginProfile($token, 'devgroup\arangodb\Query::query'); + Yii::beginProfile($token, 'explosivebit\arangodb\Query::query'); $cursor = $statement->execute(); - Yii::endProfile($token, 'devgroup\arangodb\Query::query'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); } catch (\Exception $ex) { - Yii::endProfile($token, 'devgroup\arangodb\Query::query'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } $result = $this->prepareResult($cursor->getAll()); @@ -682,13 +682,13 @@ class Query extends Component implements QueryInterface $statement = $this->getStatement($params, $db); $token = $this->getRawAql($statement); - Yii::info($token, 'devgroup\arangodb\Query::insert'); + Yii::info($token, 'explosivebit\arangodb\Query::insert'); try { - Yii::beginProfile($token, 'devgroup\arangodb\Query::insert'); + Yii::beginProfile($token, 'explosivebit\arangodb\Query::insert'); $cursor = $statement->execute(); - Yii::endProfile($token, 'devgroup\arangodb\Query::insert'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::insert'); } catch (\Exception $ex) { - Yii::endProfile($token, 'devgroup\arangodb\Query::insert'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::insert'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } return true; @@ -725,13 +725,13 @@ class Query extends Component implements QueryInterface $statement = $this->getStatement($params, $db); $token = $this->getRawAql($statement); - Yii::info($token, 'devgroup\arangodb\Query::update'); + Yii::info($token, 'explosivebit\arangodb\Query::update'); try { - Yii::beginProfile($token, 'devgroup\arangodb\Query::update'); + Yii::beginProfile($token, 'explosivebit\arangodb\Query::update'); $cursor = $statement->execute(); - Yii::endProfile($token, 'devgroup\arangodb\Query::update'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::update'); } catch (\Exception $ex) { - Yii::endProfile($token, 'devgroup\arangodb\Query::update'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::update'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } $meta = $cursor->getMetadata(); @@ -770,13 +770,13 @@ class Query extends Component implements QueryInterface $statement = $this->getStatement($params, $db); $token = $this->getRawAql($statement); - Yii::info($token, 'devgroup\arangodb\Query::remove'); + Yii::info($token, 'explosivebit\arangodb\Query::remove'); try { - Yii::beginProfile($token, 'devgroup\arangodb\Query::remove'); + Yii::beginProfile($token, 'explosivebit\arangodb\Query::remove'); $cursor = $statement->execute(); - Yii::endProfile($token, 'devgroup\arangodb\Query::remove'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::remove'); } catch (\Exception $ex) { - Yii::endProfile($token, 'devgroup\arangodb\Query::remove'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::remove'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } $meta = $cursor->getMetadata(); @@ -859,13 +859,13 @@ class Query extends Component implements QueryInterface $statement->setBatchSize(1); $token = $this->getRawAql($statement); - Yii::info($token, 'devgroup\arangodb\Query::query'); + Yii::info($token, 'explosivebit\arangodb\Query::query'); try { - Yii::beginProfile($token, 'devgroup\arangodb\Query::query'); + Yii::beginProfile($token, 'explosivebit\arangodb\Query::query'); $cursor = $statement->execute(); - Yii::endProfile($token, 'devgroup\arangodb\Query::query'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); } catch (\Exception $ex) { - Yii::endProfile($token, 'devgroup\arangodb\Query::query'); + Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } return $cursor->getFullCount(); diff --git a/Serializer.php b/Serializer.php index 202e131..3c12cab 100644 --- a/Serializer.php +++ b/Serializer.php @@ -5,7 +5,7 @@ * Time: 16:04 */ -namespace devgroup\arangodb; +namespace explosivebit\arangodb; use yii\base\Arrayable; diff --git a/composer.json b/composer.json index 43d7846..0e4c6bd 100644 --- a/composer.json +++ b/composer.json @@ -6,16 +6,8 @@ "license": "GPL-3.0+", "authors": [ { - "name": "Alexander Kozhevnikov", - "email": "b37hr3z3n@gmail.com" - }, - { - "name": "Evgeny Dubovitsky", - "email": "flynn068@gmail.com" - }, - { - "name": "Pavel Fedotov", - "email": "fps.06@mail.ru" + "name": "Ilya Rumyantsev", + "email": "explosivebit@gmail.com" } ], "minimum-stability": "dev", @@ -28,7 +20,7 @@ }, "autoload": { "psr-4": { - "devgroup\\arangodb\\": "" + "explosivebit\\arangodb\\": "" } } } \ No newline at end of file diff --git a/console/controllers/MigrateController.php b/console/controllers/MigrateController.php index 498204a..845edcc 100644 --- a/console/controllers/MigrateController.php +++ b/console/controllers/MigrateController.php @@ -1,11 +1,11 @@ messages, Logger::LEVEL_PROFILE, [ - 'devgroup\arangodb\Query::query', - 'devgroup\arangodb\Query::insert', - 'devgroup\arangodb\Query::update', - 'devgroup\arangodb\Query::remove', - 'devgroup\arangodb\Query::execute', + 'explosivebit\arangodb\Query::query', + 'explosivebit\arangodb\Query::insert', + 'explosivebit\arangodb\Query::update', + 'explosivebit\arangodb\Query::remove', + 'explosivebit\arangodb\Query::execute', ] ); } @@ -83,7 +83,7 @@ class ArangoDbPanel extends Panel $queryTime = number_format($this->getTotalQueryTime($timings) * 1000) . ' ms'; return \Yii::$app->view->render( - '@devgroup/arangodb/panels/arangodb/views/summary', + '@explosivebit/arangodb/panels/arangodb/views/summary', [ 'timings' => $this->calculateTimings(), 'queryCount' => $queryCount, @@ -101,7 +101,7 @@ class ArangoDbPanel extends Panel $searchModel = new ArangoDb(); $dataProvider = $searchModel->search(Yii::$app->request->getQueryParams(), $this->getModels()); - return Yii::$app->view->render('@devgroup/arangodb/panels/arangodb/views/detail', [ + return Yii::$app->view->render('@explosivebit/arangodb/panels/arangodb/views/detail', [ 'panel' => $this, 'dataProvider' => $dataProvider, 'searchModel' => $searchModel, @@ -136,15 +136,15 @@ class ArangoDbPanel extends Panel protected function getQueryType($category) { switch ($category) { - case 'devgroup\arangodb\Query::query' : + case 'explosivebit\arangodb\Query::query' : return 'SELECT'; - case 'devgroup\arangodb\Query::insert' : + case 'explosivebit\arangodb\Query::insert' : return 'INSERT'; - case 'devgroup\arangodb\Query::update' : + case 'explosivebit\arangodb\Query::update' : return 'UPDATE'; - case 'devgroup\arangodb\Query::remove' : + case 'explosivebit\arangodb\Query::remove' : return 'REMOVE'; - case 'devgroup\arangodb\Query::execute' : + case 'explosivebit\arangodb\Query::execute' : return 'EXECUTE'; default : return ''; diff --git a/panels/arangodb/models/ArangoDb.php b/panels/arangodb/models/ArangoDb.php index 8bb8606..9bcc917 100644 --- a/panels/arangodb/models/ArangoDb.php +++ b/panels/arangodb/models/ArangoDb.php @@ -1,6 +1,6 @@ extends \devgroup\arangodb\Migration { public function up() { - + $this->createCollection('',[]); } public function down() { - echo " cannot be reverted.\n"; - - return false; + $this->dropCollection(''); } }