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

Method getNamespaces

src/outerbase-cloud/query-driver.ts:27–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 ) {}
26
27 async getNamespaces(): Promise<SavedDocNamespace[]> {
28 if (this.cacheNamespaceList) {
29 return this.cacheNamespaceList;
30 }
31
32 const queries = await getOuterbaseQueryList(this.workspaceId, this.baseId);
33
34 this.cacheNamespaceList = [
35 {
36 id: "default",
37 name: "Workspace",
38 createdAt: Date.now(),
39 updatedAt: Date.now(),
40 },
41 ];
42
43 this.cacheDocs = {
44 default: queries.items.map((q) => ({
45 id: q.id,
46 namespace: {
47 id: "default",
48 name: "Workspace",
49 createdAt: Date.now(),
50 updatedAt: Date.now(),
51 },
52 name: q.name,
53 content: q.query,
54 type: "sql",
55 data: q,
56 createdAt: Date.now(),
57 updatedAt: Date.now(),
58 })),
59 };
60
61 return this.cacheNamespaceList;
62 }
63
64 async createNamespace(): Promise<SavedDocNamespace> {
65 throw new Error("Not implemented");

Callers 5

createDocMethod · 0.95
getDocsMethod · 0.95
updateDocMethod · 0.95
removeDocMethod · 0.95
SaveDocButtonFunction · 0.45

Calls 1

getOuterbaseQueryListFunction · 0.90

Tested by

no test coverage detected