╭ changed ────╮ │src/event.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │130 const old_moment_cursor = try haxy_moments.getCursor(hash.bytesToInt(hash_kind, parent_oid)) orelse return error.CursorNotFound; │ │131 const old_moment = try DB.HashMap(.read_only).init(old_moment_cursor); │ │132 │ │133 - const old_moment_index_cursor = try old_moment.getCursor(hash.hashInt(hash_kind, "index")) orelse return error.CursorNotFound; │ │133 + const old_moment_index_cursor = try old_moment.getCursor(hash.hashInt(hash_kind, "moment-index")) orelse return error.CursorNotFound;│ │134 const old_moment_index = try old_moment_index_cursor.readUint(); │ │135 │ │136 // resize the haxy list so we truncate all the moments that were │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │183 // associate this moment with the index it will first appear at in the haxy list. │ │184 // this will be important later so we can truncate that list if the user ever │ │185 // rebases starting at this object id. │ │186 - try haxy_moment.put(hash.hashInt(hash_kind, "index"), .{ .uint = try haxy.count() - 1 }); │ │186 + try haxy_moment.put(hash.hashInt(hash_kind, "moment-index"), .{ .uint = try haxy.count() - 1 });│ │187 │ │188 // consume the event into the views map │ │189 { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │192 // get the id of the current event as bytes │ │193 var current_event_id: [event_id_size]u8 = undefined; │ │194 _ = try std.fmt.hexToBytes(&current_event_id, &event.id); │ │195 - │ │196 - // create a new views map for the current event we are consuming │ │197 - const views_cursor = try haxy_moment.putCursor(hash.hashInt(hash_kind, "views"));│ │198 - const views = try DB.HashMap(.read_write).init(views_cursor); │ │195 │ │196 switch (event.data) { │ │197 .issue => |data| { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │202 - const event_id_to_issue_cursor = try views.putCursor(hash.hashInt(hash_kind, "event-id->issue")); │ │198 + const event_id_to_issue_cursor = try haxy_moment.putCursor(hash.hashInt(hash_kind, "event-id->issue"));│ │199 const event_id_to_issue = try DB.HashMap(.read_write).init(event_id_to_issue_cursor); │ │200 │ │201 const issue_cursor = try event_id_to_issue.putCursor(hash.hashInt(hash_kind, &current_event_id)); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯