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

Function rowToObject

packages/sql/sqlite-wasm/src/SqliteClient.ts:464–470  ·  view source on GitHub ↗
(columns: Array<string>, row: Array<any>)

Source from the content-addressed store, hash-verified

462 })
463
464function rowToObject(columns: Array<string>, row: Array<any>) {
465 const obj: Record<string, any> = {}
466 for (let i = 0; i < columns.length; i++) {
467 Rec.assignProperty(obj, columns[i], row[i])
468 }
469 return obj
470}
471const extractObject = (rows: [Array<string>, Array<any>]) => rows[1].map((row) => rowToObject(rows[0], row))
472const extractRows = (rows: [Array<string>, Array<any>]) => rows[1]
473

Callers 1

extractObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected