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

Commit bf7276b

Browse files
committed
mssql normalize_uuid
1 parent 275bf19 commit bf7276b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

data_diff/databases/mssql.py

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
)
1414
from data_diff.abcs.database_types import (
1515
JSON,
16+
ColType_UUID,
1617
NumericType,
1718
Timestamp,
1819
TimestampTZ,
@@ -154,6 +155,9 @@ def md5_as_int(self, s: str) -> str:
154155
def md5_as_hex(self, s: str) -> str:
155156
return f"HashBytes('MD5', {s})"
156157

158+
def normalize_uuid(self, value: str, coltype: ColType_UUID) -> str:
159+
return f"TRIM(CAST({value} AS char)) AS {value}"
160+
157161

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

0 commit comments

Comments
 (0)