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

Function tidbTheCurrentDatabase

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

Source from the content-addressed store, hash-verified

209}
210
211func tidbTheCurrentDatabase(d *model.DatabaseMetadata, node *tidbast.TableToTable) bool {
212 if node.NewTable.Schema.O != "" && !isCurrentDatabase(d, node.NewTable.Schema.O) {
213 return false
214 }
215 if node.OldTable.Schema.O != "" && !isCurrentDatabase(d, node.OldTable.Schema.O) {
216 return false
217 }
218 return true
219}
220
221func tidbDropDatabase(d *model.DatabaseMetadata, node *tidbast.DropDatabaseStmt) *storepb.Advice {
222 if !isCurrentDatabase(d, node.Name.O) {

Callers 1

tidbRenameTableFunction · 0.85

Calls 1

isCurrentDatabaseFunction · 0.70

Tested by

no test coverage detected