MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / Adapter

Class Adapter

packages/core/src/query/__tests__/basic-queries.test.ts:34–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34class Adapter implements DatabaseAdapter {
35 constructor(private db: Database.Database) {}
36 exec(sql: string) {
37 this.db.exec(sql)
38 }
39 prepare(sql: string) {
40 return new Stmt(this.db.prepare(sql))
41 }
42 transaction<T>(fn: () => T): T {
43 return this.db.transaction(fn)()
44 }
45 pragma(p: string) {
46 return this.db.pragma(p)
47 }
48 close() {
49 this.db.close()
50 }
51}
52
53// 2024-01-15 12:00:00 UTC, 时区偏移不会跨出 2024-01
54const TS = 1705320000

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected