From 2b85cb4ec310a8a5b663d4b82c1a8acdc229eeb1 Mon Sep 17 00:00:00 2001 From: whwyy Date: Mon, 29 Apr 2024 21:55:19 +0800 Subject: [PATCH] eee --- Db.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Db.php b/Db.php index e3f6c8e..d0dea49 100644 --- a/Db.php +++ b/Db.php @@ -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