MCPcopy
hub / github.com/prisma/prisma / queryRaw

Method queryRaw

packages/adapter-mariadb/src/mariadb.ts:30–41  ·  view source on GitHub ↗
(query: SqlQuery)

Source from the content-addressed store, hash-verified

28 ) {}
29
30 async queryRaw(query: SqlQuery): Promise<SqlResultSet> {
31 const tag = '[js::query_raw]'
32 debug(`${tag} %O`, query)
33
34 const result = await this.performIO(query)
35 return {
36 columnNames: result.meta?.map((field) => field.name()) ?? [],
37 columnTypes: result.meta?.map(mapColumnType) ?? [],
38 rows: Array.isArray(result) ? result.map((row) => mapRow(row, result.meta)) : [],
39 lastInsertId: result.insertId?.toString(),
40 }
41 }
42
43 async executeRaw(query: SqlQuery): Promise<number> {
44 const tag = '[js::execute_raw]'

Callers

nothing calls this directly

Calls 4

performIOMethod · 0.95
mapRowFunction · 0.90
debugFunction · 0.85
toStringMethod · 0.45

Tested by

no test coverage detected