diff --git a/entc/gen/template/builder/query.tmpl b/entc/gen/template/builder/query.tmpl index c21171f92..8ee73d775 100644 --- a/entc/gen/template/builder/query.tmpl +++ b/entc/gen/template/builder/query.tmpl @@ -144,7 +144,7 @@ func ({{ $receiver }} *{{ $builder }}) FirstIDX(ctx context.Context) {{ $.ID.Typ } // Only returns a single {{ $.Name }} entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one {{ $.Name }} entity is not found. +// Returns a *NotSingularError when more than one {{ $.Name }} entity is found. // Returns a *NotFoundError when no {{ $.Name }} entities are found. func ({{ $receiver }} *{{ $builder }}) Only(ctx context.Context) (*{{ $.Name }}, error) { nodes, err := {{ $receiver }}.Limit(2).All(ctx) @@ -171,7 +171,7 @@ func ({{ $receiver }} *{{ $builder }}) OnlyX(ctx context.Context) *{{ $.Name }} } // OnlyID is like Only, but returns the only {{ $.Name }} ID in the query. -// Returns a *NotSingularError when exactly one {{ $.Name }} ID is not found. +// Returns a *NotSingularError when more than one {{ $.Name }} ID is found. // Returns a *NotFoundError when no entities are found. func ({{ $receiver }} *{{ $builder }}) OnlyID(ctx context.Context) (id {{ $.ID.Type }}, err error) { var ids []{{ $.ID.Type }} diff --git a/entc/integration/cascadelete/ent/comment_query.go b/entc/integration/cascadelete/ent/comment_query.go index 844169f88..a640aaf1c 100644 --- a/entc/integration/cascadelete/ent/comment_query.go +++ b/entc/integration/cascadelete/ent/comment_query.go @@ -135,7 +135,7 @@ func (cq *CommentQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Comment entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Comment entity is not found. +// Returns a *NotSingularError when more than one Comment entity is found. // Returns a *NotFoundError when no Comment entities are found. func (cq *CommentQuery) Only(ctx context.Context) (*Comment, error) { nodes, err := cq.Limit(2).All(ctx) @@ -162,7 +162,7 @@ func (cq *CommentQuery) OnlyX(ctx context.Context) *Comment { } // OnlyID is like Only, but returns the only Comment ID in the query. -// Returns a *NotSingularError when exactly one Comment ID is not found. +// Returns a *NotSingularError when more than one Comment ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CommentQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/cascadelete/ent/post_query.go b/entc/integration/cascadelete/ent/post_query.go index 745a0f9ad..2ecdf52ba 100644 --- a/entc/integration/cascadelete/ent/post_query.go +++ b/entc/integration/cascadelete/ent/post_query.go @@ -160,7 +160,7 @@ func (pq *PostQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Post entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Post entity is not found. +// Returns a *NotSingularError when more than one Post entity is found. // Returns a *NotFoundError when no Post entities are found. func (pq *PostQuery) Only(ctx context.Context) (*Post, error) { nodes, err := pq.Limit(2).All(ctx) @@ -187,7 +187,7 @@ func (pq *PostQuery) OnlyX(ctx context.Context) *Post { } // OnlyID is like Only, but returns the only Post ID in the query. -// Returns a *NotSingularError when exactly one Post ID is not found. +// Returns a *NotSingularError when more than one Post ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PostQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/cascadelete/ent/user_query.go b/entc/integration/cascadelete/ent/user_query.go index 94b5fa712..210c5d025 100644 --- a/entc/integration/cascadelete/ent/user_query.go +++ b/entc/integration/cascadelete/ent/user_query.go @@ -136,7 +136,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/config/ent/user_query.go b/entc/integration/config/ent/user_query.go index ec5606661..b5b8cd99c 100644 --- a/entc/integration/config/ent/user_query.go +++ b/entc/integration/config/ent/user_query.go @@ -110,7 +110,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/customid/ent/blob_query.go b/entc/integration/customid/ent/blob_query.go index 3dd8747b2..ef821250a 100644 --- a/entc/integration/customid/ent/blob_query.go +++ b/entc/integration/customid/ent/blob_query.go @@ -160,7 +160,7 @@ func (bq *BlobQuery) FirstIDX(ctx context.Context) uuid.UUID { } // Only returns a single Blob entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Blob entity is not found. +// Returns a *NotSingularError when more than one Blob entity is found. // Returns a *NotFoundError when no Blob entities are found. func (bq *BlobQuery) Only(ctx context.Context) (*Blob, error) { nodes, err := bq.Limit(2).All(ctx) @@ -187,7 +187,7 @@ func (bq *BlobQuery) OnlyX(ctx context.Context) *Blob { } // OnlyID is like Only, but returns the only Blob ID in the query. -// Returns a *NotSingularError when exactly one Blob ID is not found. +// Returns a *NotSingularError when more than one Blob ID is found. // Returns a *NotFoundError when no entities are found. func (bq *BlobQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { var ids []uuid.UUID diff --git a/entc/integration/customid/ent/car_query.go b/entc/integration/customid/ent/car_query.go index b9544734e..39a4f469c 100644 --- a/entc/integration/customid/ent/car_query.go +++ b/entc/integration/customid/ent/car_query.go @@ -136,7 +136,7 @@ func (cq *CarQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Car entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Car entity is not found. +// Returns a *NotSingularError when more than one Car entity is found. // Returns a *NotFoundError when no Car entities are found. func (cq *CarQuery) Only(ctx context.Context) (*Car, error) { nodes, err := cq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (cq *CarQuery) OnlyX(ctx context.Context) *Car { } // OnlyID is like Only, but returns the only Car ID in the query. -// Returns a *NotSingularError when exactly one Car ID is not found. +// Returns a *NotSingularError when more than one Car ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CarQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/customid/ent/device_query.go b/entc/integration/customid/ent/device_query.go index a96410b10..6dbea6d9d 100644 --- a/entc/integration/customid/ent/device_query.go +++ b/entc/integration/customid/ent/device_query.go @@ -161,7 +161,7 @@ func (dq *DeviceQuery) FirstIDX(ctx context.Context) schema.ID { } // Only returns a single Device entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Device entity is not found. +// Returns a *NotSingularError when more than one Device entity is found. // Returns a *NotFoundError when no Device entities are found. func (dq *DeviceQuery) Only(ctx context.Context) (*Device, error) { nodes, err := dq.Limit(2).All(ctx) @@ -188,7 +188,7 @@ func (dq *DeviceQuery) OnlyX(ctx context.Context) *Device { } // OnlyID is like Only, but returns the only Device ID in the query. -// Returns a *NotSingularError when exactly one Device ID is not found. +// Returns a *NotSingularError when more than one Device ID is found. // Returns a *NotFoundError when no entities are found. func (dq *DeviceQuery) OnlyID(ctx context.Context) (id schema.ID, err error) { var ids []schema.ID diff --git a/entc/integration/customid/ent/doc_query.go b/entc/integration/customid/ent/doc_query.go index 12d17fe39..c51448602 100644 --- a/entc/integration/customid/ent/doc_query.go +++ b/entc/integration/customid/ent/doc_query.go @@ -160,7 +160,7 @@ func (dq *DocQuery) FirstIDX(ctx context.Context) schema.DocID { } // Only returns a single Doc entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Doc entity is not found. +// Returns a *NotSingularError when more than one Doc entity is found. // Returns a *NotFoundError when no Doc entities are found. func (dq *DocQuery) Only(ctx context.Context) (*Doc, error) { nodes, err := dq.Limit(2).All(ctx) @@ -187,7 +187,7 @@ func (dq *DocQuery) OnlyX(ctx context.Context) *Doc { } // OnlyID is like Only, but returns the only Doc ID in the query. -// Returns a *NotSingularError when exactly one Doc ID is not found. +// Returns a *NotSingularError when more than one Doc ID is found. // Returns a *NotFoundError when no entities are found. func (dq *DocQuery) OnlyID(ctx context.Context) (id schema.DocID, err error) { var ids []schema.DocID diff --git a/entc/integration/customid/ent/group_query.go b/entc/integration/customid/ent/group_query.go index bafb27749..8edb0f525 100644 --- a/entc/integration/customid/ent/group_query.go +++ b/entc/integration/customid/ent/group_query.go @@ -136,7 +136,7 @@ func (gq *GroupQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Group entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Group entity is not found. +// Returns a *NotSingularError when more than one Group entity is found. // Returns a *NotFoundError when no Group entities are found. func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) { nodes, err := gq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (gq *GroupQuery) OnlyX(ctx context.Context) *Group { } // OnlyID is like Only, but returns the only Group ID in the query. -// Returns a *NotSingularError when exactly one Group ID is not found. +// Returns a *NotSingularError when more than one Group ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/customid/ent/mixinid_query.go b/entc/integration/customid/ent/mixinid_query.go index 3186b1ed3..8b3da1792 100644 --- a/entc/integration/customid/ent/mixinid_query.go +++ b/entc/integration/customid/ent/mixinid_query.go @@ -111,7 +111,7 @@ func (miq *MixinIDQuery) FirstIDX(ctx context.Context) uuid.UUID { } // Only returns a single MixinID entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one MixinID entity is not found. +// Returns a *NotSingularError when more than one MixinID entity is found. // Returns a *NotFoundError when no MixinID entities are found. func (miq *MixinIDQuery) Only(ctx context.Context) (*MixinID, error) { nodes, err := miq.Limit(2).All(ctx) @@ -138,7 +138,7 @@ func (miq *MixinIDQuery) OnlyX(ctx context.Context) *MixinID { } // OnlyID is like Only, but returns the only MixinID ID in the query. -// Returns a *NotSingularError when exactly one MixinID ID is not found. +// Returns a *NotSingularError when more than one MixinID ID is found. // Returns a *NotFoundError when no entities are found. func (miq *MixinIDQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { var ids []uuid.UUID diff --git a/entc/integration/customid/ent/note_query.go b/entc/integration/customid/ent/note_query.go index 68e88f4ba..6d50471c3 100644 --- a/entc/integration/customid/ent/note_query.go +++ b/entc/integration/customid/ent/note_query.go @@ -160,7 +160,7 @@ func (nq *NoteQuery) FirstIDX(ctx context.Context) schema.NoteID { } // Only returns a single Note entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Note entity is not found. +// Returns a *NotSingularError when more than one Note entity is found. // Returns a *NotFoundError when no Note entities are found. func (nq *NoteQuery) Only(ctx context.Context) (*Note, error) { nodes, err := nq.Limit(2).All(ctx) @@ -187,7 +187,7 @@ func (nq *NoteQuery) OnlyX(ctx context.Context) *Note { } // OnlyID is like Only, but returns the only Note ID in the query. -// Returns a *NotSingularError when exactly one Note ID is not found. +// Returns a *NotSingularError when more than one Note ID is found. // Returns a *NotFoundError when no entities are found. func (nq *NoteQuery) OnlyID(ctx context.Context) (id schema.NoteID, err error) { var ids []schema.NoteID diff --git a/entc/integration/customid/ent/pet_query.go b/entc/integration/customid/ent/pet_query.go index c2ab69fc8..e4bf274e9 100644 --- a/entc/integration/customid/ent/pet_query.go +++ b/entc/integration/customid/ent/pet_query.go @@ -207,7 +207,7 @@ func (pq *PetQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Pet entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Pet entity is not found. +// Returns a *NotSingularError when more than one Pet entity is found. // Returns a *NotFoundError when no Pet entities are found. func (pq *PetQuery) Only(ctx context.Context) (*Pet, error) { nodes, err := pq.Limit(2).All(ctx) @@ -234,7 +234,7 @@ func (pq *PetQuery) OnlyX(ctx context.Context) *Pet { } // OnlyID is like Only, but returns the only Pet ID in the query. -// Returns a *NotSingularError when exactly one Pet ID is not found. +// Returns a *NotSingularError when more than one Pet ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PetQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/customid/ent/session_query.go b/entc/integration/customid/ent/session_query.go index 5136c7469..6c25d85c2 100644 --- a/entc/integration/customid/ent/session_query.go +++ b/entc/integration/customid/ent/session_query.go @@ -137,7 +137,7 @@ func (sq *SessionQuery) FirstIDX(ctx context.Context) schema.ID { } // Only returns a single Session entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Session entity is not found. +// Returns a *NotSingularError when more than one Session entity is found. // Returns a *NotFoundError when no Session entities are found. func (sq *SessionQuery) Only(ctx context.Context) (*Session, error) { nodes, err := sq.Limit(2).All(ctx) @@ -164,7 +164,7 @@ func (sq *SessionQuery) OnlyX(ctx context.Context) *Session { } // OnlyID is like Only, but returns the only Session ID in the query. -// Returns a *NotSingularError when exactly one Session ID is not found. +// Returns a *NotSingularError when more than one Session ID is found. // Returns a *NotFoundError when no entities are found. func (sq *SessionQuery) OnlyID(ctx context.Context) (id schema.ID, err error) { var ids []schema.ID diff --git a/entc/integration/customid/ent/user_query.go b/entc/integration/customid/ent/user_query.go index ef778afa2..cfe253c23 100644 --- a/entc/integration/customid/ent/user_query.go +++ b/entc/integration/customid/ent/user_query.go @@ -207,7 +207,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -234,7 +234,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/edgefield/ent/car_query.go b/entc/integration/edgefield/ent/car_query.go index a4ba9c750..9483a02a4 100644 --- a/entc/integration/edgefield/ent/car_query.go +++ b/entc/integration/edgefield/ent/car_query.go @@ -137,7 +137,7 @@ func (cq *CarQuery) FirstIDX(ctx context.Context) uuid.UUID { } // Only returns a single Car entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Car entity is not found. +// Returns a *NotSingularError when more than one Car entity is found. // Returns a *NotFoundError when no Car entities are found. func (cq *CarQuery) Only(ctx context.Context) (*Car, error) { nodes, err := cq.Limit(2).All(ctx) @@ -164,7 +164,7 @@ func (cq *CarQuery) OnlyX(ctx context.Context) *Car { } // OnlyID is like Only, but returns the only Car ID in the query. -// Returns a *NotSingularError when exactly one Car ID is not found. +// Returns a *NotSingularError when more than one Car ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CarQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error) { var ids []uuid.UUID diff --git a/entc/integration/edgefield/ent/card_query.go b/entc/integration/edgefield/ent/card_query.go index eb849f63c..a3393ee63 100644 --- a/entc/integration/edgefield/ent/card_query.go +++ b/entc/integration/edgefield/ent/card_query.go @@ -135,7 +135,7 @@ func (cq *CardQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Card entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Card entity is not found. +// Returns a *NotSingularError when more than one Card entity is found. // Returns a *NotFoundError when no Card entities are found. func (cq *CardQuery) Only(ctx context.Context) (*Card, error) { nodes, err := cq.Limit(2).All(ctx) @@ -162,7 +162,7 @@ func (cq *CardQuery) OnlyX(ctx context.Context) *Card { } // OnlyID is like Only, but returns the only Card ID in the query. -// Returns a *NotSingularError when exactly one Card ID is not found. +// Returns a *NotSingularError when more than one Card ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CardQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/edgefield/ent/info_query.go b/entc/integration/edgefield/ent/info_query.go index 526dbc07d..8f8f028c7 100644 --- a/entc/integration/edgefield/ent/info_query.go +++ b/entc/integration/edgefield/ent/info_query.go @@ -135,7 +135,7 @@ func (iq *InfoQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Info entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Info entity is not found. +// Returns a *NotSingularError when more than one Info entity is found. // Returns a *NotFoundError when no Info entities are found. func (iq *InfoQuery) Only(ctx context.Context) (*Info, error) { nodes, err := iq.Limit(2).All(ctx) @@ -162,7 +162,7 @@ func (iq *InfoQuery) OnlyX(ctx context.Context) *Info { } // OnlyID is like Only, but returns the only Info ID in the query. -// Returns a *NotSingularError when exactly one Info ID is not found. +// Returns a *NotSingularError when more than one Info ID is found. // Returns a *NotFoundError when no entities are found. func (iq *InfoQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/edgefield/ent/metadata_query.go b/entc/integration/edgefield/ent/metadata_query.go index 4da1afc16..ca7a17b09 100644 --- a/entc/integration/edgefield/ent/metadata_query.go +++ b/entc/integration/edgefield/ent/metadata_query.go @@ -182,7 +182,7 @@ func (mq *MetadataQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Metadata entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Metadata entity is not found. +// Returns a *NotSingularError when more than one Metadata entity is found. // Returns a *NotFoundError when no Metadata entities are found. func (mq *MetadataQuery) Only(ctx context.Context) (*Metadata, error) { nodes, err := mq.Limit(2).All(ctx) @@ -209,7 +209,7 @@ func (mq *MetadataQuery) OnlyX(ctx context.Context) *Metadata { } // OnlyID is like Only, but returns the only Metadata ID in the query. -// Returns a *NotSingularError when exactly one Metadata ID is not found. +// Returns a *NotSingularError when more than one Metadata ID is found. // Returns a *NotFoundError when no entities are found. func (mq *MetadataQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/edgefield/ent/node_query.go b/entc/integration/edgefield/ent/node_query.go index ffa74b07c..5027dd8ab 100644 --- a/entc/integration/edgefield/ent/node_query.go +++ b/entc/integration/edgefield/ent/node_query.go @@ -158,7 +158,7 @@ func (nq *NodeQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Node entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Node entity is not found. +// Returns a *NotSingularError when more than one Node entity is found. // Returns a *NotFoundError when no Node entities are found. func (nq *NodeQuery) Only(ctx context.Context) (*Node, error) { nodes, err := nq.Limit(2).All(ctx) @@ -185,7 +185,7 @@ func (nq *NodeQuery) OnlyX(ctx context.Context) *Node { } // OnlyID is like Only, but returns the only Node ID in the query. -// Returns a *NotSingularError when exactly one Node ID is not found. +// Returns a *NotSingularError when more than one Node ID is found. // Returns a *NotFoundError when no entities are found. func (nq *NodeQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/edgefield/ent/pet_query.go b/entc/integration/edgefield/ent/pet_query.go index bb2ac7c44..a9b3c553a 100644 --- a/entc/integration/edgefield/ent/pet_query.go +++ b/entc/integration/edgefield/ent/pet_query.go @@ -135,7 +135,7 @@ func (pq *PetQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Pet entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Pet entity is not found. +// Returns a *NotSingularError when more than one Pet entity is found. // Returns a *NotFoundError when no Pet entities are found. func (pq *PetQuery) Only(ctx context.Context) (*Pet, error) { nodes, err := pq.Limit(2).All(ctx) @@ -162,7 +162,7 @@ func (pq *PetQuery) OnlyX(ctx context.Context) *Pet { } // OnlyID is like Only, but returns the only Pet ID in the query. -// Returns a *NotSingularError when exactly one Pet ID is not found. +// Returns a *NotSingularError when more than one Pet ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/edgefield/ent/post_query.go b/entc/integration/edgefield/ent/post_query.go index 65d84004e..1bd8d3d28 100644 --- a/entc/integration/edgefield/ent/post_query.go +++ b/entc/integration/edgefield/ent/post_query.go @@ -135,7 +135,7 @@ func (pq *PostQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Post entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Post entity is not found. +// Returns a *NotSingularError when more than one Post entity is found. // Returns a *NotFoundError when no Post entities are found. func (pq *PostQuery) Only(ctx context.Context) (*Post, error) { nodes, err := pq.Limit(2).All(ctx) @@ -162,7 +162,7 @@ func (pq *PostQuery) OnlyX(ctx context.Context) *Post { } // OnlyID is like Only, but returns the only Post ID in the query. -// Returns a *NotSingularError when exactly one Post ID is not found. +// Returns a *NotSingularError when more than one Post ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PostQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/edgefield/ent/rental_query.go b/entc/integration/edgefield/ent/rental_query.go index 2d20fa18e..6f94c20e5 100644 --- a/entc/integration/edgefield/ent/rental_query.go +++ b/entc/integration/edgefield/ent/rental_query.go @@ -160,7 +160,7 @@ func (rq *RentalQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Rental entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Rental entity is not found. +// Returns a *NotSingularError when more than one Rental entity is found. // Returns a *NotFoundError when no Rental entities are found. func (rq *RentalQuery) Only(ctx context.Context) (*Rental, error) { nodes, err := rq.Limit(2).All(ctx) @@ -187,7 +187,7 @@ func (rq *RentalQuery) OnlyX(ctx context.Context) *Rental { } // OnlyID is like Only, but returns the only Rental ID in the query. -// Returns a *NotSingularError when exactly one Rental ID is not found. +// Returns a *NotSingularError when more than one Rental ID is found. // Returns a *NotFoundError when no entities are found. func (rq *RentalQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/edgefield/ent/user_query.go b/entc/integration/edgefield/ent/user_query.go index 0e6cfcd0e..5e8e6a1f2 100644 --- a/entc/integration/edgefield/ent/user_query.go +++ b/entc/integration/edgefield/ent/user_query.go @@ -301,7 +301,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -328,7 +328,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/card_query.go b/entc/integration/ent/card_query.go index 100597664..6208a8fc2 100644 --- a/entc/integration/ent/card_query.go +++ b/entc/integration/ent/card_query.go @@ -163,7 +163,7 @@ func (cq *CardQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Card entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Card entity is not found. +// Returns a *NotSingularError when more than one Card entity is found. // Returns a *NotFoundError when no Card entities are found. func (cq *CardQuery) Only(ctx context.Context) (*Card, error) { nodes, err := cq.Limit(2).All(ctx) @@ -190,7 +190,7 @@ func (cq *CardQuery) OnlyX(ctx context.Context) *Card { } // OnlyID is like Only, but returns the only Card ID in the query. -// Returns a *NotSingularError when exactly one Card ID is not found. +// Returns a *NotSingularError when more than one Card ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CardQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/comment_query.go b/entc/integration/ent/comment_query.go index 35c29b8f3..766321df8 100644 --- a/entc/integration/ent/comment_query.go +++ b/entc/integration/ent/comment_query.go @@ -112,7 +112,7 @@ func (cq *CommentQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Comment entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Comment entity is not found. +// Returns a *NotSingularError when more than one Comment entity is found. // Returns a *NotFoundError when no Comment entities are found. func (cq *CommentQuery) Only(ctx context.Context) (*Comment, error) { nodes, err := cq.Limit(2).All(ctx) @@ -139,7 +139,7 @@ func (cq *CommentQuery) OnlyX(ctx context.Context) *Comment { } // OnlyID is like Only, but returns the only Comment ID in the query. -// Returns a *NotSingularError when exactly one Comment ID is not found. +// Returns a *NotSingularError when more than one Comment ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CommentQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/fieldtype_query.go b/entc/integration/ent/fieldtype_query.go index b200ab669..ef88644fe 100644 --- a/entc/integration/ent/fieldtype_query.go +++ b/entc/integration/ent/fieldtype_query.go @@ -113,7 +113,7 @@ func (ftq *FieldTypeQuery) FirstIDX(ctx context.Context) int { } // Only returns a single FieldType entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one FieldType entity is not found. +// Returns a *NotSingularError when more than one FieldType entity is found. // Returns a *NotFoundError when no FieldType entities are found. func (ftq *FieldTypeQuery) Only(ctx context.Context) (*FieldType, error) { nodes, err := ftq.Limit(2).All(ctx) @@ -140,7 +140,7 @@ func (ftq *FieldTypeQuery) OnlyX(ctx context.Context) *FieldType { } // OnlyID is like Only, but returns the only FieldType ID in the query. -// Returns a *NotSingularError when exactly one FieldType ID is not found. +// Returns a *NotSingularError when more than one FieldType ID is found. // Returns a *NotFoundError when no entities are found. func (ftq *FieldTypeQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/file_query.go b/entc/integration/ent/file_query.go index 4118658cb..f0f490854 100644 --- a/entc/integration/ent/file_query.go +++ b/entc/integration/ent/file_query.go @@ -187,7 +187,7 @@ func (fq *FileQuery) FirstIDX(ctx context.Context) int { } // Only returns a single File entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one File entity is not found. +// Returns a *NotSingularError when more than one File entity is found. // Returns a *NotFoundError when no File entities are found. func (fq *FileQuery) Only(ctx context.Context) (*File, error) { nodes, err := fq.Limit(2).All(ctx) @@ -214,7 +214,7 @@ func (fq *FileQuery) OnlyX(ctx context.Context) *File { } // OnlyID is like Only, but returns the only File ID in the query. -// Returns a *NotSingularError when exactly one File ID is not found. +// Returns a *NotSingularError when more than one File ID is found. // Returns a *NotFoundError when no entities are found. func (fq *FileQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/filetype_query.go b/entc/integration/ent/filetype_query.go index f0f234a69..2ec8c8c0f 100644 --- a/entc/integration/ent/filetype_query.go +++ b/entc/integration/ent/filetype_query.go @@ -138,7 +138,7 @@ func (ftq *FileTypeQuery) FirstIDX(ctx context.Context) int { } // Only returns a single FileType entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one FileType entity is not found. +// Returns a *NotSingularError when more than one FileType entity is found. // Returns a *NotFoundError when no FileType entities are found. func (ftq *FileTypeQuery) Only(ctx context.Context) (*FileType, error) { nodes, err := ftq.Limit(2).All(ctx) @@ -165,7 +165,7 @@ func (ftq *FileTypeQuery) OnlyX(ctx context.Context) *FileType { } // OnlyID is like Only, but returns the only FileType ID in the query. -// Returns a *NotSingularError when exactly one FileType ID is not found. +// Returns a *NotSingularError when more than one FileType ID is found. // Returns a *NotFoundError when no entities are found. func (ftq *FileTypeQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/goods_query.go b/entc/integration/ent/goods_query.go index a5340f481..66a910866 100644 --- a/entc/integration/ent/goods_query.go +++ b/entc/integration/ent/goods_query.go @@ -112,7 +112,7 @@ func (gq *GoodsQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Goods entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Goods entity is not found. +// Returns a *NotSingularError when more than one Goods entity is found. // Returns a *NotFoundError when no Goods entities are found. func (gq *GoodsQuery) Only(ctx context.Context) (*Goods, error) { nodes, err := gq.Limit(2).All(ctx) @@ -139,7 +139,7 @@ func (gq *GoodsQuery) OnlyX(ctx context.Context) *Goods { } // OnlyID is like Only, but returns the only Goods ID in the query. -// Returns a *NotSingularError when exactly one Goods ID is not found. +// Returns a *NotSingularError when more than one Goods ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GoodsQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/group_query.go b/entc/integration/ent/group_query.go index f36292456..1d973b828 100644 --- a/entc/integration/ent/group_query.go +++ b/entc/integration/ent/group_query.go @@ -210,7 +210,7 @@ func (gq *GroupQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Group entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Group entity is not found. +// Returns a *NotSingularError when more than one Group entity is found. // Returns a *NotFoundError when no Group entities are found. func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) { nodes, err := gq.Limit(2).All(ctx) @@ -237,7 +237,7 @@ func (gq *GroupQuery) OnlyX(ctx context.Context) *Group { } // OnlyID is like Only, but returns the only Group ID in the query. -// Returns a *NotSingularError when exactly one Group ID is not found. +// Returns a *NotSingularError when more than one Group ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/groupinfo_query.go b/entc/integration/ent/groupinfo_query.go index 553acb675..6a834afcc 100644 --- a/entc/integration/ent/groupinfo_query.go +++ b/entc/integration/ent/groupinfo_query.go @@ -138,7 +138,7 @@ func (giq *GroupInfoQuery) FirstIDX(ctx context.Context) int { } // Only returns a single GroupInfo entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one GroupInfo entity is not found. +// Returns a *NotSingularError when more than one GroupInfo entity is found. // Returns a *NotFoundError when no GroupInfo entities are found. func (giq *GroupInfoQuery) Only(ctx context.Context) (*GroupInfo, error) { nodes, err := giq.Limit(2).All(ctx) @@ -165,7 +165,7 @@ func (giq *GroupInfoQuery) OnlyX(ctx context.Context) *GroupInfo { } // OnlyID is like Only, but returns the only GroupInfo ID in the query. -// Returns a *NotSingularError when exactly one GroupInfo ID is not found. +// Returns a *NotSingularError when more than one GroupInfo ID is found. // Returns a *NotFoundError when no entities are found. func (giq *GroupInfoQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/item_query.go b/entc/integration/ent/item_query.go index 117731fef..8a99b5757 100644 --- a/entc/integration/ent/item_query.go +++ b/entc/integration/ent/item_query.go @@ -112,7 +112,7 @@ func (iq *ItemQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Item entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Item entity is not found. +// Returns a *NotSingularError when more than one Item entity is found. // Returns a *NotFoundError when no Item entities are found. func (iq *ItemQuery) Only(ctx context.Context) (*Item, error) { nodes, err := iq.Limit(2).All(ctx) @@ -139,7 +139,7 @@ func (iq *ItemQuery) OnlyX(ctx context.Context) *Item { } // OnlyID is like Only, but returns the only Item ID in the query. -// Returns a *NotSingularError when exactly one Item ID is not found. +// Returns a *NotSingularError when more than one Item ID is found. // Returns a *NotFoundError when no entities are found. func (iq *ItemQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/ent/node_query.go b/entc/integration/ent/node_query.go index 72dbe2047..97e432f99 100644 --- a/entc/integration/ent/node_query.go +++ b/entc/integration/ent/node_query.go @@ -161,7 +161,7 @@ func (nq *NodeQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Node entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Node entity is not found. +// Returns a *NotSingularError when more than one Node entity is found. // Returns a *NotFoundError when no Node entities are found. func (nq *NodeQuery) Only(ctx context.Context) (*Node, error) { nodes, err := nq.Limit(2).All(ctx) @@ -188,7 +188,7 @@ func (nq *NodeQuery) OnlyX(ctx context.Context) *Node { } // OnlyID is like Only, but returns the only Node ID in the query. -// Returns a *NotSingularError when exactly one Node ID is not found. +// Returns a *NotSingularError when more than one Node ID is found. // Returns a *NotFoundError when no entities are found. func (nq *NodeQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/pet_query.go b/entc/integration/ent/pet_query.go index f3f4788cd..b2a34f50b 100644 --- a/entc/integration/ent/pet_query.go +++ b/entc/integration/ent/pet_query.go @@ -161,7 +161,7 @@ func (pq *PetQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Pet entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Pet entity is not found. +// Returns a *NotSingularError when more than one Pet entity is found. // Returns a *NotFoundError when no Pet entities are found. func (pq *PetQuery) Only(ctx context.Context) (*Pet, error) { nodes, err := pq.Limit(2).All(ctx) @@ -188,7 +188,7 @@ func (pq *PetQuery) OnlyX(ctx context.Context) *Pet { } // OnlyID is like Only, but returns the only Pet ID in the query. -// Returns a *NotSingularError when exactly one Pet ID is not found. +// Returns a *NotSingularError when more than one Pet ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/spec_query.go b/entc/integration/ent/spec_query.go index 3295499c2..054fe2522 100644 --- a/entc/integration/ent/spec_query.go +++ b/entc/integration/ent/spec_query.go @@ -138,7 +138,7 @@ func (sq *SpecQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Spec entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Spec entity is not found. +// Returns a *NotSingularError when more than one Spec entity is found. // Returns a *NotFoundError when no Spec entities are found. func (sq *SpecQuery) Only(ctx context.Context) (*Spec, error) { nodes, err := sq.Limit(2).All(ctx) @@ -165,7 +165,7 @@ func (sq *SpecQuery) OnlyX(ctx context.Context) *Spec { } // OnlyID is like Only, but returns the only Spec ID in the query. -// Returns a *NotSingularError when exactly one Spec ID is not found. +// Returns a *NotSingularError when more than one Spec ID is found. // Returns a *NotFoundError when no entities are found. func (sq *SpecQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/task_query.go b/entc/integration/ent/task_query.go index 5148dc79d..4c1f73ba6 100644 --- a/entc/integration/ent/task_query.go +++ b/entc/integration/ent/task_query.go @@ -112,7 +112,7 @@ func (tq *TaskQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Task entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Task entity is not found. +// Returns a *NotSingularError when more than one Task entity is found. // Returns a *NotFoundError when no Task entities are found. func (tq *TaskQuery) Only(ctx context.Context) (*Task, error) { nodes, err := tq.Limit(2).All(ctx) @@ -139,7 +139,7 @@ func (tq *TaskQuery) OnlyX(ctx context.Context) *Task { } // OnlyID is like Only, but returns the only Task ID in the query. -// Returns a *NotSingularError when exactly one Task ID is not found. +// Returns a *NotSingularError when more than one Task ID is found. // Returns a *NotFoundError when no entities are found. func (tq *TaskQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/ent/user_query.go b/entc/integration/ent/user_query.go index b6672126a..8401e0bf5 100644 --- a/entc/integration/ent/user_query.go +++ b/entc/integration/ent/user_query.go @@ -372,7 +372,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -399,7 +399,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/gremlin/ent/card_query.go b/entc/integration/gremlin/ent/card_query.go index b94c2e19f..48ddbd0e1 100644 --- a/entc/integration/gremlin/ent/card_query.go +++ b/entc/integration/gremlin/ent/card_query.go @@ -144,7 +144,7 @@ func (cq *CardQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Card entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Card entity is not found. +// Returns a *NotSingularError when more than one Card entity is found. // Returns a *NotFoundError when no Card entities are found. func (cq *CardQuery) Only(ctx context.Context) (*Card, error) { nodes, err := cq.Limit(2).All(ctx) @@ -171,7 +171,7 @@ func (cq *CardQuery) OnlyX(ctx context.Context) *Card { } // OnlyID is like Only, but returns the only Card ID in the query. -// Returns a *NotSingularError when exactly one Card ID is not found. +// Returns a *NotSingularError when more than one Card ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CardQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/comment_query.go b/entc/integration/gremlin/ent/comment_query.go index 87297bf79..e75e7470a 100644 --- a/entc/integration/gremlin/ent/comment_query.go +++ b/entc/integration/gremlin/ent/comment_query.go @@ -111,7 +111,7 @@ func (cq *CommentQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Comment entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Comment entity is not found. +// Returns a *NotSingularError when more than one Comment entity is found. // Returns a *NotFoundError when no Comment entities are found. func (cq *CommentQuery) Only(ctx context.Context) (*Comment, error) { nodes, err := cq.Limit(2).All(ctx) @@ -138,7 +138,7 @@ func (cq *CommentQuery) OnlyX(ctx context.Context) *Comment { } // OnlyID is like Only, but returns the only Comment ID in the query. -// Returns a *NotSingularError when exactly one Comment ID is not found. +// Returns a *NotSingularError when more than one Comment ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CommentQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/fieldtype_query.go b/entc/integration/gremlin/ent/fieldtype_query.go index d8b114d3d..11c8fa664 100644 --- a/entc/integration/gremlin/ent/fieldtype_query.go +++ b/entc/integration/gremlin/ent/fieldtype_query.go @@ -111,7 +111,7 @@ func (ftq *FieldTypeQuery) FirstIDX(ctx context.Context) string { } // Only returns a single FieldType entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one FieldType entity is not found. +// Returns a *NotSingularError when more than one FieldType entity is found. // Returns a *NotFoundError when no FieldType entities are found. func (ftq *FieldTypeQuery) Only(ctx context.Context) (*FieldType, error) { nodes, err := ftq.Limit(2).All(ctx) @@ -138,7 +138,7 @@ func (ftq *FieldTypeQuery) OnlyX(ctx context.Context) *FieldType { } // OnlyID is like Only, but returns the only FieldType ID in the query. -// Returns a *NotSingularError when exactly one FieldType ID is not found. +// Returns a *NotSingularError when more than one FieldType ID is found. // Returns a *NotFoundError when no entities are found. func (ftq *FieldTypeQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/file_query.go b/entc/integration/gremlin/ent/file_query.go index dabdfce79..3af2c30e6 100644 --- a/entc/integration/gremlin/ent/file_query.go +++ b/entc/integration/gremlin/ent/file_query.go @@ -159,7 +159,7 @@ func (fq *FileQuery) FirstIDX(ctx context.Context) string { } // Only returns a single File entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one File entity is not found. +// Returns a *NotSingularError when more than one File entity is found. // Returns a *NotFoundError when no File entities are found. func (fq *FileQuery) Only(ctx context.Context) (*File, error) { nodes, err := fq.Limit(2).All(ctx) @@ -186,7 +186,7 @@ func (fq *FileQuery) OnlyX(ctx context.Context) *File { } // OnlyID is like Only, but returns the only File ID in the query. -// Returns a *NotSingularError when exactly one File ID is not found. +// Returns a *NotSingularError when more than one File ID is found. // Returns a *NotFoundError when no entities are found. func (fq *FileQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/filetype_query.go b/entc/integration/gremlin/ent/filetype_query.go index fa42b6ede..6499f7aed 100644 --- a/entc/integration/gremlin/ent/filetype_query.go +++ b/entc/integration/gremlin/ent/filetype_query.go @@ -127,7 +127,7 @@ func (ftq *FileTypeQuery) FirstIDX(ctx context.Context) string { } // Only returns a single FileType entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one FileType entity is not found. +// Returns a *NotSingularError when more than one FileType entity is found. // Returns a *NotFoundError when no FileType entities are found. func (ftq *FileTypeQuery) Only(ctx context.Context) (*FileType, error) { nodes, err := ftq.Limit(2).All(ctx) @@ -154,7 +154,7 @@ func (ftq *FileTypeQuery) OnlyX(ctx context.Context) *FileType { } // OnlyID is like Only, but returns the only FileType ID in the query. -// Returns a *NotSingularError when exactly one FileType ID is not found. +// Returns a *NotSingularError when more than one FileType ID is found. // Returns a *NotFoundError when no entities are found. func (ftq *FileTypeQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/goods_query.go b/entc/integration/gremlin/ent/goods_query.go index b19bfeabf..039b7c097 100644 --- a/entc/integration/gremlin/ent/goods_query.go +++ b/entc/integration/gremlin/ent/goods_query.go @@ -111,7 +111,7 @@ func (gq *GoodsQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Goods entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Goods entity is not found. +// Returns a *NotSingularError when more than one Goods entity is found. // Returns a *NotFoundError when no Goods entities are found. func (gq *GoodsQuery) Only(ctx context.Context) (*Goods, error) { nodes, err := gq.Limit(2).All(ctx) @@ -138,7 +138,7 @@ func (gq *GoodsQuery) OnlyX(ctx context.Context) *Goods { } // OnlyID is like Only, but returns the only Goods ID in the query. -// Returns a *NotSingularError when exactly one Goods ID is not found. +// Returns a *NotSingularError when more than one Goods ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GoodsQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/group_query.go b/entc/integration/gremlin/ent/group_query.go index 9fc42a523..8f2e97317 100644 --- a/entc/integration/gremlin/ent/group_query.go +++ b/entc/integration/gremlin/ent/group_query.go @@ -173,7 +173,7 @@ func (gq *GroupQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Group entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Group entity is not found. +// Returns a *NotSingularError when more than one Group entity is found. // Returns a *NotFoundError when no Group entities are found. func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) { nodes, err := gq.Limit(2).All(ctx) @@ -200,7 +200,7 @@ func (gq *GroupQuery) OnlyX(ctx context.Context) *Group { } // OnlyID is like Only, but returns the only Group ID in the query. -// Returns a *NotSingularError when exactly one Group ID is not found. +// Returns a *NotSingularError when more than one Group ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GroupQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/groupinfo_query.go b/entc/integration/gremlin/ent/groupinfo_query.go index 417e1123b..13914bb52 100644 --- a/entc/integration/gremlin/ent/groupinfo_query.go +++ b/entc/integration/gremlin/ent/groupinfo_query.go @@ -128,7 +128,7 @@ func (giq *GroupInfoQuery) FirstIDX(ctx context.Context) string { } // Only returns a single GroupInfo entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one GroupInfo entity is not found. +// Returns a *NotSingularError when more than one GroupInfo entity is found. // Returns a *NotFoundError when no GroupInfo entities are found. func (giq *GroupInfoQuery) Only(ctx context.Context) (*GroupInfo, error) { nodes, err := giq.Limit(2).All(ctx) @@ -155,7 +155,7 @@ func (giq *GroupInfoQuery) OnlyX(ctx context.Context) *GroupInfo { } // OnlyID is like Only, but returns the only GroupInfo ID in the query. -// Returns a *NotSingularError when exactly one GroupInfo ID is not found. +// Returns a *NotSingularError when more than one GroupInfo ID is found. // Returns a *NotFoundError when no entities are found. func (giq *GroupInfoQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/item_query.go b/entc/integration/gremlin/ent/item_query.go index 0bec8da24..f42b06975 100644 --- a/entc/integration/gremlin/ent/item_query.go +++ b/entc/integration/gremlin/ent/item_query.go @@ -111,7 +111,7 @@ func (iq *ItemQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Item entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Item entity is not found. +// Returns a *NotSingularError when more than one Item entity is found. // Returns a *NotFoundError when no Item entities are found. func (iq *ItemQuery) Only(ctx context.Context) (*Item, error) { nodes, err := iq.Limit(2).All(ctx) @@ -138,7 +138,7 @@ func (iq *ItemQuery) OnlyX(ctx context.Context) *Item { } // OnlyID is like Only, but returns the only Item ID in the query. -// Returns a *NotSingularError when exactly one Item ID is not found. +// Returns a *NotSingularError when more than one Item ID is found. // Returns a *NotFoundError when no entities are found. func (iq *ItemQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/node_query.go b/entc/integration/gremlin/ent/node_query.go index 011395b6a..8355b2bcb 100644 --- a/entc/integration/gremlin/ent/node_query.go +++ b/entc/integration/gremlin/ent/node_query.go @@ -142,7 +142,7 @@ func (nq *NodeQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Node entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Node entity is not found. +// Returns a *NotSingularError when more than one Node entity is found. // Returns a *NotFoundError when no Node entities are found. func (nq *NodeQuery) Only(ctx context.Context) (*Node, error) { nodes, err := nq.Limit(2).All(ctx) @@ -169,7 +169,7 @@ func (nq *NodeQuery) OnlyX(ctx context.Context) *Node { } // OnlyID is like Only, but returns the only Node ID in the query. -// Returns a *NotSingularError when exactly one Node ID is not found. +// Returns a *NotSingularError when more than one Node ID is found. // Returns a *NotFoundError when no entities are found. func (nq *NodeQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/pet_query.go b/entc/integration/gremlin/ent/pet_query.go index 5b67eac4e..5017f3001 100644 --- a/entc/integration/gremlin/ent/pet_query.go +++ b/entc/integration/gremlin/ent/pet_query.go @@ -143,7 +143,7 @@ func (pq *PetQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Pet entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Pet entity is not found. +// Returns a *NotSingularError when more than one Pet entity is found. // Returns a *NotFoundError when no Pet entities are found. func (pq *PetQuery) Only(ctx context.Context) (*Pet, error) { nodes, err := pq.Limit(2).All(ctx) @@ -170,7 +170,7 @@ func (pq *PetQuery) OnlyX(ctx context.Context) *Pet { } // OnlyID is like Only, but returns the only Pet ID in the query. -// Returns a *NotSingularError when exactly one Pet ID is not found. +// Returns a *NotSingularError when more than one Pet ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PetQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/spec_query.go b/entc/integration/gremlin/ent/spec_query.go index cafda067e..b0aa1e438 100644 --- a/entc/integration/gremlin/ent/spec_query.go +++ b/entc/integration/gremlin/ent/spec_query.go @@ -127,7 +127,7 @@ func (sq *SpecQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Spec entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Spec entity is not found. +// Returns a *NotSingularError when more than one Spec entity is found. // Returns a *NotFoundError when no Spec entities are found. func (sq *SpecQuery) Only(ctx context.Context) (*Spec, error) { nodes, err := sq.Limit(2).All(ctx) @@ -154,7 +154,7 @@ func (sq *SpecQuery) OnlyX(ctx context.Context) *Spec { } // OnlyID is like Only, but returns the only Spec ID in the query. -// Returns a *NotSingularError when exactly one Spec ID is not found. +// Returns a *NotSingularError when more than one Spec ID is found. // Returns a *NotFoundError when no entities are found. func (sq *SpecQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/task_query.go b/entc/integration/gremlin/ent/task_query.go index 27664a39e..240e84552 100644 --- a/entc/integration/gremlin/ent/task_query.go +++ b/entc/integration/gremlin/ent/task_query.go @@ -111,7 +111,7 @@ func (tq *TaskQuery) FirstIDX(ctx context.Context) string { } // Only returns a single Task entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Task entity is not found. +// Returns a *NotSingularError when more than one Task entity is found. // Returns a *NotFoundError when no Task entities are found. func (tq *TaskQuery) Only(ctx context.Context) (*Task, error) { nodes, err := tq.Limit(2).All(ctx) @@ -138,7 +138,7 @@ func (tq *TaskQuery) OnlyX(ctx context.Context) *Task { } // OnlyID is like Only, but returns the only Task ID in the query. -// Returns a *NotSingularError when exactly one Task ID is not found. +// Returns a *NotSingularError when more than one Task ID is found. // Returns a *NotFoundError when no entities are found. func (tq *TaskQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/gremlin/ent/user_query.go b/entc/integration/gremlin/ent/user_query.go index 3b782fd67..f221077ff 100644 --- a/entc/integration/gremlin/ent/user_query.go +++ b/entc/integration/gremlin/ent/user_query.go @@ -277,7 +277,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) string { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -304,7 +304,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id string, err error) { var ids []string diff --git a/entc/integration/hooks/ent/card_query.go b/entc/integration/hooks/ent/card_query.go index b958d9220..edd6dfc60 100644 --- a/entc/integration/hooks/ent/card_query.go +++ b/entc/integration/hooks/ent/card_query.go @@ -136,7 +136,7 @@ func (cq *CardQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Card entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Card entity is not found. +// Returns a *NotSingularError when more than one Card entity is found. // Returns a *NotFoundError when no Card entities are found. func (cq *CardQuery) Only(ctx context.Context) (*Card, error) { nodes, err := cq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (cq *CardQuery) OnlyX(ctx context.Context) *Card { } // OnlyID is like Only, but returns the only Card ID in the query. -// Returns a *NotSingularError when exactly one Card ID is not found. +// Returns a *NotSingularError when more than one Card ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CardQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/hooks/ent/user_query.go b/entc/integration/hooks/ent/user_query.go index 9774ad09d..fc5f899b3 100644 --- a/entc/integration/hooks/ent/user_query.go +++ b/entc/integration/hooks/ent/user_query.go @@ -183,7 +183,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -210,7 +210,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/idtype/ent/user_query.go b/entc/integration/idtype/ent/user_query.go index 1c921ad7c..c65bc0550 100644 --- a/entc/integration/idtype/ent/user_query.go +++ b/entc/integration/idtype/ent/user_query.go @@ -182,7 +182,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) uint64 { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -209,7 +209,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id uint64, err error) { var ids []uint64 diff --git a/entc/integration/json/ent/user_query.go b/entc/integration/json/ent/user_query.go index 3649a3059..738afd8ae 100644 --- a/entc/integration/json/ent/user_query.go +++ b/entc/integration/json/ent/user_query.go @@ -110,7 +110,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv1/car_query.go b/entc/integration/migrate/entv1/car_query.go index bdec7212f..061fe8902 100644 --- a/entc/integration/migrate/entv1/car_query.go +++ b/entc/integration/migrate/entv1/car_query.go @@ -136,7 +136,7 @@ func (cq *CarQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Car entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Car entity is not found. +// Returns a *NotSingularError when more than one Car entity is found. // Returns a *NotFoundError when no Car entities are found. func (cq *CarQuery) Only(ctx context.Context) (*Car, error) { nodes, err := cq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (cq *CarQuery) OnlyX(ctx context.Context) *Car { } // OnlyID is like Only, but returns the only Car ID in the query. -// Returns a *NotSingularError when exactly one Car ID is not found. +// Returns a *NotSingularError when more than one Car ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CarQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv1/conversion_query.go b/entc/integration/migrate/entv1/conversion_query.go index d4643ee39..48f2ad1e5 100644 --- a/entc/integration/migrate/entv1/conversion_query.go +++ b/entc/integration/migrate/entv1/conversion_query.go @@ -110,7 +110,7 @@ func (cq *ConversionQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Conversion entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Conversion entity is not found. +// Returns a *NotSingularError when more than one Conversion entity is found. // Returns a *NotFoundError when no Conversion entities are found. func (cq *ConversionQuery) Only(ctx context.Context) (*Conversion, error) { nodes, err := cq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (cq *ConversionQuery) OnlyX(ctx context.Context) *Conversion { } // OnlyID is like Only, but returns the only Conversion ID in the query. -// Returns a *NotSingularError when exactly one Conversion ID is not found. +// Returns a *NotSingularError when more than one Conversion ID is found. // Returns a *NotFoundError when no entities are found. func (cq *ConversionQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv1/customtype_query.go b/entc/integration/migrate/entv1/customtype_query.go index 7931f7d66..b434d7098 100644 --- a/entc/integration/migrate/entv1/customtype_query.go +++ b/entc/integration/migrate/entv1/customtype_query.go @@ -110,7 +110,7 @@ func (ctq *CustomTypeQuery) FirstIDX(ctx context.Context) int { } // Only returns a single CustomType entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one CustomType entity is not found. +// Returns a *NotSingularError when more than one CustomType entity is found. // Returns a *NotFoundError when no CustomType entities are found. func (ctq *CustomTypeQuery) Only(ctx context.Context) (*CustomType, error) { nodes, err := ctq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (ctq *CustomTypeQuery) OnlyX(ctx context.Context) *CustomType { } // OnlyID is like Only, but returns the only CustomType ID in the query. -// Returns a *NotSingularError when exactly one CustomType ID is not found. +// Returns a *NotSingularError when more than one CustomType ID is found. // Returns a *NotFoundError when no entities are found. func (ctq *CustomTypeQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv1/user_query.go b/entc/integration/migrate/entv1/user_query.go index 8614f410b..0752281a8 100644 --- a/entc/integration/migrate/entv1/user_query.go +++ b/entc/integration/migrate/entv1/user_query.go @@ -206,7 +206,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -233,7 +233,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv2/car_query.go b/entc/integration/migrate/entv2/car_query.go index d4dc7b3c9..50743ba74 100644 --- a/entc/integration/migrate/entv2/car_query.go +++ b/entc/integration/migrate/entv2/car_query.go @@ -136,7 +136,7 @@ func (cq *CarQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Car entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Car entity is not found. +// Returns a *NotSingularError when more than one Car entity is found. // Returns a *NotFoundError when no Car entities are found. func (cq *CarQuery) Only(ctx context.Context) (*Car, error) { nodes, err := cq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (cq *CarQuery) OnlyX(ctx context.Context) *Car { } // OnlyID is like Only, but returns the only Car ID in the query. -// Returns a *NotSingularError when exactly one Car ID is not found. +// Returns a *NotSingularError when more than one Car ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CarQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv2/conversion_query.go b/entc/integration/migrate/entv2/conversion_query.go index 2c0a52fca..11108dd57 100644 --- a/entc/integration/migrate/entv2/conversion_query.go +++ b/entc/integration/migrate/entv2/conversion_query.go @@ -110,7 +110,7 @@ func (cq *ConversionQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Conversion entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Conversion entity is not found. +// Returns a *NotSingularError when more than one Conversion entity is found. // Returns a *NotFoundError when no Conversion entities are found. func (cq *ConversionQuery) Only(ctx context.Context) (*Conversion, error) { nodes, err := cq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (cq *ConversionQuery) OnlyX(ctx context.Context) *Conversion { } // OnlyID is like Only, but returns the only Conversion ID in the query. -// Returns a *NotSingularError when exactly one Conversion ID is not found. +// Returns a *NotSingularError when more than one Conversion ID is found. // Returns a *NotFoundError when no entities are found. func (cq *ConversionQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv2/customtype_query.go b/entc/integration/migrate/entv2/customtype_query.go index a003a81ab..2ae0bc4dc 100644 --- a/entc/integration/migrate/entv2/customtype_query.go +++ b/entc/integration/migrate/entv2/customtype_query.go @@ -110,7 +110,7 @@ func (ctq *CustomTypeQuery) FirstIDX(ctx context.Context) int { } // Only returns a single CustomType entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one CustomType entity is not found. +// Returns a *NotSingularError when more than one CustomType entity is found. // Returns a *NotFoundError when no CustomType entities are found. func (ctq *CustomTypeQuery) Only(ctx context.Context) (*CustomType, error) { nodes, err := ctq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (ctq *CustomTypeQuery) OnlyX(ctx context.Context) *CustomType { } // OnlyID is like Only, but returns the only CustomType ID in the query. -// Returns a *NotSingularError when exactly one CustomType ID is not found. +// Returns a *NotSingularError when more than one CustomType ID is found. // Returns a *NotFoundError when no entities are found. func (ctq *CustomTypeQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv2/group_query.go b/entc/integration/migrate/entv2/group_query.go index fa5e702e7..5b06c71ab 100644 --- a/entc/integration/migrate/entv2/group_query.go +++ b/entc/integration/migrate/entv2/group_query.go @@ -110,7 +110,7 @@ func (gq *GroupQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Group entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Group entity is not found. +// Returns a *NotSingularError when more than one Group entity is found. // Returns a *NotFoundError when no Group entities are found. func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) { nodes, err := gq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (gq *GroupQuery) OnlyX(ctx context.Context) *Group { } // OnlyID is like Only, but returns the only Group ID in the query. -// Returns a *NotSingularError when exactly one Group ID is not found. +// Returns a *NotSingularError when more than one Group ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv2/media_query.go b/entc/integration/migrate/entv2/media_query.go index c483d960d..bda2c3008 100644 --- a/entc/integration/migrate/entv2/media_query.go +++ b/entc/integration/migrate/entv2/media_query.go @@ -110,7 +110,7 @@ func (mq *MediaQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Media entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Media entity is not found. +// Returns a *NotSingularError when more than one Media entity is found. // Returns a *NotFoundError when no Media entities are found. func (mq *MediaQuery) Only(ctx context.Context) (*Media, error) { nodes, err := mq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (mq *MediaQuery) OnlyX(ctx context.Context) *Media { } // OnlyID is like Only, but returns the only Media ID in the query. -// Returns a *NotSingularError when exactly one Media ID is not found. +// Returns a *NotSingularError when more than one Media ID is found. // Returns a *NotFoundError when no entities are found. func (mq *MediaQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv2/pet_query.go b/entc/integration/migrate/entv2/pet_query.go index 3d65c39e9..3a5786774 100644 --- a/entc/integration/migrate/entv2/pet_query.go +++ b/entc/integration/migrate/entv2/pet_query.go @@ -136,7 +136,7 @@ func (pq *PetQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Pet entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Pet entity is not found. +// Returns a *NotSingularError when more than one Pet entity is found. // Returns a *NotFoundError when no Pet entities are found. func (pq *PetQuery) Only(ctx context.Context) (*Pet, error) { nodes, err := pq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (pq *PetQuery) OnlyX(ctx context.Context) *Pet { } // OnlyID is like Only, but returns the only Pet ID in the query. -// Returns a *NotSingularError when exactly one Pet ID is not found. +// Returns a *NotSingularError when more than one Pet ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/migrate/entv2/user_query.go b/entc/integration/migrate/entv2/user_query.go index 50dead9e1..5299b135e 100644 --- a/entc/integration/migrate/entv2/user_query.go +++ b/entc/integration/migrate/entv2/user_query.go @@ -183,7 +183,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -210,7 +210,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/multischema/ent/group_query.go b/entc/integration/multischema/ent/group_query.go index f0a30cb5d..8aceb1aab 100644 --- a/entc/integration/multischema/ent/group_query.go +++ b/entc/integration/multischema/ent/group_query.go @@ -141,7 +141,7 @@ func (gq *GroupQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Group entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Group entity is not found. +// Returns a *NotSingularError when more than one Group entity is found. // Returns a *NotFoundError when no Group entities are found. func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) { nodes, err := gq.Limit(2).All(ctx) @@ -168,7 +168,7 @@ func (gq *GroupQuery) OnlyX(ctx context.Context) *Group { } // OnlyID is like Only, but returns the only Group ID in the query. -// Returns a *NotSingularError when exactly one Group ID is not found. +// Returns a *NotSingularError when more than one Group ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/multischema/ent/pet_query.go b/entc/integration/multischema/ent/pet_query.go index aae19c90c..d4e3bd140 100644 --- a/entc/integration/multischema/ent/pet_query.go +++ b/entc/integration/multischema/ent/pet_query.go @@ -140,7 +140,7 @@ func (pq *PetQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Pet entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Pet entity is not found. +// Returns a *NotSingularError when more than one Pet entity is found. // Returns a *NotFoundError when no Pet entities are found. func (pq *PetQuery) Only(ctx context.Context) (*Pet, error) { nodes, err := pq.Limit(2).All(ctx) @@ -167,7 +167,7 @@ func (pq *PetQuery) OnlyX(ctx context.Context) *Pet { } // OnlyID is like Only, but returns the only Pet ID in the query. -// Returns a *NotSingularError when exactly one Pet ID is not found. +// Returns a *NotSingularError when more than one Pet ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/multischema/ent/user_query.go b/entc/integration/multischema/ent/user_query.go index b860a6a6a..d6c659eeb 100644 --- a/entc/integration/multischema/ent/user_query.go +++ b/entc/integration/multischema/ent/user_query.go @@ -168,7 +168,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -195,7 +195,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/privacy/ent/task_query.go b/entc/integration/privacy/ent/task_query.go index 6c68751a5..cc322c634 100644 --- a/entc/integration/privacy/ent/task_query.go +++ b/entc/integration/privacy/ent/task_query.go @@ -161,7 +161,7 @@ func (tq *TaskQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Task entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Task entity is not found. +// Returns a *NotSingularError when more than one Task entity is found. // Returns a *NotFoundError when no Task entities are found. func (tq *TaskQuery) Only(ctx context.Context) (*Task, error) { nodes, err := tq.Limit(2).All(ctx) @@ -188,7 +188,7 @@ func (tq *TaskQuery) OnlyX(ctx context.Context) *Task { } // OnlyID is like Only, but returns the only Task ID in the query. -// Returns a *NotSingularError when exactly one Task ID is not found. +// Returns a *NotSingularError when more than one Task ID is found. // Returns a *NotFoundError when no entities are found. func (tq *TaskQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/privacy/ent/team_query.go b/entc/integration/privacy/ent/team_query.go index b35607a4c..1efc3c868 100644 --- a/entc/integration/privacy/ent/team_query.go +++ b/entc/integration/privacy/ent/team_query.go @@ -160,7 +160,7 @@ func (tq *TeamQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Team entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Team entity is not found. +// Returns a *NotSingularError when more than one Team entity is found. // Returns a *NotFoundError when no Team entities are found. func (tq *TeamQuery) Only(ctx context.Context) (*Team, error) { nodes, err := tq.Limit(2).All(ctx) @@ -187,7 +187,7 @@ func (tq *TeamQuery) OnlyX(ctx context.Context) *Team { } // OnlyID is like Only, but returns the only Team ID in the query. -// Returns a *NotSingularError when exactly one Team ID is not found. +// Returns a *NotSingularError when more than one Team ID is found. // Returns a *NotFoundError when no entities are found. func (tq *TeamQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/privacy/ent/user_query.go b/entc/integration/privacy/ent/user_query.go index 236cbfb14..86adac55f 100644 --- a/entc/integration/privacy/ent/user_query.go +++ b/entc/integration/privacy/ent/user_query.go @@ -160,7 +160,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -187,7 +187,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/template/ent/group_query.go b/entc/integration/template/ent/group_query.go index 5bc27aefb..128a08113 100644 --- a/entc/integration/template/ent/group_query.go +++ b/entc/integration/template/ent/group_query.go @@ -113,7 +113,7 @@ func (gq *GroupQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Group entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Group entity is not found. +// Returns a *NotSingularError when more than one Group entity is found. // Returns a *NotFoundError when no Group entities are found. func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) { nodes, err := gq.Limit(2).All(ctx) @@ -140,7 +140,7 @@ func (gq *GroupQuery) OnlyX(ctx context.Context) *Group { } // OnlyID is like Only, but returns the only Group ID in the query. -// Returns a *NotSingularError when exactly one Group ID is not found. +// Returns a *NotSingularError when more than one Group ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/template/ent/pet_query.go b/entc/integration/template/ent/pet_query.go index 6c8751fe4..fce7f0301 100644 --- a/entc/integration/template/ent/pet_query.go +++ b/entc/integration/template/ent/pet_query.go @@ -139,7 +139,7 @@ func (pq *PetQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Pet entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Pet entity is not found. +// Returns a *NotSingularError when more than one Pet entity is found. // Returns a *NotFoundError when no Pet entities are found. func (pq *PetQuery) Only(ctx context.Context) (*Pet, error) { nodes, err := pq.Limit(2).All(ctx) @@ -166,7 +166,7 @@ func (pq *PetQuery) OnlyX(ctx context.Context) *Pet { } // OnlyID is like Only, but returns the only Pet ID in the query. -// Returns a *NotSingularError when exactly one Pet ID is not found. +// Returns a *NotSingularError when more than one Pet ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/entc/integration/template/ent/user_query.go b/entc/integration/template/ent/user_query.go index 5e0559f8e..c6ec17900 100644 --- a/entc/integration/template/ent/user_query.go +++ b/entc/integration/template/ent/user_query.go @@ -162,7 +162,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -189,7 +189,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/edgeindex/ent/city_query.go b/examples/edgeindex/ent/city_query.go index f00d66d52..172f4c117 100644 --- a/examples/edgeindex/ent/city_query.go +++ b/examples/edgeindex/ent/city_query.go @@ -136,7 +136,7 @@ func (cq *CityQuery) FirstIDX(ctx context.Context) int { } // Only returns a single City entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one City entity is not found. +// Returns a *NotSingularError when more than one City entity is found. // Returns a *NotFoundError when no City entities are found. func (cq *CityQuery) Only(ctx context.Context) (*City, error) { nodes, err := cq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (cq *CityQuery) OnlyX(ctx context.Context) *City { } // OnlyID is like Only, but returns the only City ID in the query. -// Returns a *NotSingularError when exactly one City ID is not found. +// Returns a *NotSingularError when more than one City ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CityQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/edgeindex/ent/street_query.go b/examples/edgeindex/ent/street_query.go index f83a04c38..23c068b07 100644 --- a/examples/edgeindex/ent/street_query.go +++ b/examples/edgeindex/ent/street_query.go @@ -136,7 +136,7 @@ func (sq *StreetQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Street entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Street entity is not found. +// Returns a *NotSingularError when more than one Street entity is found. // Returns a *NotFoundError when no Street entities are found. func (sq *StreetQuery) Only(ctx context.Context) (*Street, error) { nodes, err := sq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (sq *StreetQuery) OnlyX(ctx context.Context) *Street { } // OnlyID is like Only, but returns the only Street ID in the query. -// Returns a *NotSingularError when exactly one Street ID is not found. +// Returns a *NotSingularError when more than one Street ID is found. // Returns a *NotFoundError when no entities are found. func (sq *StreetQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/entcpkg/ent/user_query.go b/examples/entcpkg/ent/user_query.go index a75d2a8b1..bdc9de67f 100644 --- a/examples/entcpkg/ent/user_query.go +++ b/examples/entcpkg/ent/user_query.go @@ -110,7 +110,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/fs/ent/file_query.go b/examples/fs/ent/file_query.go index 03f88e01c..c9c7c8f31 100644 --- a/examples/fs/ent/file_query.go +++ b/examples/fs/ent/file_query.go @@ -158,7 +158,7 @@ func (fq *FileQuery) FirstIDX(ctx context.Context) int { } // Only returns a single File entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one File entity is not found. +// Returns a *NotSingularError when more than one File entity is found. // Returns a *NotFoundError when no File entities are found. func (fq *FileQuery) Only(ctx context.Context) (*File, error) { nodes, err := fq.Limit(2).All(ctx) @@ -185,7 +185,7 @@ func (fq *FileQuery) OnlyX(ctx context.Context) *File { } // OnlyID is like Only, but returns the only File ID in the query. -// Returns a *NotSingularError when exactly one File ID is not found. +// Returns a *NotSingularError when more than one File ID is found. // Returns a *NotFoundError when no entities are found. func (fq *FileQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/m2m2types/ent/group_query.go b/examples/m2m2types/ent/group_query.go index b0b3e6c6f..391b6c3ad 100644 --- a/examples/m2m2types/ent/group_query.go +++ b/examples/m2m2types/ent/group_query.go @@ -136,7 +136,7 @@ func (gq *GroupQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Group entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Group entity is not found. +// Returns a *NotSingularError when more than one Group entity is found. // Returns a *NotFoundError when no Group entities are found. func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) { nodes, err := gq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (gq *GroupQuery) OnlyX(ctx context.Context) *Group { } // OnlyID is like Only, but returns the only Group ID in the query. -// Returns a *NotSingularError when exactly one Group ID is not found. +// Returns a *NotSingularError when more than one Group ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/m2m2types/ent/user_query.go b/examples/m2m2types/ent/user_query.go index 02242f77d..aeb39a67e 100644 --- a/examples/m2m2types/ent/user_query.go +++ b/examples/m2m2types/ent/user_query.go @@ -136,7 +136,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/m2mbidi/ent/user_query.go b/examples/m2mbidi/ent/user_query.go index 479983256..14391a70f 100644 --- a/examples/m2mbidi/ent/user_query.go +++ b/examples/m2mbidi/ent/user_query.go @@ -135,7 +135,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -162,7 +162,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/m2mrecur/ent/user_query.go b/examples/m2mrecur/ent/user_query.go index 11924dd11..4903da7bb 100644 --- a/examples/m2mrecur/ent/user_query.go +++ b/examples/m2mrecur/ent/user_query.go @@ -158,7 +158,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -185,7 +185,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/o2m2types/ent/pet_query.go b/examples/o2m2types/ent/pet_query.go index 5f08a0ed3..06c5beeef 100644 --- a/examples/o2m2types/ent/pet_query.go +++ b/examples/o2m2types/ent/pet_query.go @@ -136,7 +136,7 @@ func (pq *PetQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Pet entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Pet entity is not found. +// Returns a *NotSingularError when more than one Pet entity is found. // Returns a *NotFoundError when no Pet entities are found. func (pq *PetQuery) Only(ctx context.Context) (*Pet, error) { nodes, err := pq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (pq *PetQuery) OnlyX(ctx context.Context) *Pet { } // OnlyID is like Only, but returns the only Pet ID in the query. -// Returns a *NotSingularError when exactly one Pet ID is not found. +// Returns a *NotSingularError when more than one Pet ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/o2m2types/ent/user_query.go b/examples/o2m2types/ent/user_query.go index b3599c27d..28361e97d 100644 --- a/examples/o2m2types/ent/user_query.go +++ b/examples/o2m2types/ent/user_query.go @@ -136,7 +136,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/o2mrecur/ent/node_query.go b/examples/o2mrecur/ent/node_query.go index 3cb5945a3..a1af262d8 100644 --- a/examples/o2mrecur/ent/node_query.go +++ b/examples/o2mrecur/ent/node_query.go @@ -159,7 +159,7 @@ func (nq *NodeQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Node entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Node entity is not found. +// Returns a *NotSingularError when more than one Node entity is found. // Returns a *NotFoundError when no Node entities are found. func (nq *NodeQuery) Only(ctx context.Context) (*Node, error) { nodes, err := nq.Limit(2).All(ctx) @@ -186,7 +186,7 @@ func (nq *NodeQuery) OnlyX(ctx context.Context) *Node { } // OnlyID is like Only, but returns the only Node ID in the query. -// Returns a *NotSingularError when exactly one Node ID is not found. +// Returns a *NotSingularError when more than one Node ID is found. // Returns a *NotFoundError when no entities are found. func (nq *NodeQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/o2o2types/ent/card_query.go b/examples/o2o2types/ent/card_query.go index fc4951dd0..c7072b2d6 100644 --- a/examples/o2o2types/ent/card_query.go +++ b/examples/o2o2types/ent/card_query.go @@ -136,7 +136,7 @@ func (cq *CardQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Card entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Card entity is not found. +// Returns a *NotSingularError when more than one Card entity is found. // Returns a *NotFoundError when no Card entities are found. func (cq *CardQuery) Only(ctx context.Context) (*Card, error) { nodes, err := cq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (cq *CardQuery) OnlyX(ctx context.Context) *Card { } // OnlyID is like Only, but returns the only Card ID in the query. -// Returns a *NotSingularError when exactly one Card ID is not found. +// Returns a *NotSingularError when more than one Card ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CardQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/o2o2types/ent/user_query.go b/examples/o2o2types/ent/user_query.go index cbf591fbf..c3b5ceb88 100644 --- a/examples/o2o2types/ent/user_query.go +++ b/examples/o2o2types/ent/user_query.go @@ -136,7 +136,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/o2obidi/ent/user_query.go b/examples/o2obidi/ent/user_query.go index b24c823b6..d2f132320 100644 --- a/examples/o2obidi/ent/user_query.go +++ b/examples/o2obidi/ent/user_query.go @@ -135,7 +135,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -162,7 +162,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/o2orecur/ent/node_query.go b/examples/o2orecur/ent/node_query.go index 45906fae6..a328e2d29 100644 --- a/examples/o2orecur/ent/node_query.go +++ b/examples/o2orecur/ent/node_query.go @@ -159,7 +159,7 @@ func (nq *NodeQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Node entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Node entity is not found. +// Returns a *NotSingularError when more than one Node entity is found. // Returns a *NotFoundError when no Node entities are found. func (nq *NodeQuery) Only(ctx context.Context) (*Node, error) { nodes, err := nq.Limit(2).All(ctx) @@ -186,7 +186,7 @@ func (nq *NodeQuery) OnlyX(ctx context.Context) *Node { } // OnlyID is like Only, but returns the only Node ID in the query. -// Returns a *NotSingularError when exactly one Node ID is not found. +// Returns a *NotSingularError when more than one Node ID is found. // Returns a *NotFoundError when no entities are found. func (nq *NodeQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/privacyadmin/ent/user_query.go b/examples/privacyadmin/ent/user_query.go index 7647f291b..8bbee8d73 100644 --- a/examples/privacyadmin/ent/user_query.go +++ b/examples/privacyadmin/ent/user_query.go @@ -110,7 +110,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/privacytenant/ent/group_query.go b/examples/privacytenant/ent/group_query.go index 8ff6dca8e..f5cf62a16 100644 --- a/examples/privacytenant/ent/group_query.go +++ b/examples/privacytenant/ent/group_query.go @@ -161,7 +161,7 @@ func (gq *GroupQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Group entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Group entity is not found. +// Returns a *NotSingularError when more than one Group entity is found. // Returns a *NotFoundError when no Group entities are found. func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) { nodes, err := gq.Limit(2).All(ctx) @@ -188,7 +188,7 @@ func (gq *GroupQuery) OnlyX(ctx context.Context) *Group { } // OnlyID is like Only, but returns the only Group ID in the query. -// Returns a *NotSingularError when exactly one Group ID is not found. +// Returns a *NotSingularError when more than one Group ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/privacytenant/ent/tenant_query.go b/examples/privacytenant/ent/tenant_query.go index ce8be1ac4..6cb1fde39 100644 --- a/examples/privacytenant/ent/tenant_query.go +++ b/examples/privacytenant/ent/tenant_query.go @@ -110,7 +110,7 @@ func (tq *TenantQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Tenant entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Tenant entity is not found. +// Returns a *NotSingularError when more than one Tenant entity is found. // Returns a *NotFoundError when no Tenant entities are found. func (tq *TenantQuery) Only(ctx context.Context) (*Tenant, error) { nodes, err := tq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (tq *TenantQuery) OnlyX(ctx context.Context) *Tenant { } // OnlyID is like Only, but returns the only Tenant ID in the query. -// Returns a *NotSingularError when exactly one Tenant ID is not found. +// Returns a *NotSingularError when more than one Tenant ID is found. // Returns a *NotFoundError when no entities are found. func (tq *TenantQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/privacytenant/ent/user_query.go b/examples/privacytenant/ent/user_query.go index 5258a8c3d..56ed65258 100644 --- a/examples/privacytenant/ent/user_query.go +++ b/examples/privacytenant/ent/user_query.go @@ -161,7 +161,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -188,7 +188,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/start/ent/car_query.go b/examples/start/ent/car_query.go index 7830b2a18..aa10c88e9 100644 --- a/examples/start/ent/car_query.go +++ b/examples/start/ent/car_query.go @@ -136,7 +136,7 @@ func (cq *CarQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Car entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Car entity is not found. +// Returns a *NotSingularError when more than one Car entity is found. // Returns a *NotFoundError when no Car entities are found. func (cq *CarQuery) Only(ctx context.Context) (*Car, error) { nodes, err := cq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (cq *CarQuery) OnlyX(ctx context.Context) *Car { } // OnlyID is like Only, but returns the only Car ID in the query. -// Returns a *NotSingularError when exactly one Car ID is not found. +// Returns a *NotSingularError when more than one Car ID is found. // Returns a *NotFoundError when no entities are found. func (cq *CarQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/start/ent/group_query.go b/examples/start/ent/group_query.go index a91d272f6..ec38319f2 100644 --- a/examples/start/ent/group_query.go +++ b/examples/start/ent/group_query.go @@ -136,7 +136,7 @@ func (gq *GroupQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Group entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Group entity is not found. +// Returns a *NotSingularError when more than one Group entity is found. // Returns a *NotFoundError when no Group entities are found. func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) { nodes, err := gq.Limit(2).All(ctx) @@ -163,7 +163,7 @@ func (gq *GroupQuery) OnlyX(ctx context.Context) *Group { } // OnlyID is like Only, but returns the only Group ID in the query. -// Returns a *NotSingularError when exactly one Group ID is not found. +// Returns a *NotSingularError when more than one Group ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/start/ent/user_query.go b/examples/start/ent/user_query.go index f0d8910b2..8b44894ff 100644 --- a/examples/start/ent/user_query.go +++ b/examples/start/ent/user_query.go @@ -160,7 +160,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -187,7 +187,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/traversal/ent/group_query.go b/examples/traversal/ent/group_query.go index 208107982..5f196cf5d 100644 --- a/examples/traversal/ent/group_query.go +++ b/examples/traversal/ent/group_query.go @@ -160,7 +160,7 @@ func (gq *GroupQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Group entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Group entity is not found. +// Returns a *NotSingularError when more than one Group entity is found. // Returns a *NotFoundError when no Group entities are found. func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) { nodes, err := gq.Limit(2).All(ctx) @@ -187,7 +187,7 @@ func (gq *GroupQuery) OnlyX(ctx context.Context) *Group { } // OnlyID is like Only, but returns the only Group ID in the query. -// Returns a *NotSingularError when exactly one Group ID is not found. +// Returns a *NotSingularError when more than one Group ID is found. // Returns a *NotFoundError when no entities are found. func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/traversal/ent/pet_query.go b/examples/traversal/ent/pet_query.go index 3ef805558..da2516f38 100644 --- a/examples/traversal/ent/pet_query.go +++ b/examples/traversal/ent/pet_query.go @@ -160,7 +160,7 @@ func (pq *PetQuery) FirstIDX(ctx context.Context) int { } // Only returns a single Pet entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one Pet entity is not found. +// Returns a *NotSingularError when more than one Pet entity is found. // Returns a *NotFoundError when no Pet entities are found. func (pq *PetQuery) Only(ctx context.Context) (*Pet, error) { nodes, err := pq.Limit(2).All(ctx) @@ -187,7 +187,7 @@ func (pq *PetQuery) OnlyX(ctx context.Context) *Pet { } // OnlyID is like Only, but returns the only Pet ID in the query. -// Returns a *NotSingularError when exactly one Pet ID is not found. +// Returns a *NotSingularError when more than one Pet ID is found. // Returns a *NotFoundError when no entities are found. func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/traversal/ent/user_query.go b/examples/traversal/ent/user_query.go index 04f75571e..382311e72 100644 --- a/examples/traversal/ent/user_query.go +++ b/examples/traversal/ent/user_query.go @@ -206,7 +206,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -233,7 +233,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int diff --git a/examples/version/ent/user_query.go b/examples/version/ent/user_query.go index 8e286081e..15a4f327f 100644 --- a/examples/version/ent/user_query.go +++ b/examples/version/ent/user_query.go @@ -110,7 +110,7 @@ func (uq *UserQuery) FirstIDX(ctx context.Context) int { } // Only returns a single User entity found by the query, ensuring it only returns one. -// Returns a *NotSingularError when exactly one User entity is not found. +// Returns a *NotSingularError when more than one User entity is found. // Returns a *NotFoundError when no User entities are found. func (uq *UserQuery) Only(ctx context.Context) (*User, error) { nodes, err := uq.Limit(2).All(ctx) @@ -137,7 +137,7 @@ func (uq *UserQuery) OnlyX(ctx context.Context) *User { } // OnlyID is like Only, but returns the only User ID in the query. -// Returns a *NotSingularError when exactly one User ID is not found. +// Returns a *NotSingularError when more than one User ID is found. // Returns a *NotFoundError when no entities are found. func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) { var ids []int