Versions in this module Expand all Collapse all v4 v4.0.4 Jul 30, 2024 Changes in this version + const ServiceID + type SQL struct + Clock syncf.Clock + DB *gorm.DB + IsPG bool + func (s *SQL) CountEventsBy(ctx context.Context, feedID feed.ID, since time.Time, key string, ...) (map[string]int64, error) + func (s *SQL) CreateSubscription(ctx context.Context, sub *feed.Subscription) error + func (s *SQL) DeleteAllSubscriptions(ctx context.Context, feedID feed.ID, errorLike string) (int64, error) + func (s *SQL) EventTx(ctx context.Context, body func(tx feed.EventTx) error) error + func (s *SQL) GetActiveFeedIDs(ctx context.Context) ([]feed.ID, error) + func (s *SQL) GetSubscription(ctx context.Context, header feed.Header) (*feed.Subscription, error) + func (s *SQL) IsMediaUnique(ctx context.Context, hash *feed.MediaHash) (bool, error) + func (s *SQL) ListSubscriptions(ctx context.Context, feedID feed.ID, active bool) ([]feed.Subscription, error) + func (s *SQL) SaveEvent(ctx context.Context, feedID feed.ID, eventType string, value any) error + func (s *SQL) ShiftSubscription(ctx context.Context, feedID feed.ID) (*feed.Subscription, error) + func (s *SQL) Tx(ctx context.Context, body func(tx feed.Tx) error) error + func (s *SQL) UpdateSubscription(ctx context.Context, header feed.Header, value any) error