(dbId, callback)
| 197 | } |
| 198 | |
| 199 | async 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 | |
| 211 | async function MongoWithTransaction(dbId, callback) { |
| 212 | try { |
nothing calls this directly
no test coverage detected