Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Commit

Permalink
Exclude size null (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdigital authored Jun 25, 2023
1 parent b4afe7e commit 047368d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sqlitedb/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func createQuery(query *SearchQuery) (string, error) {
} else if query.Episode.Valid {
expressions = append(expressions, goqu.C("title").Like("%E"+fmt.Sprintf("%02d", query.Episode.Int64)+".%"))
}
expressions = append(expressions, goqu.C("size").IsNotNull())
ds := dialect.From("items").Where(expressions...).Order(goqu.C("dt").Desc()).Limit(query.Limit).Offset(query.Offset)
sqlQuery, _, err := ds.ToSQL()
return sqlQuery, err
Expand Down

0 comments on commit 047368d

Please sign in to comment.