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

Method run

packages/sql/libsql/src/LibsqlClient.ts:206–217  ·  view source on GitHub ↗
(
        sql: string,
        params: ReadonlyArray<unknown> = []
      )

Source from the content-addressed store, hash-verified

204 }
205
206 run(
207 sql: string,
208 params: ReadonlyArray<unknown> = []
209 ) {
210 return Effect.map(
211 Effect.tryPromise({
212 try: () => this.sdk.execute({ sql, args: params as Array<any> }),
213 catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to execute statement", "execute") })
214 }),
215 (results) => results.rows
216 )
217 }
218
219 runRaw(
220 sql: string,

Callers 2

executeMethod · 0.95
executeValuesMethod · 0.95

Calls 3

classifyErrorFunction · 0.70
mapMethod · 0.45
executeMethod · 0.45

Tested by

no test coverage detected