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

Commit 3ef3700

Browse files
committed
bug: fix uuid normalization (for strings)
1 parent efd1148 commit 3ef3700

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

data_diff/databases/mssql.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ def md5_as_int(self, s: str) -> str:
166166
def md5_as_hex(self, s: str) -> str:
167167
return f"HashBytes('MD5', {s})"
168168

169+
def normalize_uuid(self, value: str, coltype) -> str:
170+
return f"CONVERT(VARCHAR(36), UPPER(TRIM(CONVERT(varchar(4000), {value}))))"
171+
169172

170173
@attrs.define(frozen=False, init=False, kw_only=True)
171174
class MsSQL(ThreadedDatabase):

0 commit comments

Comments
 (0)