mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
entc/gen: rename FirstXID to FirstIDX (#854)
This commit is contained in:
@@ -90,8 +90,8 @@ func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error) {
|
||||
return ids[0], nil
|
||||
}
|
||||
|
||||
// FirstXID is like FirstID, but panics if an error occurs.
|
||||
func (uq *UserQuery) FirstXID(ctx context.Context) int {
|
||||
// FirstIDX is like FirstID, but panics if an error occurs.
|
||||
func (uq *UserQuery) FirstIDX(ctx context.Context) int {
|
||||
id, err := uq.FirstID(ctx)
|
||||
if err != nil && !IsNotFound(err) {
|
||||
panic(err)
|
||||
|
||||
Reference in New Issue
Block a user