╭ changed ────╮ │src/event.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │1713 } │ │1714 }, │ │1715 .bool, .int, .@"enum" => return a == b, │ │1716 + .@"struct" => return fieldsEqual(Field, a, b), │ │1717 .optional => |optional_info| { │ │1718 if (a) |a_value| { │ │1719 if (b) |b_value| return fieldEqual(optional_info.child, a_value, b_value);│ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1785 ) !void { │ │1786 switch (@typeInfo(T)) { │ │1787 .@"struct" => |struct_info| { │ │1778 - comptime validateFlattenedFields(T); │ │1788 inline for (struct_info.fields) |field| { │ │1789 try upsertField(DB, hash_kind, map, field.name, field.type, @field(event, field.name));│ │1790 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1863 if (array_info.child != u8) @compileError("unsupported upsert field type: " ++ @typeName(Field));│ │1864 try upsertBytes(DB, hash_kind, map, key, &child); │ │1865 }, │ │1866 + .@"struct" => try upsert( │ │1867 + optional_info.child, │ │1868 + DB, │ │1869 + hash_kind, │ │1870 + try DB.HashMap(.read_write).init(try map.putCursor(key)), │ │1871 + child, │ │1872 + ), │ │1873 else => @compileError("unsupported upsert field type: " ++ @typeName(Field)), │ │1874 } │ │1875 } else { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │1876 _ = try map.remove(key); │ │1877 } │ │1878 }, │ │1863 - // a struct field's own fields are stored in the same map │ │1864 - .@"struct" => try upsert(Field, DB, hash_kind, map, value), │ │1879 + .@"struct" => try upsert( │ │1880 + Field, │ │1881 + DB, │ │1882 + hash_kind, │ │1883 + try DB.HashMap(.read_write).init(try map.putCursor(key)), │ │1884 + value, │ │1885 + ), │ │1886 else => @compileError("unsupported upsert field type: " ++ @typeName(Field)),│ │1887 } │ │1888 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯