feat(db): add GetBooksByTag query for tag detail page

Uses $2 = ANY(tags) to match against the tags text[] column with GIN
index support. sqlc generates a single string Column2 param (not []string).
This commit is contained in:
2026-05-10 16:11:46 -04:00
parent ae2e03d499
commit fa38ca0d1b
3 changed files with 98 additions and 0 deletions
+1
View File
@@ -129,6 +129,7 @@ type Querier interface {
GetAllSystemConfig(ctx context.Context) ([]SystemConfig, error)
GetAllSystemSettings(ctx context.Context) ([]GetAllSystemSettingsRow, error)
GetAnnotationsForBook(ctx context.Context, arg GetAnnotationsForBookParams) ([]GetAnnotationsForBookRow, error)
GetBooksByTag(ctx context.Context, arg GetBooksByTagParams) ([]MediaItems, error)
// Get collection
GetCollection(ctx context.Context, id pgtype.UUID) (Collections, error)
// Get collection items