diff --git a/Traits/QueryTrait.php b/Traits/QueryTrait.php index 936633b..8841f08 100644 --- a/Traits/QueryTrait.php +++ b/Traits/QueryTrait.php @@ -104,6 +104,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @return string * @throws @@ -147,6 +148,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string $column * @return $this @@ -157,6 +159,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string $column * @return $this @@ -182,6 +185,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string|Closure $tableName * @@ -196,6 +200,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string $tableName * @param string $alias @@ -274,6 +279,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return false; } + /** * @param string $tableName * @param string $alias @@ -294,6 +300,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this->join("LEFT JOIN " . $tableName, $alias, $onCondition, $param); } + /** * @param string $tableName * @param string $alias @@ -314,6 +321,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this->join("RIGHT JOIN " . $tableName, $alias, $onCondition, $param); } + /** * @param string $tableName * @param string $alias @@ -334,6 +342,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this->join("INNER JOIN " . $tableName, $alias, $onCondition, $param); } + /** * @param string $field * @@ -345,6 +354,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string $field * @return $this @@ -355,6 +365,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string $lngField * @param string $latField @@ -370,6 +381,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string|array $column * @param string $sort @@ -397,6 +409,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string $column * @param string $sort @@ -414,6 +427,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param array $column * @@ -425,6 +439,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @return $this */ @@ -434,6 +449,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param array|Closure|string $conditionArray * @param string $opera @@ -470,6 +486,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string $column * @param string $value @@ -482,6 +499,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string $column * @param string $value @@ -551,6 +569,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string $column * @param int|float $start @@ -570,6 +589,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param string $column * @param int|float $start @@ -589,6 +609,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param mixed $value * @return $this @@ -599,13 +620,18 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** - * @param array $column + * @param array|string $column * @return $this */ - public function where(array $column): static + public function where(array|string $column): static { - return $this->addArray($column); + if (is_string($column)) { + return $this->whereRaw($column); + } else { + return $this->addArray($column); + } } @@ -667,6 +693,7 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq return $this; } + /** * @param int $limit *