func (esmq *ExplicitSkippedMessageQuery) First(ctx context.Context) (*ExplicitSkippedMessage, error) {
	nodes, err := esmq.Limit(1).All(ctx)
	if err != nil {
		return nil, err
	}
	if len(nodes) == 0 {
		return nil, &NotFoundError{explicitskippedmessage.Label}
	}
	return nodes[0], nil
}
First returns the first ExplicitSkippedMessage entity from the query.
Returns a *NotFoundError when no ExplicitSkippedMessage was found.
package ent
import (
	"context"
	"errors"
	"fmt"
	"math"
	"entgo.io/contrib/entproto/internal/entprototest/ent/explicitskippedmessage"
	"entgo.io/contrib/entproto/internal/entprototest/ent/predicate"
	"entgo.io/ent/dialect/sql"
	"entgo.io/ent/dialect/sql/sqlgraph"
	"entgo.io/ent/schema/field"
)
type ExplicitSkippedMessageQuery struct {
	config
	limit      *int
	offset     *int
	unique     *bool
	order      []OrderFunc
	fields     []string
	predicates []predicate.ExplicitSkippedMessage
	sql  *sql.Selector
	path func(context.Context) (*sql.Selector, error)
}
func (esmq *ExplicitSkippedMessageQuery) Where(ps ...predicate.ExplicitSkippedMessage) *ExplicitSkippedMessageQuery {
	esmq.predicates = append(esmq.predicates, ps...)
	return esmq
}
func (esmq *ExplicitSkippedMessageQuery) Limit(limit int) *ExplicitSkippedMessageQuery {
	esmq.limit = &limit
	return esmq
}
func (esmq *ExplicitSkippedMessageQuery) Offset(offset int) *ExplicitSkippedMessageQuery {
	esmq.offset = &offset
	return esmq
}
func (esmq *ExplicitSkippedMessageQuery) Unique(unique bool) *ExplicitSkippedMessageQuery {
	esmq.unique = &unique
	return esmq
}
func (esmq *ExplicitSkippedMessageQuery) Order(o ...OrderFunc) *ExplicitSkippedMessageQuery {
	esmq.order = append(esmq.order, o...)
	return esmq
}