Skip to content

Commit

Permalink
remove code to create /data/aquila.jobs.db
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Apr 17, 2022
1 parent 5ec89dc commit 9a8fd67
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/db/_db.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const root = @import("root");

const _internal = @import("./_internal.zig");
const db = &_internal.db;
const db_jobs = &_internal.db_jobs;
const Engine = _internal.Engine;

pub const Remote = @import("./Remote.zig");
Expand All @@ -29,18 +28,10 @@ pub fn connect(alloc: std.mem.Allocator, path: string) !void {
try _internal.createTableT(alloc, db, User);
try _internal.createTableT(alloc, db, Package);
try _internal.createTableT(alloc, db, Version);

{
const jobspath = try std.fs.path.join(alloc, &.{ root.datadirpath, "aquila.jobs.db" });
const f = try std.fs.cwd().createFile(abspath, .{ .truncate = false });
f.close();
db_jobs.* = try Engine.connect(try alloc.dupeZ(u8, jobspath));
}
}

pub fn close() void {
db.close();
db_jobs.close();
}

pub const CountStat = struct {
Expand Down

0 comments on commit 9a8fd67

Please sign in to comment.