Skip to content

Conversation

olavloite
Copy link
Collaborator

Store temporary TransactionOptions in the connection state as local options. Local options only apply to the current transaction. This simplifies the internal state handling of the driver, as all transaction state should only be read from the connection state, and not also from a temporary variable.

This also enables the use of a combination of temporary transaction options and using SQL statements to set further options. The shared library always includes temporary transaction options, as the BeginTransaction function accepts TransactionOptions as an input argument. This meant that using SQL statements to set further transaction options was not supported through the shared library.

@olavloite olavloite requested a review from a team as a code owner October 4, 2025 12:38
@olavloite olavloite force-pushed the store-temp-transaction-options-in-connection-state branch from a2fe03d to 28dc192 Compare October 5, 2025 07:14
Store temporary TransactionOptions in the connection state as local options. Local options
only apply to the current transaction. This simplifies the internal state handling of the
driver, as all transaction state should only be read from the connection state, and not
also from a temporary variable.

This also enables the use of a combination of temporary transaction options and using
SQL statements to set further options. The shared library always includes temporary
transaction options, as the BeginTransaction function accepts TransactionOptions as an
input argument. This meant that using SQL statements to set further transaction options
was not supported through the shared library.
@olavloite olavloite force-pushed the store-temp-transaction-options-in-connection-state branch from 28dc192 to 27d7edc Compare October 5, 2025 09:02
@olavloite olavloite requested a review from rayudu3745 October 5, 2025 11:27
Copy link
Contributor

@bhatt4982 bhatt4982 left a comment

Choose a reason for hiding this comment

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

LGTM...

@olavloite olavloite merged commit 8893903 into main Oct 7, 2025
26 checks passed
@olavloite olavloite deleted the store-temp-transaction-options-in-connection-state branch October 7, 2025 16:59
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.

2 participants