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

Function matchExact

backend/api/mcp/tool_resolve.go:258–266  ·  view source on GitHub ↗

matchExact returns databases whose short name exactly matches the input.

(databases []databaseEntry, name string)

Source from the content-addressed store, hash-verified

256
257// matchExact returns databases whose short name exactly matches the input.
258func matchExact(databases []databaseEntry, name string) []databaseEntry {
259 var result []databaseEntry
260 for _, db := range databases {
261 if extractDatabaseName(db.Name) == name {
262 result = append(result, db)
263 }
264 }
265 return result
266}
267
268// matchCaseInsensitive returns databases whose short name matches case-insensitively.
269func matchCaseInsensitive(databases []databaseEntry, name string) []databaseEntry {

Callers 1

matchDatabasesFunction · 0.85

Calls 1

extractDatabaseNameFunction · 0.70

Tested by

no test coverage detected