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

Method listMaterializedViews

backend/plugin/parser/pg/completion.go:1536–1550  ·  view source on GitHub ↗
(schema string)

Source from the content-addressed store, hash-verified

1534}
1535
1536func (c *Completer) listMaterializedViews(schema string) []string {
1537 if _, exists := c.metadataCache[c.defaultDatabase]; !exists {
1538 _, metadata, err := c.getMetadata(c.ctx, c.instanceID, c.defaultDatabase)
1539 if err != nil || metadata == nil {
1540 return nil
1541 }
1542 c.metadataCache[c.defaultDatabase] = metadata
1543 }
1544
1545 schemaMeta := c.metadataCache[c.defaultDatabase].GetSchemaMetadata(schema)
1546 if schemaMeta == nil {
1547 return nil
1548 }
1549 return schemaMeta.ListMaterializedViewNames()
1550}
1551
1552func (c *Completer) resolveMaterializedViewColumns(definition, schema, table string) ([]base.Candidate, error) {
1553 if len(definition) == 0 {

Callers 1

insertViewsWithPrefixMethod · 0.80

Calls 2

GetSchemaMetadataMethod · 0.80

Tested by

no test coverage detected