Versions in this module Expand all Collapse all v0 v0.1.22 May 22, 2026 v0.1.21 May 22, 2026 v0.1.20 May 22, 2026 v0.1.19 Feb 9, 2026 v0.1.18 Jan 28, 2026 v0.1.17 Jan 28, 2026 v0.1.16 Jan 26, 2026 v0.1.15 Jan 26, 2026 v0.1.14 Jan 26, 2026 Changes in this version + type Cycle struct + CreatedAt time.Time + End *time.Time + FetchedAt time.Time + ID int64 + ScoreJson *string + ScoreState string + Start time.Time + TimezoneOffset string + UpdatedAt time.Time + UserID int64 + type DBTX interface + ExecContext func(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext func(context.Context, string) (*sql.Stmt, error) + QueryContext func(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...interface{}) *sql.Row + type GetCycleByDateParams struct + DayEnd time.Time + DayStart time.Time + type GetCyclesByDateRangeCursorParams struct + Cursor time.Time + Limit int64 + RangeEnd time.Time + RangeStart time.Time + type GetCyclesByDateRangeParams struct + Limit int64 + RangeEnd time.Time + RangeStart time.Time + type GetSleepsByDateRangeCursorParams struct + Cursor time.Time + Limit int64 + RangeEnd time.Time + RangeStart time.Time + type GetSleepsByDateRangeParams struct + Limit int64 + RangeEnd time.Time + RangeStart time.Time + type GetWorkoutsByDateRangeCursorParams struct + Cursor time.Time + Limit int64 + RangeEnd time.Time + RangeStart time.Time + type GetWorkoutsByDateRangeParams struct + Limit int64 + RangeEnd time.Time + RangeStart time.Time + type Querier interface + DeleteCycle func(ctx context.Context, id int64) error + DeleteRecovery func(ctx context.Context, cycleID int64) error + DeleteSleep func(ctx context.Context, id string) error + DeleteTokenMetadata func(ctx context.Context) error + DeleteWorkout func(ctx context.Context, id string) error + GetCycle func(ctx context.Context, id int64) (Cycle, error) + GetCycleByDate func(ctx context.Context, arg GetCycleByDateParams) (Cycle, error) + GetCyclesByDateRange func(ctx context.Context, arg GetCyclesByDateRangeParams) ([]Cycle, error) + GetCyclesByDateRangeCursor func(ctx context.Context, arg GetCyclesByDateRangeCursorParams) ([]Cycle, error) + GetLastNotificationPoll func(ctx context.Context) (*time.Time, error) + GetLatestCycles func(ctx context.Context, limit int64) ([]Cycle, error) + GetNapsByCycleID func(ctx context.Context, cycleID int64) ([]Sleep, error) + GetPendingCycles func(ctx context.Context) ([]Cycle, error) + GetRecoveriesByCycleIDs func(ctx context.Context, cycleIds []int64) ([]Recovery, error) + GetRecovery func(ctx context.Context, cycleID int64) (Recovery, error) + GetSleep func(ctx context.Context, id string) (Sleep, error) + GetSleepByCycleID func(ctx context.Context, cycleID int64) (Sleep, error) + GetSleepsByDateRange func(ctx context.Context, arg GetSleepsByDateRangeParams) ([]Sleep, error) + GetSleepsByDateRangeCursor func(ctx context.Context, arg GetSleepsByDateRangeCursorParams) ([]Sleep, error) + GetSyncState func(ctx context.Context) (SyncState, error) + GetTokenMetadata func(ctx context.Context) (Token, error) + GetWorkout func(ctx context.Context, id string) (Workout, error) + GetWorkoutsByCycleID func(ctx context.Context, cycleID int64) ([]Workout, error) + GetWorkoutsByDateRange func(ctx context.Context, arg GetWorkoutsByDateRangeParams) ([]Workout, error) + GetWorkoutsByDateRangeCursor func(ctx context.Context, arg GetWorkoutsByDateRangeCursorParams) ([]Workout, error) + MarkBackfillComplete func(ctx context.Context) error + UpdateBackfillWatermark func(ctx context.Context, backfillWatermark *time.Time) error + UpdateLastFullSync func(ctx context.Context, lastFullSync *time.Time) error + UpdateLastNotificationPoll func(ctx context.Context, lastNotificationPoll *time.Time) error + UpsertCycle func(ctx context.Context, arg UpsertCycleParams) error + UpsertRecovery func(ctx context.Context, arg UpsertRecoveryParams) error + UpsertSleep func(ctx context.Context, arg UpsertSleepParams) error + UpsertSyncState func(ctx context.Context, arg UpsertSyncStateParams) error + UpsertTokenMetadata func(ctx context.Context, arg UpsertTokenMetadataParams) error + UpsertWorkout func(ctx context.Context, arg UpsertWorkoutParams) error + type Queries struct + func New(db DBTX) *Queries + func (q *Queries) DeleteCycle(ctx context.Context, id int64) error + func (q *Queries) DeleteRecovery(ctx context.Context, cycleID int64) error + func (q *Queries) DeleteSleep(ctx context.Context, id string) error + func (q *Queries) DeleteTokenMetadata(ctx context.Context) error + func (q *Queries) DeleteWorkout(ctx context.Context, id string) error + func (q *Queries) GetCycle(ctx context.Context, id int64) (Cycle, error) + func (q *Queries) GetCycleByDate(ctx context.Context, arg GetCycleByDateParams) (Cycle, error) + func (q *Queries) GetCyclesByDateRange(ctx context.Context, arg GetCyclesByDateRangeParams) ([]Cycle, error) + func (q *Queries) GetCyclesByDateRangeCursor(ctx context.Context, arg GetCyclesByDateRangeCursorParams) ([]Cycle, error) + func (q *Queries) GetLastNotificationPoll(ctx context.Context) (*time.Time, error) + func (q *Queries) GetLatestCycles(ctx context.Context, limit int64) ([]Cycle, error) + func (q *Queries) GetNapsByCycleID(ctx context.Context, cycleID int64) ([]Sleep, error) + func (q *Queries) GetPendingCycles(ctx context.Context) ([]Cycle, error) + func (q *Queries) GetRecoveriesByCycleIDs(ctx context.Context, cycleIds []int64) ([]Recovery, error) + func (q *Queries) GetRecovery(ctx context.Context, cycleID int64) (Recovery, error) + func (q *Queries) GetSleep(ctx context.Context, id string) (Sleep, error) + func (q *Queries) GetSleepByCycleID(ctx context.Context, cycleID int64) (Sleep, error) + func (q *Queries) GetSleepsByDateRange(ctx context.Context, arg GetSleepsByDateRangeParams) ([]Sleep, error) + func (q *Queries) GetSleepsByDateRangeCursor(ctx context.Context, arg GetSleepsByDateRangeCursorParams) ([]Sleep, error) + func (q *Queries) GetSyncState(ctx context.Context) (SyncState, error) + func (q *Queries) GetTokenMetadata(ctx context.Context) (Token, error) + func (q *Queries) GetWorkout(ctx context.Context, id string) (Workout, error) + func (q *Queries) GetWorkoutsByCycleID(ctx context.Context, cycleID int64) ([]Workout, error) + func (q *Queries) GetWorkoutsByDateRange(ctx context.Context, arg GetWorkoutsByDateRangeParams) ([]Workout, error) + func (q *Queries) GetWorkoutsByDateRangeCursor(ctx context.Context, arg GetWorkoutsByDateRangeCursorParams) ([]Workout, error) + func (q *Queries) MarkBackfillComplete(ctx context.Context) error + func (q *Queries) UpdateBackfillWatermark(ctx context.Context, backfillWatermark *time.Time) error + func (q *Queries) UpdateLastFullSync(ctx context.Context, lastFullSync *time.Time) error + func (q *Queries) UpdateLastNotificationPoll(ctx context.Context, lastNotificationPoll *time.Time) error + func (q *Queries) UpsertCycle(ctx context.Context, arg UpsertCycleParams) error + func (q *Queries) UpsertRecovery(ctx context.Context, arg UpsertRecoveryParams) error + func (q *Queries) UpsertSleep(ctx context.Context, arg UpsertSleepParams) error + func (q *Queries) UpsertSyncState(ctx context.Context, arg UpsertSyncStateParams) error + func (q *Queries) UpsertTokenMetadata(ctx context.Context, arg UpsertTokenMetadataParams) error + func (q *Queries) UpsertWorkout(ctx context.Context, arg UpsertWorkoutParams) error + func (q *Queries) WithTx(tx *sql.Tx) *Queries + type Recovery struct + CreatedAt time.Time + CycleID int64 + FetchedAt time.Time + ScoreJson *string + ScoreState string + SleepID string + UpdatedAt time.Time + UserID int64 + type Sleep struct + CreatedAt time.Time + CycleID int64 + End time.Time + FetchedAt time.Time + ID string + Nap int64 + ScoreJson *string + ScoreState string + Start time.Time + TimezoneOffset string + UpdatedAt time.Time + UserID int64 + V1ID *int64 + type SyncState struct + BackfillComplete int64 + BackfillWatermark *time.Time + CreatedAt *time.Time + ID int64 + LastFullSync *time.Time + LastNotificationPoll *time.Time + UpdatedAt *time.Time + type Token struct + Expiry time.Time + ID int64 + TokenType string + type UpsertCycleParams struct + CreatedAt time.Time + End *time.Time + ID int64 + ScoreJson *string + ScoreState string + Start time.Time + TimezoneOffset string + UpdatedAt time.Time + UserID int64 + type UpsertRecoveryParams struct + CreatedAt time.Time + CycleID int64 + ScoreJson *string + ScoreState string + SleepID string + UpdatedAt time.Time + UserID int64 + type UpsertSleepParams struct + CreatedAt time.Time + CycleID int64 + End time.Time + ID string + Nap int64 + ScoreJson *string + ScoreState string + Start time.Time + TimezoneOffset string + UpdatedAt time.Time + UserID int64 + V1ID *int64 + type UpsertSyncStateParams struct + BackfillComplete int64 + BackfillWatermark *time.Time + LastFullSync *time.Time + type UpsertTokenMetadataParams struct + Expiry time.Time + TokenType string + type UpsertWorkoutParams struct + CreatedAt time.Time + End time.Time + ID string + ScoreJson *string + ScoreState string + SportName string + Start time.Time + TimezoneOffset string + UpdatedAt time.Time + UserID int64 + V1ID *int64 + type Workout struct + CreatedAt time.Time + End time.Time + FetchedAt time.Time + ID string + ScoreJson *string + ScoreState string + SportName string + Start time.Time + TimezoneOffset string + UpdatedAt time.Time + UserID int64 + V1ID *int64