MCPcopy
hub / github.com/prisma/prisma / commit

Method commit

packages/adapter-ppg/src/ppg.ts:158–172  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156 }
157
158 async commit(): Promise<void> {
159 if (this.#finished) {
160 throw new Error('Transaction already finished')
161 }
162
163 try {
164 await this.#ensureBegun()
165 await this.#session.query('COMMIT')
166 this.#finished = true
167 } catch (error) {
168 throw convertDriverError(error)
169 } finally {
170 this.#session.close()
171 }
172 }
173
174 async rollback(): Promise<void> {
175 if (this.#finished) {

Callers

nothing calls this directly

Calls 4

#ensureBegunMethod · 0.95
convertDriverErrorFunction · 0.90
closeMethod · 0.80
queryMethod · 0.45

Tested by

no test coverage detected