-
-
Notifications
You must be signed in to change notification settings - Fork 40
Update doc about $db->select()
#987
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #987 +/- ##
=========================================
Coverage 98.99% 98.99%
Complexity 1654 1654
=========================================
Files 99 99
Lines 4169 4169
=========================================
Hits 4127 4127
Misses 42 42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates tests and documentation to use the new $db->select()
method instead of instantiating queries with new Query($db)
, and removes now-unnecessary use Yiisoft\Db\Query\Query
imports.
- Replace all
new Query($db)
calls with$db->select()
. - Remove redundant
use Yiisoft\Db\Query\Query
statements from tests. - Update code examples in docs and README to match the new API.
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/Db/Query/QueryTest.php | Switched query instantiation to $db->select() |
tests/Db/Expression/StructuredExpressionBuilderTest.php | Updated expression builder test to use $db->select() |
tests/Db/Expression/JsonExpressionBuilderTest.php | Updated expression builder test to use $db->select() |
tests/Db/Expression/ArrayExpressionBuilderTest.php | Updated expression builder test to use $db->select() |
tests/Common/CommonCommandTest.php | Replaced new Query($db) with $db->select() in assertions |
tests/AbstractConnectionTest.php | Updated batch query result creation to use $db->select() |
src/Query/QueryInterface.php | Updated doc example to use $db->select() |
docs/guide/pt-BR/query/with-query.md | Changed example to use $db->select() |
docs/guide/pt-BR/query/where.md | Changed example to use $db->select() |
docs/guide/pt-BR/query/union.md | Changed example to use $db->select() |
docs/guide/pt-BR/query/select.md | Changed example to use $db->select() |
docs/guide/pt-BR/query-builder.md | Changed example to use $db->select() |
docs/guide/en/schema/typecasting.md | Changed example to use $db->select() |
docs/guide/en/query/with-query.md | Changed example to use $db->select() |
docs/guide/en/query/where.md | Changed example to use $db->select() |
docs/guide/en/query/union.md | Changed example to use $db->select() |
docs/guide/en/query/select.md | Changed example to use $db->select() |
docs/guide/en/query-builder.md | Changed example to use $db->select() |
README.md | Updated sample usage to use $db->select() |
Co-authored-by: Sergei Predvoditelev <[email protected]>
Merge it before release 2.0