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

Method getColumn

backend/api/v1/query_result_masker.go:301–319  ·  view source on GitHub ↗
(col *parserbase.ColumnResource)

Source from the content-addressed store, hash-verified

299}
300
301func (p *maskingDataProvider) getColumn(col *parserbase.ColumnResource) (*storepb.ColumnMetadata, *storepb.ColumnCatalog) {
302 schema := p.schemas[col.Database]
303 if schema == nil {
304 return nil, nil
305 }
306 s := schema.GetSchemaMetadata(col.Schema)
307 if s == nil {
308 return nil, nil
309 }
310 t := s.GetTable(col.Table)
311 if t == nil {
312 return nil, nil
313 }
314 c := t.GetColumn(col.Column)
315 if c == nil {
316 return nil, nil
317 }
318 return c.GetProto(), c.GetCatalog()
319}
320
321func (p *maskingDataProvider) getMaskingExemptionPolicy(projectID string) *storepb.MaskingExemptionPolicy {
322 return p.policies[projectID]

Calls 5

GetSchemaMetadataMethod · 0.80
GetTableMethod · 0.45
GetColumnMethod · 0.45
GetProtoMethod · 0.45
GetCatalogMethod · 0.45

Tested by

no test coverage detected