Skip to content

Commit cf75ffb

Browse files
vistartclaude
andcommitted
refactor(sqlserver): validate COLLATE names via dialect hook
Return the validated SQL Server collation SQL token from validate_collation_name so COLLATE formatting supports DATABASE_DEFAULT through one hook. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent dc3a295 commit cf75ffb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/rhosocial/activerecord/backend/impl/sqlserver

‎src/rhosocial/activerecord/backend/impl/sqlserver/dialect.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,8 @@ def supports_collate_expression(self) -> bool:
277277
"""SQL Server supports expression-level COLLATE."""
278278
return True
279279

280-
def format_collation_name(self, collation) -> str:
281-
"""Format SQL Server collation names as validated bare tokens."""
280+
def validate_collation_name(self, collation) -> str:
281+
"""Validate SQL Server collation names and return their SQL representation."""
282282
if collation.schema is not None:
283283
raise UnsupportedFeatureError(self.name, "schema-qualified COLLATE")
284284
if collation.keyword is not None and collation.keyword != "DATABASE_DEFAULT":

0 commit comments

Comments
 (0)