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

Method execute

packages/sql/pg/src/PgClient.ts:685–693  ·  view source on GitHub ↗
(
    sql: string,
    params: ReadonlyArray<unknown>,
    transformRows: (<A extends object>(row: ReadonlyArray<A>) => ReadonlyArray<A>) | undefined
  )

Source from the content-addressed store, hash-verified

683 }
684
685 execute(
686 sql: string,
687 params: ReadonlyArray<unknown>,
688 transformRows: (<A extends object>(row: ReadonlyArray<A>) => ReadonlyArray<A>) | undefined
689 ) {
690 return transformRows
691 ? Effect.map(this.run(sql, params), transformRows)
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) => {

Callers 15

executeUnpreparedMethod · 0.95
runFunction · 0.45
executeUnpreparedFunction · 0.45
executeUnpreparedFunction · 0.45
executeUnpreparedFunction · 0.45
streamRequestFunction · 0.45
createMessageStreamFunction · 0.45
withResponseFunction · 0.45
binaryRequestFunction · 0.45
createResponseFunction · 0.45
createResponseStreamFunction · 0.45

Calls 2

runMethod · 0.95
mapMethod · 0.45

Tested by 1

wrapConnectionFunction · 0.36