MCPcopy
hub / github.com/prisma/prisma / performIO

Method performIO

packages/adapter-libsql/src/libsql.ts:77–90  ·  view source on GitHub ↗

* Run a query against the database, returning the result set. * Should the query fail due to a connection error, the connection is * marked as unhealthy.

(query: SqlQuery)

Source from the content-addressed store, hash-verified

75 * marked as unhealthy.
76 */
77 private async performIO(query: SqlQuery): Promise<LibSqlResultSet> {
78 const release = await this[LOCK_TAG].acquire()
79 try {
80 const result = await this.client.execute({
81 sql: query.sql,
82 args: query.args.map((arg, i) => mapArg(arg, query.argTypes[i], this.adapterOptions)),
83 })
84 return result
85 } catch (e) {
86 this.onError(e)
87 } finally {
88 release()
89 }
90 }
91
92 protected onError(error: any): never {
93 debug('Error in performIO: %O', error)

Callers 2

queryRawMethod · 0.95
executeRawMethod · 0.95

Calls 4

onErrorMethod · 0.95
mapArgFunction · 0.90
acquireMethod · 0.80
executeMethod · 0.65

Tested by

no test coverage detected