// FirstID returns the first FactType ID from the query.
// Returns a *NotFoundError when no FactType ID was found.
FirstID returns the first FactType ID from the query.
Returns a *NotFoundError when no FactType ID was found.
// FirstID returns the first FactType ID from the query . // Returns a * NotFoundError when no FactType ID was found .
func (ftq *FactTypeQuery) FirstID(ctx context.Context) (id string, err error) {
	var ids []string
	if ids, err = ftq.Limit(1).IDs(ctx); err != nil {
		return
	}
	if len(ids) == 0 {
		err = &NotFoundError{facttype.Label}
		return
	}
	return ids[0], nil
}
func ( ftq * FactTypeQuery ) FirstID ( ctx context . Context ) ( id string , err error ) { var ids [ ] string if ids , err = ftq . Limit ( 1 ) . IDs ( ctx ) ; err != nil { return } if len ( ids ) == 0 { err = & NotFoundError { facttype . Label } return } return ids [ 0 ] , nil }
FirstID returns the first FactType ID from the query.
FirstID returns the first FactType ID from the query .