M3: the positional operators and arrayFilters #7

Merged
dev merged 4 commits from m3-positional into main 2026-08-10 17:49:33 +00:00
Showing only changes of commit 1482df891b - Show all commits

View File

@@ -5919,9 +5919,10 @@ test "arrayFilters reach the update, and are refused before the scan" {
try testing.expectEqual(@as(i32, 9), values[1].int32); try testing.expectEqual(@as(i32, 9), values[1].int32);
// A filter no path uses is refused even when the query matches nothing at // A filter no path uses is refused even when the query matches nothing at
// all, which is what makes the check belong before the scan rather than // all, which is what makes the check belong beside the scan rather than
// inside the per-document loop. Mutation check: move `update.validate` // inside `apply`. Mutation check: delete the standalone `update.validate`
// below `scan_matching` and this answers ok. // call and this answers ok -- `apply` runs once per matched document, and
// there are none.
const unused = [_]bson.Value{.{ .doc = &.{ const unused = [_]bson.Value{.{ .doc = &.{
.{ .key = "q", .value = .{ .doc = &.{.{ .key = "nomatch", .value = .{ .int32 = 1 } }} } }, .{ .key = "q", .value = .{ .doc = &.{.{ .key = "nomatch", .value = .{ .int32 = 1 } }} } },
.{ .key = "u", .value = .{ .doc = &.{ .{ .key = "u", .value = .{ .doc = &.{