This commit is contained in:
2023-04-16 15:34:50 +08:00
parent 64d3f31138
commit 2e258c7e08
+9 -1
View File
@@ -24,6 +24,14 @@ class SqlBuilder extends Component
public ActiveQuery|Query|null $query;
public function __construct(ActiveQuery|Query|null $config)
{
parent::__construct();
$this->query = $config;
}
/**
* @param ISqlBuilder|null $query
* @return $this
@@ -31,7 +39,7 @@ class SqlBuilder extends Component
*/
public static function builder(ISqlBuilder|null $query): static
{
return new static(['query' => $query]);
return new static($query);
}