╭ changed ────╮ │src/event.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │226 │ │227 switch (event.data) { │ │228 .issue => |data| { │ │198 - const event_id_to_issue_cursor = try haxy_moment.putCursor(hash.hashInt(hash_kind, "event-id->issue")); │ │229 + const event_id_to_issue_cursor = try haxy_moment.putCursor(hash.hashInt(repo_opts.hash, "event-id->issue"));│ │230 const event_id_to_issue = try DB.HashMap(.read_write).init(event_id_to_issue_cursor); │ │231 │ │201 - const issue_cursor = try event_id_to_issue.putCursor(hash.hashInt(hash_kind, &current_event_id)); │ │232 + const issue_cursor = try event_id_to_issue.putCursor(hash.hashInt(repo_opts.hash, &current_event_id)); │ │233 const issue = try DB.HashMap(.read_write).init(issue_cursor); │ │234 │ │204 - try upsert(DB, hash_kind, issue, @TypeOf(data), data); │ │235 + try upsert(DB, repo_opts.hash, issue, @TypeOf(data), data); │ │236 }, │ │237 } │ │238 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │245 } │ │246 │ │247 if (last_object_id_maybe) |*last_object_id| { │ │217 - try moment.put(hash.hashInt(hash_kind, "haxy-last-object-id"), .{ .bytes = last_object_id }); │ │248 + try moment.put(hash.hashInt(repo_opts.hash, "haxy-last-object-id"), .{ .bytes = last_object_id });│ │249 } │ │250 } │ │251 }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │252 │ │222 - try db_file.lock(io, .exclusive); │ │223 - defer db_file.unlock(io); │ │253 + try repo.core.db_file.lock(io, .exclusive); │ │254 + defer repo.core.db_file.unlock(io); │ │255 │ │256 // create a new transaction in the database that runs the above-defined Ctx function │ │226 - const history = try DB.ArrayList(.read_write).init(db.rootCursor()); │ │227 - try history.appendContext(.{ .slot = try history.getSlot(-1) }, Ctx{ .repo_events = repo_events });│ │257 + const history = try DB.ArrayList(.read_write).init(repo.core.db.rootCursor()); │ │258 + try history.appendContext(.{ .slot = try history.getSlot(-1) }, Ctx{ │ │259 + .io = io, │ │260 + .allocator = allocator, │ │261 + .repo = repo, │ │262 + .repo_events = repo_events, │ │263 + }); │ │264 } │ │265 │ │266 fn upsert( │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯