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

Function isCurrentDatabase

backend/plugin/schema/mysql/database.go:10–15  ·  view source on GitHub ↗

isCurrentDatabase returns true if the given database is the current database.

(d *model.DatabaseMetadata, database string)

Source from the content-addressed store, hash-verified

8
9// isCurrentDatabase returns true if the given database is the current database.
10func isCurrentDatabase(d *model.DatabaseMetadata, database string) bool {
11 if !d.GetIsObjectCaseSensitive() {
12 return strings.EqualFold(d.DatabaseName(), database)
13 }
14 return d.DatabaseName() == database
15}

Calls 2

DatabaseNameMethod · 0.80

Tested by

no test coverage detected