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

Method insertTables

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

Source from the content-addressed store, hash-verified

244}
245
246func (m CompletionMap) insertTables(c *Completer, schemas map[string]bool) {
247 for schema := range schemas {
248 if schema == "" {
249 for _, table := range c.cteTables {
250 m.Insert(base.Candidate{
251 Type: base.CandidateTypeTable,
252 Text: c.quotedIdentifierIfNeeded(table.Table),
253 })
254 }
255 continue
256 }
257 for _, table := range c.listTables(schema) {
258 m.Insert(base.Candidate{
259 Type: base.CandidateTypeTable,
260 Text: c.quotedIdentifierIfNeeded(table),
261 })
262 }
263 }
264}
265
266func (m CompletionMap) insertAllColumns(c *Completer) {
267 for _, schema := range c.listAllDatabases() {

Calls 3

InsertMethod · 0.95
listTablesMethod · 0.45

Tested by

no test coverage detected