From a4be42cc826d896efd25d474f9cdc65da4dbbfd9 Mon Sep 17 00:00:00 2001 From: RedHood Date: Wed, 20 Jan 2021 12:08:50 +1000 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BC=D0=B5=D0=BD=D0=B0=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=80=D0=B0=D0=BD=D1=81=D1=82=D0=B2=20=D0=B8?= =?UTF-8?q?=D0=BC=D1=91=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mirzaev/yii2-arangodb/ActiveQuery.php | 10 ++-- mirzaev/yii2-arangodb/ActiveRecord.php | 2 +- mirzaev/yii2-arangodb/AqlExpression.php | 8 +-- mirzaev/yii2-arangodb/Connection.php | 10 ++-- mirzaev/yii2-arangodb/Exception.php | 2 +- mirzaev/yii2-arangodb/Migration.php | 2 +- mirzaev/yii2-arangodb/Query.php | 60 +++++++++---------- mirzaev/yii2-arangodb/Serializer.php | 8 +-- .../console/controllers/MigrateController.php | 10 ++-- .../panels/arangodb/ArangoDbPanel.php | 26 ++++---- .../panels/arangodb/models/ArangoDb.php | 2 +- mirzaev/yii2-arangodb/views/migration.php | 2 +- 12 files changed, 65 insertions(+), 77 deletions(-) diff --git a/mirzaev/yii2-arangodb/ActiveQuery.php b/mirzaev/yii2-arangodb/ActiveQuery.php index bdf704f..3d27e28 100644 --- a/mirzaev/yii2-arangodb/ActiveQuery.php +++ b/mirzaev/yii2-arangodb/ActiveQuery.php @@ -1,6 +1,6 @@ createCommand($db); $token = $this->getRawAql($statement); - Yii::info($token, 'explosivebit\arangodb\Query::query'); + Yii::info($token, 'mirzaev\yii2\arangodb\Query::query'); try { - Yii::beginProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::beginProfile($token, 'mirzaev\yii2\arangodb\Query::query'); $cursor = $statement->execute(); $rows = $cursor->getAll(); - Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Query::query'); } catch (\Exception $ex) { - Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Query::query'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } if (!empty($rows)) { diff --git a/mirzaev/yii2-arangodb/ActiveRecord.php b/mirzaev/yii2-arangodb/ActiveRecord.php index 8e1f0f0..f0c803b 100644 --- a/mirzaev/yii2-arangodb/ActiveRecord.php +++ b/mirzaev/yii2-arangodb/ActiveRecord.php @@ -1,6 +1,6 @@ expression; } } - \ No newline at end of file diff --git a/mirzaev/yii2-arangodb/Connection.php b/mirzaev/yii2-arangodb/Connection.php index a99708c..ba16e19 100644 --- a/mirzaev/yii2-arangodb/Connection.php +++ b/mirzaev/yii2-arangodb/Connection.php @@ -1,6 +1,6 @@ connectionOptions[ConnectionOptions::OPTION_ENDPOINT]; try { - Yii::info($token, 'explosivebit\arangodb\Connection::open'); - Yii::beginProfile($token, 'explosivebit\arangodb\Connection::open'); + Yii::info($token, 'mirzaev\yii2\arangodb\Connection::open'); + Yii::beginProfile($token, 'mirzaev\yii2\arangodb\Connection::open'); $this->connection = new \ArangoDBClient\Connection($this->connectionOptions); $this->collectionHandler = new CollectionHandler($this->connection); $this->documentHandler = new DocumentHandler($this->connection); $this->edgeHandler = new EdgeHandler($this->connection); $this->graphHandler = new GraphHandler($this->connection); - Yii::endProfile($token, 'explosivebit\arangodb\Connection::open'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Connection::open'); } catch (\Exception $ex) { - Yii::endProfile($token, 'explosivebit\arangodb\Connection::open'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Connection::open'); throw new \Exception($ex->getMessage(), (int)$ex->getCode(), $ex); } } diff --git a/mirzaev/yii2-arangodb/Exception.php b/mirzaev/yii2-arangodb/Exception.php index 8ee97ba..03580ca 100644 --- a/mirzaev/yii2-arangodb/Exception.php +++ b/mirzaev/yii2-arangodb/Exception.php @@ -1,6 +1,6 @@ getStatement($options); $token = $this->getRawAql($statement); - Yii::info($token, 'explosivebit\arangodb\Query::query'); + Yii::info($token, 'mirzaev\yii2\arangodb\Query::query'); try { - Yii::beginProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::beginProfile($token, 'mirzaev\yii2\arangodb\Query::query'); $cursor = $statement->execute(); - Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Query::query'); } catch (\Exception $ex) { - Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::endProfile($token, 'mirzaev\yii2\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, 'explosivebit\arangodb\Query::query'); + Yii::info($token, 'mirzaev\yii2\arangodb\Query::query'); try { - Yii::beginProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::beginProfile($token, 'mirzaev\yii2\arangodb\Query::query'); $cursor = $statement->execute(); - Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Query::query'); } catch (\Exception $ex) { - Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::endProfile($token, 'mirzaev\yii2\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, 'explosivebit\arangodb\Query::query'); + Yii::info($token, 'mirzaev\yii2\arangodb\Query::query'); try { - Yii::beginProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::beginProfile($token, 'mirzaev\yii2\arangodb\Query::query'); $cursor = $statement->execute(); - Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Query::query'); } catch (\Exception $ex) { - Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::endProfile($token, 'mirzaev\yii2\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, 'explosivebit\arangodb\Query::insert'); + Yii::info($token, 'mirzaev\yii2\arangodb\Query::insert'); try { - Yii::beginProfile($token, 'explosivebit\arangodb\Query::insert'); + Yii::beginProfile($token, 'mirzaev\yii2\arangodb\Query::insert'); $cursor = $statement->execute(); - Yii::endProfile($token, 'explosivebit\arangodb\Query::insert'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Query::insert'); } catch (\Exception $ex) { - Yii::endProfile($token, 'explosivebit\arangodb\Query::insert'); + Yii::endProfile($token, 'mirzaev\yii2\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, 'explosivebit\arangodb\Query::update'); + Yii::info($token, 'mirzaev\yii2\arangodb\Query::update'); try { - Yii::beginProfile($token, 'explosivebit\arangodb\Query::update'); + Yii::beginProfile($token, 'mirzaev\yii2\arangodb\Query::update'); $cursor = $statement->execute(); - Yii::endProfile($token, 'explosivebit\arangodb\Query::update'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Query::update'); } catch (\Exception $ex) { - Yii::endProfile($token, 'explosivebit\arangodb\Query::update'); + Yii::endProfile($token, 'mirzaev\yii2\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, 'explosivebit\arangodb\Query::remove'); + Yii::info($token, 'mirzaev\yii2\arangodb\Query::remove'); try { - Yii::beginProfile($token, 'explosivebit\arangodb\Query::remove'); + Yii::beginProfile($token, 'mirzaev\yii2\arangodb\Query::remove'); $cursor = $statement->execute(); - Yii::endProfile($token, 'explosivebit\arangodb\Query::remove'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Query::remove'); } catch (\Exception $ex) { - Yii::endProfile($token, 'explosivebit\arangodb\Query::remove'); + Yii::endProfile($token, 'mirzaev\yii2\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, 'explosivebit\arangodb\Query::query'); + Yii::info($token, 'mirzaev\yii2\arangodb\Query::query'); try { - Yii::beginProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::beginProfile($token, 'mirzaev\yii2\arangodb\Query::query'); $cursor = $statement->execute(); - Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Query::query'); } catch (\Exception $ex) { - Yii::endProfile($token, 'explosivebit\arangodb\Query::query'); + Yii::endProfile($token, 'mirzaev\yii2\arangodb\Query::query'); throw new \Exception($ex->getMessage(), (int) $ex->getCode(), $ex); } return $cursor->getFullCount(); @@ -1237,6 +1237,6 @@ class Query extends Component implements QueryInterface } return $this; } - + public function emulateExecution ( $value = true ){} } diff --git a/mirzaev/yii2-arangodb/Serializer.php b/mirzaev/yii2-arangodb/Serializer.php index 3c12cab..2bf0add 100644 --- a/mirzaev/yii2-arangodb/Serializer.php +++ b/mirzaev/yii2-arangodb/Serializer.php @@ -1,11 +1,6 @@ messages, Logger::LEVEL_PROFILE, [ - 'explosivebit\arangodb\Query::query', - 'explosivebit\arangodb\Query::insert', - 'explosivebit\arangodb\Query::update', - 'explosivebit\arangodb\Query::remove', - 'explosivebit\arangodb\Query::execute', + 'mirzaev\yii2\arangodb\Query::query', + 'mirzaev\yii2\arangodb\Query::insert', + 'mirzaev\yii2\arangodb\Query::update', + 'mirzaev\yii2\arangodb\Query::remove', + 'mirzaev\yii2\arangodb\Query::execute', ] ); } @@ -136,15 +136,15 @@ class ArangoDbPanel extends Panel protected function getQueryType($category) { switch ($category) { - case 'explosivebit\arangodb\Query::query' : + case 'mirzaev\yii2\arangodb\Query::query' : return 'SELECT'; - case 'explosivebit\arangodb\Query::insert' : + case 'mirzaev\yii2\arangodb\Query::insert' : return 'INSERT'; - case 'explosivebit\arangodb\Query::update' : + case 'mirzaev\yii2\arangodb\Query::update' : return 'UPDATE'; - case 'explosivebit\arangodb\Query::remove' : + case 'mirzaev\yii2\arangodb\Query::remove' : return 'REMOVE'; - case 'explosivebit\arangodb\Query::execute' : + case 'mirzaev\yii2\arangodb\Query::execute' : return 'EXECUTE'; default : return ''; @@ -155,4 +155,4 @@ class ArangoDbPanel extends Panel { return ['arango-messages' => $this->getProfileLogs()]; } -} \ No newline at end of file +} \ No newline at end of file diff --git a/mirzaev/yii2-arangodb/panels/arangodb/models/ArangoDb.php b/mirzaev/yii2-arangodb/panels/arangodb/models/ArangoDb.php index 9bcc917..013d502 100644 --- a/mirzaev/yii2-arangodb/panels/arangodb/models/ArangoDb.php +++ b/mirzaev/yii2-arangodb/panels/arangodb/models/ArangoDb.php @@ -1,6 +1,6 @@ -class extends \explosivebit\arangodb\Migration +class extends \mirzaev\yii2\arangodb\Migration { public function up() {