()
| 1064 | } |
| 1065 | |
| 1066 | func (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 | |
| 1086 | func (c *Completer) filterCandidatesByScene(candidates []base.Candidate) []base.Candidate { |
| 1087 | if c.scene != base.SceneTypeQuery || !c.isAtStatementStartCompletion() { |
no outgoing calls
no test coverage detected