diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30fcc32d..5498ed99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,16 +60,16 @@ jobs: - name: Set environment variables pull request linux. if: matrix.os == 'ubuntu-latest' - uses: yiisoft/actions/db/environment-linux@master + uses: yiisoft/actions/db/environment-linux@fix-branch-name - name: Set environment variables pull request windows. if: matrix.os == 'windows-latest' - uses: yiisoft/actions/db/environment-windows@master + uses: yiisoft/actions/db/environment-windows@fix-branch-name - name: Install db. uses: yiisoft/actions/db/subpackage-install@master with: - BRANCH_NAME: ${{ github.head_ref }} + BRANCH_NAME: ${{ env.BRANCH_NAME }} COMPOSER_ROOT_VERSION: ${{ env.COMPOSER_ROOT_VERSION }} CURRENT_PACKAGE: db FULL_BRANCH_NAME: ${{ env.FULL_BRANCH_NAME }} diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 8603444a..d698d909 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -55,12 +55,12 @@ jobs: run: composer self-update - name: Set environment variables pull request linux. - uses: yiisoft/actions/db/environment-linux@master + uses: yiisoft/actions/db/environment-linux@fix-branch-name - name: Install db. uses: yiisoft/actions/db/subpackage-install@master with: - BRANCH_NAME: ${{ github.head_ref }} + BRANCH_NAME: ${{ env.BRANCH_NAME }} COMPOSER_ROOT_VERSION: ${{ env.COMPOSER_ROOT_VERSION }} CURRENT_PACKAGE: db FULL_BRANCH_NAME: ${{ env.FULL_BRANCH_NAME }} diff --git a/src/Builder/InConditionBuilder.php b/src/Builder/InConditionBuilder.php index 6391afe8..d1707f05 100644 --- a/src/Builder/InConditionBuilder.php +++ b/src/Builder/InConditionBuilder.php @@ -5,26 +5,23 @@ namespace Yiisoft\Db\Sqlite\Builder; use Iterator; -use Traversable; use Yiisoft\Db\Exception\Exception; use Yiisoft\Db\Exception\InvalidArgumentException; use Yiisoft\Db\Exception\InvalidConfigException; use Yiisoft\Db\Exception\NotSupportedException; use Yiisoft\Db\Expression\ExpressionInterface; use Yiisoft\Db\QueryBuilder\Condition\Builder\InConditionBuilder as BaseInConditionBuilder; -use Yiisoft\Db\QueryBuilder\QueryBuilderInterface; use function implode; use function is_array; use function str_contains; +/** + * InConditionBuilder builds conditions for {@see `\Yiisoft\Db\QueryBuilder\Condition\InCondition`} IN operator for + * SQLite. + */ final class InConditionBuilder extends BaseInConditionBuilder { - public function __construct(private QueryBuilderInterface $queryBuilder) - { - parent::__construct($queryBuilder); - } - /** * Builds SQL for IN condition. * @@ -48,11 +45,14 @@ protected function buildSubqueryInCondition( /** * Builds SQL for IN condition. * - * @return string SQL. + * @throws Exception + * @throws InvalidArgumentException + * @throws InvalidConfigException + * @throws NotSupportedException */ protected function buildCompositeInCondition( string|null $operator, - Traversable|array $columns, + iterable $columns, iterable|Iterator $values, array &$params = [] ): string {