Procházet zdrojové kódy

Reformat the query in GetEntryIDs

To make it more consistent with how all the other are formatted
jvoisin před 2 roky
rodič
revize
8a2cc3a344
1 změnil soubory, kde provedl 12 přidání a 1 odebrání
  1. 12 1
      internal/storage/entry_query_builder.go

+ 12 - 1
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())