MCPcopy Index your code
hub / github.com/Effect-TS/effect / runIterator

Function runIterator

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

Source from the content-addressed store, hash-verified

78 const db = options.db
79
80 function* runIterator(
81 sql: string,
82 params: ReadonlyArray<unknown> = []
83 ) {
84 const cursor = db.exec(sql, ...params)
85 const columns = cursor.columnNames
86 for (const result of cursor.raw()) {
87 const obj: any = {}
88 for (let i = 0; i < columns.length; i++) {
89 const value = result[i]
90 obj[columns[i]] = value instanceof ArrayBuffer ? new Uint8Array(value) : value
91 }
92 yield obj
93 }
94 }
95
96 const runStatement = (
97 sql: string,

Callers 2

runStatementFunction · 0.85
executeStreamFunction · 0.85

Calls 1

rawMethod · 0.80

Tested by

no test coverage detected