╭ changed ────╮ │src/event.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │654 .unsigned => @field(event, field.name) = @intCast(try readUint(DB, hash_kind, map, field.name)), │ │655 .signed => @field(event, field.name) = @intCast(try readInt(DB, hash_kind, map, field.name)), │ │656 }, │ │657 + .@"enum" => { │ │658 + const bytes = try readBytes(DB, hash_kind, arena.allocator(), map, field.name); │ │659 + @field(event, field.name) = std.meta.stringToEnum(field.type, bytes) orelse return error.InvalidEnumTag;│ │660 + }, │ │661 else => @compileError("unsupported read field type: " ++ @typeName(field.type)), │ │662 } │ │663 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────╮ │736 } │ │737 } │ │738 │ │739 +// three-way merge of a hash map │ │740 fn mergeChangedMapEntries( │ │741 comptime DB: type, │ │742 allocator: std.mem.Allocator,│ ╰──────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────╮ │819 } │ │820 } │ │821 │ │817 -// three-way merge of a sorted map keyed by byte strings, like │ │818 -// mergeChangedMapEntries but recursing into sorted-set values.│ │822 +// three-way merge of a sorted map │ │823 fn mergeChangedSortedMapEntries( │ │824 comptime DB: type, │ │825 allocator: std.mem.Allocator, │ ╰────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │982 │ │983 try map.put(key, .{ .bytes_object = .{ .value = bytes, .format_tag = "bl".* } });│ │984 }, │ │985 + .@"enum" => try upsertBytes(DB, hash_kind, map, key, @tagName(value)), │ │986 else => @compileError("unsupported upsert field type: " ++ @typeName(Field)), │ │987 } │ │988 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯