RFC: TSessionSynced #341
asmyasnikov
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Предлагается дописать рядом с
TSessionклассTSessionSynced, оборачивающий асинхронную (возвращающуюTFuture<Some>) сессиюTSessionс теми же самыми методами, что есть уTSession.Тогда на клиенте можно будет использовать старые retryOperation с асинхронной сессией
tableClient.RetryOperationSync([](NYdb::NTable::TSession tableSession){ auto syncedSession = NYdb::NTable::TSessionSynced(tableSession); auto transaction = syncedSession.BeginTransaction(); auto resultSet = driver.Table().ExecuteDataQuery("SELECT a, b, c from `example_table`"); // parse result return transaction.Commit(); });Beta Was this translation helpful? Give feedback.
All reactions