-
Type: Epic
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Transactions
-
-
To Do
-
Alternative Trx API
-
0
-
0
-
0
-
100
How are you using Mongo? What version of the server and driver are you using?
I work on the Node driver, and I test and work with all supported server and driver versions
This feature is client-side only, probably not something we'd backport so only relevant to 6.x drivers.
What is the feature/improvement you would like?
Add an alternative `withTransaction` API that wouldn't require users to pass a session in to each operation. Maybe something like this:
client.withTransaction2(async (client: TransactionMongoClient) => { // client is a specialized client that stores the current session, // so each operation can obtain the session from the client/db/collection // instead of passing it explicitly into the API await client.db('foo').collection('bar').insertOne({}); });
What use case would this feature/improvement enable?
This would simplify our convenient transactions API for users.
- related to
-
DRIVERS-2172 db and coll handles write concern and read concern are silently ignored in transactions
- Closed