Versions in this module Expand all Collapse all v0 v0.1.1 Feb 23, 2022 v0.1.0 Dec 3, 2021 Changes in this version + const OpCreate + const OpDelete + const OpDeleteOne + const OpUpdate + const OpUpdateOne + const TypeCar + const TypeGroup + 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 Car struct + Edges CarEdges + ID int + Model string + RegisteredAt time.Time + func (c *Car) QueryOwner() *UserQuery + func (c *Car) String() string + func (c *Car) Unwrap() *Car + func (c *Car) Update() *CarUpdateOne + type CarClient struct + func NewCarClient(c config) *CarClient + func (c *CarClient) Create() *CarCreate + func (c *CarClient) CreateBulk(builders ...*CarCreate) *CarCreateBulk + func (c *CarClient) Delete() *CarDelete + func (c *CarClient) DeleteOne(ca *Car) *CarDeleteOne + func (c *CarClient) DeleteOneID(id int) *CarDeleteOne + func (c *CarClient) Get(ctx context.Context, id int) (*Car, error) + func (c *CarClient) GetX(ctx context.Context, id int) *Car + func (c *CarClient) Hooks() []Hook + func (c *CarClient) Query() *CarQuery + func (c *CarClient) QueryOwner(ca *Car) *UserQuery + func (c *CarClient) Update() *CarUpdate + func (c *CarClient) UpdateOne(ca *Car) *CarUpdateOne + func (c *CarClient) UpdateOneID(id int) *CarUpdateOne + func (c *CarClient) Use(hooks ...Hook) + type CarCreate struct + func (cc *CarCreate) Exec(ctx context.Context) error + func (cc *CarCreate) ExecX(ctx context.Context) + func (cc *CarCreate) Mutation() *CarMutation + func (cc *CarCreate) Save(ctx context.Context) (*Car, error) + func (cc *CarCreate) SaveX(ctx context.Context) *Car + func (cc *CarCreate) SetModel(s string) *CarCreate + func (cc *CarCreate) SetNillableOwnerID(id *int) *CarCreate + func (cc *CarCreate) SetOwner(u *User) *CarCreate + func (cc *CarCreate) SetOwnerID(id int) *CarCreate + func (cc *CarCreate) SetRegisteredAt(t time.Time) *CarCreate + type CarCreateBulk struct + func (ccb *CarCreateBulk) Exec(ctx context.Context) error + func (ccb *CarCreateBulk) ExecX(ctx context.Context) + func (ccb *CarCreateBulk) Save(ctx context.Context) ([]*Car, error) + func (ccb *CarCreateBulk) SaveX(ctx context.Context) []*Car + type CarDelete struct + func (cd *CarDelete) Exec(ctx context.Context) (int, error) + func (cd *CarDelete) ExecX(ctx context.Context) int + func (cd *CarDelete) Where(ps ...predicate.Car) *CarDelete + type CarDeleteOne struct + func (cdo *CarDeleteOne) Exec(ctx context.Context) error + func (cdo *CarDeleteOne) ExecX(ctx context.Context) + type CarEdges struct + Owner *User + func (e CarEdges) OwnerOrErr() (*User, error) + type CarGroupBy struct + func (cgb *CarGroupBy) Aggregate(fns ...AggregateFunc) *CarGroupBy + func (cgb *CarGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (cgb *CarGroupBy) BoolX(ctx context.Context) bool + func (cgb *CarGroupBy) Bools(ctx context.Context) ([]bool, error) + func (cgb *CarGroupBy) BoolsX(ctx context.Context) []bool + func (cgb *CarGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (cgb *CarGroupBy) Float64X(ctx context.Context) float64 + func (cgb *CarGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (cgb *CarGroupBy) Float64sX(ctx context.Context) []float64 + func (cgb *CarGroupBy) Int(ctx context.Context) (_ int, err error) + func (cgb *CarGroupBy) IntX(ctx context.Context) int + func (cgb *CarGroupBy) Ints(ctx context.Context) ([]int, error) + func (cgb *CarGroupBy) IntsX(ctx context.Context) []int + func (cgb *CarGroupBy) Scan(ctx context.Context, v interface{}) error + func (cgb *CarGroupBy) ScanX(ctx context.Context, v interface{}) + func (cgb *CarGroupBy) String(ctx context.Context) (_ string, err error) + func (cgb *CarGroupBy) StringX(ctx context.Context) string + func (cgb *CarGroupBy) Strings(ctx context.Context) ([]string, error) + func (cgb *CarGroupBy) StringsX(ctx context.Context) []string + type CarMutation struct + func (m *CarMutation) AddField(name string, value ent.Value) error + func (m *CarMutation) AddedEdges() []string + func (m *CarMutation) AddedField(name string) (ent.Value, bool) + func (m *CarMutation) AddedFields() []string + func (m *CarMutation) AddedIDs(name string) []ent.Value + func (m *CarMutation) ClearEdge(name string) error + func (m *CarMutation) ClearField(name string) error + func (m *CarMutation) ClearOwner() + func (m *CarMutation) ClearedEdges() []string + func (m *CarMutation) ClearedFields() []string + func (m *CarMutation) EdgeCleared(name string) bool + func (m *CarMutation) Field(name string) (ent.Value, bool) + func (m *CarMutation) FieldCleared(name string) bool + func (m *CarMutation) Fields() []string + func (m *CarMutation) ID() (id int, exists bool) + func (m *CarMutation) Model() (r string, exists bool) + func (m *CarMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *CarMutation) OldModel(ctx context.Context) (v string, err error) + func (m *CarMutation) OldRegisteredAt(ctx context.Context) (v time.Time, err error) + func (m *CarMutation) Op() Op + func (m *CarMutation) OwnerCleared() bool + func (m *CarMutation) OwnerID() (id int, exists bool) + func (m *CarMutation) OwnerIDs() (ids []int) + func (m *CarMutation) RegisteredAt() (r time.Time, exists bool) + func (m *CarMutation) RemovedEdges() []string + func (m *CarMutation) RemovedIDs(name string) []ent.Value + func (m *CarMutation) ResetEdge(name string) error + func (m *CarMutation) ResetField(name string) error + func (m *CarMutation) ResetModel() + func (m *CarMutation) ResetOwner() + func (m *CarMutation) ResetRegisteredAt() + func (m *CarMutation) SetField(name string, value ent.Value) error + func (m *CarMutation) SetModel(s string) + func (m *CarMutation) SetOwnerID(id int) + func (m *CarMutation) SetRegisteredAt(t time.Time) + func (m *CarMutation) Type() string + func (m *CarMutation) Where(ps ...predicate.Car) + func (m CarMutation) Client() *Client + func (m CarMutation) Tx() (*Tx, error) + type CarQuery struct + func (cq *CarQuery) All(ctx context.Context) ([]*Car, error) + func (cq *CarQuery) AllX(ctx context.Context) []*Car + func (cq *CarQuery) Clone() *CarQuery + func (cq *CarQuery) Count(ctx context.Context) (int, error) + func (cq *CarQuery) CountX(ctx context.Context) int + func (cq *CarQuery) Exist(ctx context.Context) (bool, error) + func (cq *CarQuery) ExistX(ctx context.Context) bool + func (cq *CarQuery) First(ctx context.Context) (*Car, error) + func (cq *CarQuery) FirstID(ctx context.Context) (id int, err error) + func (cq *CarQuery) FirstIDX(ctx context.Context) int + func (cq *CarQuery) FirstX(ctx context.Context) *Car + func (cq *CarQuery) GroupBy(field string, fields ...string) *CarGroupBy + func (cq *CarQuery) IDs(ctx context.Context) ([]int, error) + func (cq *CarQuery) IDsX(ctx context.Context) []int + func (cq *CarQuery) Limit(limit int) *CarQuery + func (cq *CarQuery) Offset(offset int) *CarQuery + func (cq *CarQuery) Only(ctx context.Context) (*Car, error) + func (cq *CarQuery) OnlyID(ctx context.Context) (id int, err error) + func (cq *CarQuery) OnlyIDX(ctx context.Context) int + func (cq *CarQuery) OnlyX(ctx context.Context) *Car + func (cq *CarQuery) Order(o ...OrderFunc) *CarQuery + func (cq *CarQuery) QueryOwner() *UserQuery + func (cq *CarQuery) Select(fields ...string) *CarSelect + func (cq *CarQuery) Unique(unique bool) *CarQuery + func (cq *CarQuery) Where(ps ...predicate.Car) *CarQuery + func (cq *CarQuery) WithOwner(opts ...func(*UserQuery)) *CarQuery + type CarSelect struct + func (cs *CarSelect) Bool(ctx context.Context) (_ bool, err error) + func (cs *CarSelect) BoolX(ctx context.Context) bool + func (cs *CarSelect) Bools(ctx context.Context) ([]bool, error) + func (cs *CarSelect) BoolsX(ctx context.Context) []bool + func (cs *CarSelect) Float64(ctx context.Context) (_ float64, err error) + func (cs *CarSelect) Float64X(ctx context.Context) float64 + func (cs *CarSelect) Float64s(ctx context.Context) ([]float64, error) + func (cs *CarSelect) Float64sX(ctx context.Context) []float64 + func (cs *CarSelect) Int(ctx context.Context) (_ int, err error) + func (cs *CarSelect) IntX(ctx context.Context) int + func (cs *CarSelect) Ints(ctx context.Context) ([]int, error) + func (cs *CarSelect) IntsX(ctx context.Context) []int + func (cs *CarSelect) Scan(ctx context.Context, v interface{}) error + func (cs *CarSelect) ScanX(ctx context.Context, v interface{}) + func (cs *CarSelect) String(ctx context.Context) (_ string, err error) + func (cs *CarSelect) StringX(ctx context.Context) string + func (cs *CarSelect) Strings(ctx context.Context) ([]string, error) + func (cs *CarSelect) StringsX(ctx context.Context) []string + type CarUpdate struct + func (cu *CarUpdate) ClearOwner() *CarUpdate + func (cu *CarUpdate) Exec(ctx context.Context) error + func (cu *CarUpdate) ExecX(ctx context.Context) + func (cu *CarUpdate) Mutation() *CarMutation + func (cu *CarUpdate) Save(ctx context.Context) (int, error) + func (cu *CarUpdate) SaveX(ctx context.Context) int + func (cu *CarUpdate) SetModel(s string) *CarUpdate + func (cu *CarUpdate) SetNillableOwnerID(id *int) *CarUpdate + func (cu *CarUpdate) SetOwner(u *User) *CarUpdate + func (cu *CarUpdate) SetOwnerID(id int) *CarUpdate + func (cu *CarUpdate) SetRegisteredAt(t time.Time) *CarUpdate + func (cu *CarUpdate) Where(ps ...predicate.Car) *CarUpdate + type CarUpdateOne struct + func (cuo *CarUpdateOne) ClearOwner() *CarUpdateOne + func (cuo *CarUpdateOne) Exec(ctx context.Context) error + func (cuo *CarUpdateOne) ExecX(ctx context.Context) + func (cuo *CarUpdateOne) Mutation() *CarMutation + func (cuo *CarUpdateOne) Save(ctx context.Context) (*Car, error) + func (cuo *CarUpdateOne) SaveX(ctx context.Context) *Car + func (cuo *CarUpdateOne) Select(field string, fields ...string) *CarUpdateOne + func (cuo *CarUpdateOne) SetModel(s string) *CarUpdateOne + func (cuo *CarUpdateOne) SetNillableOwnerID(id *int) *CarUpdateOne + func (cuo *CarUpdateOne) SetOwner(u *User) *CarUpdateOne + func (cuo *CarUpdateOne) SetOwnerID(id int) *CarUpdateOne + func (cuo *CarUpdateOne) SetRegisteredAt(t time.Time) *CarUpdateOne + type Cars []*Car + type Client struct + Car *CarClient + Group *GroupClient + 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) 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 Group struct + Edges GroupEdges + ID int + Name string + func (gr *Group) QueryUsers() *UserQuery + 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) QueryUsers(gr *Group) *UserQuery + 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) AddUserIDs(ids ...int) *GroupCreate + func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate + func (gc *GroupCreate) Exec(ctx context.Context) error + func (gc *GroupCreate) ExecX(ctx context.Context) + 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) SetName(s string) *GroupCreate + type GroupCreateBulk struct + func (gcb *GroupCreateBulk) Exec(ctx context.Context) error + func (gcb *GroupCreateBulk) ExecX(ctx context.Context) + 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 GroupEdges struct + Users []*User + func (e GroupEdges) UsersOrErr() ([]*User, error) + 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) AddUserIDs(ids ...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) ClearEdge(name string) error + func (m *GroupMutation) ClearField(name string) error + func (m *GroupMutation) ClearUsers() + 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) Name() (r string, exists bool) + func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *GroupMutation) OldName(ctx context.Context) (v string, err error) + func (m *GroupMutation) Op() Op + func (m *GroupMutation) RemoveUserIDs(ids ...int) + func (m *GroupMutation) RemovedEdges() []string + func (m *GroupMutation) RemovedIDs(name string) []ent.Value + func (m *GroupMutation) RemovedUsersIDs() (ids []int) + func (m *GroupMutation) ResetEdge(name string) error + func (m *GroupMutation) ResetField(name string) error + func (m *GroupMutation) ResetName() + func (m *GroupMutation) ResetUsers() + func (m *GroupMutation) SetField(name string, value ent.Value) error + func (m *GroupMutation) SetName(s string) + func (m *GroupMutation) Type() string + func (m *GroupMutation) UsersCleared() bool + func (m *GroupMutation) UsersIDs() (ids []int) + func (m *GroupMutation) Where(ps ...predicate.Group) + 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) FirstIDX(ctx context.Context) int + func (gq *GroupQuery) FirstX(ctx context.Context) *Group + 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) QueryUsers() *UserQuery + func (gq *GroupQuery) Select(fields ...string) *GroupSelect + func (gq *GroupQuery) Unique(unique bool) *GroupQuery + func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery + func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *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) AddUserIDs(ids ...int) *GroupUpdate + func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate + func (gu *GroupUpdate) ClearUsers() *GroupUpdate + func (gu *GroupUpdate) Exec(ctx context.Context) error + func (gu *GroupUpdate) ExecX(ctx context.Context) + func (gu *GroupUpdate) Mutation() *GroupMutation + func (gu *GroupUpdate) RemoveUserIDs(ids ...int) *GroupUpdate + func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate + func (gu *GroupUpdate) Save(ctx context.Context) (int, error) + func (gu *GroupUpdate) SaveX(ctx context.Context) int + func (gu *GroupUpdate) SetName(s string) *GroupUpdate + func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate + type GroupUpdateOne struct + func (guo *GroupUpdateOne) AddUserIDs(ids ...int) *GroupUpdateOne + func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne + func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne + func (guo *GroupUpdateOne) Exec(ctx context.Context) error + func (guo *GroupUpdateOne) ExecX(ctx context.Context) + func (guo *GroupUpdateOne) Mutation() *GroupMutation + func (guo *GroupUpdateOne) RemoveUserIDs(ids ...int) *GroupUpdateOne + func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne + func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error) + func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group + func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne + func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne + type Groups []*Group + type Hook = ent.Hook + 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(...interface{})) Option + type OrderFunc func(*sql.Selector) + func Asc(fields ...string) OrderFunc + func Desc(fields ...string) OrderFunc + 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 + Car *CarClient + Group *GroupClient + 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 + Email *string + ID int + Name string + func (u *User) QueryCars() *CarQuery + func (u *User) QueryGroups() *GroupQuery + 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) QueryCars(u *User) *CarQuery + func (c *UserClient) QueryGroups(u *User) *GroupQuery + 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) AddCarIDs(ids ...int) *UserCreate + func (uc *UserCreate) AddCars(c ...*Car) *UserCreate + func (uc *UserCreate) AddGroupIDs(ids ...int) *UserCreate + func (uc *UserCreate) AddGroups(g ...*Group) *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) SetEmail(s string) *UserCreate + func (uc *UserCreate) SetName(s string) *UserCreate + func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate + func (uc *UserCreate) SetNillableName(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) + type UserEdges struct + Cars []*Car + Groups []*Group + func (e UserEdges) CarsOrErr() ([]*Car, error) + func (e UserEdges) GroupsOrErr() ([]*Group, 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) AddAge(i int) + func (m *UserMutation) AddCarIDs(ids ...int) + func (m *UserMutation) AddField(name string, value ent.Value) error + func (m *UserMutation) AddGroupIDs(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) CarsCleared() bool + func (m *UserMutation) CarsIDs() (ids []int) + func (m *UserMutation) ClearCars() + func (m *UserMutation) ClearEdge(name string) error + func (m *UserMutation) ClearEmail() + func (m *UserMutation) ClearField(name string) error + func (m *UserMutation) ClearGroups() + func (m *UserMutation) ClearedEdges() []string + func (m *UserMutation) ClearedFields() []string + func (m *UserMutation) EdgeCleared(name string) bool + func (m *UserMutation) Email() (r string, exists bool) + func (m *UserMutation) EmailCleared() 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) GroupsCleared() bool + func (m *UserMutation) GroupsIDs() (ids []int) + func (m *UserMutation) ID() (id int, exists bool) + func (m *UserMutation) Name() (r string, exists bool) + func (m *UserMutation) OldAge(ctx context.Context) (v int, err error) + func (m *UserMutation) OldEmail(ctx context.Context) (v *string, 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) RemoveCarIDs(ids ...int) + func (m *UserMutation) RemoveGroupIDs(ids ...int) + func (m *UserMutation) RemovedCarsIDs() (ids []int) + func (m *UserMutation) RemovedEdges() []string + func (m *UserMutation) RemovedGroupsIDs() (ids []int) + func (m *UserMutation) RemovedIDs(name string) []ent.Value + func (m *UserMutation) ResetAge() + func (m *UserMutation) ResetCars() + func (m *UserMutation) ResetEdge(name string) error + func (m *UserMutation) ResetEmail() + func (m *UserMutation) ResetField(name string) error + func (m *UserMutation) ResetGroups() + func (m *UserMutation) ResetName() + func (m *UserMutation) SetAge(i int) + func (m *UserMutation) SetEmail(s string) + func (m *UserMutation) SetField(name string, value ent.Value) error + func (m *UserMutation) SetName(s string) + func (m *UserMutation) Type() string + func (m *UserMutation) Where(ps ...predicate.User) + 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) 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) ([]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) QueryCars() *CarQuery + func (uq *UserQuery) QueryGroups() *GroupQuery + 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) WithCars(opts ...func(*CarQuery)) *UserQuery + func (uq *UserQuery) WithGroups(opts ...func(*GroupQuery)) *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) AddAge(i int) *UserUpdate + func (uu *UserUpdate) AddCarIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) AddCars(c ...*Car) *UserUpdate + func (uu *UserUpdate) AddGroupIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) AddGroups(g ...*Group) *UserUpdate + func (uu *UserUpdate) ClearCars() *UserUpdate + func (uu *UserUpdate) ClearEmail() *UserUpdate + func (uu *UserUpdate) ClearGroups() *UserUpdate + func (uu *UserUpdate) Exec(ctx context.Context) error + func (uu *UserUpdate) ExecX(ctx context.Context) + func (uu *UserUpdate) Mutation() *UserMutation + func (uu *UserUpdate) RemoveCarIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) RemoveCars(c ...*Car) *UserUpdate + func (uu *UserUpdate) RemoveGroupIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) RemoveGroups(g ...*Group) *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) SetEmail(s string) *UserUpdate + func (uu *UserUpdate) SetName(s string) *UserUpdate + func (uu *UserUpdate) SetNillableEmail(s *string) *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) AddCarIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) AddCars(c ...*Car) *UserUpdateOne + func (uuo *UserUpdateOne) AddGroupIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) AddGroups(g ...*Group) *UserUpdateOne + func (uuo *UserUpdateOne) ClearCars() *UserUpdateOne + func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne + func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne + func (uuo *UserUpdateOne) Exec(ctx context.Context) error + func (uuo *UserUpdateOne) ExecX(ctx context.Context) + func (uuo *UserUpdateOne) Mutation() *UserMutation + func (uuo *UserUpdateOne) RemoveCarIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) RemoveCars(c ...*Car) *UserUpdateOne + func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) RemoveGroups(g ...*Group) *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) SetEmail(s string) *UserUpdateOne + func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne + func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne + func (uuo *UserUpdateOne) SetNillableName(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