Commit a4ff463
authored
[SqlQuery] Remove unused WhereColumn() (#514)
Closes #494.
## Summary
`WhereColumn(left, op, right)` constructed a column-to-column comparison
from two unqualified column names (e.g. `WhereColumn("left", "=",
"right")` → `WHERE "left" = "right"`). Per #494 it is unused and
unneeded — the same column-vs-column comparison is already expressible
through the existing `Where(col, op, col)` overload (e.g. with
`SqlQualifiedTableColumnName` operands, covered by the *"Where:
SqlQualifiedTableColumnName OP SqlQualifiedTableColumnName"* test).
## Changes
- **`SqlQuery/Core.hpp`** — removed the `WhereColumn` declaration and
its out-of-line definition from `SqlWhereClauseBuilder<Derived>`.
- **`tests/QueryBuilderTests.cpp`** — removed the obsolete
`SqlQueryBuilder.WhereColumn` test case.
No documentation referenced `WhereColumn`, and there were no internal
callers (the unrelated `IsBatchUpdateWhereColumn` trait in
`DataMapper.hpp` is a different identifier and is untouched).
## Risk assessment
- **API**: breaking change for any external caller using `WhereColumn` —
appropriate for the issue's intent. Migration: use `Where(left, op,
right)` with `SqlQualifiedTableColumnName` operands for column-vs-column
comparisons.
- **Behavior**: no change to any other query-building path.
- **Per-DBMS**: none — pure DSL surface removal, no SQL-generation
differences.
- **Performance**: none.
## Databases tested
- `sqlite3` — `[SqlQueryBuilder]` green (395 assertions / 76 cases);
full suite green (1196 passed, 1 skipped).
- `mssql2022` (Docker, 16.00.4250) — `[SqlQueryBuilder]` green (396
assertions / 76 cases).
- `postgres` — **skipped**: no PostgreSQL ODBC driver available in this
environment. Low risk given the change is database-agnostic.
Built via the `gcc-release` preset. Note: the `clang-debug` preset
(clang-tidy + `-Werror`) currently fails on pre-existing findings in
`master`'s recently-merged prefetch / ALTER-COLUMN commits
(`SqlStatement.hpp`, `DataMapper.hpp`) that are unrelated to and
untouched by this PR.
🤖 Generated with [Claude Code](https://claude.com/claude-code)2 files changed
Lines changed: 0 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | 309 | | |
314 | 310 | | |
315 | 311 | | |
| |||
758 | 754 | | |
759 | 755 | | |
760 | 756 | | |
761 | | - | |
762 | | - | |
763 | | - | |
764 | | - | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | 757 | | |
780 | 758 | | |
781 | 759 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | 936 | | |
947 | 937 | | |
948 | 938 | | |
| |||
0 commit comments