MCPcopy Create free account
hub / github.com/IceClusters/icmysql / MongoStartTransactionSession

Function MongoStartTransactionSession

src/db/mongo/Query.js:199–209  ·  view source on GitHub ↗
(dbId, callback)

Source from the content-addressed store, hash-verified

197}
198
199async function MongoStartTransactionSession(dbId, callback) {
200 try {
201 if (typeof callback !== "function") callback = null;
202 const session = global.MongoConnections[dbId].startSession();
203 const result = await session.withTransaction(callback);
204 return result;
205 } catch (error) {
206 ParseError("MongoDB transaction error catched:", error.message);
207 return null;
208 }
209}
210
211async function MongoWithTransaction(dbId, callback) {
212 try {

Callers

nothing calls this directly

Calls 1

ParseErrorFunction · 0.85

Tested by

no test coverage detected