MCPcopy
hub / github.com/Effect-TS/effect / executeRaw

Method executeRaw

packages/sql-pg/src/PgClient.ts:206–216  ·  view source on GitHub ↗
(sql: string, params: ReadonlyArray<unknown>)

Source from the content-addressed store, hash-verified

204 : this.run(sql, params)
205 }
206 executeRaw(sql: string, params: ReadonlyArray<unknown>) {
207 return this.runWithClient<Pg.Result>((client, resume) => {
208 client.query(sql, params as any, (err, result) => {
209 if (err) {
210 resume(Effect.fail(new SqlError({ cause: err, message: "Failed to execute statement" })))
211 } else {
212 resume(Effect.succeed(result))
213 }
214 })
215 })
216 }
217 executeWithoutTransform(sql: string, params: ReadonlyArray<unknown>) {
218 return this.run(sql, params)
219 }

Callers 4

rawMethod · 0.45
Client.test.tsFile · 0.45
execWithLockConnFunction · 0.45

Calls 3

runWithClientMethod · 0.95
failMethod · 0.65
resumeFunction · 0.50

Tested by

no test coverage detected