(run: (transactionInstance: AbstractQuery<AnySchema>) => Promise<T>)
| 190 | db[table.ormName] = rows.filter((row) => !matchesCondition(row, v.where)); |
| 191 | }, |
| 192 | async transaction<T>(run: (transactionInstance: AbstractQuery<AnySchema>) => Promise<T>) { |
| 193 | const snapshot = cloneValue(db); |
| 194 | try { |
| 195 | return await run(orm); |
| 196 | } catch (error) { |
| 197 | for (const key of Object.keys(db)) delete db[key]; |
| 198 | Object.assign(db, snapshot); |
| 199 | throw error; |
| 200 | } |
| 201 | }, |
| 202 | }); |
| 203 | return orm; |
| 204 | }, |
nothing calls this directly
no test coverage detected