Remove unused helpers

This commit is contained in:
jaina heartles 2022-07-16 12:31:36 -07:00
parent b80eba6fcf
commit 52003f5e4f

View file

@ -124,10 +124,6 @@ pub const Database = struct {
self.db.close();
}
pub fn getById(self: *Database, comptime T: type, id: Uuid, alloc: std.mem.Allocator) !?T {
return self.getBy(T, .id, id, alloc);
}
pub fn getBy(
self: *Database,
comptime T: type,
@ -210,10 +206,6 @@ pub const Database = struct {
return (try row.getI64(0)) > 0;
}
pub fn getNoteById(self: *Database, id: Uuid, alloc: std.mem.Allocator) !?models.Note {
return self.getById(models.Note, id, alloc);
}
pub fn insert(self: *Database, comptime T: type, val: T) !void {
const fields = comptime std.meta.fieldNames(T);
const q = comptime (Insert{
@ -231,8 +223,4 @@ pub const Database = struct {
if ((try stmt.step()) != null) return error.UnknownError;
}
pub fn insertNote(self: *Database, note: models.Note) !void {
return self.insert(models.Note, note);
}
};