MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / hasSqliteBindings

Function hasSqliteBindings

__tests__/pr19-improvements.test.ts:49–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47
48// Check if the node:sqlite backend is available (Node >= 22.5)
49function hasSqliteBindings(): boolean {
50 try {
51 const { DatabaseSync } = require('node:sqlite');
52 const db = new DatabaseSync(':memory:');
53 db.close();
54 return true;
55 } catch {
56 return false;
57 }
58}
59
60const HAS_SQLITE = hasSqliteBindings();
61

Callers 1

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected