Versions in this module Expand all Collapse all v0 v0.1.7 Apr 6, 2024 v0.1.6 Apr 6, 2024 v0.1.5 Dec 30, 2023 v0.1.4 Dec 28, 2023 v0.1.3 Dec 3, 2023 Changes in this version + const OpCreate + const OpDelete + const OpDeleteOne + const OpUpdate + const OpUpdateOne + const TypeCategory + const TypePet + const TypeUser + var ErrTxStarted = errors.New("pets: cannot start a transaction within a transaction") + func Asc(fields ...string) func(*sql.Selector) + func Desc(fields ...string) func(*sql.Selector) + func IsConstraintError(err error) bool + func IsNotFound(err error) bool + func IsNotLoaded(err error) bool + func IsNotSingular(err error) bool + func IsValidationError(err error) bool + func MaskNotFound(err error) error + func NewContext(parent context.Context, c *Client) context.Context + func NewTxContext(parent context.Context, tx *Tx) context.Context + type AggregateFunc func(*sql.Selector) string + func As(fn AggregateFunc, end string) AggregateFunc + func Count() AggregateFunc + func Max(field string) AggregateFunc + func Mean(field string) AggregateFunc + func Min(field string) AggregateFunc + func Sum(field string) AggregateFunc + type Categories []*Category + type Category struct + Edges CategoryEdges + ID int + Name string + func (c *Category) QueryPets() *PetQuery + func (c *Category) String() string + func (c *Category) Unwrap() *Category + func (c *Category) Update() *CategoryUpdateOne + func (c *Category) Value(name string) (ent.Value, error) + type CategoryClient struct + func NewCategoryClient(c config) *CategoryClient + func (c *CategoryClient) Create() *CategoryCreate + func (c *CategoryClient) CreateBulk(builders ...*CategoryCreate) *CategoryCreateBulk + func (c *CategoryClient) Delete() *CategoryDelete + func (c *CategoryClient) DeleteOne(ca *Category) *CategoryDeleteOne + func (c *CategoryClient) DeleteOneID(id int) *CategoryDeleteOne + func (c *CategoryClient) Get(ctx context.Context, id int) (*Category, error) + func (c *CategoryClient) GetX(ctx context.Context, id int) *Category + func (c *CategoryClient) Hooks() []Hook + func (c *CategoryClient) Intercept(interceptors ...Interceptor) + func (c *CategoryClient) Interceptors() []Interceptor + func (c *CategoryClient) MapCreateBulk(slice any, setFunc func(*CategoryCreate, int)) *CategoryCreateBulk + func (c *CategoryClient) Query() *CategoryQuery + func (c *CategoryClient) QueryPets(ca *Category) *PetQuery + func (c *CategoryClient) Update() *CategoryUpdate + func (c *CategoryClient) UpdateOne(ca *Category) *CategoryUpdateOne + func (c *CategoryClient) UpdateOneID(id int) *CategoryUpdateOne + func (c *CategoryClient) Use(hooks ...Hook) + type CategoryCreate struct + func (cc *CategoryCreate) AddPetIDs(ids ...int) *CategoryCreate + func (cc *CategoryCreate) AddPets(p ...*Pet) *CategoryCreate + func (cc *CategoryCreate) Exec(ctx context.Context) error + func (cc *CategoryCreate) ExecX(ctx context.Context) + func (cc *CategoryCreate) Mutation() *CategoryMutation + func (cc *CategoryCreate) Save(ctx context.Context) (*Category, error) + func (cc *CategoryCreate) SaveX(ctx context.Context) *Category + func (cc *CategoryCreate) SetName(s string) *CategoryCreate + type CategoryCreateBulk struct + func (ccb *CategoryCreateBulk) Exec(ctx context.Context) error + func (ccb *CategoryCreateBulk) ExecX(ctx context.Context) + func (ccb *CategoryCreateBulk) Save(ctx context.Context) ([]*Category, error) + func (ccb *CategoryCreateBulk) SaveX(ctx context.Context) []*Category + type CategoryDelete struct + func (cd *CategoryDelete) Exec(ctx context.Context) (int, error) + func (cd *CategoryDelete) ExecX(ctx context.Context) int + func (cd *CategoryDelete) Where(ps ...predicate.Category) *CategoryDelete + type CategoryDeleteOne struct + func (cdo *CategoryDeleteOne) Exec(ctx context.Context) error + func (cdo *CategoryDeleteOne) ExecX(ctx context.Context) + func (cdo *CategoryDeleteOne) Where(ps ...predicate.Category) *CategoryDeleteOne + type CategoryEdges struct + Pets []*Pet + func (e CategoryEdges) PetsOrErr() ([]*Pet, error) + type CategoryGroupBy struct + func (cgb *CategoryGroupBy) Aggregate(fns ...AggregateFunc) *CategoryGroupBy + func (cgb *CategoryGroupBy) Scan(ctx context.Context, v any) error + func (s *CategoryGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (s *CategoryGroupBy) BoolX(ctx context.Context) bool + func (s *CategoryGroupBy) Bools(ctx context.Context) ([]bool, error) + func (s *CategoryGroupBy) BoolsX(ctx context.Context) []bool + func (s *CategoryGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (s *CategoryGroupBy) Float64X(ctx context.Context) float64 + func (s *CategoryGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (s *CategoryGroupBy) Float64sX(ctx context.Context) []float64 + func (s *CategoryGroupBy) Int(ctx context.Context) (_ int, err error) + func (s *CategoryGroupBy) IntX(ctx context.Context) int + func (s *CategoryGroupBy) Ints(ctx context.Context) ([]int, error) + func (s *CategoryGroupBy) IntsX(ctx context.Context) []int + func (s *CategoryGroupBy) ScanX(ctx context.Context, v any) + func (s *CategoryGroupBy) String(ctx context.Context) (_ string, err error) + func (s *CategoryGroupBy) StringX(ctx context.Context) string + func (s *CategoryGroupBy) Strings(ctx context.Context) ([]string, error) + func (s *CategoryGroupBy) StringsX(ctx context.Context) []string + type CategoryMutation struct + func (m *CategoryMutation) AddField(name string, value ent.Value) error + func (m *CategoryMutation) AddPetIDs(ids ...int) + func (m *CategoryMutation) AddedEdges() []string + func (m *CategoryMutation) AddedField(name string) (ent.Value, bool) + func (m *CategoryMutation) AddedFields() []string + func (m *CategoryMutation) AddedIDs(name string) []ent.Value + func (m *CategoryMutation) ClearEdge(name string) error + func (m *CategoryMutation) ClearField(name string) error + func (m *CategoryMutation) ClearPets() + func (m *CategoryMutation) ClearedEdges() []string + func (m *CategoryMutation) ClearedFields() []string + func (m *CategoryMutation) EdgeCleared(name string) bool + func (m *CategoryMutation) Field(name string) (ent.Value, bool) + func (m *CategoryMutation) FieldCleared(name string) bool + func (m *CategoryMutation) Fields() []string + func (m *CategoryMutation) ID() (id int, exists bool) + func (m *CategoryMutation) IDs(ctx context.Context) ([]int, error) + func (m *CategoryMutation) Name() (r string, exists bool) + func (m *CategoryMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *CategoryMutation) OldName(ctx context.Context) (v string, err error) + func (m *CategoryMutation) Op() Op + func (m *CategoryMutation) PetsCleared() bool + func (m *CategoryMutation) PetsIDs() (ids []int) + func (m *CategoryMutation) RemovePetIDs(ids ...int) + func (m *CategoryMutation) RemovedEdges() []string + func (m *CategoryMutation) RemovedIDs(name string) []ent.Value + func (m *CategoryMutation) RemovedPetsIDs() (ids []int) + func (m *CategoryMutation) ResetEdge(name string) error + func (m *CategoryMutation) ResetField(name string) error + func (m *CategoryMutation) ResetName() + func (m *CategoryMutation) ResetPets() + func (m *CategoryMutation) SetField(name string, value ent.Value) error + func (m *CategoryMutation) SetName(s string) + func (m *CategoryMutation) SetOp(op Op) + func (m *CategoryMutation) Type() string + func (m *CategoryMutation) Where(ps ...predicate.Category) + func (m *CategoryMutation) WhereP(ps ...func(*sql.Selector)) + func (m CategoryMutation) Client() *Client + func (m CategoryMutation) Tx() (*Tx, error) + type CategoryQuery struct + func (cq *CategoryQuery) Aggregate(fns ...AggregateFunc) *CategorySelect + func (cq *CategoryQuery) All(ctx context.Context) ([]*Category, error) + func (cq *CategoryQuery) AllX(ctx context.Context) []*Category + func (cq *CategoryQuery) Clone() *CategoryQuery + func (cq *CategoryQuery) Count(ctx context.Context) (int, error) + func (cq *CategoryQuery) CountX(ctx context.Context) int + func (cq *CategoryQuery) Exist(ctx context.Context) (bool, error) + func (cq *CategoryQuery) ExistX(ctx context.Context) bool + func (cq *CategoryQuery) First(ctx context.Context) (*Category, error) + func (cq *CategoryQuery) FirstID(ctx context.Context) (id int, err error) + func (cq *CategoryQuery) FirstIDX(ctx context.Context) int + func (cq *CategoryQuery) FirstX(ctx context.Context) *Category + func (cq *CategoryQuery) GroupBy(field string, fields ...string) *CategoryGroupBy + func (cq *CategoryQuery) IDs(ctx context.Context) (ids []int, err error) + func (cq *CategoryQuery) IDsX(ctx context.Context) []int + func (cq *CategoryQuery) Limit(limit int) *CategoryQuery + func (cq *CategoryQuery) Offset(offset int) *CategoryQuery + func (cq *CategoryQuery) Only(ctx context.Context) (*Category, error) + func (cq *CategoryQuery) OnlyID(ctx context.Context) (id int, err error) + func (cq *CategoryQuery) OnlyIDX(ctx context.Context) int + func (cq *CategoryQuery) OnlyX(ctx context.Context) *Category + func (cq *CategoryQuery) Order(o ...category.OrderOption) *CategoryQuery + func (cq *CategoryQuery) QueryPets() *PetQuery + func (cq *CategoryQuery) Select(fields ...string) *CategorySelect + func (cq *CategoryQuery) Unique(unique bool) *CategoryQuery + func (cq *CategoryQuery) Where(ps ...predicate.Category) *CategoryQuery + func (cq *CategoryQuery) WithPets(opts ...func(*PetQuery)) *CategoryQuery + type CategorySelect struct + func (cs *CategorySelect) Aggregate(fns ...AggregateFunc) *CategorySelect + func (cs *CategorySelect) Scan(ctx context.Context, v any) error + func (s *CategorySelect) Bool(ctx context.Context) (_ bool, err error) + func (s *CategorySelect) BoolX(ctx context.Context) bool + func (s *CategorySelect) Bools(ctx context.Context) ([]bool, error) + func (s *CategorySelect) BoolsX(ctx context.Context) []bool + func (s *CategorySelect) Float64(ctx context.Context) (_ float64, err error) + func (s *CategorySelect) Float64X(ctx context.Context) float64 + func (s *CategorySelect) Float64s(ctx context.Context) ([]float64, error) + func (s *CategorySelect) Float64sX(ctx context.Context) []float64 + func (s *CategorySelect) Int(ctx context.Context) (_ int, err error) + func (s *CategorySelect) IntX(ctx context.Context) int + func (s *CategorySelect) Ints(ctx context.Context) ([]int, error) + func (s *CategorySelect) IntsX(ctx context.Context) []int + func (s *CategorySelect) ScanX(ctx context.Context, v any) + func (s *CategorySelect) String(ctx context.Context) (_ string, err error) + func (s *CategorySelect) StringX(ctx context.Context) string + func (s *CategorySelect) Strings(ctx context.Context) ([]string, error) + func (s *CategorySelect) StringsX(ctx context.Context) []string + type CategoryUpdate struct + func (cu *CategoryUpdate) AddPetIDs(ids ...int) *CategoryUpdate + func (cu *CategoryUpdate) AddPets(p ...*Pet) *CategoryUpdate + func (cu *CategoryUpdate) ClearPets() *CategoryUpdate + func (cu *CategoryUpdate) Exec(ctx context.Context) error + func (cu *CategoryUpdate) ExecX(ctx context.Context) + func (cu *CategoryUpdate) Mutation() *CategoryMutation + func (cu *CategoryUpdate) RemovePetIDs(ids ...int) *CategoryUpdate + func (cu *CategoryUpdate) RemovePets(p ...*Pet) *CategoryUpdate + func (cu *CategoryUpdate) Save(ctx context.Context) (int, error) + func (cu *CategoryUpdate) SaveX(ctx context.Context) int + func (cu *CategoryUpdate) SetName(s string) *CategoryUpdate + func (cu *CategoryUpdate) SetNillableName(s *string) *CategoryUpdate + func (cu *CategoryUpdate) Where(ps ...predicate.Category) *CategoryUpdate + type CategoryUpdateOne struct + func (cuo *CategoryUpdateOne) AddPetIDs(ids ...int) *CategoryUpdateOne + func (cuo *CategoryUpdateOne) AddPets(p ...*Pet) *CategoryUpdateOne + func (cuo *CategoryUpdateOne) ClearPets() *CategoryUpdateOne + func (cuo *CategoryUpdateOne) Exec(ctx context.Context) error + func (cuo *CategoryUpdateOne) ExecX(ctx context.Context) + func (cuo *CategoryUpdateOne) Mutation() *CategoryMutation + func (cuo *CategoryUpdateOne) RemovePetIDs(ids ...int) *CategoryUpdateOne + func (cuo *CategoryUpdateOne) RemovePets(p ...*Pet) *CategoryUpdateOne + func (cuo *CategoryUpdateOne) Save(ctx context.Context) (*Category, error) + func (cuo *CategoryUpdateOne) SaveX(ctx context.Context) *Category + func (cuo *CategoryUpdateOne) Select(field string, fields ...string) *CategoryUpdateOne + func (cuo *CategoryUpdateOne) SetName(s string) *CategoryUpdateOne + func (cuo *CategoryUpdateOne) SetNillableName(s *string) *CategoryUpdateOne + func (cuo *CategoryUpdateOne) Where(ps ...predicate.Category) *CategoryUpdateOne + type Client struct + Category *CategoryClient + Pet *PetClient + Schema *migrate.Schema + User *UserClient + func FromContext(ctx context.Context) *Client + func NewClient(opts ...Option) *Client + func Open(driverName, dataSourceName string, options ...Option) (*Client, error) + func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error) + func (c *Client) Close() error + func (c *Client) Debug() *Client + func (c *Client) Intercept(interceptors ...Interceptor) + func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error) + func (c *Client) Tx(ctx context.Context) (*Tx, error) + func (c *Client) Use(hooks ...Hook) + type CommitFunc func(context.Context, *Tx) error + func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error + type CommitHook func(Committer) Committer + type Committer interface + Commit func(context.Context, *Tx) error + type ConstraintError struct + func (e *ConstraintError) Unwrap() error + func (e ConstraintError) Error() string + type Hook = ent.Hook + type InterceptFunc = ent.InterceptFunc + type Interceptor = ent.Interceptor + type MutateFunc = ent.MutateFunc + type Mutation = ent.Mutation + type Mutator = ent.Mutator + type NotFoundError struct + func (e *NotFoundError) Error() string + type NotLoadedError struct + func (e *NotLoadedError) Error() string + type NotSingularError struct + func (e *NotSingularError) Error() string + type Op = ent.Op + type Option func(*config) + func Debug() Option + func Driver(driver dialect.Driver) Option + func Log(fn func(...any)) Option + type OrderFunc func(*sql.Selector) + type Pet struct + Age int + Edges PetEdges + ID int + Name string + Nicknames []string + func (pe *Pet) QueryCategories() *CategoryQuery + func (pe *Pet) QueryFriends() *PetQuery + func (pe *Pet) QueryOwner() *UserQuery + func (pe *Pet) String() string + func (pe *Pet) Unwrap() *Pet + func (pe *Pet) Update() *PetUpdateOne + func (pe *Pet) Value(name string) (ent.Value, error) + type PetClient struct + func NewPetClient(c config) *PetClient + func (c *PetClient) Create() *PetCreate + func (c *PetClient) CreateBulk(builders ...*PetCreate) *PetCreateBulk + func (c *PetClient) Delete() *PetDelete + func (c *PetClient) DeleteOne(pe *Pet) *PetDeleteOne + func (c *PetClient) DeleteOneID(id int) *PetDeleteOne + func (c *PetClient) Get(ctx context.Context, id int) (*Pet, error) + func (c *PetClient) GetX(ctx context.Context, id int) *Pet + func (c *PetClient) Hooks() []Hook + func (c *PetClient) Intercept(interceptors ...Interceptor) + func (c *PetClient) Interceptors() []Interceptor + func (c *PetClient) MapCreateBulk(slice any, setFunc func(*PetCreate, int)) *PetCreateBulk + func (c *PetClient) Query() *PetQuery + func (c *PetClient) QueryCategories(pe *Pet) *CategoryQuery + func (c *PetClient) QueryFriends(pe *Pet) *PetQuery + func (c *PetClient) QueryOwner(pe *Pet) *UserQuery + func (c *PetClient) Update() *PetUpdate + func (c *PetClient) UpdateOne(pe *Pet) *PetUpdateOne + func (c *PetClient) UpdateOneID(id int) *PetUpdateOne + func (c *PetClient) Use(hooks ...Hook) + type PetCreate struct + func (pc *PetCreate) AddCategories(c ...*Category) *PetCreate + func (pc *PetCreate) AddCategoryIDs(ids ...int) *PetCreate + func (pc *PetCreate) AddFriendIDs(ids ...int) *PetCreate + func (pc *PetCreate) AddFriends(p ...*Pet) *PetCreate + func (pc *PetCreate) Exec(ctx context.Context) error + func (pc *PetCreate) ExecX(ctx context.Context) + func (pc *PetCreate) Mutation() *PetMutation + func (pc *PetCreate) Save(ctx context.Context) (*Pet, error) + func (pc *PetCreate) SaveX(ctx context.Context) *Pet + func (pc *PetCreate) SetAge(i int) *PetCreate + func (pc *PetCreate) SetID(i int) *PetCreate + func (pc *PetCreate) SetName(s string) *PetCreate + func (pc *PetCreate) SetNicknames(s []string) *PetCreate + func (pc *PetCreate) SetNillableAge(i *int) *PetCreate + func (pc *PetCreate) SetNillableOwnerID(id *int) *PetCreate + func (pc *PetCreate) SetOwner(u *User) *PetCreate + func (pc *PetCreate) SetOwnerID(id int) *PetCreate + type PetCreateBulk struct + func (pcb *PetCreateBulk) Exec(ctx context.Context) error + func (pcb *PetCreateBulk) ExecX(ctx context.Context) + func (pcb *PetCreateBulk) Save(ctx context.Context) ([]*Pet, error) + func (pcb *PetCreateBulk) SaveX(ctx context.Context) []*Pet + type PetDelete struct + func (pd *PetDelete) Exec(ctx context.Context) (int, error) + func (pd *PetDelete) ExecX(ctx context.Context) int + func (pd *PetDelete) Where(ps ...predicate.Pet) *PetDelete + type PetDeleteOne struct + func (pdo *PetDeleteOne) Exec(ctx context.Context) error + func (pdo *PetDeleteOne) ExecX(ctx context.Context) + func (pdo *PetDeleteOne) Where(ps ...predicate.Pet) *PetDeleteOne + type PetEdges struct + Categories []*Category + Friends []*Pet + Owner *User + func (e PetEdges) CategoriesOrErr() ([]*Category, error) + func (e PetEdges) FriendsOrErr() ([]*Pet, error) + func (e PetEdges) OwnerOrErr() (*User, error) + type PetGroupBy struct + func (pgb *PetGroupBy) Aggregate(fns ...AggregateFunc) *PetGroupBy + func (pgb *PetGroupBy) Scan(ctx context.Context, v any) error + func (s *PetGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (s *PetGroupBy) BoolX(ctx context.Context) bool + func (s *PetGroupBy) Bools(ctx context.Context) ([]bool, error) + func (s *PetGroupBy) BoolsX(ctx context.Context) []bool + func (s *PetGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (s *PetGroupBy) Float64X(ctx context.Context) float64 + func (s *PetGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (s *PetGroupBy) Float64sX(ctx context.Context) []float64 + func (s *PetGroupBy) Int(ctx context.Context) (_ int, err error) + func (s *PetGroupBy) IntX(ctx context.Context) int + func (s *PetGroupBy) Ints(ctx context.Context) ([]int, error) + func (s *PetGroupBy) IntsX(ctx context.Context) []int + func (s *PetGroupBy) ScanX(ctx context.Context, v any) + func (s *PetGroupBy) String(ctx context.Context) (_ string, err error) + func (s *PetGroupBy) StringX(ctx context.Context) string + func (s *PetGroupBy) Strings(ctx context.Context) ([]string, error) + func (s *PetGroupBy) StringsX(ctx context.Context) []string + type PetMutation struct + func (m *PetMutation) AddAge(i int) + func (m *PetMutation) AddCategoryIDs(ids ...int) + func (m *PetMutation) AddField(name string, value ent.Value) error + func (m *PetMutation) AddFriendIDs(ids ...int) + func (m *PetMutation) AddedAge() (r int, exists bool) + func (m *PetMutation) AddedEdges() []string + func (m *PetMutation) AddedField(name string) (ent.Value, bool) + func (m *PetMutation) AddedFields() []string + func (m *PetMutation) AddedIDs(name string) []ent.Value + func (m *PetMutation) Age() (r int, exists bool) + func (m *PetMutation) AgeCleared() bool + func (m *PetMutation) AppendNicknames(s []string) + func (m *PetMutation) AppendedNicknames() ([]string, bool) + func (m *PetMutation) CategoriesCleared() bool + func (m *PetMutation) CategoriesIDs() (ids []int) + func (m *PetMutation) ClearAge() + func (m *PetMutation) ClearCategories() + func (m *PetMutation) ClearEdge(name string) error + func (m *PetMutation) ClearField(name string) error + func (m *PetMutation) ClearFriends() + func (m *PetMutation) ClearNicknames() + func (m *PetMutation) ClearOwner() + func (m *PetMutation) ClearedEdges() []string + func (m *PetMutation) ClearedFields() []string + func (m *PetMutation) EdgeCleared(name string) bool + func (m *PetMutation) Field(name string) (ent.Value, bool) + func (m *PetMutation) FieldCleared(name string) bool + func (m *PetMutation) Fields() []string + func (m *PetMutation) FriendsCleared() bool + func (m *PetMutation) FriendsIDs() (ids []int) + func (m *PetMutation) ID() (id int, exists bool) + func (m *PetMutation) IDs(ctx context.Context) ([]int, error) + func (m *PetMutation) Name() (r string, exists bool) + func (m *PetMutation) Nicknames() (r []string, exists bool) + func (m *PetMutation) NicknamesCleared() bool + func (m *PetMutation) OldAge(ctx context.Context) (v int, err error) + func (m *PetMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *PetMutation) OldName(ctx context.Context) (v string, err error) + func (m *PetMutation) OldNicknames(ctx context.Context) (v []string, err error) + func (m *PetMutation) Op() Op + func (m *PetMutation) OwnerCleared() bool + func (m *PetMutation) OwnerID() (id int, exists bool) + func (m *PetMutation) OwnerIDs() (ids []int) + func (m *PetMutation) RemoveCategoryIDs(ids ...int) + func (m *PetMutation) RemoveFriendIDs(ids ...int) + func (m *PetMutation) RemovedCategoriesIDs() (ids []int) + func (m *PetMutation) RemovedEdges() []string + func (m *PetMutation) RemovedFriendsIDs() (ids []int) + func (m *PetMutation) RemovedIDs(name string) []ent.Value + func (m *PetMutation) ResetAge() + func (m *PetMutation) ResetCategories() + func (m *PetMutation) ResetEdge(name string) error + func (m *PetMutation) ResetField(name string) error + func (m *PetMutation) ResetFriends() + func (m *PetMutation) ResetName() + func (m *PetMutation) ResetNicknames() + func (m *PetMutation) ResetOwner() + func (m *PetMutation) SetAge(i int) + func (m *PetMutation) SetField(name string, value ent.Value) error + func (m *PetMutation) SetID(id int) + func (m *PetMutation) SetName(s string) + func (m *PetMutation) SetNicknames(s []string) + func (m *PetMutation) SetOp(op Op) + func (m *PetMutation) SetOwnerID(id int) + func (m *PetMutation) Type() string + func (m *PetMutation) Where(ps ...predicate.Pet) + func (m *PetMutation) WhereP(ps ...func(*sql.Selector)) + func (m PetMutation) Client() *Client + func (m PetMutation) Tx() (*Tx, error) + type PetQuery struct + func (pq *PetQuery) Aggregate(fns ...AggregateFunc) *PetSelect + func (pq *PetQuery) All(ctx context.Context) ([]*Pet, error) + func (pq *PetQuery) AllX(ctx context.Context) []*Pet + func (pq *PetQuery) Clone() *PetQuery + func (pq *PetQuery) Count(ctx context.Context) (int, error) + func (pq *PetQuery) CountX(ctx context.Context) int + func (pq *PetQuery) Exist(ctx context.Context) (bool, error) + func (pq *PetQuery) ExistX(ctx context.Context) bool + func (pq *PetQuery) First(ctx context.Context) (*Pet, error) + func (pq *PetQuery) FirstID(ctx context.Context) (id int, err error) + func (pq *PetQuery) FirstIDX(ctx context.Context) int + func (pq *PetQuery) FirstX(ctx context.Context) *Pet + func (pq *PetQuery) GroupBy(field string, fields ...string) *PetGroupBy + func (pq *PetQuery) IDs(ctx context.Context) (ids []int, err error) + func (pq *PetQuery) IDsX(ctx context.Context) []int + func (pq *PetQuery) Limit(limit int) *PetQuery + func (pq *PetQuery) Offset(offset int) *PetQuery + func (pq *PetQuery) Only(ctx context.Context) (*Pet, error) + func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error) + func (pq *PetQuery) OnlyIDX(ctx context.Context) int + func (pq *PetQuery) OnlyX(ctx context.Context) *Pet + func (pq *PetQuery) Order(o ...pet.OrderOption) *PetQuery + func (pq *PetQuery) QueryCategories() *CategoryQuery + func (pq *PetQuery) QueryFriends() *PetQuery + func (pq *PetQuery) QueryOwner() *UserQuery + func (pq *PetQuery) Select(fields ...string) *PetSelect + func (pq *PetQuery) Unique(unique bool) *PetQuery + func (pq *PetQuery) Where(ps ...predicate.Pet) *PetQuery + func (pq *PetQuery) WithCategories(opts ...func(*CategoryQuery)) *PetQuery + func (pq *PetQuery) WithFriends(opts ...func(*PetQuery)) *PetQuery + func (pq *PetQuery) WithOwner(opts ...func(*UserQuery)) *PetQuery + type PetSelect struct + func (ps *PetSelect) Aggregate(fns ...AggregateFunc) *PetSelect + func (ps *PetSelect) Scan(ctx context.Context, v any) error + func (s *PetSelect) Bool(ctx context.Context) (_ bool, err error) + func (s *PetSelect) BoolX(ctx context.Context) bool + func (s *PetSelect) Bools(ctx context.Context) ([]bool, error) + func (s *PetSelect) BoolsX(ctx context.Context) []bool + func (s *PetSelect) Float64(ctx context.Context) (_ float64, err error) + func (s *PetSelect) Float64X(ctx context.Context) float64 + func (s *PetSelect) Float64s(ctx context.Context) ([]float64, error) + func (s *PetSelect) Float64sX(ctx context.Context) []float64 + func (s *PetSelect) Int(ctx context.Context) (_ int, err error) + func (s *PetSelect) IntX(ctx context.Context) int + func (s *PetSelect) Ints(ctx context.Context) ([]int, error) + func (s *PetSelect) IntsX(ctx context.Context) []int + func (s *PetSelect) ScanX(ctx context.Context, v any) + func (s *PetSelect) String(ctx context.Context) (_ string, err error) + func (s *PetSelect) StringX(ctx context.Context) string + func (s *PetSelect) Strings(ctx context.Context) ([]string, error) + func (s *PetSelect) StringsX(ctx context.Context) []string + type PetUpdate struct + func (pu *PetUpdate) AddAge(i int) *PetUpdate + func (pu *PetUpdate) AddCategories(c ...*Category) *PetUpdate + func (pu *PetUpdate) AddCategoryIDs(ids ...int) *PetUpdate + func (pu *PetUpdate) AddFriendIDs(ids ...int) *PetUpdate + func (pu *PetUpdate) AddFriends(p ...*Pet) *PetUpdate + func (pu *PetUpdate) AppendNicknames(s []string) *PetUpdate + func (pu *PetUpdate) ClearAge() *PetUpdate + func (pu *PetUpdate) ClearCategories() *PetUpdate + func (pu *PetUpdate) ClearFriends() *PetUpdate + func (pu *PetUpdate) ClearNicknames() *PetUpdate + func (pu *PetUpdate) ClearOwner() *PetUpdate + func (pu *PetUpdate) Exec(ctx context.Context) error + func (pu *PetUpdate) ExecX(ctx context.Context) + func (pu *PetUpdate) Mutation() *PetMutation + func (pu *PetUpdate) RemoveCategories(c ...*Category) *PetUpdate + func (pu *PetUpdate) RemoveCategoryIDs(ids ...int) *PetUpdate + func (pu *PetUpdate) RemoveFriendIDs(ids ...int) *PetUpdate + func (pu *PetUpdate) RemoveFriends(p ...*Pet) *PetUpdate + func (pu *PetUpdate) Save(ctx context.Context) (int, error) + func (pu *PetUpdate) SaveX(ctx context.Context) int + func (pu *PetUpdate) SetAge(i int) *PetUpdate + func (pu *PetUpdate) SetName(s string) *PetUpdate + func (pu *PetUpdate) SetNicknames(s []string) *PetUpdate + func (pu *PetUpdate) SetNillableAge(i *int) *PetUpdate + func (pu *PetUpdate) SetNillableName(s *string) *PetUpdate + func (pu *PetUpdate) SetNillableOwnerID(id *int) *PetUpdate + func (pu *PetUpdate) SetOwner(u *User) *PetUpdate + func (pu *PetUpdate) SetOwnerID(id int) *PetUpdate + func (pu *PetUpdate) Where(ps ...predicate.Pet) *PetUpdate + type PetUpdateOne struct + func (puo *PetUpdateOne) AddAge(i int) *PetUpdateOne + func (puo *PetUpdateOne) AddCategories(c ...*Category) *PetUpdateOne + func (puo *PetUpdateOne) AddCategoryIDs(ids ...int) *PetUpdateOne + func (puo *PetUpdateOne) AddFriendIDs(ids ...int) *PetUpdateOne + func (puo *PetUpdateOne) AddFriends(p ...*Pet) *PetUpdateOne + func (puo *PetUpdateOne) AppendNicknames(s []string) *PetUpdateOne + func (puo *PetUpdateOne) ClearAge() *PetUpdateOne + func (puo *PetUpdateOne) ClearCategories() *PetUpdateOne + func (puo *PetUpdateOne) ClearFriends() *PetUpdateOne + func (puo *PetUpdateOne) ClearNicknames() *PetUpdateOne + func (puo *PetUpdateOne) ClearOwner() *PetUpdateOne + func (puo *PetUpdateOne) Exec(ctx context.Context) error + func (puo *PetUpdateOne) ExecX(ctx context.Context) + func (puo *PetUpdateOne) Mutation() *PetMutation + func (puo *PetUpdateOne) RemoveCategories(c ...*Category) *PetUpdateOne + func (puo *PetUpdateOne) RemoveCategoryIDs(ids ...int) *PetUpdateOne + func (puo *PetUpdateOne) RemoveFriendIDs(ids ...int) *PetUpdateOne + func (puo *PetUpdateOne) RemoveFriends(p ...*Pet) *PetUpdateOne + func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error) + func (puo *PetUpdateOne) SaveX(ctx context.Context) *Pet + func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne + func (puo *PetUpdateOne) SetAge(i int) *PetUpdateOne + func (puo *PetUpdateOne) SetName(s string) *PetUpdateOne + func (puo *PetUpdateOne) SetNicknames(s []string) *PetUpdateOne + func (puo *PetUpdateOne) SetNillableAge(i *int) *PetUpdateOne + func (puo *PetUpdateOne) SetNillableName(s *string) *PetUpdateOne + func (puo *PetUpdateOne) SetNillableOwnerID(id *int) *PetUpdateOne + func (puo *PetUpdateOne) SetOwner(u *User) *PetUpdateOne + func (puo *PetUpdateOne) SetOwnerID(id int) *PetUpdateOne + func (puo *PetUpdateOne) Where(ps ...predicate.Pet) *PetUpdateOne + type Pets []*Pet + type Policy = ent.Policy + type Querier = ent.Querier + type QuerierFunc = ent.QuerierFunc + type Query = ent.Query + type QueryContext = ent.QueryContext + type RollbackFunc func(context.Context, *Tx) error + func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error + type RollbackHook func(Rollbacker) Rollbacker + type Rollbacker interface + Rollback func(context.Context, *Tx) error + type TraverseFunc = ent.TraverseFunc + type Traverser = ent.Traverser + type Tx struct + Category *CategoryClient + Pet *PetClient + User *UserClient + func TxFromContext(ctx context.Context) *Tx + func (tx *Tx) Client() *Client + func (tx *Tx) Commit() error + func (tx *Tx) OnCommit(f CommitHook) + func (tx *Tx) OnRollback(f RollbackHook) + func (tx *Tx) Rollback() error + type User struct + Age int + Edges UserEdges + ID int + Name string + func (u *User) QueryPets() *PetQuery + func (u *User) String() string + func (u *User) Unwrap() *User + func (u *User) Update() *UserUpdateOne + func (u *User) Value(name string) (ent.Value, error) + type UserClient struct + func NewUserClient(c config) *UserClient + func (c *UserClient) Create() *UserCreate + func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk + func (c *UserClient) Delete() *UserDelete + func (c *UserClient) DeleteOne(u *User) *UserDeleteOne + func (c *UserClient) DeleteOneID(id int) *UserDeleteOne + func (c *UserClient) Get(ctx context.Context, id int) (*User, error) + func (c *UserClient) GetX(ctx context.Context, id int) *User + func (c *UserClient) Hooks() []Hook + func (c *UserClient) Intercept(interceptors ...Interceptor) + func (c *UserClient) Interceptors() []Interceptor + func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk + func (c *UserClient) Query() *UserQuery + func (c *UserClient) QueryPets(u *User) *PetQuery + func (c *UserClient) Update() *UserUpdate + func (c *UserClient) UpdateOne(u *User) *UserUpdateOne + func (c *UserClient) UpdateOneID(id int) *UserUpdateOne + func (c *UserClient) Use(hooks ...Hook) + type UserCreate struct + func (uc *UserCreate) AddPetIDs(ids ...int) *UserCreate + func (uc *UserCreate) AddPets(p ...*Pet) *UserCreate + func (uc *UserCreate) Exec(ctx context.Context) error + func (uc *UserCreate) ExecX(ctx context.Context) + func (uc *UserCreate) Mutation() *UserMutation + func (uc *UserCreate) Save(ctx context.Context) (*User, error) + func (uc *UserCreate) SaveX(ctx context.Context) *User + func (uc *UserCreate) SetAge(i int) *UserCreate + func (uc *UserCreate) SetName(s string) *UserCreate + type UserCreateBulk struct + func (ucb *UserCreateBulk) Exec(ctx context.Context) error + func (ucb *UserCreateBulk) ExecX(ctx context.Context) + func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error) + func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User + type UserDelete struct + func (ud *UserDelete) Exec(ctx context.Context) (int, error) + func (ud *UserDelete) ExecX(ctx context.Context) int + func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete + type UserDeleteOne struct + func (udo *UserDeleteOne) Exec(ctx context.Context) error + func (udo *UserDeleteOne) ExecX(ctx context.Context) + func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne + type UserEdges struct + Pets []*Pet + func (e UserEdges) PetsOrErr() ([]*Pet, error) + type UserGroupBy struct + func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (s *UserGroupBy) BoolX(ctx context.Context) bool + func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error) + func (s *UserGroupBy) BoolsX(ctx context.Context) []bool + func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (s *UserGroupBy) Float64X(ctx context.Context) float64 + func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (s *UserGroupBy) Float64sX(ctx context.Context) []float64 + func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error) + func (s *UserGroupBy) IntX(ctx context.Context) int + func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error) + func (s *UserGroupBy) IntsX(ctx context.Context) []int + func (s *UserGroupBy) ScanX(ctx context.Context, v any) + func (s *UserGroupBy) String(ctx context.Context) (_ string, err error) + func (s *UserGroupBy) StringX(ctx context.Context) string + func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error) + func (s *UserGroupBy) StringsX(ctx context.Context) []string + func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy + func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error + type UserMutation struct + func (m *UserMutation) AddAge(i int) + func (m *UserMutation) AddField(name string, value ent.Value) error + func (m *UserMutation) AddPetIDs(ids ...int) + func (m *UserMutation) AddedAge() (r int, exists bool) + func (m *UserMutation) AddedEdges() []string + func (m *UserMutation) AddedField(name string) (ent.Value, bool) + func (m *UserMutation) AddedFields() []string + func (m *UserMutation) AddedIDs(name string) []ent.Value + func (m *UserMutation) Age() (r int, exists bool) + func (m *UserMutation) ClearEdge(name string) error + func (m *UserMutation) ClearField(name string) error + func (m *UserMutation) ClearPets() + func (m *UserMutation) ClearedEdges() []string + func (m *UserMutation) ClearedFields() []string + func (m *UserMutation) EdgeCleared(name string) bool + func (m *UserMutation) Field(name string) (ent.Value, bool) + func (m *UserMutation) FieldCleared(name string) bool + func (m *UserMutation) Fields() []string + func (m *UserMutation) ID() (id int, exists bool) + func (m *UserMutation) IDs(ctx context.Context) ([]int, error) + func (m *UserMutation) Name() (r string, exists bool) + func (m *UserMutation) OldAge(ctx context.Context) (v int, err error) + func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *UserMutation) OldName(ctx context.Context) (v string, err error) + func (m *UserMutation) Op() Op + func (m *UserMutation) PetsCleared() bool + func (m *UserMutation) PetsIDs() (ids []int) + func (m *UserMutation) RemovePetIDs(ids ...int) + func (m *UserMutation) RemovedEdges() []string + func (m *UserMutation) RemovedIDs(name string) []ent.Value + func (m *UserMutation) RemovedPetsIDs() (ids []int) + func (m *UserMutation) ResetAge() + func (m *UserMutation) ResetEdge(name string) error + func (m *UserMutation) ResetField(name string) error + func (m *UserMutation) ResetName() + func (m *UserMutation) ResetPets() + func (m *UserMutation) SetAge(i int) + func (m *UserMutation) SetField(name string, value ent.Value) error + func (m *UserMutation) SetName(s string) + func (m *UserMutation) SetOp(op Op) + func (m *UserMutation) Type() string + func (m *UserMutation) Where(ps ...predicate.User) + func (m *UserMutation) WhereP(ps ...func(*sql.Selector)) + func (m UserMutation) Client() *Client + func (m UserMutation) Tx() (*Tx, error) + type UserQuery struct + func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect + func (uq *UserQuery) All(ctx context.Context) ([]*User, error) + func (uq *UserQuery) AllX(ctx context.Context) []*User + func (uq *UserQuery) Clone() *UserQuery + func (uq *UserQuery) Count(ctx context.Context) (int, error) + func (uq *UserQuery) CountX(ctx context.Context) int + func (uq *UserQuery) Exist(ctx context.Context) (bool, error) + func (uq *UserQuery) ExistX(ctx context.Context) bool + func (uq *UserQuery) First(ctx context.Context) (*User, error) + func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error) + func (uq *UserQuery) FirstIDX(ctx context.Context) int + func (uq *UserQuery) FirstX(ctx context.Context) *User + func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy + func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error) + func (uq *UserQuery) IDsX(ctx context.Context) []int + func (uq *UserQuery) Limit(limit int) *UserQuery + func (uq *UserQuery) Offset(offset int) *UserQuery + func (uq *UserQuery) Only(ctx context.Context) (*User, error) + func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error) + func (uq *UserQuery) OnlyIDX(ctx context.Context) int + func (uq *UserQuery) OnlyX(ctx context.Context) *User + func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery + func (uq *UserQuery) QueryPets() *PetQuery + func (uq *UserQuery) Select(fields ...string) *UserSelect + func (uq *UserQuery) Unique(unique bool) *UserQuery + func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery + func (uq *UserQuery) WithPets(opts ...func(*PetQuery)) *UserQuery + type UserSelect struct + func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error) + func (s *UserSelect) BoolX(ctx context.Context) bool + func (s *UserSelect) Bools(ctx context.Context) ([]bool, error) + func (s *UserSelect) BoolsX(ctx context.Context) []bool + func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error) + func (s *UserSelect) Float64X(ctx context.Context) float64 + func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error) + func (s *UserSelect) Float64sX(ctx context.Context) []float64 + func (s *UserSelect) Int(ctx context.Context) (_ int, err error) + func (s *UserSelect) IntX(ctx context.Context) int + func (s *UserSelect) Ints(ctx context.Context) ([]int, error) + func (s *UserSelect) IntsX(ctx context.Context) []int + func (s *UserSelect) ScanX(ctx context.Context, v any) + func (s *UserSelect) String(ctx context.Context) (_ string, err error) + func (s *UserSelect) StringX(ctx context.Context) string + func (s *UserSelect) Strings(ctx context.Context) ([]string, error) + func (s *UserSelect) StringsX(ctx context.Context) []string + func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect + func (us *UserSelect) Scan(ctx context.Context, v any) error + type UserUpdate struct + func (uu *UserUpdate) AddAge(i int) *UserUpdate + func (uu *UserUpdate) AddPetIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) AddPets(p ...*Pet) *UserUpdate + func (uu *UserUpdate) ClearPets() *UserUpdate + func (uu *UserUpdate) Exec(ctx context.Context) error + func (uu *UserUpdate) ExecX(ctx context.Context) + func (uu *UserUpdate) Mutation() *UserMutation + func (uu *UserUpdate) RemovePetIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) RemovePets(p ...*Pet) *UserUpdate + func (uu *UserUpdate) Save(ctx context.Context) (int, error) + func (uu *UserUpdate) SaveX(ctx context.Context) int + func (uu *UserUpdate) SetAge(i int) *UserUpdate + func (uu *UserUpdate) SetName(s string) *UserUpdate + func (uu *UserUpdate) SetNillableAge(i *int) *UserUpdate + func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate + func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate + type UserUpdateOne struct + func (uuo *UserUpdateOne) AddAge(i int) *UserUpdateOne + func (uuo *UserUpdateOne) AddPetIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) AddPets(p ...*Pet) *UserUpdateOne + func (uuo *UserUpdateOne) ClearPets() *UserUpdateOne + func (uuo *UserUpdateOne) Exec(ctx context.Context) error + func (uuo *UserUpdateOne) ExecX(ctx context.Context) + func (uuo *UserUpdateOne) Mutation() *UserMutation + func (uuo *UserUpdateOne) RemovePetIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) RemovePets(p ...*Pet) *UserUpdateOne + func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error) + func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User + func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne + func (uuo *UserUpdateOne) SetAge(i int) *UserUpdateOne + func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne + func (uuo *UserUpdateOne) SetNillableAge(i *int) *UserUpdateOne + func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne + func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne + type Users []*User + type ValidationError struct + Name string + func (e *ValidationError) Error() string + func (e *ValidationError) Unwrap() error + type Value = ent.Value