var switch, fmt, npe fix

This commit is contained in:
2026-03-12 19:22:14 +01:00
parent 8c06024fe5
commit d007569f93
6 changed files with 21 additions and 29 deletions

View File

@@ -223,7 +223,8 @@ func (q *Queries) SearchArtists(ctx context.Context, arg SearchArtistsParams) ([
const searchBeatmaps = `-- name: SearchBeatmaps :many
SELECT beatmapid, artist, artistunicode, title, titleunicode, creator, difficulty, audio, md5hash, file, rankedstatus, lastmodifiedtime, totaltime, audiopreviewtime, beatmapsetid, source, tags, lastplayed, folder
FROM Beatmap
WHERE Title LIKE ? OR Artist LIKE ?
WHERE Title LIKE ? OR Artist LIKE ?
GROUP BY Folder
LIMIT ? OFFSET ?
`

View File

@@ -92,13 +92,13 @@ WHERE c.Name = (
ORDER BY Name
LIMIT 1 OFFSET ?1
)
LIMIT ?2 OFFSET ?3
LIMIT ?3 OFFSET ?2
`
type GetCollectionByOffsetParams struct {
Offset int64 `json:"offset"`
Limit int64 `json:"limit"`
Offset_2 int64 `json:"offset_2"`
Index int64 `json:"index"`
Offset int64 `json:"offset"`
Limit int64 `json:"limit"`
}
type GetCollectionByOffsetRow struct {
@@ -115,7 +115,7 @@ type GetCollectionByOffsetRow struct {
}
func (q *Queries) GetCollectionByOffset(ctx context.Context, arg GetCollectionByOffsetParams) ([]GetCollectionByOffsetRow, error) {
rows, err := q.db.QueryContext(ctx, getCollectionByOffset, arg.Offset, arg.Limit, arg.Offset_2)
rows, err := q.db.QueryContext(ctx, getCollectionByOffset, arg.Index, arg.Offset, arg.Limit)
if err != nil {
return nil, err
}