MCPcopy Index your code
hub / github.com/bytebase/bytebase / listAllDatabases

Method listAllDatabases

backend/plugin/parser/plsql/completion.go:1066–1084  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1064}
1065
1066func (c *Completer) listAllDatabases() []string {
1067 var result []string
1068 if c.defaultDatabase != "" {
1069 result = append(result, c.defaultDatabase)
1070 }
1071 if c.listDatabaseNames == nil {
1072 return result
1073 }
1074 list, err := c.listDatabaseNames(c.ctx, c.instanceID)
1075 if err != nil {
1076 return result
1077 }
1078 for _, name := range list {
1079 if name != c.defaultDatabase {
1080 result = append(result, name)
1081 }
1082 }
1083 return result
1084}
1085
1086func (c *Completer) filterCandidatesByScene(candidates []base.Candidate) []base.Candidate {
1087 if c.scene != base.SceneTypeQuery || !c.isAtStatementStartCompletion() {

Callers 2

insertDatabasesMethod · 0.45
insertAllColumnsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected