Odbc driver feature#596
Open
Ylonies wants to merge 21 commits intoydb-platform:mainfrom
Open
Conversation
EndTran for env + tests
Combine connection attribute routing and error-localization updates into one focused commit while keeping driver pool changes separate. Made-with: Cursor
Gazizonoki
requested changes
Apr 24, 2026
Comment on lines
+34
to
+36
| virtual void OnStreamPartError(const TStatus& status) { | ||
| (void)status; | ||
| } |
Collaborator
There was a problem hiding this comment.
Suggested change
| virtual void OnStreamPartError(const TStatus& status) { | |
| (void)status; | |
| } | |
| virtual void OnStreamPartError([[maybe_unused]] const TStatus& status) { | |
| } |
| } | ||
| } | ||
|
|
||
| SQLRETURN SQL_API SQLGetDiagField(SQLSMALLINT handleType, |
Collaborator
There was a problem hiding this comment.
А SQLGetDiagField чем от SQLGetDiagRec отличается?
Author
There was a problem hiding this comment.
Необходимо по спеке, SQLGetDiagRec возвращает целую диагностическую запись, SQLGetDiagRec - одно поле по diagIdentifier
| if (txSettings.GetMode() == NQuery::TTxSettings::TS_SERIALIZABLE_RW) { | ||
| return session.StreamExecuteQuery( | ||
| PreparedQuery_, | ||
| NQuery::TTxControl::NoTx(), |
Collaborator
There was a problem hiding this comment.
А почему NoTx? Есть же Serializable
| auto iterator = CreateExecuteIterator(session, params); | ||
| NStatusHelpers::ThrowOnError(iterator); | ||
|
|
||
| std::optional<NQuery::TExecuteQueryPart> prefetchedResultPart = PrefetchFirstResultPart(iterator); |
Collaborator
There was a problem hiding this comment.
А зачем делать prefetch?
Author
There was a problem hiding this comment.
- ранняя диагностика 2) retry при autocommit прямо в execute
Comment on lines
+8
to
+30
| std::optional<NQuery::TTxSettings::ETransactionMode> TConnectionAttributes::ResolveTxMode(SQLUINTEGER accessMode, SQLUINTEGER txnIsolation) { | ||
| if (accessMode == SQL_MODE_READ_ONLY) { | ||
| switch (txnIsolation) { | ||
| case SQL_TXN_READ_UNCOMMITTED: | ||
| return NQuery::TTxSettings::TS_STALE_RO; | ||
| case SQL_TXN_READ_COMMITTED: | ||
| return NQuery::TTxSettings::TS_ONLINE_RO; | ||
| case SQL_TXN_REPEATABLE_READ: | ||
| case SQL_TXN_SERIALIZABLE: | ||
| return NQuery::TTxSettings::TS_SNAPSHOT_RO; | ||
| default: | ||
| return std::nullopt; | ||
| } | ||
| } | ||
|
|
||
| switch (txnIsolation) { | ||
| case SQL_TXN_REPEATABLE_READ: | ||
| case SQL_TXN_SERIALIZABLE: | ||
| return NQuery::TTxSettings::TS_SERIALIZABLE_RW; | ||
| default: | ||
| return std::nullopt; | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
Мы не поддерживаем SQL_TXN_READ_UNCOMMITTED и SQL_TXN_READ_COMMITTED.
SQL_TXN_REPEATABLE_READ поддерживаем в виде SnapshotRW.
SQL_TXN_SERIALIZABLE.
Про accessMode, как это работает в ODBC?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.