This commit is contained in:
2024-04-29 21:55:19 +08:00
parent 73b9923740
commit 2b85cb4ec3
+18
View File
@@ -153,6 +153,24 @@ class Db extends QueryTrait implements ISqlBuilder
}
/**
* @return bool|array|null
*/
public function first(): bool|array|null
{
return $this->connection->createCommand(SqlBuilder::builder($this)->delete())->one();
}
/**
* @return bool|array
*/
public function get(): bool|array
{
return $this->connection->createCommand(SqlBuilder::builder($this)->delete())->all();
}
/**
* @param string $sql
* @return mixed