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

Method run

packages/sql/pglite/src/PgliteClient.ts:300–308  ·  view source on GitHub ↗
(method: string, sql: string, params: ReadonlyArray<unknown>)

Source from the content-addressed store, hash-verified

298 }
299
300 private run(method: string, sql: string, params: ReadonlyArray<unknown>) {
301 return Effect.map(
302 Effect.tryPromise({
303 try: () => this.pglite.query<any>(sql, params as Array<any>),
304 catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to execute statement", method) })
305 }),
306 (result) => result.rows
307 )
308 }
309 execute(
310 sql: string,
311 params: ReadonlyArray<unknown>,

Callers 3

executeMethod · 0.95
executeUnpreparedMethod · 0.95
executeStreamMethod · 0.95

Calls 3

classifyErrorFunction · 0.70
queryMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected