[ci skip] codex 5.3 review

This commit is contained in:
2026-02-06 15:07:44 +11:00
parent 5dcc11e5e0
commit dc96431f06
8 changed files with 179 additions and 339 deletions

View File

@@ -85,13 +85,14 @@ func listLatestHourlyWithRows(ctx context.Context, dbConn *sqlx.DB, vcenter stri
if limit <= 0 {
limit = 50
}
rows, err := dbConn.QueryxContext(ctx, `
query := dbConn.Rebind(`
SELECT table_name, snapshot_time, snapshot_count
FROM snapshot_registry
WHERE snapshot_type = 'hourly' AND snapshot_time < ?
ORDER BY snapshot_time DESC
LIMIT ?
`, beforeUnix, limit)
`)
rows, err := dbConn.QueryxContext(ctx, query, beforeUnix, limit)
if err != nil {
return nil, err
}