╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Patch.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
435 const set = try DB.SortedSet(.read_write).init(try tag_statuses.putCursor(key)); 436 _ = try set.remove(order_key); 437 if (0 == try set.count()) _ = try tag_statuses.remove(key); 438 } 439 } 440 441 pub fn readById( 442 comptime DB: type, 443 comptime hash_kind: hash.HashKind, 444 haxy_moment: DB.HashMap(.read_only), 445 arena: *std.heap.ArenaAllocator, 446 id: *const [evt.event_id_size]u8, 447 ) !?Record { 448 const records_cursor = try haxy_moment.getCursor(hash.hashInt(hash_kind, record_map_key)) orelse return null; 449 const records = try DB.HashMap(.read_only).init(records_cursor); 450 const record_cursor = try records.getCursor(hash.hashInt(hash_kind, id)) orelse return null; 451 return try evt.read(Record, DB, hash_kind, arena, try DB.HashMap(.read_only).init(record_cursor)); 452 } 453