╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ event.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
1059 _ = try last_object_id_cursor.readBytes(&last_object_id); 1060 1061 const haxy_cursor = try moment.getCursor(hash.hashInt(repo_opts.hash, "haxy")) orelse return error.NotFound; 1062 const haxy = try Repo.DB.ArrayList(.read_only).init(haxy_cursor); 1063 1064 try std.testing.expectEqual(3, try haxy.count()); 1065 1066 const haxy_moments_cursor = try haxy.getCursor(-1) orelse return error.NotFound; 1067 const haxy_moments = try Repo.DB.HashMap(.read_only).init(haxy_moments_cursor); 1068 1069 const haxy_moment_cursor = try haxy_moments.getCursor(hash.bytesToInt(repo_opts.hash, &last_object_id)) orelse return error.NotFound; 1070 const haxy_moment = try Repo.DB.HashMap(.read_only).init(haxy_moment_cursor); 1071 1072 // get the map of users 1073 const event_id_to_user_cursor = try haxy_moment.getCursor(hash.hashInt(repo_opts.hash, "event-id->user")) orelse return error.NotFound; 1074 const event_id_to_user = try Repo.DB.HashMap(.read_only).init(event_id_to_user_cursor); 1075 1076 try std.testing.expect(null == try event_id_to_user.getCursor(hash.hashInt(repo_opts.hash, &user_event_id))); 1077 } 1078 } 1079