MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / Stmt

Class Stmt

packages/http-routes/src/routes/web/analytics.test.ts:23–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21import { registerAnalyticsRoutes } from './analytics'
22
23class Stmt implements PreparedStatement {
24 readonly?: boolean
25 constructor(private stmt: Database.Statement) {
26 this.readonly = stmt.readonly
27 }
28 get(...p: unknown[]) {
29 return this.stmt.get(...p) as Record<string, unknown> | undefined
30 }
31 all(...p: unknown[]) {
32 return this.stmt.all(...p) as Record<string, unknown>[]
33 }
34 run(...p: unknown[]): RunResult {
35 const r = this.stmt.run(...p)
36 return { changes: r.changes, lastInsertRowid: r.lastInsertRowid }
37 }
38}
39
40class Adapter implements DatabaseAdapter {
41 constructor(private db: Database.Database) {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected