Closed Feyfeyy closed 3 years ago
So the problem I can see is that SELECT NEWID()
is returned by pymssql as a <class 'uuid.UUID'>
object with sql_type_hint 2. So we just need to add this line before the try:
statement:
if isinstance(item, uuid.UUID):
return str(item)
fix merged in #14
Using python when passing a unique identifier (GUID/UUID) using the query method as an parameter.
the following error is displayed due to no mapping in place for unique identifier (GUID/UUID)
as shown the _get_data_mapper method has no sql type hinting for a unique identifier (GUID/UUID) to be mapped which is causing the bug by falling into the clause of _parse_datetimeoffset_from_bytes which is causing the error advised above.