diff --git a/Database/ActiveRecord.php b/Database/ActiveRecord.php index f1edfc2d..2e8c49a4 100644 --- a/Database/ActiveRecord.php +++ b/Database/ActiveRecord.php @@ -42,53 +42,6 @@ class ActiveRecord extends BaseActiveRecord return []; } - /** - * @param string $column - * @param int $value - * @return static|bool - * @throws Exception - */ - public function incrBy(string $column, int $value) - { - if (!$this->mathematics(self::INCR, [$column => $value])) { - return false; - } - $this->{$column} += $value; - return $this->refresh(); - } - - /** - * @param $column - * @param $value - * @return array|Command|bool|int|string - * @throws Exception - */ - public function decrBy(string $column, int $value) - { - if (!$this->mathematics(self::DECR, [$column => $value])) { - return false; - } - $this->{$column} -= $value; - return $this->refresh(); - } - - /** - * @param array $attributes - * @return bool|self - * @throws Exception - */ - public function batchIncrColumn(array $attributes) - { - if (!$this->mathematics(self::INCR, $attributes)) { - return false; - } - foreach ($attributes as $key => $attribute) { - $this->$key += $attribute; - } - return $this; - } - - /** * @param string $column * @param int $value @@ -154,24 +107,6 @@ class ActiveRecord extends BaseActiveRecord return $this; } - - /** - * @param array $attributes - * @return bool|self - * @throws Exception - */ - public function batchDescColumn(array $attributes) - { - if (!$this->mathematics(self::DECR, $attributes)) { - return false; - } - foreach ($attributes as $key => $attribute) { - $this->$key -= $attribute; - } - return $this; - } - - /** * @param $attributes * @param $condition