改名
This commit is contained in:
@@ -310,7 +310,8 @@ class ActiveQuery extends Component implements ISqlBuilder
|
||||
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @param bool $getSql
|
||||
* @return string|bool
|
||||
* @throws Exception
|
||||
*/
|
||||
public function delete($getSql = false): string|bool
|
||||
|
||||
@@ -127,7 +127,7 @@ class SqlBuilder extends Component
|
||||
* @return string
|
||||
* @throws Exception
|
||||
*/
|
||||
public function delete()
|
||||
public function delete(): string
|
||||
{
|
||||
$delete = sprintf('DELETE FROM %s ', $this->query->modelClass::getTable());
|
||||
|
||||
@@ -232,6 +232,10 @@ class SqlBuilder extends Component
|
||||
$select = $this->_selectPrefix();
|
||||
}
|
||||
$select = $this->_wherePrefix($select);
|
||||
if (!empty($this->query->attributes) && is_array($this->query->attributes)) {
|
||||
$select = strtr($select, $this->query->attributes);
|
||||
}
|
||||
|
||||
if (!empty($this->query->group)) {
|
||||
$select .= $this->builderGroup($this->query->group);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user