This commit is contained in:
2021-08-09 18:56:09 +08:00
parent 415abed013
commit 0377550b6f
3 changed files with 14 additions and 4 deletions
+11 -2
View File
@@ -22,13 +22,22 @@ class Query implements ISqlBuilder
use QueryTrait;
/**
* @throws Exception
*/
public function __construct()
{
$this->builder = SqlBuilder::builder($this);
}
/**
* @return string
* @throws Exception
*/
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
{
return SqlBuilder::builder($this)->getCondition();
return $this->builder->getCondition();
}