变更
This commit is contained in:
+9
-1
@@ -24,6 +24,14 @@ class SqlBuilder extends Component
|
|||||||
public ActiveQuery|Query|null $query;
|
public ActiveQuery|Query|null $query;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct(ActiveQuery|Query|null $config)
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->query = $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param ISqlBuilder|null $query
|
* @param ISqlBuilder|null $query
|
||||||
* @return $this
|
* @return $this
|
||||||
@@ -31,7 +39,7 @@ class SqlBuilder extends Component
|
|||||||
*/
|
*/
|
||||||
public static function builder(ISqlBuilder|null $query): static
|
public static function builder(ISqlBuilder|null $query): static
|
||||||
{
|
{
|
||||||
return new static(['query' => $query]);
|
return new static($query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user