From 9f1dea174058aa7b9713a5ebafc6f00886f98547 Mon Sep 17 00:00:00 2001 From: evgen-d Date: Fri, 8 Aug 2014 08:55:42 +0400 Subject: [PATCH] remove update remove methods --- Query.php | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/Query.php b/Query.php index 5ba099e..ba9de9e 100644 --- a/Query.php +++ b/Query.php @@ -81,58 +81,6 @@ class Query extends Component implements QueryInterface return $this->getStatement($options, $db); } - public function update($collection, $columns, $condition, $params) - { - $clauses = [ - $this->buildFrom($collection), - $this->buildWhere($condition, $params), - $this->buildUpdate($collection, $columns), - ]; - - $aql = implode($this->separator, array_filter($clauses)); - - $options = ArrayHelper::merge( - $params, - [ - 'query' => $aql, - 'bindVars' => $params, - ] - ); - - return $this->getStatement($options); - } - - public function remove($collection, $condition, $params) - { - $clauses = [ - $this->buildFrom($collection), - $this->buildWhere($condition, $params), - $this->buildRemove($collection), - ]; - - $aql = implode($this->separator, array_filter($clauses)); - - $options = ArrayHelper::merge( - $params, - [ - 'query' => $aql, - 'bindVars' => $params, - ] - ); - - return $this->getStatement($options); - } - - protected function buildUpdate($collection, $columns) - { - return 'UPDATE ' . $collection . 'WITH ' . Json::encode($columns) . ' IN ' . $collection; - } - - protected function buildRemove($collection) - { - return 'REMOVE ' . $collection . ' IN ' . $collection; - } - /** * @param $fields * @return $this