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

Function GetDatabaseDefinition

backend/plugin/schema/schema.go:209–215  ·  view source on GitHub ↗
(engine storepb.Engine, ctx GetDefinitionContext, metadata *storepb.DatabaseSchemaMetadata)

Source from the content-addressed store, hash-verified

207}
208
209func GetDatabaseDefinition(engine storepb.Engine, ctx GetDefinitionContext, metadata *storepb.DatabaseSchemaMetadata) (string, error) {
210 f, ok := getDatabaseDefinitions[engine]
211 if !ok {
212 return "", errors.Errorf("engine %s is not supported", engine)
213 }
214 return f(ctx, metadata)
215}
216
217func RegisterGetDatabaseMetadata(engine storepb.Engine, f getDatabaseMetadata) {
218 mux.Lock()

Callers 13

DumpMethod · 0.92
DumpMethod · 0.92
DumpMethod · 0.92
DumpMethod · 0.92
DumpMethod · 0.92
DumpMethod · 0.92
GetSchemaStringMethod · 0.92
getSingleFileSDLMethod · 0.92

Calls 2

fFunction · 0.85
ErrorfMethod · 0.80