internal/storage/postgres/storage.go
func (s *Storage) Abandon(ctx context.Context, accessToken string) (bool, error) {
	span, ctx := opentracing.StartSpanFromContext(ctx, "postgres.storage.abandon")
	defer span.Finish()

	start := time.Now()
	labels := prometheus.Labels{"query": "abandon"}

	result, err := s.db.ExecContext(ctx, s.queryAbandon, accessToken)
	s.incQueries(labels, start)
	if err != nil {
		s.incError(labels)
		return false, err
	}

	affected, err := result.RowsAffected()
	if err != nil {
		return false, err
	}
	if affected == 0 {
		return false, storage.ErrSessionNotFound
	}

	return true, nil
}
func (s *Storage) Abandon(ctx context.Context, accessToken string) (bool, error) {
	span, ctx := opentracing.StartSpanFromContext(ctx, "postgres.storage.abandon")
	defer span.Finish()

	start := time.Now()
	labels := prometheus.Labels{"query": "abandon"}

	result, err := s.db.ExecContext(ctx, s.queryAbandon, accessToken)
	s.incQueries(labels, start)
	if err != nil {
		s.incError(labels)
		return false, err
	}

	affected, err := result.RowsAffected()
	if err != nil {
		return false, err
	}
	if affected == 0 {
		return false, storage.ErrSessionNotFound
	}

	return true, nil
}
// Abandon implements storage interface.