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

Function tidbTargetDatabase

backend/plugin/schema/tidb/walk_through.go:197–202  ·  view source on GitHub ↗
(d *model.DatabaseMetadata, node *tidbast.TableToTable)

Source from the content-addressed store, hash-verified

195}
196
197func tidbTargetDatabase(d *model.DatabaseMetadata, node *tidbast.TableToTable) string {
198 if node.OldTable.Schema.O != "" && !isCurrentDatabase(d, node.OldTable.Schema.O) {
199 return node.OldTable.Schema.O
200 }
201 return node.NewTable.Schema.O
202}
203
204func tidbMoveToOtherDatabase(d *model.DatabaseMetadata, node *tidbast.TableToTable) bool {
205 if node.OldTable.Schema.O != "" && !isCurrentDatabase(d, node.OldTable.Schema.O) {

Callers 1

tidbRenameTableFunction · 0.85

Calls 1

isCurrentDatabaseFunction · 0.70

Tested by

no test coverage detected