Files
yellowjacket/backend/database/sql/sqlcgen/player_state.sql.go
T
loganandonion-4-dinner f521045540 chore(deps): update go dependencies (non-major) (#40)
* chore(deps): update go dependencies (non-major)

* fix: regenerate code and add postUpgradeTasks for Renovate

Regenerate templ and sqlc output to match bumped tool versions.
Configure Renovate postUpgradeTasks to run 'go generate ./...' after
Go dependency updates, preventing stale generated files in future PRs.

---------

Co-authored-by: onion-4-dinner <15676555+onion-4-dinner@users.noreply.github.com>
2026-02-14 01:17:59 -06:00

58 lines
1.2 KiB
Go

// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.30.0
// source: player_state.sql
package sqlcgen
import (
"context"
)
const getPlayerState = `-- name: GetPlayerState :one
SELECT volume, muted, last_track_path, last_position_seconds
FROM player_state WHERE id = 1
`
type GetPlayerStateRow struct {
Volume int64
Muted bool
LastTrackPath string
LastPositionSeconds int64
}
func (q *Queries) GetPlayerState(ctx context.Context) (GetPlayerStateRow, error) {
row := q.db.QueryRowContext(ctx, getPlayerState)
var i GetPlayerStateRow
err := row.Scan(
&i.Volume,
&i.Muted,
&i.LastTrackPath,
&i.LastPositionSeconds,
)
return i, err
}
const updatePlayerState = `-- name: UpdatePlayerState :exec
UPDATE player_state
SET volume = ?, muted = ?, last_track_path = ?, last_position_seconds = ?
WHERE id = 1
`
type UpdatePlayerStateParams struct {
Volume int64
Muted bool
LastTrackPath string
LastPositionSeconds int64
}
func (q *Queries) UpdatePlayerState(ctx context.Context, arg UpdatePlayerStateParams) error {
_, err := q.db.ExecContext(ctx, updatePlayerState,
arg.Volume,
arg.Muted,
arg.LastTrackPath,
arg.LastPositionSeconds,
)
return err
}