Versions in this module Expand all Collapse all v1 v1.0.1 Apr 12, 2022 Changes in this version + const OpCreate + const OpDelete + const OpDeleteOne + const OpUpdate + const OpUpdateOne + const TypeCard + 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 Card struct + CreatedAt time.Time + Edges CardEdges + ID int + InHook string + Name string + Number string + func (c *Card) QueryOwner() *UserQuery + func (c *Card) String() string + func (c *Card) Unwrap() *Card + func (c *Card) Update() *CardUpdateOne + type CardClient struct + func NewCardClient(c config) *CardClient + func (c *CardClient) Create() *CardCreate + func (c *CardClient) CreateBulk(builders ...*CardCreate) *CardCreateBulk + func (c *CardClient) Delete() *CardDelete + func (c *CardClient) DeleteOne(ca *Card) *CardDeleteOne + func (c *CardClient) DeleteOneID(id int) *CardDeleteOne + func (c *CardClient) Get(ctx context.Context, id int) (*Card, error) + func (c *CardClient) GetX(ctx context.Context, id int) *Card + func (c *CardClient) Hooks() []Hook + func (c *CardClient) Query() *CardQuery + func (c *CardClient) QueryOwner(ca *Card) *UserQuery + func (c *CardClient) Update() *CardUpdate + func (c *CardClient) UpdateOne(ca *Card) *CardUpdateOne + func (c *CardClient) UpdateOneID(id int) *CardUpdateOne + func (c *CardClient) Use(hooks ...Hook) + type CardCreate struct + func (cc *CardCreate) Exec(ctx context.Context) error + func (cc *CardCreate) ExecX(ctx context.Context) + func (cc *CardCreate) Mutation() *CardMutation + func (cc *CardCreate) Save(ctx context.Context) (*Card, error) + func (cc *CardCreate) SaveX(ctx context.Context) *Card + func (cc *CardCreate) SetCreatedAt(t time.Time) *CardCreate + func (cc *CardCreate) SetInHook(s string) *CardCreate + func (cc *CardCreate) SetName(s string) *CardCreate + func (cc *CardCreate) SetNillableCreatedAt(t *time.Time) *CardCreate + func (cc *CardCreate) SetNillableName(s *string) *CardCreate + func (cc *CardCreate) SetNillableNumber(s *string) *CardCreate + func (cc *CardCreate) SetNillableOwnerID(id *int) *CardCreate + func (cc *CardCreate) SetNumber(s string) *CardCreate + func (cc *CardCreate) SetOwner(u *User) *CardCreate + func (cc *CardCreate) SetOwnerID(id int) *CardCreate + type CardCreateBulk struct + func (ccb *CardCreateBulk) Exec(ctx context.Context) error + func (ccb *CardCreateBulk) ExecX(ctx context.Context) + func (ccb *CardCreateBulk) Save(ctx context.Context) ([]*Card, error) + func (ccb *CardCreateBulk) SaveX(ctx context.Context) []*Card + type CardDelete struct + func (cd *CardDelete) Exec(ctx context.Context) (int, error) + func (cd *CardDelete) ExecX(ctx context.Context) int + func (cd *CardDelete) Where(ps ...predicate.Card) *CardDelete + type CardDeleteOne struct + func (cdo *CardDeleteOne) Exec(ctx context.Context) error + func (cdo *CardDeleteOne) ExecX(ctx context.Context) + type CardEdges struct + Owner *User + func (e CardEdges) OwnerOrErr() (*User, error) + type CardGroupBy struct + func (cgb *CardGroupBy) Aggregate(fns ...AggregateFunc) *CardGroupBy + func (cgb *CardGroupBy) Scan(ctx context.Context, v interface{}) error + func (s *CardGroupBy) Bool(ctx context.Context) (_ bool, err error) + func (s *CardGroupBy) BoolX(ctx context.Context) bool + func (s *CardGroupBy) Bools(ctx context.Context) ([]bool, error) + func (s *CardGroupBy) BoolsX(ctx context.Context) []bool + func (s *CardGroupBy) Float64(ctx context.Context) (_ float64, err error) + func (s *CardGroupBy) Float64X(ctx context.Context) float64 + func (s *CardGroupBy) Float64s(ctx context.Context) ([]float64, error) + func (s *CardGroupBy) Float64sX(ctx context.Context) []float64 + func (s *CardGroupBy) Int(ctx context.Context) (_ int, err error) + func (s *CardGroupBy) IntX(ctx context.Context) int + func (s *CardGroupBy) Ints(ctx context.Context) ([]int, error) + func (s *CardGroupBy) IntsX(ctx context.Context) []int + func (s *CardGroupBy) ScanX(ctx context.Context, v interface{}) + func (s *CardGroupBy) String(ctx context.Context) (_ string, err error) + func (s *CardGroupBy) StringX(ctx context.Context) string + func (s *CardGroupBy) Strings(ctx context.Context) ([]string, error) + func (s *CardGroupBy) StringsX(ctx context.Context) []string + type CardMutation struct + func (m *CardMutation) AddField(name string, value ent.Value) error + func (m *CardMutation) AddedEdges() []string + func (m *CardMutation) AddedField(name string) (ent.Value, bool) + func (m *CardMutation) AddedFields() []string + func (m *CardMutation) AddedIDs(name string) []ent.Value + func (m *CardMutation) ClearEdge(name string) error + func (m *CardMutation) ClearField(name string) error + func (m *CardMutation) ClearName() + func (m *CardMutation) ClearOwner() + func (m *CardMutation) ClearedEdges() []string + func (m *CardMutation) ClearedFields() []string + func (m *CardMutation) CreatedAt() (r time.Time, exists bool) + func (m *CardMutation) EdgeCleared(name string) bool + func (m *CardMutation) Field(name string) (ent.Value, bool) + func (m *CardMutation) FieldCleared(name string) bool + func (m *CardMutation) Fields() []string + func (m *CardMutation) ID() (id int, exists bool) + func (m *CardMutation) IDs(ctx context.Context) ([]int, error) + func (m *CardMutation) InHook() (r string, exists bool) + func (m *CardMutation) Name() (r string, exists bool) + func (m *CardMutation) NameCleared() bool + func (m *CardMutation) Number() (r string, exists bool) + func (m *CardMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error) + func (m *CardMutation) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *CardMutation) OldInHook(ctx context.Context) (v string, err error) + func (m *CardMutation) OldName(ctx context.Context) (v string, err error) + func (m *CardMutation) OldNumber(ctx context.Context) (v string, err error) + func (m *CardMutation) Op() Op + func (m *CardMutation) OwnerCleared() bool + func (m *CardMutation) OwnerID() (id int, exists bool) + func (m *CardMutation) OwnerIDs() (ids []int) + func (m *CardMutation) RemovedEdges() []string + func (m *CardMutation) RemovedIDs(name string) []ent.Value + func (m *CardMutation) ResetCreatedAt() + func (m *CardMutation) ResetEdge(name string) error + func (m *CardMutation) ResetField(name string) error + func (m *CardMutation) ResetInHook() + func (m *CardMutation) ResetName() + func (m *CardMutation) ResetNumber() + func (m *CardMutation) ResetOwner() + func (m *CardMutation) SetCreatedAt(t time.Time) + func (m *CardMutation) SetField(name string, value ent.Value) error + func (m *CardMutation) SetInHook(s string) + func (m *CardMutation) SetName(s string) + func (m *CardMutation) SetNumber(s string) + func (m *CardMutation) SetOwnerID(id int) + func (m *CardMutation) Type() string + func (m *CardMutation) Where(ps ...predicate.Card) + func (m CardMutation) Client() *Client + func (m CardMutation) Tx() (*Tx, error) + type CardQuery struct + func (cq *CardQuery) All(ctx context.Context) ([]*Card, error) + func (cq *CardQuery) AllX(ctx context.Context) []*Card + func (cq *CardQuery) Clone() *CardQuery + func (cq *CardQuery) Count(ctx context.Context) (int, error) + func (cq *CardQuery) CountX(ctx context.Context) int + func (cq *CardQuery) Exist(ctx context.Context) (bool, error) + func (cq *CardQuery) ExistX(ctx context.Context) bool + func (cq *CardQuery) First(ctx context.Context) (*Card, error) + func (cq *CardQuery) FirstID(ctx context.Context) (id int, err error) + func (cq *CardQuery) FirstIDX(ctx context.Context) int + func (cq *CardQuery) FirstX(ctx context.Context) *Card + func (cq *CardQuery) GroupBy(field string, fields ...string) *CardGroupBy + func (cq *CardQuery) IDs(ctx context.Context) ([]int, error) + func (cq *CardQuery) IDsX(ctx context.Context) []int + func (cq *CardQuery) Limit(limit int) *CardQuery + func (cq *CardQuery) Offset(offset int) *CardQuery + func (cq *CardQuery) Only(ctx context.Context) (*Card, error) + func (cq *CardQuery) OnlyID(ctx context.Context) (id int, err error) + func (cq *CardQuery) OnlyIDX(ctx context.Context) int + func (cq *CardQuery) OnlyX(ctx context.Context) *Card + func (cq *CardQuery) Order(o ...OrderFunc) *CardQuery + func (cq *CardQuery) QueryOwner() *UserQuery + func (cq *CardQuery) Select(fields ...string) *CardSelect + func (cq *CardQuery) Unique(unique bool) *CardQuery + func (cq *CardQuery) Where(ps ...predicate.Card) *CardQuery + func (cq *CardQuery) WithOwner(opts ...func(*UserQuery)) *CardQuery + type CardSelect struct + func (cs *CardSelect) Scan(ctx context.Context, v interface{}) error + func (s *CardSelect) Bool(ctx context.Context) (_ bool, err error) + func (s *CardSelect) BoolX(ctx context.Context) bool + func (s *CardSelect) Bools(ctx context.Context) ([]bool, error) + func (s *CardSelect) BoolsX(ctx context.Context) []bool + func (s *CardSelect) Float64(ctx context.Context) (_ float64, err error) + func (s *CardSelect) Float64X(ctx context.Context) float64 + func (s *CardSelect) Float64s(ctx context.Context) ([]float64, error) + func (s *CardSelect) Float64sX(ctx context.Context) []float64 + func (s *CardSelect) Int(ctx context.Context) (_ int, err error) + func (s *CardSelect) IntX(ctx context.Context) int + func (s *CardSelect) Ints(ctx context.Context) ([]int, error) + func (s *CardSelect) IntsX(ctx context.Context) []int + func (s *CardSelect) ScanX(ctx context.Context, v interface{}) + func (s *CardSelect) String(ctx context.Context) (_ string, err error) + func (s *CardSelect) StringX(ctx context.Context) string + func (s *CardSelect) Strings(ctx context.Context) ([]string, error) + func (s *CardSelect) StringsX(ctx context.Context) []string + type CardUpdate struct + func (cu *CardUpdate) ClearName() *CardUpdate + func (cu *CardUpdate) ClearOwner() *CardUpdate + func (cu *CardUpdate) Exec(ctx context.Context) error + func (cu *CardUpdate) ExecX(ctx context.Context) + func (cu *CardUpdate) Mutation() *CardMutation + func (cu *CardUpdate) Save(ctx context.Context) (int, error) + func (cu *CardUpdate) SaveX(ctx context.Context) int + func (cu *CardUpdate) SetCreatedAt(t time.Time) *CardUpdate + func (cu *CardUpdate) SetInHook(s string) *CardUpdate + func (cu *CardUpdate) SetName(s string) *CardUpdate + func (cu *CardUpdate) SetNillableCreatedAt(t *time.Time) *CardUpdate + func (cu *CardUpdate) SetNillableName(s *string) *CardUpdate + func (cu *CardUpdate) SetNillableOwnerID(id *int) *CardUpdate + func (cu *CardUpdate) SetOwner(u *User) *CardUpdate + func (cu *CardUpdate) SetOwnerID(id int) *CardUpdate + func (cu *CardUpdate) Where(ps ...predicate.Card) *CardUpdate + type CardUpdateOne struct + func (cuo *CardUpdateOne) ClearName() *CardUpdateOne + func (cuo *CardUpdateOne) ClearOwner() *CardUpdateOne + func (cuo *CardUpdateOne) Exec(ctx context.Context) error + func (cuo *CardUpdateOne) ExecX(ctx context.Context) + func (cuo *CardUpdateOne) Mutation() *CardMutation + func (cuo *CardUpdateOne) Save(ctx context.Context) (*Card, error) + func (cuo *CardUpdateOne) SaveX(ctx context.Context) *Card + func (cuo *CardUpdateOne) Select(field string, fields ...string) *CardUpdateOne + func (cuo *CardUpdateOne) SetCreatedAt(t time.Time) *CardUpdateOne + func (cuo *CardUpdateOne) SetInHook(s string) *CardUpdateOne + func (cuo *CardUpdateOne) SetName(s string) *CardUpdateOne + func (cuo *CardUpdateOne) SetNillableCreatedAt(t *time.Time) *CardUpdateOne + func (cuo *CardUpdateOne) SetNillableName(s *string) *CardUpdateOne + func (cuo *CardUpdateOne) SetNillableOwnerID(id *int) *CardUpdateOne + func (cuo *CardUpdateOne) SetOwner(u *User) *CardUpdateOne + func (cuo *CardUpdateOne) SetOwnerID(id int) *CardUpdateOne + type Cards []*Card + type Client struct + Card *CardClient + 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 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 + Card *CardClient + 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 + Password string + Version int + Worth uint + func (u *User) QueryBestFriend() *UserQuery + func (u *User) QueryCards() *CardQuery + func (u *User) QueryFriends() *UserQuery + 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) QueryBestFriend(u *User) *UserQuery + func (c *UserClient) QueryCards(u *User) *CardQuery + func (c *UserClient) QueryFriends(u *User) *UserQuery + 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) AddCardIDs(ids ...int) *UserCreate + func (uc *UserCreate) AddCards(c ...*Card) *UserCreate + func (uc *UserCreate) AddFriendIDs(ids ...int) *UserCreate + func (uc *UserCreate) AddFriends(u ...*User) *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) SetBestFriend(u *User) *UserCreate + func (uc *UserCreate) SetBestFriendID(id int) *UserCreate + func (uc *UserCreate) SetName(s string) *UserCreate + func (uc *UserCreate) SetNillableBestFriendID(id *int) *UserCreate + func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate + func (uc *UserCreate) SetNillableVersion(i *int) *UserCreate + func (uc *UserCreate) SetNillableWorth(u *uint) *UserCreate + func (uc *UserCreate) SetPassword(s string) *UserCreate + func (uc *UserCreate) SetVersion(i int) *UserCreate + func (uc *UserCreate) SetWorth(u uint) *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 + BestFriend *User + Cards []*Card + Friends []*User + func (e UserEdges) BestFriendOrErr() (*User, error) + func (e UserEdges) CardsOrErr() ([]*Card, error) + func (e UserEdges) FriendsOrErr() ([]*User, 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 interface{}) + 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 interface{}) error + type UserMutation struct + func (m *UserMutation) AddCardIDs(ids ...int) + func (m *UserMutation) AddField(name string, value ent.Value) error + func (m *UserMutation) AddFriendIDs(ids ...int) + func (m *UserMutation) AddVersion(i int) + func (m *UserMutation) AddWorth(u 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) AddedVersion() (r int, exists bool) + func (m *UserMutation) AddedWorth() (r int, exists bool) + func (m *UserMutation) BestFriendCleared() bool + func (m *UserMutation) BestFriendID() (id int, exists bool) + func (m *UserMutation) BestFriendIDs() (ids []int) + func (m *UserMutation) CardsCleared() bool + func (m *UserMutation) CardsIDs() (ids []int) + func (m *UserMutation) ClearBestFriend() + func (m *UserMutation) ClearCards() + func (m *UserMutation) ClearEdge(name string) error + func (m *UserMutation) ClearField(name string) error + func (m *UserMutation) ClearFriends() + func (m *UserMutation) ClearPassword() + func (m *UserMutation) ClearWorth() + 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) FriendsCleared() bool + func (m *UserMutation) FriendsIDs() (ids []int) + 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) OldField(ctx context.Context, name string) (ent.Value, error) + func (m *UserMutation) OldName(ctx context.Context) (v string, err error) + func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error) + func (m *UserMutation) OldVersion(ctx context.Context) (v int, err error) + func (m *UserMutation) OldWorth(ctx context.Context) (v uint, err error) + func (m *UserMutation) Op() Op + func (m *UserMutation) Password() (r string, exists bool) + func (m *UserMutation) PasswordCleared() bool + func (m *UserMutation) RemoveCardIDs(ids ...int) + func (m *UserMutation) RemoveFriendIDs(ids ...int) + func (m *UserMutation) RemovedCardsIDs() (ids []int) + func (m *UserMutation) RemovedEdges() []string + func (m *UserMutation) RemovedFriendsIDs() (ids []int) + func (m *UserMutation) RemovedIDs(name string) []ent.Value + func (m *UserMutation) ResetBestFriend() + func (m *UserMutation) ResetCards() + 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) ResetPassword() + func (m *UserMutation) ResetVersion() + func (m *UserMutation) ResetWorth() + func (m *UserMutation) SetBestFriendID(id int) + func (m *UserMutation) SetField(name string, value ent.Value) error + func (m *UserMutation) SetName(s string) + func (m *UserMutation) SetPassword(s string) + func (m *UserMutation) SetVersion(i int) + func (m *UserMutation) SetWorth(u uint) + func (m *UserMutation) Type() string + func (m *UserMutation) Version() (r int, exists bool) + func (m *UserMutation) Where(ps ...predicate.User) + func (m *UserMutation) Worth() (r uint, exists bool) + func (m *UserMutation) WorthCleared() bool + 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) QueryBestFriend() *UserQuery + func (uq *UserQuery) QueryCards() *CardQuery + func (uq *UserQuery) QueryFriends() *UserQuery + 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) WithBestFriend(opts ...func(*UserQuery)) *UserQuery + func (uq *UserQuery) WithCards(opts ...func(*CardQuery)) *UserQuery + func (uq *UserQuery) WithFriends(opts ...func(*UserQuery)) *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 interface{}) + 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) Scan(ctx context.Context, v interface{}) error + type UserUpdate struct + func (uu *UserUpdate) AddCardIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) AddCards(c ...*Card) *UserUpdate + func (uu *UserUpdate) AddFriendIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) AddFriends(u ...*User) *UserUpdate + func (uu *UserUpdate) AddVersion(i int) *UserUpdate + func (uu *UserUpdate) AddWorth(u int) *UserUpdate + func (uu *UserUpdate) ClearBestFriend() *UserUpdate + func (uu *UserUpdate) ClearCards() *UserUpdate + func (uu *UserUpdate) ClearFriends() *UserUpdate + func (uu *UserUpdate) ClearPassword() *UserUpdate + func (uu *UserUpdate) ClearWorth() *UserUpdate + func (uu *UserUpdate) Exec(ctx context.Context) error + func (uu *UserUpdate) ExecX(ctx context.Context) + func (uu *UserUpdate) Mutation() *UserMutation + func (uu *UserUpdate) RemoveCardIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) RemoveCards(c ...*Card) *UserUpdate + func (uu *UserUpdate) RemoveFriendIDs(ids ...int) *UserUpdate + func (uu *UserUpdate) RemoveFriends(u ...*User) *UserUpdate + func (uu *UserUpdate) Save(ctx context.Context) (int, error) + func (uu *UserUpdate) SaveX(ctx context.Context) int + func (uu *UserUpdate) SetBestFriend(u *User) *UserUpdate + func (uu *UserUpdate) SetBestFriendID(id int) *UserUpdate + func (uu *UserUpdate) SetName(s string) *UserUpdate + func (uu *UserUpdate) SetNillableBestFriendID(id *int) *UserUpdate + func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate + func (uu *UserUpdate) SetNillableVersion(i *int) *UserUpdate + func (uu *UserUpdate) SetNillableWorth(u *uint) *UserUpdate + func (uu *UserUpdate) SetPassword(s string) *UserUpdate + func (uu *UserUpdate) SetVersion(i int) *UserUpdate + func (uu *UserUpdate) SetWorth(u uint) *UserUpdate + func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate + type UserUpdateOne struct + func (uuo *UserUpdateOne) AddCardIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) AddCards(c ...*Card) *UserUpdateOne + func (uuo *UserUpdateOne) AddFriendIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) AddFriends(u ...*User) *UserUpdateOne + func (uuo *UserUpdateOne) AddVersion(i int) *UserUpdateOne + func (uuo *UserUpdateOne) AddWorth(u int) *UserUpdateOne + func (uuo *UserUpdateOne) ClearBestFriend() *UserUpdateOne + func (uuo *UserUpdateOne) ClearCards() *UserUpdateOne + func (uuo *UserUpdateOne) ClearFriends() *UserUpdateOne + func (uuo *UserUpdateOne) ClearPassword() *UserUpdateOne + func (uuo *UserUpdateOne) ClearWorth() *UserUpdateOne + func (uuo *UserUpdateOne) Exec(ctx context.Context) error + func (uuo *UserUpdateOne) ExecX(ctx context.Context) + func (uuo *UserUpdateOne) Mutation() *UserMutation + func (uuo *UserUpdateOne) RemoveCardIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) RemoveCards(c ...*Card) *UserUpdateOne + func (uuo *UserUpdateOne) RemoveFriendIDs(ids ...int) *UserUpdateOne + func (uuo *UserUpdateOne) RemoveFriends(u ...*User) *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) SetBestFriend(u *User) *UserUpdateOne + func (uuo *UserUpdateOne) SetBestFriendID(id int) *UserUpdateOne + func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne + func (uuo *UserUpdateOne) SetNillableBestFriendID(id *int) *UserUpdateOne + func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne + func (uuo *UserUpdateOne) SetNillableVersion(i *int) *UserUpdateOne + func (uuo *UserUpdateOne) SetNillableWorth(u *uint) *UserUpdateOne + func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne + func (uuo *UserUpdateOne) SetVersion(i int) *UserUpdateOne + func (uuo *UserUpdateOne) SetWorth(u uint) *UserUpdateOne + type Users []*User + type ValidationError struct + Name string + func (e *ValidationError) Error() string + func (e *ValidationError) Unwrap() error + type Value = ent.Value