Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Cast to unlimited varchars in MS SQL (especially UUDS) #825

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion data_diff/databases/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def current_schema(self) -> str:
WHERE name = CURRENT_USER"""

def to_string(self, s: str):
return f"CONVERT(varchar, {s})"
# Both convert(varchar(max), …) and convert(text, …) do work.
return f"CONVERT(VARCHAR(MAX), {s})"

def type_repr(self, t) -> str:
try:
Expand Down