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

Function runValuesUncached

repos/effect/packages/sql/d1/src/D1Client.ts:170–183  ·  view source on GitHub ↗
(
        sql: string,
        params: ReadonlyArray<unknown>
      )

Source from the content-addressed store, hash-verified

168 // D1 batches execute on the binding directly and intentionally cannot participate in SqlClient transactions.
169 const responses = yield* Effect.tryPromise({
170 try: () =>
171 options.db.batch<Record<string, unknown>>(prepared).then((responses) => {
172 for (const response of responses) {
173 if (response.error) {
174 throw response.error
175 }
176 }
177 return responses
178 }),
179 catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to execute batch", "execute") })
180 })
181
182 const results = responses.map((response, index) => {
183 const rows = response.results || []
184 const transformRows = transforms[index]
185 return transformRows ? transformRows(rows) : rows
186 })

Callers 1

executeValuesUnpreparedFunction · 0.85

Calls 2

rawMethod · 0.80
classifyErrorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…