Use find() instead of where() for song/albums views and add artists to song view
I think this makes things faster, but I may just be comparing to the scrobbles view which is terribly slow
This commit is contained in:
parent
05e9c05742
commit
0522a023b5
4 changed files with 22 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ const jetzig = @import("jetzig");
|
|||
pub fn index(request: *jetzig.Request) !jetzig.View {
|
||||
var root = try request.data(.object);
|
||||
var scrobbles_view = try root.put("scrobbles", .array);
|
||||
const query = jetzig.database.Query(.Scrobble).select(.{.date})
|
||||
const query = jetzig.database.Query(.Scrobble).select(.{ .id, .date })
|
||||
.include(.song, .{ .select = .{ .id, .name } })
|
||||
.include(.album, .{ .select = .{ .id, .name } })
|
||||
.include(.scrobbleartists, .{ .select = .{.artist_id} })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue