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

Method constructor

packages/sql-sqlite-do/test/Client.test.ts:15–18  ·  view source on GitHub ↗
(rows: ReadonlyArray<Record<string, unknown>>, columns?: ReadonlyArray<string>)

Source from the content-addressed store, hash-verified

13 readonly rows: ReadonlyArray<ReadonlyArray<unknown>>
14
15 constructor(rows: ReadonlyArray<Record<string, unknown>>, columns?: ReadonlyArray<string>) {
16 this.columnNames = columns ?? Object.keys(rows[0] ?? {})
17 this.rows = rows.map((row) => this.columnNames.map((column) => row[column]))
18 }
19
20 *raw() {
21 yield* this.rows.map((row) => [...row])

Callers

nothing calls this directly

Calls 2

keysMethod · 0.80
mapMethod · 0.65

Tested by

no test coverage detected