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

Method insertTables

backend/plugin/parser/mysql/completion.go:239–257  ·  view source on GitHub ↗
(c *Completer, schemas map[string]bool)

Source from the content-addressed store, hash-verified

237}
238
239func (m CompletionMap) insertTables(c *Completer, schemas map[string]bool) {
240 for schema := range schemas {
241 if len(schema) == 0 {
242 for _, table := range c.cteTables {
243 m.Insert(base.Candidate{
244 Type: base.CandidateTypeTable,
245 Text: c.quotedIdentifierIfNeeded(table.Table),
246 })
247 }
248 continue
249 }
250 for _, table := range c.listTables(schema) {
251 m.Insert(base.Candidate{
252 Type: base.CandidateTypeTable,
253 Text: c.quotedIdentifierIfNeeded(table),
254 })
255 }
256 }
257}
258
259func (m CompletionMap) insertViews(c *Completer, schemas map[string]bool) {
260 for schema := range schemas {

Callers 1

convertCandidatesMethod · 0.45

Calls 3

InsertMethod · 0.95
listTablesMethod · 0.45

Tested by

no test coverage detected