change delete returned

This commit is contained in:
2022-09-12 02:49:18 +08:00
parent 9d81bc6479
commit ca011c4557
+4 -4
View File
@@ -331,14 +331,14 @@ class ActiveQuery extends Component implements ISqlBuilder
/**
* @param bool $getSql
* @return int|bool|string|null
* @throws
* @return bool|string
* @throws Exception
*/
public function delete(bool $getSql = FALSE): int|bool|string|null
public function delete(bool $getSql = FALSE): bool|string
{
$sql = $this->builder->delete();
if ($getSql === FALSE) {
return $this->execute($sql)->delete();
return (bool)$this->execute($sql)->delete();
}
return $sql;
}