MCPcopy Create free account
hub / github.com/bytebase/dbhub / queryAll

Method queryAll

src/connectors/sqlite/index.ts:152–157  ·  view source on GitHub ↗

* Run an introspection query and return all rows. Integers come back as plain * numbers (no `setReadBigInts`), which is what the schema-reading callers need * for boolean flag comparisons. node:sqlite types `.all()` as a generic record * array, so the result is cast to the caller's expected

(sql: string, ...params: any[])

Source from the content-addressed store, hash-verified

150 * array, so the result is cast to the caller's expected row shape.
151 */
152 private queryAll<T>(sql: string, ...params: any[]): T[] {
153 if (!this.db) {
154 throw new Error("Not connected to SQLite database");
155 }
156 return this.db.prepare(sql).all(...params) as unknown as T[];
157 }
158
159 /** Run an introspection query and return a single row (or undefined). */
160 private queryOne<T>(sql: string, ...params: any[]): T | undefined {

Callers 4

getTablesMethod · 0.95
getViewsMethod · 0.95
getTableIndexesMethod · 0.95
getTableSchemaMethod · 0.95

Calls 1

prepareMethod · 0.80

Tested by

no test coverage detected