Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class support for SELECT DISTINCT to the query model so callers can request de-duplicated select results, with SQL generation and test-driver execution coverage.
Changes:
- Extend
SelectQuerywith adistinct()fluent setter andisDistinct()flag. - Update SQL generation to emit
SELECT DISTINCT ...when requested. - Add/extend tests for DISTINCT behavior and SQL string generation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/tests/TestDriverTest.php | Adds integration-style tests validating DISTINCT behavior via the test driver. |
| test/tests/SQLTest.php | Adds a generator-level assertion for SELECT DISTINCT * .... |
| src/Query/SelectQuery.php | Introduces the distinct flag and fluent API on SelectQuery. |
| src/Query/Generator/SQL.php | Emits DISTINCT in generated SQL when SelectQuery::isDistinct() is true. |
| src/Driver/Test/TestTable.php | Implements DISTINCT filtering in the in-memory test driver query execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Adds support for SELECT DISTINCT to the query builder and ensures SQL generation and the in-memory test driver can execute distinct queries.
Changes:
- Introduces a
distinctflag onSelectQuerywithdistinct()/isDistinct()APIs. - Updates the SQL generator to emit
SELECT DISTINCT ...for distinct select queries. - Adds test coverage for distinct behavior in both the SQL generator tests and the TestDriver integration tests.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/Query/SelectQuery.php |
Adds distinct state + fluent API to mark a select query as distinct. |
src/Query/Generator/SQL.php |
Emits DISTINCT in generated SELECT statements when requested. |
src/Driver/Test/TestTable.php |
Attempts to implement distinct filtering in the in-memory test driver. |
test/tests/SQLTest.php |
Verifies SQL generation for SELECT DISTINCT * .... |
test/tests/TestDriverTest.php |
Adds integration tests for distinct results (including field-only distinct and null handling). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
This PR adds support for SELECT DISTINCT to the query layer, ensuring SQL generation and the in-memory Test driver can represent distinct selects, and adds PHPUnit coverage for the new query behavior.
Changes:
- Add a
distinctflag + fluent API (distinct(),isDistinct()) toSelectQuery. - Extend the SQL generator to emit
SELECT DISTINCT .... - Update the Test driver to attempt de-duplication for distinct selects and add tests covering distinct selection scenarios (including nulls and aliases).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/tests/TestDriverTest.php | Adds new PHPUnit tests for distinct select behavior in the Test driver. |
| test/tests/SQLTest.php | Adds SQL generation test for SELECT DISTINCT * .... |
| src/Query/SelectQuery.php | Introduces distinct state and API on SelectQuery. |
| src/Query/Generator/SQL.php | Emits DISTINCT after SELECT when enabled on the query. |
| src/Driver/Test/TestTable.php | Implements distinct handling in the in-memory Test table query path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Adds support for SELECT DISTINCT to the query layer, ensuring SQL generation and the in-memory test driver can represent distinct selects, and expanding test coverage to validate expected distinct behavior.
Changes:
- Extend
SelectQuerywith adistinct()flag and accessor (isDistinct()). - Update SQL generator to emit
SELECT DISTINCT ...for distinct select queries. - Update the test driver and tests to exercise distinct selection semantics (including distinct-by-field and null handling).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/Query/SelectQuery.php |
Adds distinct state + fluent setter/getter on SelectQuery. |
src/Query/Generator/SQL.php |
Emits DISTINCT in generated SQL for SelectQuery. |
src/Driver/Test/TestTable.php |
Implements DISTINCT handling in the in-memory test driver and adjusts ordering/limit application timing. |
test/tests/SQLTest.php |
Adds SQL generation test for SELECT DISTINCT * .... |
test/tests/TestDriverTest.php |
Adds test-driver coverage for distinct behavior (field distinct, limit interaction, nulls, alias, aggregates). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Adds support for SELECT DISTINCT to the query layer and ensures both SQL generation and the in-memory test driver handle distinct selects, with accompanying unit tests.
Changes:
- Introduce a
distinctflag and fluent API (SelectQuery::distinct()/isDistinct()). - Update SQL generator to emit
SELECT DISTINCT .... - Extend the test driver to apply
DISTINCT(for explicit field selections) and adjust ordering/limiting flow; add tests covering DISTINCT scenarios.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/tests/TestDriverTest.php | Adds integration tests for DISTINCT behavior in the test driver (fields, limit, null handling, alias, aggregate+group). |
| test/tests/SQLTest.php | Adds SQL string-generation test asserting SELECT DISTINCT * .... |
| src/Query/SelectQuery.php | Adds distinct flag, constructor param, and distinct accessor/mutator. |
| src/Query/Generator/SQL.php | Emits DISTINCT keyword for distinct select queries. |
| src/Driver/Test/TestTable.php | Applies DISTINCT de-duplication (when fields are specified) and moves ordering/limit application after select processing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
No description provided.