( ctx context.Context, stores *store.Store, database *store.DatabaseMessage, spans []*parserbase.QuerySpan, )
| 73 | } |
| 74 | |
| 75 | func preExecuteMaskingCheckMongoDB( |
| 76 | ctx context.Context, |
| 77 | stores *store.Store, |
| 78 | database *store.DatabaseMessage, |
| 79 | spans []*parserbase.QuerySpan, |
| 80 | ) error { |
| 81 | for _, span := range spans { |
| 82 | if span.MongoDBAnalysis == nil { |
| 83 | continue |
| 84 | } |
| 85 | analysis := span.MongoDBAnalysis |
| 86 | if analysis.Collection == "" { |
| 87 | continue |
| 88 | } |
| 89 | |
| 90 | objectSchema, err := getTableObjectSchema(ctx, stores, database.InstanceID, database.DatabaseName, analysis.Collection) |
| 91 | if err != nil { |
| 92 | return connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get object schema for collection %q", analysis.Collection)) |
| 93 | } |
| 94 | if objectSchema == nil { |
| 95 | continue |
| 96 | } |
| 97 | |
| 98 | if err := checkMongoDBRequestBlocked(analysis); err != nil { |
| 99 | return connect.NewError(connect.CodeInvalidArgument, err) |
| 100 | } |
| 101 | } |
| 102 | return nil |
| 103 | } |
| 104 | |
| 105 | func preExecuteMaskingCheckElasticsearch( |
| 106 | ctx context.Context, |
no test coverage detected