MCPcopy Create free account
hub / github.com/bytebase/bytebase / build

Method build

backend/store/model/changed_resources.go:86–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

84}
85
86func (s *ChangedSchema) build() *storepb.ChangedResourceSchema {
87 changedResourceSchema := &storepb.ChangedResourceSchema{}
88 for _, table := range s.tables {
89 changedResourceSchema.Tables = append(changedResourceSchema.Tables, table.table)
90 }
91 slices.SortFunc(changedResourceSchema.Tables, func(a, b *storepb.ChangedResourceTable) int {
92 if a.GetName() < b.GetName() {
93 return -1
94 } else if a.GetName() > b.GetName() {
95 return 1
96 }
97 return 0
98 })
99
100 return changedResourceSchema
101}
102
103func (r *ChangedResources) AddTable(database string, schema string, change *storepb.ChangedResourceTable, affectedTable bool) {
104 if _, ok := r.databases[database]; !ok {

Callers 3

qp.min.jsFile · 0.45
BuildMethod · 0.45
buildMethod · 0.45

Calls 1

GetNameMethod · 0.45

Tested by

no test coverage detected