diff --git a/src/queries.js b/src/queries.js index 7103530..ea685f1 100644 --- a/src/queries.js +++ b/src/queries.js @@ -248,7 +248,8 @@ export function image_query_with_where(maybe_where) { + "LEFT JOIN ImageTags ON Images.id=ImageTags.imageid " + "LEFT JOIN ImageInformation ON Images.id=ImageInformation.imageid " + "LEFT JOIN Tags ON ImageTags.tagid=Tags.id " + (maybe_where ? maybe_where : "") - + " GROUP BY Images.id;"; + + " GROUP BY Images.id LIMIT 300;"; + // TODO make the limit configurable and have a warning } // This query will return database entries with the fields "id" and "relativePath" for each matching album.