| 15 | import type { DatabaseAdapter, PreparedStatement, RunResult } from '../../interfaces' |
| 16 | |
| 17 | class Stmt implements PreparedStatement { |
| 18 | readonly?: boolean |
| 19 | constructor(private stmt: Database.Statement) { |
| 20 | this.readonly = stmt.readonly |
| 21 | } |
| 22 | get(...p: unknown[]) { |
| 23 | return this.stmt.get(...p) as Record<string, unknown> | undefined |
| 24 | } |
| 25 | all(...p: unknown[]) { |
| 26 | return this.stmt.all(...p) as Record<string, unknown>[] |
| 27 | } |
| 28 | run(...p: unknown[]): RunResult { |
| 29 | const r = this.stmt.run(...p) |
| 30 | return { changes: r.changes, lastInsertRowid: r.lastInsertRowid } |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | class Adapter implements DatabaseAdapter { |
| 35 | constructor(private db: Database.Database) {} |
nothing calls this directly
no outgoing calls
no test coverage detected