MCPcopy Create free account
hub / github.com/bytebase/bytebase / makeDatabase

Function makeDatabase

backend/api/mcp/tool_query_test.go:17–29  ·  view source on GitHub ↗

makeDatabase builds a database entry with an ADMIN datasource for mock responses.

(name, instanceName, project, engine, dsID string)

Source from the content-addressed store, hash-verified

15
16// makeDatabase builds a database entry with an ADMIN datasource for mock responses.
17func makeDatabase(name, instanceName, project, engine, dsID string) map[string]any {
18 return map[string]any{
19 "name": name,
20 "project": project,
21 "instanceResource": map[string]any{
22 "name": instanceName,
23 "engine": engine,
24 "dataSources": []any{
25 map[string]any{"id": dsID, "type": "ADMIN"},
26 },
27 },
28 }
29}
30
31// makeDatabaseWithDualDS builds a database entry with both ADMIN and READ_ONLY data sources.
32func makeDatabaseWithDualDS(name, instanceName, project, engine, adminDSID, readOnlyDSID string) map[string]any {

Calls

no outgoing calls

Tested by

no test coverage detected