Transactions in integration libraries for various languages #2005
Unanswered
gaurav-bagga
asked this question in
Q&A
Replies: 4 comments 3 replies
-
To add to above question. I was thinking of an use case as follows.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I have the same issue, is there any answer to it? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Someone answer please? This is important. I'm writing a driver for Haskell, I need to know if this will eventually be possible or it will never be implemented. |
Beta Was this translation helpful? Give feedback.
3 replies
-
The truth is that it is a poor implementation and without giving answers for anything I found myself having to search, needing a db that handles concurrent transactions well, it is better to use tikv directly and optionally tiDB |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is documentation for transaction available here which gives brief idea how transactions can be managed. However looking into integration libraries primarily for Rust and Java it is not clear how transaction can be started, committed or rollbacked using client API.
For instance the Rust API as described here there is no method to start transaction, commit or rollback.
Coming from Java background. I was expecting something where methods are provided to start, commit, rollback. Now Rust is using async model, which I deem is quite similar to coroutines in Kotlin (an assumption). There needs to be transaction context which is passed around suspend/resume points, similar to what we have in Rust async/await. As a piece of code is not bound to run on same thread as what happens in Kotlin mostly (you could confine it to a thread but that would defeat lot of purpose, I am assuming again something similar happens in Rust), thread locals are no good.
I'll really appreciate if some advice is provided how to deal with transactions using API or should I send a batch as string as follows.
to the API call db.query(sql) for now.
I have just started with Rust and Surrealdb so my lookout of API might be biased with my background in Java.
Just need some insights.
Thanks, can't deny Surrealdb is awesome and fun to work.
Beta Was this translation helpful? Give feedback.
All reactions