Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add method build() in ExpressionBuilderInterface::class. #731

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/Expression/ExpressionBuilderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -18,4 +23,18 @@
*/
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.

Check failure on line 29 in src/Expression/ExpressionBuilderInterface.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.0-ubuntu-latest

MismatchingDocblockParamType

src/Expression/ExpressionBuilderInterface.php:29:15: MismatchingDocblockParamType: Parameter $expression has wrong type 'Yiisoft\Db\Expression\ExpressionInterface', should be 'Yiisoft\Db\Expression\Expression' (see https://psalm.dev/141)

Check failure on line 29 in src/Expression/ExpressionBuilderInterface.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.1-ubuntu-latest

MismatchingDocblockParamType

src/Expression/ExpressionBuilderInterface.php:29:15: MismatchingDocblockParamType: Parameter $expression has wrong type 'Yiisoft\Db\Expression\ExpressionInterface', should be 'Yiisoft\Db\Expression\Expression' (see https://psalm.dev/141)

Check failure on line 29 in src/Expression/ExpressionBuilderInterface.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.1-ubuntu-latest

MismatchingDocblockParamType

src/Expression/ExpressionBuilderInterface.php:29:15: MismatchingDocblockParamType: Parameter $expression has wrong type 'Yiisoft\Db\Expression\ExpressionInterface', should be 'Yiisoft\Db\Query\QueryInterface' (see https://psalm.dev/141)

Check failure on line 29 in src/Expression/ExpressionBuilderInterface.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.1-ubuntu-latest

MismatchingDocblockParamType

src/Expression/ExpressionBuilderInterface.php:29:15: MismatchingDocblockParamType: Parameter $expression has wrong type 'Yiisoft\Db\Expression\ExpressionInterface', should be 'Yiisoft\Db\QueryBuilder\Condition\Interface\BetweenColumnsConditionInterface' (see https://psalm.dev/141)

Check failure on line 29 in src/Expression/ExpressionBuilderInterface.php

View workflow job for this annotation

GitHub Actions / psalm / PHP 8.0-ubuntu-latest

MismatchingDocblockParamType

src/Expression/ExpressionBuilderInterface.php:29:15: MismatchingDocblockParamType: Parameter $expression has wrong type 'Yiisoft\Db\Expression\ExpressionInterface', should be 'Yiisoft\Db\Expression\Expression' (see https://psalm.dev/141)
* @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;
}
Loading