Skip to content

DBAPI based on Query Service #1

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 33 commits into from
Oct 30, 2024
Merged

DBAPI based on Query Service #1

merged 33 commits into from
Oct 30, 2024

Conversation

vgvoleg
Copy link
Collaborator

@vgvoleg vgvoleg commented Oct 16, 2024

No description provided.

@vgvoleg vgvoleg changed the title New dbapi DBAPI based on Query Service Oct 16, 2024
@vgvoleg vgvoleg force-pushed the new_dbapi branch 2 times, most recently from 63c0263 to baabab8 Compare October 21, 2024 15:51
@vgvoleg vgvoleg force-pushed the new_dbapi branch 3 times, most recently from 8117b8e to be55108 Compare October 23, 2024 07:07
@vgvoleg vgvoleg requested a review from LuckySting October 23, 2024 13:08
return self._tx_context.execute(
query=query,
parameters=parameters,
commit_tx=self._autocommit,

Choose a reason for hiding this comment

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

question: I think if tx_context is None we could do it, so autocommit variable could be removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tx_context is None only in case of AUTOCOMMIT isolation level, but we have other levels with interactive transactions ON/OFF.

def _execute_generic_query(
self, query: str, parameters: ParametersType | None = None
) -> Iterator[ydb.convert.ResultSet]:
return self._session.execute(query=query, parameters=parameters)

Choose a reason for hiding this comment

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

question: Why you don't use session_pool.retry_operation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will do it out of this PR

@vgvoleg vgvoleg merged commit de14b64 into main Oct 30, 2024
2 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.

2 participants