╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Attachment.zig ───────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯
150 pub fn readById( 151 comptime DB: type, 152 comptime hash_kind: hash.HashKind, 153 haxy_moment: DB.HashMap(.read_only), 154 arena: *std.heap.ArenaAllocator, 155 attachment_id: []const u8, 156 ) !?Record { 157 const records_cursor = try haxy_moment.getCursor(hash.hashInt(hash_kind, record_map_key)) orelse return null; 158 const records = try DB.HashMap(.read_only).init(records_cursor); 159 const record_cursor = try records.getCursor(hash.hashInt(hash_kind, attachment_id)) orelse return null; 160 const record_map = try DB.HashMap(.read_only).init(record_cursor); 161 return try evt.read(Record, DB, hash_kind, arena, record_map); 162 } 163