Skip to content

Conversation

gargsaumya
Copy link
Contributor

@gargsaumya gargsaumya commented Oct 3, 2025

Work Item / Issue Reference

AB#39185

GitHub Issue: #241


Summary

This pull request removes the logic for automatically mapping UUID string parameters to GUID types in the _map_sql_type method of mssql_python/cursor.py. As a result, UUID strings will no longer be converted to binary GUID representations when binding parameters.

Type mapping changes:

  • Removed the code that attempted to parse parameters as UUIDs and map them to SQL GUID types, so UUID strings will now be handled as regular strings instead of being converted to bytes_le for GUID columns.

@Copilot Copilot AI review requested due to automatic review settings October 3, 2025 06:46
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes automatic UUID string to GUID type mapping logic from the cursor's parameter handling. The change simplifies type mapping by eliminating the attempt to parse string parameters as UUIDs and convert them to binary GUID representations.

  • Removed UUID parsing and binary conversion logic from _map_sql_type method
  • UUID strings will now be treated as regular strings instead of being automatically converted to GUID types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

github-actions bot commented Oct 3, 2025

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

74%


📈 Total Lines Covered: 4171 out of 5600
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.connection.connection.cpp: 67.6%
mssql_python.ddbc_bindings.py: 68.5%
mssql_python.pybind.ddbc_bindings.cpp: 69.3%
mssql_python.pybind.connection.connection_pool.cpp: 78.9%
mssql_python.cursor.py: 79.7%
mssql_python.connection.py: 81.7%
mssql_python.helpers.py: 84.7%
mssql_python.auth.py: 85.3%
mssql_python.type.py: 86.8%
mssql_python.pooling.py: 88.8%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

@gargsaumya gargsaumya merged commit cc180ec into main Oct 7, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-size: small Minimal code update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coercion of UNIQUEIDENTIFIER / uuid values from binary to string only works with fetchone(), not fetchall() or fetchmany()
3 participants