MCPcopy Create free account
hub / github.com/damms005/devdb-vscode / getConnection

Method getConnection

src/database-engines/sqlite-engine.ts:25–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 }
24
25 getConnection(): CustomSqliteEngine | null {
26 if (this.db) {
27 return this.db as any as CustomSqliteEngine;
28 }
29
30 try {
31 this.db = new Database(this.dbPath, (err) => {
32 if (err) {
33 throw new Error(String(err));
34 }
35 });
36
37 return this.db as any as CustomSqliteEngine;
38 } catch (err) {
39 reportError(`SQLite connection error: ${err}`);
40 return null;
41 }
42
43 }
44
45 async isOkay(): Promise<boolean> {
46 try {

Callers 11

isOkayMethod · 0.95
getTableCreationSqlMethod · 0.95
getTablesMethod · 0.95
getColumnsMethod · 0.95
getTotalRowsMethod · 0.95
getRowsMethod · 0.95
getVersionMethod · 0.95
transactionMethod · 0.95
rawQueryMethod · 0.95
beginTransactionMethod · 0.95
runQueryMethod · 0.95

Calls 1

reportErrorFunction · 0.90

Tested by

no test coverage detected