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

Function GetTableDefinition

backend/plugin/schema/schema.go:175–181  ·  view source on GitHub ↗
(engine storepb.Engine, tableName string, table *storepb.TableMetadata, sequences []*storepb.SequenceMetadata)

Source from the content-addressed store, hash-verified

173}
174
175func GetTableDefinition(engine storepb.Engine, tableName string, table *storepb.TableMetadata, sequences []*storepb.SequenceMetadata) (string, error) {
176 f, ok := getTableDefinitions[engine]
177 if !ok {
178 return "", errors.Errorf("engine %s is not supported", engine)
179 }
180 return f(tableName, table, sequences)
181}
182
183func RegisterGetSchemaDefinition(engine storepb.Engine, f getSchemaDefinition) {
184 mux.Lock()

Callers 1

GetSchemaStringMethod · 0.92

Calls 2

fFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected