MCPcopy Index your code
hub / github.com/outerbase/studio / OuterbaseQueryable

Class OuterbaseQueryable

src/outerbase-cloud/database/query.ts:6–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import { transformOuterbaseResult } from "./utils";
5
6export class OuterbaseQueryable implements QueryableBaseDriver {
7 protected workspaceId: string;
8 protected sourceId: string;
9
10 constructor({ workspaceId, sourceId }: OuterbaseDatabaseConfig) {
11 this.workspaceId = workspaceId;
12 this.sourceId = sourceId;
13 }
14
15 async query(stmt: string): Promise<DatabaseResultSet> {
16 const jsonResponse = await runOuterbaseQueryRaw(
17 this.workspaceId,
18 this.sourceId,
19 stmt
20 );
21
22 return transformOuterbaseResult(jsonResponse);
23 }
24
25 async batch(stmts: string[]): Promise<DatabaseResultSet[]> {
26 return (
27 await runOuterbaseQueryBatch(this.workspaceId, this.sourceId, stmts)
28 ).map(transformOuterbaseResult);
29 }
30
31 async transaction(stmts: string[]): Promise<DatabaseResultSet[]> {
32 return this.batch(stmts);
33 }
34}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…