Skip to content

Conversation

@jahnvi480
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 13, 2025 11:01
Copy link
Contributor

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 adds support for access token authentication by enhancing how connection attributes are set before connecting.

  • Updates the C++ binding function (SQLSetConnectAttr_wrap) to support various Python value types including sequences.
  • Adds an optional attrs_before parameter to Python connection functions to allow pre-connection attribute configuration.
  • Updates constants and refactors the connection initialization to apply these attributes.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
mssql_python/pybind/ddbc_bindings.cpp Enhances SQLSetConnectAttr_wrap to support multiple Python types and recursive sequence handling.
mssql_python/db_connection.py Introduces an attrs_before parameter in connect to bypass user/password for access token auth.
mssql_python/constants.py Adds the SQL_IS_POINTER constant for pointer-based attribute values.
mssql_python/connection.py Refactors connection initialization and attribute setting to apply pre-connection attributes.

@bewithgaurav bewithgaurav merged commit a0e43e5 into main May 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants