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

Method constructor

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

keysMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected