MCPcopy
hub / github.com/prisma/prisma / rollback

Method rollback

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

Source from the content-addressed store, hash-verified

172 }
173
174 async rollback(): Promise<void> {
175 if (this.#finished) {
176 throw new Error('Transaction already finished')
177 }
178
179 try {
180 if (this.#begun) {
181 await this.#session.query('ROLLBACK')
182 }
183 this.#finished = true
184 } catch (error) {
185 throw convertDriverError(error)
186 } finally {
187 this.#session.close()
188 }
189 }
190
191 async createSavepoint(name: string): Promise<void> {
192 await this.executeRaw({ sql: `SAVEPOINT ${name}`, args: [], argTypes: [] })

Callers

nothing calls this directly

Calls 3

convertDriverErrorFunction · 0.90
closeMethod · 0.80
queryMethod · 0.45

Tested by

no test coverage detected