MCPcopy Create free account
hub / github.com/effect-app/libs / runValues

Function runValues

repos/effect/packages/sql/sqlite-do/src/SqliteClient.ts:217–233  ·  view source on GitHub ↗
(
        sql: string,
        params: ReadonlyArray<unknown> = []
      )

Source from the content-addressed store, hash-verified

215 catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to execute statement", "execute") })
216 })
217
218 const runValues = (
219 sql: string,
220 params: ReadonlyArray<unknown> = []
221 ): Effect.Effect<ReadonlyArray<any>, SqlError, never> =>
222 Effect.try({
223 try: () =>
224 Array.from(sqlStorage.exec(sql, ...params).raw(), (row) => {
225 for (let i = 0; i < row.length; i++) {
226 const value = row[i]
227 if (value instanceof ArrayBuffer) {
228 row[i] = new Uint8Array(value) as any
229 }
230 }
231 return row
232 }),
233 catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to execute statement", "execute") })
234 })
235
236 return identity<Connection>({

Callers 2

executeValuesFunction · 0.70
executeValuesUnpreparedFunction · 0.70

Calls 3

rawMethod · 0.80
execMethod · 0.80
classifyErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…