From ff63ce4a4e3b5fecdd82f6dd015f5b66974f0175 Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Wed, 26 Jul 2023 11:09:53 -0400 Subject: [PATCH 1/2] Add method `build()` to `ExpressionBuilderInterface::class`. --- src/Expression/ExpressionBuilderInterface.php | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Expression/ExpressionBuilderInterface.php b/src/Expression/ExpressionBuilderInterface.php index 7bb163f70..01c186537 100644 --- a/src/Expression/ExpressionBuilderInterface.php +++ b/src/Expression/ExpressionBuilderInterface.php @@ -4,6 +4,11 @@ namespace Yiisoft\Db\Expression; +use Yiisoft\Db\Exception\Exception; +use Yiisoft\Db\Exception\InvalidArgumentException; +use Yiisoft\Db\Exception\InvalidConfigException; +use Yiisoft\Db\Exception\NotSupportedException; + /** * This interface defines the methods to build database expressions, such as conditions for a SELECT statement or values * to insert into a table. @@ -18,4 +23,19 @@ */ interface ExpressionBuilderInterface { + /** + * Method builds the raw SQL from the $expression that will not be additionally escaped or quoted. + * + * @param ExpressionInterface $expression The expression to be built. + * @param array $params the binding Parameters. + * + * + * @throws Exception + * @throws InvalidArgumentException + * @throws InvalidConfigException + * @throws NotSupportedException + * + * @return string The raw SQL that will not be additionally escaped or quoted. + */ + public function build(ExpressionInterface $expression, array &$params = []): string; } From eb6ff2843eef85bddd8421d38fb972e9bef29736 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Wed, 26 Jul 2023 15:10:13 +0000 Subject: [PATCH 2/2] Apply fixes from StyleCI --- src/Expression/ExpressionBuilderInterface.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Expression/ExpressionBuilderInterface.php b/src/Expression/ExpressionBuilderInterface.php index 01c186537..320f0a224 100644 --- a/src/Expression/ExpressionBuilderInterface.php +++ b/src/Expression/ExpressionBuilderInterface.php @@ -29,7 +29,6 @@ interface ExpressionBuilderInterface * @param ExpressionInterface $expression The expression to be built. * @param array $params the binding Parameters. * - * * @throws Exception * @throws InvalidArgumentException * @throws InvalidConfigException