From ef1c5ffe6cb2a385259f18bec7f3694174ff2f7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 26 Mar 2021 14:21:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/ActiveQuery.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Database/ActiveQuery.php b/Database/ActiveQuery.php index 2737a05c..fb8ce1ea 100644 --- a/Database/ActiveQuery.php +++ b/Database/ActiveQuery.php @@ -155,6 +155,17 @@ class ActiveQuery extends Component implements ISqlBuilder return $newModel; } + + /** + * @return string + * @throws Exception + */ + public function toSql(): string + { + return $this->builder->get(); + } + + /** * @return array|Collection */