Skip to content

Commit

Permalink
z
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc committed May 26, 2024
1 parent cd8dae8 commit d6185e2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/subject/mysql_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ func (r mysqlRepo) Count(
if filter.Series.Set {
q = q.Where(r.q.Subject.Series.Is(filter.Series.Value))

Check warning on line 245 in internal/subject/mysql_repository.go

View check run for this annotation

Codecov / codecov/patch

internal/subject/mysql_repository.go#L244-L245

Added lines #L244 - L245 were not covered by tests
}
// TODO:(everpcpc): add platform filter
if filter.Platform.Set {
q = q.Where(r.q.Subject.Infobox.Like(filter.Platform.Value))

Check warning on line 248 in internal/subject/mysql_repository.go

View check run for this annotation

Codecov / codecov/patch

internal/subject/mysql_repository.go#L247-L248

Added lines #L247 - L248 were not covered by tests
}
if filter.Year.Set {
q = q.Where(r.q.SubjectField.Year.Eq(filter.Year.Value))

Check warning on line 251 in internal/subject/mysql_repository.go

View check run for this annotation

Codecov / codecov/patch

internal/subject/mysql_repository.go#L250-L251

Added lines #L250 - L251 were not covered by tests
}
Expand Down Expand Up @@ -277,7 +279,9 @@ func (r mysqlRepo) Browse(
if filter.Series.Set {
q = q.Where(r.q.Subject.Series.Is(filter.Series.Value))

Check warning on line 280 in internal/subject/mysql_repository.go

View check run for this annotation

Codecov / codecov/patch

internal/subject/mysql_repository.go#L279-L280

Added lines #L279 - L280 were not covered by tests
}
// TODO:(everpcpc): add platform filter
if filter.Platform.Set {
q = q.Where(r.q.Subject.Infobox.Like(filter.Platform.Value))

Check warning on line 283 in internal/subject/mysql_repository.go

View check run for this annotation

Codecov / codecov/patch

internal/subject/mysql_repository.go#L282-L283

Added lines #L282 - L283 were not covered by tests
}
if filter.Year.Set {
q = q.Where(r.q.SubjectField.Year.Eq(filter.Year.Value))

Check warning on line 286 in internal/subject/mysql_repository.go

View check run for this annotation

Codecov / codecov/patch

internal/subject/mysql_repository.go#L285-L286

Added lines #L285 - L286 were not covered by tests
}
Expand Down

0 comments on commit d6185e2

Please sign in to comment.