Versions in this module Expand all Collapse all v0 v0.5.4 Jan 6, 2021 Changes in this version type Option + func Boring() Option v0.5.3 Dec 13, 2020 v0.5.2 Dec 11, 2020 v0.5.1 Nov 29, 2020 v0.5.0 Nov 3, 2020 Changes in this version type GroupQuery + func (gq *GroupQuery) FirstIDX(ctx context.Context) int type PetQuery + func (pq *PetQuery) FirstIDX(ctx context.Context) int type UserQuery + func (uq *UserQuery) FirstIDX(ctx context.Context) int v0.4.3 Sep 21, 2020 Changes in this version type UserMutation + func (m *UserMutation) ClearFriends() + func (m *UserMutation) ClearPets() + func (m *UserMutation) FriendsCleared() bool + func (m *UserMutation) PetsCleared() bool type UserUpdate + func (uu *UserUpdate) ClearFriends() *UserUpdate + func (uu *UserUpdate) ClearPets() *UserUpdate type UserUpdateOne + func (uuo *UserUpdateOne) ClearFriends() *UserUpdateOne + func (uuo *UserUpdateOne) ClearPets() *UserUpdateOne v0.4.2 Aug 30, 2020 v0.4.1 Aug 30, 2020 v0.4.0 Aug 18, 2020 Changes in this version + const OpCreate + const OpDelete + const OpDeleteOne + const OpUpdate + const OpUpdateOne + const TypeGroup + const TypePet + const TypeUser + 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 Client struct + Group *GroupClient + 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) Node(ctx context.Context, id int) (*Node, error) + func (c *Client) Noder(ctx context.Context, id int) (Noder, 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 Edge struct + IDs []int + Name string + Type string + type Field struct + Name string + Type string + Value string + type Group struct + ID int + MaxUsers int + func (gr *Group) Node(ctx context.Context) (node *Node, err error) + func (gr *Group) String() string + func (gr *Group) Unwrap() *Group + func (gr *Group) Update() *GroupUpdateOne + type GroupClient struct + func NewGroupClient(c config) *GroupClient + func (c *GroupClient) Create() *GroupCreate + func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk + func (c *GroupClient) Delete() *GroupDelete + func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne + func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne + func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error) + func (c *GroupClient) GetX(ctx context.Context, id int) *Group + func (c *GroupClient) Hooks() []Hook + func (c *GroupClient) Query() *GroupQuery + func (c *GroupClient) Update() *GroupUpdate + func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne + func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne + func (c *GroupClient) Use(hooks ...Hook) + type GroupCreate struct + func (gc *GroupCreate) Mutation() *GroupMutation + func (gc *GroupCreate) Save(ctx context.Context) (*Group, error) + func (gc *GroupCreate) SaveX(ctx context.Context) *Group + func (gc *GroupCreate) SetMaxUsers(i int) *GroupCreate + type GroupCreateBulk struct + func (gcb *GroupCreateBulk) Save(ctx context.Context) ([]*Group, error) + func (gcb *GroupCreateBulk) SaveX(ctx context.Context) []*Group + type GroupDelete struct + func (gd *GroupDelete) Exec(ctx context.Context) (int, error) + func (gd *GroupDelete) ExecX(ctx context.Context) int + func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete + type GroupDeleteOne struct + func (gdo *GroupDeleteOne) Exec(ctx context.Context) error + func (gdo *GroupDeleteOne) ExecX(ctx context.Context) + type GroupGroupBy struct + func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy + func (ggb *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (ggb *GroupGroupBy) BoolX(ctx context.Context) bool + func (ggb *GroupGroupBy) Bools(ctx context.Context) ([]bool, error) + func (ggb *GroupGroupBy) BoolsX(ctx context.Context) []bool + func (ggb *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (ggb *GroupGroupBy) Float64X(ctx context.Context) float64 + func (ggb *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (ggb *GroupGroupBy) Float64sX(ctx context.Context) []float64 + func (ggb *GroupGroupBy) Int(ctx context.Context) (_ int, err error) + func (ggb *GroupGroupBy) IntX(ctx context.Context) int + func (ggb *GroupGroupBy) Ints(ctx context.Context) ([]int, error) + func (ggb *GroupGroupBy) IntsX(ctx context.Context) []int + func (ggb *GroupGroupBy) Scan(ctx context.Context, v interface{}) error + func (ggb *GroupGroupBy) ScanX(ctx context.Context, v interface{}) + func (ggb *GroupGroupBy) String(ctx context.Context) (_ string, err error) + func (ggb *GroupGroupBy) StringX(ctx context.Context) string + func (ggb *GroupGroupBy) Strings(ctx context.Context) ([]string, error) + func (ggb *GroupGroupBy) StringsX(ctx context.Context) []string + type GroupMutation struct + func (m *GroupMutation) AddField(name string, value ent.Value) error + func (m *GroupMutation) AddMaxUsers(i int) + func (m *GroupMutation) AddedEdges() []string + func (m *GroupMutation) AddedField(name string) (ent.Value, bool) + func (m *GroupMutation) AddedFields() []string + func (m *GroupMutation) AddedIDs(name string) []ent.Value + func (m *GroupMutation) AddedMaxUsers() (r int, exists bool) + func (m *GroupMutation) ClearEdge(name string) error + func (m *GroupMutation) ClearField(name string) error + func (m *GroupMutation) ClearedEdges() []string + func (m *GroupMutation) ClearedFields() []string + func (m *GroupMutation) EdgeCleared(name string) bool + func (m *GroupMutation) Field(name string) (ent.Value, bool) + func (m *GroupMutation) FieldCleared(name string) bool + func (m *GroupMutation) Fields() []string + func (m *GroupMutation) ID() (id int, exists bool) + func (m *GroupMutation) MaxUsers() (r int, exists bool) + func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *GroupMutation) OldMaxUsers(ctx context.Context) (v int, err error) + func (m *GroupMutation) Op() Op + func (m *GroupMutation) RemovedEdges() []string + func (m *GroupMutation) RemovedIDs(name string) []ent.Value + func (m *GroupMutation) ResetEdge(name string) error + func (m *GroupMutation) ResetField(name string) error + func (m *GroupMutation) ResetMaxUsers() + func (m *GroupMutation) SetField(name string, value ent.Value) error + func (m *GroupMutation) SetMaxUsers(i int) + func (m *GroupMutation) Type() string + func (m GroupMutation) Client() *Client + func (m GroupMutation) Tx() (*Tx, error) + type GroupQuery struct + func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error) + func (gq *GroupQuery) AllX(ctx context.Context) []*Group + func (gq *GroupQuery) Clone() *GroupQuery + func (gq *GroupQuery) Count(ctx context.Context) (int, error) + func (gq *GroupQuery) CountX(ctx context.Context) int + func (gq *GroupQuery) Exist(ctx context.Context) (bool, error) + func (gq *GroupQuery) ExistX(ctx context.Context) bool + func (gq *GroupQuery) First(ctx context.Context) (*Group, error) + func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error) + func (gq *GroupQuery) FirstX(ctx context.Context) *Group + func (gq *GroupQuery) FirstXID(ctx context.Context) int + func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy + func (gq *GroupQuery) IDs(ctx context.Context) ([]int, error) + func (gq *GroupQuery) IDsX(ctx context.Context) []int + func (gq *GroupQuery) Limit(limit int) *GroupQuery + func (gq *GroupQuery) Offset(offset int) *GroupQuery + func (gq *GroupQuery) Only(ctx context.Context) (*Group, error) + func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error) + func (gq *GroupQuery) OnlyIDX(ctx context.Context) int + func (gq *GroupQuery) OnlyX(ctx context.Context) *Group + func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery + func (gq *GroupQuery) Select(field string, fields ...string) *GroupSelect + func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery + type GroupSelect struct + func (gs *GroupSelect) Bool(ctx context.Context) (_ bool, err error) + func (gs *GroupSelect) BoolX(ctx context.Context) bool + func (gs *GroupSelect) Bools(ctx context.Context) ([]bool, error) + func (gs *GroupSelect) BoolsX(ctx context.Context) []bool + func (gs *GroupSelect) Float64(ctx context.Context) (_ float64, err error) + func (gs *GroupSelect) Float64X(ctx context.Context) float64 + func (gs *GroupSelect) Float64s(ctx context.Context) ([]float64, error) + func (gs *GroupSelect) Float64sX(ctx context.Context) []float64 + func (gs *GroupSelect) Int(ctx context.Context) (_ int, err error) + func (gs *GroupSelect) IntX(ctx context.Context) int + func (gs *GroupSelect) Ints(ctx context.Context) ([]int, error) + func (gs *GroupSelect) IntsX(ctx context.Context) []int + func (gs *GroupSelect) Scan(ctx context.Context, v interface{}) error + func (gs *GroupSelect) ScanX(ctx context.Context, v interface{}) + func (gs *GroupSelect) String(ctx context.Context) (_ string, err error) + func (gs *GroupSelect) StringX(ctx context.Context) string + func (gs *GroupSelect) Strings(ctx context.Context) ([]string, error) + func (gs *GroupSelect) StringsX(ctx context.Context) []string + type GroupUpdate struct + func (gu *GroupUpdate) AddMaxUsers(i int) *GroupUpdate + func (gu *GroupUpdate) Exec(ctx context.Context) error + func (gu *GroupUpdate) ExecX(ctx context.Context) + func (gu *GroupUpdate) Mutation() *GroupMutation + func (gu *GroupUpdate) Save(ctx context.Context) (int, error) + func (gu *GroupUpdate) SaveX(ctx context.Context) int + func (gu *GroupUpdate) SetMaxUsers(i int) *GroupUpdate + func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate + type GroupUpdateOne struct + func (guo *GroupUpdateOne) AddMaxUsers(i int) *GroupUpdateOne + func (guo *GroupUpdateOne) Exec(ctx context.Context) error + func (guo *GroupUpdateOne) ExecX(ctx context.Context) + func (guo *GroupUpdateOne) Mutation() *GroupMutation + func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error) + func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group + func (guo *GroupUpdateOne) SetMaxUsers(i int) *GroupUpdateOne + type Groups []*Group + type Hook = ent.Hook + type MutateFunc = ent.MutateFunc + type Mutation = ent.Mutation + type Mutator = ent.Mutator + type Node struct + Edges []*Edge + Fields []*Field + ID int + Type string + type Noder interface + Node func(context.Context) (*Node, error) + 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(...interface{})) Option + type OrderFunc func(*sql.Selector) + func Asc(fields ...string) OrderFunc + func Desc(fields ...string) OrderFunc + type Pet struct + Age int + Edges PetEdges + ID int + LicensedAt *time.Time + func (pe *Pet) Node(ctx context.Context) (node *Node, err error) + func (pe *Pet) QueryOwner() *UserQuery + func (pe *Pet) String() string + func (pe *Pet) Unwrap() *Pet + func (pe *Pet) Update() *PetUpdateOne + 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) Query() *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) 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) SetLicensedAt(t time.Time) *PetCreate + func (pc *PetCreate) SetNillableLicensedAt(t *time.Time) *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) 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) + type PetEdges struct + Owner *User + func (e PetEdges) OwnerOrErr() (*User, error) + type PetGroupBy struct + func (pgb *PetGroupBy) Aggregate(fns ...AggregateFunc) *PetGroupBy + func (pgb *PetGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (pgb *PetGroupBy) BoolX(ctx context.Context) bool + func (pgb *PetGroupBy) Bools(ctx context.Context) ([]bool, error) + func (pgb *PetGroupBy) BoolsX(ctx context.Context) []bool + func (pgb *PetGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (pgb *PetGroupBy) Float64X(ctx context.Context) float64 + func (pgb *PetGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (pgb *PetGroupBy) Float64sX(ctx context.Context) []float64 + func (pgb *PetGroupBy) Int(ctx context.Context) (_ int, err error) + func (pgb *PetGroupBy) IntX(ctx context.Context) int + func (pgb *PetGroupBy) Ints(ctx context.Context) ([]int, error) + func (pgb *PetGroupBy) IntsX(ctx context.Context) []int + func (pgb *PetGroupBy) Scan(ctx context.Context, v interface{}) error + func (pgb *PetGroupBy) ScanX(ctx context.Context, v interface{}) + func (pgb *PetGroupBy) String(ctx context.Context) (_ string, err error) + func (pgb *PetGroupBy) StringX(ctx context.Context) string + func (pgb *PetGroupBy) Strings(ctx context.Context) ([]string, error) + func (pgb *PetGroupBy) StringsX(ctx context.Context) []string + type PetMutation struct + func (m *PetMutation) AddAge(i int) + func (m *PetMutation) AddField(name string, value ent.Value) error + 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) ClearEdge(name string) error + func (m *PetMutation) ClearField(name string) error + func (m *PetMutation) ClearLicensedAt() + 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) ID() (id int, exists bool) + func (m *PetMutation) LicensedAt() (r time.Time, exists bool) + func (m *PetMutation) LicensedAtCleared() 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) OldLicensedAt(ctx context.Context) (v *time.Time, 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) RemovedEdges() []string + func (m *PetMutation) RemovedIDs(name string) []ent.Value + func (m *PetMutation) ResetAge() + func (m *PetMutation) ResetEdge(name string) error + func (m *PetMutation) ResetField(name string) error + func (m *PetMutation) ResetLicensedAt() + func (m *PetMutation) ResetOwner() + func (m *PetMutation) SetAge(i int) + func (m *PetMutation) SetField(name string, value ent.Value) error + func (m *PetMutation) SetLicensedAt(t time.Time) + func (m *PetMutation) SetOwnerID(id int) + func (m *PetMutation) Type() string + func (m PetMutation) Client() *Client + func (m PetMutation) Tx() (*Tx, error) + type PetQuery struct + 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) FirstX(ctx context.Context) *Pet + func (pq *PetQuery) FirstXID(ctx context.Context) int + func (pq *PetQuery) GroupBy(field string, fields ...string) *PetGroupBy + func (pq *PetQuery) IDs(ctx context.Context) ([]int, 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 ...OrderFunc) *PetQuery + func (pq *PetQuery) QueryOwner() *UserQuery + func (pq *PetQuery) Select(field string, fields ...string) *PetSelect + func (pq *PetQuery) Where(ps ...predicate.Pet) *PetQuery + func (pq *PetQuery) WithOwner(opts ...func(*UserQuery)) *PetQuery + type PetSelect struct + func (ps *PetSelect) Bool(ctx context.Context) (_ bool, err error) + func (ps *PetSelect) BoolX(ctx context.Context) bool + func (ps *PetSelect) Bools(ctx context.Context) ([]bool, error) + func (ps *PetSelect) BoolsX(ctx context.Context) []bool + func (ps *PetSelect) Float64(ctx context.Context) (_ float64, err error) + func (ps *PetSelect) Float64X(ctx context.Context) float64 + func (ps *PetSelect) Float64s(ctx context.Context) ([]float64, error) + func (ps *PetSelect) Float64sX(ctx context.Context) []float64 + func (ps *PetSelect) Int(ctx context.Context) (_ int, err error) + func (ps *PetSelect) IntX(ctx context.Context) int + func (ps *PetSelect) Ints(ctx context.Context) ([]int, error) + func (ps *PetSelect) IntsX(ctx context.Context) []int + func (ps *PetSelect) Scan(ctx context.Context, v interface{}) error + func (ps *PetSelect) ScanX(ctx context.Context, v interface{}) + func (ps *PetSelect) String(ctx context.Context) (_ string, err error) + func (ps *PetSelect) StringX(ctx context.Context) string + func (ps *PetSelect) Strings(ctx context.Context) ([]string, error) + func (ps *PetSelect) StringsX(ctx context.Context) []string + type PetUpdate struct + func (pu *PetUpdate) AddAge(i int) *PetUpdate + func (pu *PetUpdate) ClearLicensedAt() *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) Save(ctx context.Context) (int, error) + func (pu *PetUpdate) SaveX(ctx context.Context) int + func (pu *PetUpdate) SetAge(i int) *PetUpdate + func (pu *PetUpdate) SetLicensedAt(t time.Time) *PetUpdate + func (pu *PetUpdate) SetNillableLicensedAt(t *time.Time) *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) ClearLicensedAt() *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) Save(ctx context.Context) (*Pet, error) + func (puo *PetUpdateOne) SaveX(ctx context.Context) *Pet + func (puo *PetUpdateOne) SetAge(i int) *PetUpdateOne + func (puo *PetUpdateOne) SetLicensedAt(t time.Time) *PetUpdateOne + func (puo *PetUpdateOne) SetNillableLicensedAt(t *time.Time) *PetUpdateOne + func (puo *PetUpdateOne) SetNillableOwnerID(id *int) *PetUpdateOne + func (puo *PetUpdateOne) SetOwner(u *User) *PetUpdateOne + func (puo *PetUpdateOne) SetOwnerID(id int) *PetUpdateOne + type Pets []*Pet + type Policy = ent.Policy + type Query = ent.Query + 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 Tx struct + Group *GroupClient + 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 + Edges UserEdges + ID int + Name string + func (u *User) Node(ctx context.Context) (node *Node, err error) + func (u *User) QueryFriends() *UserQuery + func (u *User) QueryPets() *PetQuery + func (u *User) String() string + func (u *User) Unwrap() *User + func (u *User) Update() *UserUpdateOne + 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) Query() *UserQuery + func (c *UserClient) QueryFriends(u *User) *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) AddFriendIDs(ids ...int) *UserCreate + func (uc *UserCreate) AddFriends(u ...*User) *UserCreate + func (uc *UserCreate) AddPetIDs(ids ...int) *UserCreate + func (uc *UserCreate) AddPets(p ...*Pet) *UserCreate + 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) SetName(s string) *UserCreate + type UserCreateBulk struct + 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) + type UserEdges struct + Friends []*User + Pets []*Pet + func (e UserEdges) FriendsOrErr() ([]*User, error) + func (e UserEdges) PetsOrErr() ([]*Pet, error) + type UserGroupBy struct + func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy + func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (ugb *UserGroupBy) BoolX(ctx context.Context) bool + func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error) + func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool + func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (ugb *UserGroupBy) Float64X(ctx context.Context) float64 + func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64 + func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error) + func (ugb *UserGroupBy) IntX(ctx context.Context) int + func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error) + func (ugb *UserGroupBy) IntsX(ctx context.Context) []int + func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error + func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{}) + func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error) + func (ugb *UserGroupBy) StringX(ctx context.Context) string + func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error) + func (ugb *UserGroupBy) StringsX(ctx context.Context) []string + type UserMutation struct + func (m *UserMutation) AddField(name string, value ent.Value) error + func (m *UserMutation) AddFriendIDs(ids ...int) + func (m *UserMutation) AddPetIDs(ids ...int) + 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) ClearEdge(name string) error + func (m *UserMutation) ClearField(name string) error + 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) FriendsIDs() (ids []int) + func (m *UserMutation) ID() (id int, exists bool) + func (m *UserMutation) Name() (r string, exists bool) + 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) PetsIDs() (ids []int) + func (m *UserMutation) RemoveFriendIDs(ids ...int) + func (m *UserMutation) RemovePetIDs(ids ...int) + func (m *UserMutation) RemovedEdges() []string + func (m *UserMutation) RemovedFriendsIDs() (ids []int) + func (m *UserMutation) RemovedIDs(name string) []ent.Value + func (m *UserMutation) RemovedPetsIDs() (ids []int) + func (m *UserMutation) ResetEdge(name string) error + func (m *UserMutation) ResetField(name string) error + func (m *UserMutation) ResetFriends() + func (m *UserMutation) ResetName() + func (m *UserMutation) ResetPets() + func (m *UserMutation) SetField(name string, value ent.Value) error + func (m *UserMutation) SetName(s string) + func (m *UserMutation) Type() string + func (m UserMutation) Client() *Client + func (m UserMutation) Tx() (*Tx, error) + type UserQuery struct + 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) FirstX(ctx context.Context) *User + func (uq *UserQuery) FirstXID(ctx context.Context) int + func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy + func (uq *UserQuery) IDs(ctx context.Context) ([]int, 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 ...OrderFunc) *UserQuery + func (uq *UserQuery) QueryFriends() *UserQuery + func (uq *UserQuery) QueryPets() *PetQuery + func (uq *UserQuery) Select(field string, fields ...string) *UserSelect + func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery + func (uq *UserQuery) WithFriends(opts ...func(*UserQuery)) *UserQuery + func (uq *UserQuery) WithPets(opts ...func(*PetQuery)) *UserQuery + type UserSelect struct + func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error) + func (us *UserSelect) BoolX(ctx context.Context) bool + func (us *UserSelect) Bools(ctx context.Context) ([]bool, error) + func (us *UserSelect) BoolsX(ctx context.Context) []bool + func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error) + func (us *UserSelect) Float64X(ctx context.Context) float64 + func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error) + func (us *UserSelect) Float64sX(ctx context.Context) []float64 + func (us *UserSelect) Int(ctx context.Context) (_ int, err error) + func (us *UserSelect) IntX(ctx context.Context) int + func (us *UserSelect) Ints(ctx context.Context) ([]int, error) + func (us *UserSelect) IntsX(ctx context.Context) []int + func (us *UserSelect) Scan(ctx context.Context, v interface{}) error + func (us *UserSelect) ScanX(ctx context.Context, v interface{}) + func (us *UserSelect) String(ctx context.Context) (_ string, err error) + func (us *UserSelect) StringX(ctx context.Context) string + func (us *UserSelect) Strings(ctx context.Context) ([]string, error) + func (us *UserSelect) StringsX(ctx context.Context) []string + type UserUpdate struct + func (uu *UserUpdate) AddFriendIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) AddFriends(u ...*User) *UserUpdate + func (uu *UserUpdate) AddPetIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) AddPets(p ...*Pet) *UserUpdate + func (uu *UserUpdate) Exec(ctx context.Context) error + func (uu *UserUpdate) ExecX(ctx context.Context) + func (uu *UserUpdate) Mutation() *UserMutation + func (uu *UserUpdate) RemoveFriendIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) RemoveFriends(u ...*User) *UserUpdate + 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) SetName(s string) *UserUpdate + func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate + type UserUpdateOne struct + func (uuo *UserUpdateOne) AddFriendIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) AddFriends(u ...*User) *UserUpdateOne + func (uuo *UserUpdateOne) AddPetIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) AddPets(p ...*Pet) *UserUpdateOne + func (uuo *UserUpdateOne) Exec(ctx context.Context) error + func (uuo *UserUpdateOne) ExecX(ctx context.Context) + func (uuo *UserUpdateOne) Mutation() *UserMutation + func (uuo *UserUpdateOne) RemoveFriendIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) RemoveFriends(u ...*User) *UserUpdateOne + 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) SetName(s string) *UserUpdateOne + type Users []*User + type ValidationError struct + Name string + func (e *ValidationError) Error() string + func (e *ValidationError) Unwrap() error + type Value = ent.Value