mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
### Does this PR have any customer impact? yes ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) feature ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) yes ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description apply schema validation on general update ####Comments to follow:https://msdata.visualstudio.com/DefaultCollection/CosmosDB/_git/pgmongo/pullRequest/1452968#1729531108 ---- #### AI description (iteration 1) #### PR Classification New feature: Schema validation applied on general update operations. #### PR Summary This pull request introduces schema validation for update operations, ensuring documents comply with defined schemas during updates. - Added `command_schema_validation_against_update` function and `ValidateSchemaOnDocumentUpdate` in `schema_validation.c` to handle schema validation during updates. - Updated `bson_expr_eval.h` to include `ExprEvalState` struct definition. - Modified `update.c` to integrate schema validation logic into batch and single document update processes. - Enhanced `schema_validation_insert.sql` with tests for update operations involving schema validation.