This commit is contained in:
2024-04-26 15:36:55 +08:00
parent 2fd37f90a3
commit 87f568bdfe
4 changed files with 25 additions and 43 deletions
+2 -1
View File
@@ -115,10 +115,11 @@ class Db extends QueryTrait implements ISqlBuilder
/**
* @return bool
* @throws Exception
*/
public function exists(): bool
{
return $this->connection->createCommand(SqlBuilder::builder($this)->one())->rowCount() > 0;
return $this->connection->createCommand(SqlBuilder::builder($this->limit(1))->exists())->exists();
}
/**