[SqlQuery] Remove unused WhereColumn()#514
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 existingWhere(col, op, col)overload (e.g. withSqlQualifiedTableColumnNameoperands, covered by the "Where: SqlQualifiedTableColumnName OP SqlQualifiedTableColumnName" test).Changes
SqlQuery/Core.hpp— removed theWhereColumndeclaration and its out-of-line definition fromSqlWhereClauseBuilder<Derived>.tests/QueryBuilderTests.cpp— removed the obsoleteSqlQueryBuilder.WhereColumntest case.No documentation referenced
WhereColumn, and there were no internal callers (the unrelatedIsBatchUpdateWhereColumntrait inDataMapper.hppis a different identifier and is untouched).Risk assessment
WhereColumn— appropriate for the issue's intent. Migration: useWhere(left, op, right)withSqlQualifiedTableColumnNameoperands for column-vs-column comparisons.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-releasepreset. Note: theclang-debugpreset (clang-tidy +-Werror) currently fails on pre-existing findings inmaster's recently-merged prefetch / ALTER-COLUMN commits (SqlStatement.hpp,DataMapper.hpp) that are unrelated to and untouched by this PR.🤖 Generated with Claude Code