// Float64 returns a single float64 from a group-by query.
// It is only allowed when executing a group-by query with one field.
Float64 returns a single float64 from a group-by query.
It is only allowed when executing a group-by query with one field.
// Float64 returns a single float64 from a group - by query . // It is only allowed when executing a group - by query with one field .
func (aagb *APIAuditGroupBy) Float64(ctx context.Context) (_ float64, err error) {
	var v []float64
	if v, err = aagb.Float64s(ctx); err != nil {
		return
	}
	switch len(v) {
	case 1:
		return v[0], nil
	case 0:
		err = &NotFoundError{apiaudit.Label}
	default:
		err = fmt.Errorf("ent: APIAuditGroupBy.Float64s returned %d results when one was expected", len(v))
	}
	return
}
func ( aagb * APIAuditGroupBy ) Float64 ( ctx context . Context ) ( _ float64 , err error ) { var v [ ] float64 if v , err = aagb . Float64s ( ctx ) ; err != nil { return } switch len ( v ) { case 1 : return v [ 0 ] , nil case 0 : err = & NotFoundError { apiaudit . Label } default : err = fmt . Errorf ( " " , len ( v ) ) } return }
Float64 returns a single float64 from a group-by query.
Float64 returns a single float64 from a group - by query .