╭ changed ────────────╮ │src/event/Comment.zig│ ╰─────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────╮ │14 removed: bool = false, │ │15 author_email: ?[]const u8 = null,│ │16 created_order: u64 = 0, │ │17 + updated_order: u64 = 0, │ │18 }; │ │19 │ │20 const Self = @This(); │ ╰─────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │59 existing_record_maybe = try evt.read(Record, DB, hash_kind, arena, existing_comment); │ │60 } │ │61 │ │61 - var record_to_write = if (record_maybe) |record| │ │62 - record │ │63 - else blk: { │ │64 - var record = existing_record_maybe orelse return error.EventNotFound; │ │65 - record.removed = true; │ │66 - break :blk record; │ │67 - }; │ │62 + var record_to_write = record_maybe orelse try evt.removedRecord(Record, DB, hash_kind, haxy_moment.readOnly(), existing_record_maybe);│ │63 │ │64 const thread_id = try evt.parseEventId(&record_to_write.event.thread_id); │ │65 _ = try evt.parseEventId(&record_to_write.event.parent_id); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │77 const comment_cursor = try event_id_to_comment.putCursor(comment_key); │ │78 const comment = try DB.HashMap(.read_write).init(comment_cursor); │ │79 try evt.upsert(Record, DB, hash_kind, comment, record_to_write); │ │85 - try evt.indexEvent(DB, hash_kind, haxy_moment, event_id, .comment, record_to_write.created_order, record_to_write.removed);│ │80 + try evt.indexEvent(DB, hash_kind, haxy_moment, event_id, .comment, existing_record_maybe, record_to_write); │ │81 │ │82 if (existing_cursor_maybe == null) { │ │83 const comment_id_set_cursor = try haxy_moment.putCursor(hash.hashInt(hash_kind, id_set_key)); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯