改名
This commit is contained in:
@@ -43,8 +43,6 @@ class ActiveQuery extends Component implements ISqlBuilder
|
|||||||
public array $attributes = [];
|
public array $attributes = [];
|
||||||
|
|
||||||
|
|
||||||
private SqlBuilder $builder;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Comply constructor.
|
* Comply constructor.
|
||||||
|
|||||||
+11
-2
@@ -22,13 +22,22 @@ class Query implements ISqlBuilder
|
|||||||
|
|
||||||
use QueryTrait;
|
use QueryTrait;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->builder = SqlBuilder::builder($this);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getSql(): string
|
public function getSql(): string
|
||||||
{
|
{
|
||||||
return SqlBuilder::builder($this)->get();
|
return $this->builder->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -38,7 +47,7 @@ class Query implements ISqlBuilder
|
|||||||
*/
|
*/
|
||||||
public function getCondition(): string
|
public function getCondition(): string
|
||||||
{
|
{
|
||||||
return SqlBuilder::builder($this)->getCondition();
|
return $this->builder->getCondition();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ trait QueryTrait
|
|||||||
|
|
||||||
public bool $ifNotWhere = false;
|
public bool $ifNotWhere = false;
|
||||||
|
|
||||||
|
|
||||||
|
private SqlBuilder $builder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ActiveRecord|string|null
|
* @var ActiveRecord|string|null
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user