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