| 648 | } |
| 649 | |
| 650 | func maskCosmosDB(span *parserbase.QuerySpan, data map[string]any, objectSchema *storepb.ObjectSchema, semanticTypeToMasker map[string]masker.Masker) (map[string]any, error) { |
| 651 | if len(span.Results) != 1 { |
| 652 | return nil, errors.Errorf("expected 1 result, but got %d", len(span.Results)) |
| 653 | } |
| 654 | return walkAndMaskJSON(data, span.Results[0].SourceFieldPaths, objectSchema, semanticTypeToMasker) |
| 655 | } |
| 656 | |
| 657 | // maskCosmosDBScalarValue handles VALUE query results where the JSON is a scalar |
| 658 | // (string, number, bool) rather than an object. It checks if any projected source |