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

Function executeStream

packages/sql/sqlite-do/src/SqliteClient.ts:290–305  ·  view source on GitHub ↗
(sql, params, transformRows)

Source from the content-addressed store, hash-verified

288 : runStatement(sql, params)
289 },
290 executeStream(sql, params, transformRows) {
291 return Stream.suspend(() => {
292 const iterator = runIterator(sql, params)
293 return Stream.fromIteratorSucceed(iterator, 128)
294 }).pipe(
295 Stream.catchCauseFilter(Cause.findDefect, (defect) =>
296 Stream.fail(
297 new SqlError({
298 reason: classifyError(defect, "Failed to execute statement", "execute")
299 })
300 )),
301 transformRows
302 ? Stream.mapArray((chunk) => transformRows(chunk) as any)
303 : identity
304 )
305 }
306 })
307 })
308

Callers

nothing calls this directly

Calls 4

runIteratorFunction · 0.85
classifyErrorFunction · 0.70
pipeMethod · 0.65
failMethod · 0.65

Tested by

no test coverage detected