Skip to content

[SqlQuery] Remove unused WhereColumn()#514

Merged
christianparpart merged 1 commit into
masterfrom
remove-wherecolumn-494
Jul 1, 2026
Merged

[SqlQuery] Remove unused WhereColumn()#514
christianparpart merged 1 commit into
masterfrom
remove-wherecolumn-494

Conversation

@Yaraslaut

Copy link
Copy Markdown
Member

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).
  • postgresskipped: 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

WhereColumn(left, op, right) emitted a column-to-column comparison from two
unqualified column names. Per issue #494 it is unused and unneeded — the same
column-vs-column comparison is expressible via the existing
Where(col, op, col) overload (e.g. with SqlQualifiedTableColumnName operands).

- Remove the declaration and out-of-line definition from SqlWhereClauseBuilder
  in SqlQuery/Core.hpp.
- Remove the obsolete "SqlQueryBuilder.WhereColumn" test case.

Closes #494

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@christianparpart christianparpart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 hm, alright.

@christianparpart christianparpart merged commit a4ff463 into master Jul 1, 2026
29 checks passed
@christianparpart christianparpart deleted the remove-wherecolumn-494 branch July 1, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WhereColumn remove?

2 participants