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

Update migrations.rst #2303

Merged
merged 1 commit into from
Aug 9, 2024
Merged

Update migrations.rst #2303

merged 1 commit into from
Aug 9, 2024

Conversation

MarwanSalim
Copy link
Contributor

Update documentation based on the latest code changes.

Ref 1:

public function getQueryBuilder(string $type): Query
{
return match ($type) {
Query::TYPE_SELECT => $this->getDecoratedConnection()->selectQuery(),
Query::TYPE_INSERT => $this->getDecoratedConnection()->insertQuery(),
Query::TYPE_UPDATE => $this->getDecoratedConnection()->updateQuery(),
Query::TYPE_DELETE => $this->getDecoratedConnection()->deleteQuery(),
default => throw new InvalidArgumentException(
'Query type must be one of: `select`, `insert`, `update`, `delete`.'
)
};
}

Update documentation based on the latest code changes

```php
    /**
     * @inheritdoc
     */
    public function getQueryBuilder(string $type): Query
    {
        return match ($type) {
            Query::TYPE_SELECT => $this->getDecoratedConnection()->selectQuery(),
            Query::TYPE_INSERT => $this->getDecoratedConnection()->insertQuery(),
            Query::TYPE_UPDATE => $this->getDecoratedConnection()->updateQuery(),
            Query::TYPE_DELETE => $this->getDecoratedConnection()->deleteQuery(),
            default => throw new InvalidArgumentException(
                'Query type must be one of: `select`, `insert`, `update`, `delete`.'
            )
        };
    }
```

Ref 1: https://github.com/cakephp/phinx/blob/b0f4397dd57eb91bd5369c2770a4f2656a3f993c/src/Phinx/Db/Adapter/PdoAdapter.php#L239-L250
@dereuromark dereuromark merged commit 0480295 into cakephp:0.x Aug 9, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants