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

Method constructor

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected