╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ event.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
788 // 789 790 const events_to_consume3 = [_]evt.EventWithId{ 791 .{ 792 .id = std.fmt.bytesToHex(user_event_id, .lower), 793 .event = .{ .user = null }, 794 }, 795 }; 796 797 // commit and consume the removal 798 try evt.commitAndConsume(repo_opts, io, allocator, &repo, .{ .kind = .head, .name = "haxy/meta" }, &events_to_consume3); 799 800 { 801 const haxy_moment = try evt.currentMoment(repo_opts, &repo); 802 803 // get the map of users 804 const event_id_to_user_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "event-id->user")) orelse return error.NotFound; 805 const event_id_to_user = try Repo.DB.HashMap(.read_only).init(event_id_to_user_cursor); 806 807 try std.testing.expect(null == try event_id_to_user.getCursor(hash.hashInt(repo_opts.hash, &user_event_id))); 808 } 809 } 810