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

Method run

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

Source from the content-addressed store, hash-verified

276 }
277
278 private run(method: string, sql: string, params: ReadonlyArray<unknown>) {
279 return Effect.map(
280 Effect.tryPromise({
281 try: () => this.pglite.query<any>(sql, params as Array<any>),
282 catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to execute statement", method) })
283 }),
284 (result) => result.rows
285 )
286 }
287 execute(
288 sql: string,
289 params: ReadonlyArray<unknown>,

Callers 3

executeMethod · 0.95
executeUnpreparedMethod · 0.95
executeStreamMethod · 0.95

Calls 2

classifyErrorFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected