MCPcopy Index your code
hub / github.com/Effect-TS/effect / executeValues

Method executeValues

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

Source from the content-addressed store, hash-verified

218 return this.run(sql, params)
219 }
220 executeValues(sql: string, params: ReadonlyArray<unknown>) {
221 return this.runWithClient<ReadonlyArray<any>>((client, resume) => {
222 client.query(
223 {
224 text: sql,
225 rowMode: "array",
226 values: params as Array<string>
227 },
228 (err, result) => {
229 if (err) {
230 resume(Effect.fail(new SqlError({ cause: err, message: "Failed to execute statement" })))
231 } else {
232 resume(Effect.succeed(result.rows))
233 }
234 }
235 )
236 })
237 }
238 executeUnprepared(
239 sql: string,
240 params: ReadonlyArray<unknown>,

Callers 4

valuesMethod · 0.45
Client.test.tsFile · 0.45
execWithLockConnValuesFunction · 0.45

Calls 3

runWithClientMethod · 0.95
failMethod · 0.65
resumeFunction · 0.50

Tested by

no test coverage detected