MCPcopy Create free account
hub / github.com/Effect-TS/effect / executeRaw

Method executeRaw

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

Source from the content-addressed store, hash-verified

692 : this.run(sql, params)
693 }
694 executeRaw(sql: string, params: ReadonlyArray<unknown>) {
695 return this.runWithClient<Pg.Result>((client, resume) => {
696 client.query(sql, params as any, (err, result) => {
697 if (err) {
698 resume(
699 Effect.fail(new SqlError({ reason: classifyError(err, "Failed to execute statement", "execute") }))
700 )
701 } else {
702 resume(Effect.succeed(result))
703 }
704 })
705 })
706 }
707 executeWithoutTransform(sql: string, params: ReadonlyArray<unknown>) {
708 return this.run(sql, params)
709 }

Callers 8

runValuesFunction · 0.45
PgClient.tsFile · 0.45
wrapConnectionFunction · 0.45
wrapConnectionFunction · 0.45
rawFunction · 0.45
execWithLockConnFunction · 0.45

Calls 4

classifyErrorFunction · 0.70
resumeFunction · 0.50
failMethod · 0.45
succeedMethod · 0.45

Tested by 1

wrapConnectionFunction · 0.36