From 8a2cc3a344283b08e02561dc3f0849ec85bb6545 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sun, 25 Feb 2024 16:29:14 +0100 Subject: [PATCH] Reformat the query in GetEntryIDs To make it more consistent with how all the other are formatted --- internal/storage/entry_query_builder.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/internal/storage/entry_query_builder.go b/internal/storage/entry_query_builder.go index 1fae4981..70d04e25 100644 --- a/internal/storage/entry_query_builder.go +++ b/internal/storage/entry_query_builder.go @@ -397,7 +397,18 @@ func (e *EntryQueryBuilder) GetEntries() (model.Entries, error) { // GetEntryIDs returns a list of entry IDs that match the condition. func (e *EntryQueryBuilder) GetEntryIDs() ([]int64, error) { - query := `SELECT e.id FROM entries e LEFT JOIN feeds f ON f.id=e.feed_id WHERE %s %s` + query := ` + SELECT + e.id + FROM + entries e + LEFT JOIN + feeds f + ON + f.id=e.feed_id + WHERE + %s %s + ` condition := e.buildCondition() query = fmt.Sprintf(query, condition, e.buildSorting())