Skip to content

Fix tx modes #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 31, 2024
Merged

Fix tx modes #2

merged 3 commits into from
Oct 31, 2024

Conversation

vgvoleg
Copy link
Collaborator

@vgvoleg vgvoleg commented Oct 31, 2024

No description provided.

@@ -30,7 +30,7 @@ class IsolationLevel(str, Enum):


class _IsolationSettings(NamedTuple):
ydb_mode: ydb.BaseQueryTxMode
ydb_mode: ydb.BaseQueryTxMode | None

Choose a reason for hiding this comment

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

nitpick: It is always not None

self, query: str, seq_of_parameters: Sequence[ParametersType]
) -> None:
for parameters in seq_of_parameters:
self.execute(query, parameters)

Choose a reason for hiding this comment

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

question (non-blocking): Could we optimize this using preparation of query or just concat queries together?

Choose a reason for hiding this comment

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

suggestion: commit and rollback could raise exception in case of TLI or BrokenSession. I think we should wrap them to interface exceptions

@vgvoleg vgvoleg merged commit f9dacef into main Oct 31, 2024
2 checks passed
@vgvoleg vgvoleg deleted the fix_tx_modes branch October 31, 2024 15:22
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