Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Admin
- func (c *Admin) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Admin) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (a *Admin) String() string
- func (a *Admin) Unwrap() *Admin
- func (a *Admin) Update() *AdminUpdateOne
- func (a *Admin) Value(name string) (ent.Value, error)
- type AdminClient
- func (c *AdminClient) Create() *AdminCreate
- func (c *AdminClient) CreateBulk(builders ...*AdminCreate) *AdminCreateBulk
- func (c *AdminClient) Delete() *AdminDelete
- func (c *AdminClient) DeleteOne(a *Admin) *AdminDeleteOne
- func (c *AdminClient) DeleteOneID(id uint64) *AdminDeleteOne
- func (c *AdminClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *AdminClient) Get(ctx context.Context, id uint64) (*Admin, error)
- func (c *AdminClient) GetX(ctx context.Context, id uint64) *Admin
- func (c *AdminClient) Hooks() []Hook
- func (c *AdminClient) Intercept(interceptors ...Interceptor)
- func (c *AdminClient) Interceptors() []Interceptor
- func (c *AdminClient) MapCreateBulk(slice any, setFunc func(*AdminCreate, int)) *AdminCreateBulk
- func (c *AdminClient) Query() *AdminQuery
- func (c *AdminClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *AdminClient) Update() *AdminUpdate
- func (c *AdminClient) UpdateOne(a *Admin) *AdminUpdateOne
- func (c *AdminClient) UpdateOneID(id uint64) *AdminUpdateOne
- func (c *AdminClient) Use(hooks ...Hook)
- type AdminCreate
- func (ac *AdminCreate) Exec(ctx context.Context) error
- func (c *AdminCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ac *AdminCreate) ExecX(ctx context.Context)
- func (ac *AdminCreate) Mutation() *AdminMutation
- func (ac *AdminCreate) OnConflict(opts ...sql.ConflictOption) *AdminUpsertOne
- func (ac *AdminCreate) OnConflictColumns(columns ...string) *AdminUpsertOne
- func (c *AdminCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ac *AdminCreate) Save(ctx context.Context) (*Admin, error)
- func (ac *AdminCreate) SaveX(ctx context.Context) *Admin
- func (ac *AdminCreate) SetAvatar(s string) *AdminCreate
- func (ac *AdminCreate) SetCreatedAt(t time.Time) *AdminCreate
- func (ac *AdminCreate) SetDeletedAt(t time.Time) *AdminCreate
- func (ac *AdminCreate) SetEmail(s string) *AdminCreate
- func (ac *AdminCreate) SetEmailVerifiedAt(t time.Time) *AdminCreate
- func (ac *AdminCreate) SetID(u uint64) *AdminCreate
- func (ac *AdminCreate) SetLang(s string) *AdminCreate
- func (ac *AdminCreate) SetName(s string) *AdminCreate
- func (ac *AdminCreate) SetNillableAvatar(s *string) *AdminCreate
- func (ac *AdminCreate) SetNillableCreatedAt(t *time.Time) *AdminCreate
- func (ac *AdminCreate) SetNillableDeletedAt(t *time.Time) *AdminCreate
- func (ac *AdminCreate) SetNillableEmail(s *string) *AdminCreate
- func (ac *AdminCreate) SetNillableEmailVerifiedAt(t *time.Time) *AdminCreate
- func (ac *AdminCreate) SetNillableLang(s *string) *AdminCreate
- func (ac *AdminCreate) SetNillableName(s *string) *AdminCreate
- func (ac *AdminCreate) SetNillableType(u *uint8) *AdminCreate
- func (ac *AdminCreate) SetNillableUpdatedAt(t *time.Time) *AdminCreate
- func (ac *AdminCreate) SetNillableUsername(s *string) *AdminCreate
- func (ac *AdminCreate) SetPassword(s string) *AdminCreate
- func (ac *AdminCreate) SetPassword2(s string) *AdminCreate
- func (ac *AdminCreate) SetType(u uint8) *AdminCreate
- func (ac *AdminCreate) SetUpdatedAt(t time.Time) *AdminCreate
- func (ac *AdminCreate) SetUsername(s string) *AdminCreate
- type AdminCreateBulk
- func (acb *AdminCreateBulk) Exec(ctx context.Context) error
- func (c *AdminCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (acb *AdminCreateBulk) ExecX(ctx context.Context)
- func (acb *AdminCreateBulk) OnConflict(opts ...sql.ConflictOption) *AdminUpsertBulk
- func (acb *AdminCreateBulk) OnConflictColumns(columns ...string) *AdminUpsertBulk
- func (c *AdminCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (acb *AdminCreateBulk) Save(ctx context.Context) ([]*Admin, error)
- func (acb *AdminCreateBulk) SaveX(ctx context.Context) []*Admin
- type AdminDelete
- func (ad *AdminDelete) Exec(ctx context.Context) (int, error)
- func (c *AdminDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ad *AdminDelete) ExecX(ctx context.Context) int
- func (c *AdminDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ad *AdminDelete) Where(ps ...predicate.Admin) *AdminDelete
- type AdminDeleteOne
- type AdminGroupBy
- func (agb *AdminGroupBy) Aggregate(fns ...AggregateFunc) *AdminGroupBy
- func (s *AdminGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AdminGroupBy) BoolX(ctx context.Context) bool
- func (s *AdminGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AdminGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AdminGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AdminGroupBy) Float64X(ctx context.Context) float64
- func (s *AdminGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AdminGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AdminGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AdminGroupBy) IntX(ctx context.Context) int
- func (s *AdminGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AdminGroupBy) IntsX(ctx context.Context) []int
- func (agb *AdminGroupBy) Scan(ctx context.Context, v any) error
- func (s *AdminGroupBy) ScanX(ctx context.Context, v any)
- func (s *AdminGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AdminGroupBy) StringX(ctx context.Context) string
- func (s *AdminGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AdminGroupBy) StringsX(ctx context.Context) []string
- type AdminMutation
- func (m *AdminMutation) AddField(name string, value ent.Value) error
- func (m *AdminMutation) AddType(u int8)
- func (m *AdminMutation) AddedEdges() []string
- func (m *AdminMutation) AddedField(name string) (ent.Value, bool)
- func (m *AdminMutation) AddedFields() []string
- func (m *AdminMutation) AddedIDs(name string) []ent.Value
- func (m *AdminMutation) AddedType() (r int8, exists bool)
- func (m *AdminMutation) Avatar() (r string, exists bool)
- func (m *AdminMutation) AvatarCleared() bool
- func (m *AdminMutation) ClearAvatar()
- func (m *AdminMutation) ClearDeletedAt()
- func (m *AdminMutation) ClearEdge(name string) error
- func (m *AdminMutation) ClearEmail()
- func (m *AdminMutation) ClearEmailVerifiedAt()
- func (m *AdminMutation) ClearField(name string) error
- func (m *AdminMutation) ClearName()
- func (m *AdminMutation) ClearUsername()
- func (m *AdminMutation) ClearedEdges() []string
- func (m *AdminMutation) ClearedFields() []string
- func (m AdminMutation) Client() *Client
- func (m *AdminMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AdminMutation) DeletedAt() (r time.Time, exists bool)
- func (m *AdminMutation) DeletedAtCleared() bool
- func (m *AdminMutation) EdgeCleared(name string) bool
- func (m *AdminMutation) Email() (r string, exists bool)
- func (m *AdminMutation) EmailCleared() bool
- func (m *AdminMutation) EmailVerifiedAt() (r time.Time, exists bool)
- func (m *AdminMutation) EmailVerifiedAtCleared() bool
- func (c *AdminMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *AdminMutation) Field(name string) (ent.Value, bool)
- func (m *AdminMutation) FieldCleared(name string) bool
- func (m *AdminMutation) Fields() []string
- func (m *AdminMutation) GetType() (r uint8, exists bool)
- func (m *AdminMutation) ID() (id uint64, exists bool)
- func (m *AdminMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *AdminMutation) Lang() (r string, exists bool)
- func (m *AdminMutation) Name() (r string, exists bool)
- func (m *AdminMutation) NameCleared() bool
- func (m *AdminMutation) OldAvatar(ctx context.Context) (v *string, err error)
- func (m *AdminMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AdminMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *AdminMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *AdminMutation) OldEmailVerifiedAt(ctx context.Context) (v *time.Time, err error)
- func (m *AdminMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AdminMutation) OldLang(ctx context.Context) (v string, err error)
- func (m *AdminMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AdminMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *AdminMutation) OldPassword2(ctx context.Context) (v string, err error)
- func (m *AdminMutation) OldType(ctx context.Context) (v uint8, err error)
- func (m *AdminMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AdminMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *AdminMutation) Op() Op
- func (m *AdminMutation) Password() (r string, exists bool)
- func (m *AdminMutation) Password2() (r string, exists bool)
- func (c *AdminMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *AdminMutation) RemovedEdges() []string
- func (m *AdminMutation) RemovedIDs(name string) []ent.Value
- func (m *AdminMutation) ResetAvatar()
- func (m *AdminMutation) ResetCreatedAt()
- func (m *AdminMutation) ResetDeletedAt()
- func (m *AdminMutation) ResetEdge(name string) error
- func (m *AdminMutation) ResetEmail()
- func (m *AdminMutation) ResetEmailVerifiedAt()
- func (m *AdminMutation) ResetField(name string) error
- func (m *AdminMutation) ResetLang()
- func (m *AdminMutation) ResetName()
- func (m *AdminMutation) ResetPassword()
- func (m *AdminMutation) ResetPassword2()
- func (m *AdminMutation) ResetType()
- func (m *AdminMutation) ResetUpdatedAt()
- func (m *AdminMutation) ResetUsername()
- func (m *AdminMutation) SetAvatar(s string)
- func (m *AdminMutation) SetCreatedAt(t time.Time)
- func (m *AdminMutation) SetDeletedAt(t time.Time)
- func (m *AdminMutation) SetEmail(s string)
- func (m *AdminMutation) SetEmailVerifiedAt(t time.Time)
- func (m *AdminMutation) SetField(name string, value ent.Value) error
- func (m *AdminMutation) SetID(id uint64)
- func (m *AdminMutation) SetLang(s string)
- func (m *AdminMutation) SetName(s string)
- func (m *AdminMutation) SetOp(op Op)
- func (m *AdminMutation) SetPassword(s string)
- func (m *AdminMutation) SetPassword2(s string)
- func (m *AdminMutation) SetType(u uint8)
- func (m *AdminMutation) SetUpdatedAt(t time.Time)
- func (m *AdminMutation) SetUsername(s string)
- func (m AdminMutation) Tx() (*Tx, error)
- func (m *AdminMutation) Type() string
- func (m *AdminMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AdminMutation) Username() (r string, exists bool)
- func (m *AdminMutation) UsernameCleared() bool
- func (m *AdminMutation) Where(ps ...predicate.Admin)
- func (m *AdminMutation) WhereP(ps ...func(*sql.Selector))
- type AdminQuery
- func (aq *AdminQuery) Aggregate(fns ...AggregateFunc) *AdminSelect
- func (aq *AdminQuery) All(ctx context.Context) ([]*Admin, error)
- func (aq *AdminQuery) AllX(ctx context.Context) []*Admin
- func (aq *AdminQuery) Clone() *AdminQuery
- func (aq *AdminQuery) Count(ctx context.Context) (int, error)
- func (aq *AdminQuery) CountX(ctx context.Context) int
- func (c *AdminQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (aq *AdminQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AdminQuery) ExistX(ctx context.Context) bool
- func (aq *AdminQuery) First(ctx context.Context) (*Admin, error)
- func (aq *AdminQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (aq *AdminQuery) FirstIDX(ctx context.Context) uint64
- func (aq *AdminQuery) FirstX(ctx context.Context) *Admin
- func (aq *AdminQuery) GroupBy(field string, fields ...string) *AdminGroupBy
- func (aq *AdminQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (aq *AdminQuery) IDsX(ctx context.Context) []uint64
- func (aq *AdminQuery) Limit(limit int) *AdminQuery
- func (aq *AdminQuery) Offset(offset int) *AdminQuery
- func (aq *AdminQuery) Only(ctx context.Context) (*Admin, error)
- func (aq *AdminQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (aq *AdminQuery) OnlyIDX(ctx context.Context) uint64
- func (aq *AdminQuery) OnlyX(ctx context.Context) *Admin
- func (aq *AdminQuery) Order(o ...admin.OrderOption) *AdminQuery
- func (c *AdminQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (aq *AdminQuery) Select(fields ...string) *AdminSelect
- func (aq *AdminQuery) Unique(unique bool) *AdminQuery
- func (aq *AdminQuery) Where(ps ...predicate.Admin) *AdminQuery
- type AdminSelect
- func (as *AdminSelect) Aggregate(fns ...AggregateFunc) *AdminSelect
- func (s *AdminSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AdminSelect) BoolX(ctx context.Context) bool
- func (s *AdminSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AdminSelect) BoolsX(ctx context.Context) []bool
- func (c AdminSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *AdminSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AdminSelect) Float64X(ctx context.Context) float64
- func (s *AdminSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AdminSelect) Float64sX(ctx context.Context) []float64
- func (s *AdminSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AdminSelect) IntX(ctx context.Context) int
- func (s *AdminSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AdminSelect) IntsX(ctx context.Context) []int
- func (c AdminSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (as *AdminSelect) Scan(ctx context.Context, v any) error
- func (s *AdminSelect) ScanX(ctx context.Context, v any)
- func (s *AdminSelect) String(ctx context.Context) (_ string, err error)
- func (s *AdminSelect) StringX(ctx context.Context) string
- func (s *AdminSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AdminSelect) StringsX(ctx context.Context) []string
- type AdminUpdate
- func (au *AdminUpdate) AddType(u int8) *AdminUpdate
- func (au *AdminUpdate) ClearAvatar() *AdminUpdate
- func (au *AdminUpdate) ClearDeletedAt() *AdminUpdate
- func (au *AdminUpdate) ClearEmail() *AdminUpdate
- func (au *AdminUpdate) ClearEmailVerifiedAt() *AdminUpdate
- func (au *AdminUpdate) ClearName() *AdminUpdate
- func (au *AdminUpdate) ClearUsername() *AdminUpdate
- func (au *AdminUpdate) Exec(ctx context.Context) error
- func (c *AdminUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (au *AdminUpdate) ExecX(ctx context.Context)
- func (au *AdminUpdate) Mutation() *AdminMutation
- func (c *AdminUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (au *AdminUpdate) Save(ctx context.Context) (int, error)
- func (au *AdminUpdate) SaveX(ctx context.Context) int
- func (au *AdminUpdate) SetAvatar(s string) *AdminUpdate
- func (au *AdminUpdate) SetCreatedAt(t time.Time) *AdminUpdate
- func (au *AdminUpdate) SetDeletedAt(t time.Time) *AdminUpdate
- func (au *AdminUpdate) SetEmail(s string) *AdminUpdate
- func (au *AdminUpdate) SetEmailVerifiedAt(t time.Time) *AdminUpdate
- func (au *AdminUpdate) SetLang(s string) *AdminUpdate
- func (au *AdminUpdate) SetName(s string) *AdminUpdate
- func (au *AdminUpdate) SetNillableAvatar(s *string) *AdminUpdate
- func (au *AdminUpdate) SetNillableCreatedAt(t *time.Time) *AdminUpdate
- func (au *AdminUpdate) SetNillableDeletedAt(t *time.Time) *AdminUpdate
- func (au *AdminUpdate) SetNillableEmail(s *string) *AdminUpdate
- func (au *AdminUpdate) SetNillableEmailVerifiedAt(t *time.Time) *AdminUpdate
- func (au *AdminUpdate) SetNillableLang(s *string) *AdminUpdate
- func (au *AdminUpdate) SetNillableName(s *string) *AdminUpdate
- func (au *AdminUpdate) SetNillablePassword(s *string) *AdminUpdate
- func (au *AdminUpdate) SetNillablePassword2(s *string) *AdminUpdate
- func (au *AdminUpdate) SetNillableType(u *uint8) *AdminUpdate
- func (au *AdminUpdate) SetNillableUsername(s *string) *AdminUpdate
- func (au *AdminUpdate) SetPassword(s string) *AdminUpdate
- func (au *AdminUpdate) SetPassword2(s string) *AdminUpdate
- func (au *AdminUpdate) SetType(u uint8) *AdminUpdate
- func (au *AdminUpdate) SetUpdatedAt(t time.Time) *AdminUpdate
- func (au *AdminUpdate) SetUsername(s string) *AdminUpdate
- func (au *AdminUpdate) Where(ps ...predicate.Admin) *AdminUpdate
- type AdminUpdateOne
- func (auo *AdminUpdateOne) AddType(u int8) *AdminUpdateOne
- func (auo *AdminUpdateOne) ClearAvatar() *AdminUpdateOne
- func (auo *AdminUpdateOne) ClearDeletedAt() *AdminUpdateOne
- func (auo *AdminUpdateOne) ClearEmail() *AdminUpdateOne
- func (auo *AdminUpdateOne) ClearEmailVerifiedAt() *AdminUpdateOne
- func (auo *AdminUpdateOne) ClearName() *AdminUpdateOne
- func (auo *AdminUpdateOne) ClearUsername() *AdminUpdateOne
- func (auo *AdminUpdateOne) Exec(ctx context.Context) error
- func (c *AdminUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (auo *AdminUpdateOne) ExecX(ctx context.Context)
- func (auo *AdminUpdateOne) Mutation() *AdminMutation
- func (c *AdminUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (auo *AdminUpdateOne) Save(ctx context.Context) (*Admin, error)
- func (auo *AdminUpdateOne) SaveX(ctx context.Context) *Admin
- func (auo *AdminUpdateOne) Select(field string, fields ...string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetAvatar(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetCreatedAt(t time.Time) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetDeletedAt(t time.Time) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetEmail(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetEmailVerifiedAt(t time.Time) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetLang(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetName(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableAvatar(s *string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableCreatedAt(t *time.Time) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableDeletedAt(t *time.Time) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableEmail(s *string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableEmailVerifiedAt(t *time.Time) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableLang(s *string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableName(s *string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillablePassword(s *string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillablePassword2(s *string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableType(u *uint8) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetNillableUsername(s *string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetPassword(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetPassword2(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetType(u uint8) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetUpdatedAt(t time.Time) *AdminUpdateOne
- func (auo *AdminUpdateOne) SetUsername(s string) *AdminUpdateOne
- func (auo *AdminUpdateOne) Where(ps ...predicate.Admin) *AdminUpdateOne
- type AdminUpsert
- func (u *AdminUpsert) AddType(v uint8) *AdminUpsert
- func (u *AdminUpsert) ClearAvatar() *AdminUpsert
- func (u *AdminUpsert) ClearDeletedAt() *AdminUpsert
- func (u *AdminUpsert) ClearEmail() *AdminUpsert
- func (u *AdminUpsert) ClearEmailVerifiedAt() *AdminUpsert
- func (u *AdminUpsert) ClearName() *AdminUpsert
- func (u *AdminUpsert) ClearUsername() *AdminUpsert
- func (u *AdminUpsert) SetAvatar(v string) *AdminUpsert
- func (u *AdminUpsert) SetCreatedAt(v time.Time) *AdminUpsert
- func (u *AdminUpsert) SetDeletedAt(v time.Time) *AdminUpsert
- func (u *AdminUpsert) SetEmail(v string) *AdminUpsert
- func (u *AdminUpsert) SetEmailVerifiedAt(v time.Time) *AdminUpsert
- func (u *AdminUpsert) SetLang(v string) *AdminUpsert
- func (u *AdminUpsert) SetName(v string) *AdminUpsert
- func (u *AdminUpsert) SetPassword(v string) *AdminUpsert
- func (u *AdminUpsert) SetPassword2(v string) *AdminUpsert
- func (u *AdminUpsert) SetType(v uint8) *AdminUpsert
- func (u *AdminUpsert) SetUpdatedAt(v time.Time) *AdminUpsert
- func (u *AdminUpsert) SetUsername(v string) *AdminUpsert
- func (u *AdminUpsert) UpdateAvatar() *AdminUpsert
- func (u *AdminUpsert) UpdateCreatedAt() *AdminUpsert
- func (u *AdminUpsert) UpdateDeletedAt() *AdminUpsert
- func (u *AdminUpsert) UpdateEmail() *AdminUpsert
- func (u *AdminUpsert) UpdateEmailVerifiedAt() *AdminUpsert
- func (u *AdminUpsert) UpdateLang() *AdminUpsert
- func (u *AdminUpsert) UpdateName() *AdminUpsert
- func (u *AdminUpsert) UpdatePassword() *AdminUpsert
- func (u *AdminUpsert) UpdatePassword2() *AdminUpsert
- func (u *AdminUpsert) UpdateType() *AdminUpsert
- func (u *AdminUpsert) UpdateUpdatedAt() *AdminUpsert
- func (u *AdminUpsert) UpdateUsername() *AdminUpsert
- type AdminUpsertBulk
- func (u *AdminUpsertBulk) AddType(v uint8) *AdminUpsertBulk
- func (u *AdminUpsertBulk) ClearAvatar() *AdminUpsertBulk
- func (u *AdminUpsertBulk) ClearDeletedAt() *AdminUpsertBulk
- func (u *AdminUpsertBulk) ClearEmail() *AdminUpsertBulk
- func (u *AdminUpsertBulk) ClearEmailVerifiedAt() *AdminUpsertBulk
- func (u *AdminUpsertBulk) ClearName() *AdminUpsertBulk
- func (u *AdminUpsertBulk) ClearUsername() *AdminUpsertBulk
- func (u *AdminUpsertBulk) DoNothing() *AdminUpsertBulk
- func (u *AdminUpsertBulk) Exec(ctx context.Context) error
- func (u *AdminUpsertBulk) ExecX(ctx context.Context)
- func (u *AdminUpsertBulk) Ignore() *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetAvatar(v string) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetCreatedAt(v time.Time) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetDeletedAt(v time.Time) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetEmail(v string) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetEmailVerifiedAt(v time.Time) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetLang(v string) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetName(v string) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetPassword(v string) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetPassword2(v string) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetType(v uint8) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetUpdatedAt(v time.Time) *AdminUpsertBulk
- func (u *AdminUpsertBulk) SetUsername(v string) *AdminUpsertBulk
- func (u *AdminUpsertBulk) Update(set func(*AdminUpsert)) *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateAvatar() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateCreatedAt() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateDeletedAt() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateEmail() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateEmailVerifiedAt() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateLang() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateName() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateNewValues() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdatePassword() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdatePassword2() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateType() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateUpdatedAt() *AdminUpsertBulk
- func (u *AdminUpsertBulk) UpdateUsername() *AdminUpsertBulk
- type AdminUpsertOne
- func (u *AdminUpsertOne) AddType(v uint8) *AdminUpsertOne
- func (u *AdminUpsertOne) ClearAvatar() *AdminUpsertOne
- func (u *AdminUpsertOne) ClearDeletedAt() *AdminUpsertOne
- func (u *AdminUpsertOne) ClearEmail() *AdminUpsertOne
- func (u *AdminUpsertOne) ClearEmailVerifiedAt() *AdminUpsertOne
- func (u *AdminUpsertOne) ClearName() *AdminUpsertOne
- func (u *AdminUpsertOne) ClearUsername() *AdminUpsertOne
- func (u *AdminUpsertOne) DoNothing() *AdminUpsertOne
- func (u *AdminUpsertOne) Exec(ctx context.Context) error
- func (u *AdminUpsertOne) ExecX(ctx context.Context)
- func (u *AdminUpsertOne) ID(ctx context.Context) (id uint64, err error)
- func (u *AdminUpsertOne) IDX(ctx context.Context) uint64
- func (u *AdminUpsertOne) Ignore() *AdminUpsertOne
- func (u *AdminUpsertOne) SetAvatar(v string) *AdminUpsertOne
- func (u *AdminUpsertOne) SetCreatedAt(v time.Time) *AdminUpsertOne
- func (u *AdminUpsertOne) SetDeletedAt(v time.Time) *AdminUpsertOne
- func (u *AdminUpsertOne) SetEmail(v string) *AdminUpsertOne
- func (u *AdminUpsertOne) SetEmailVerifiedAt(v time.Time) *AdminUpsertOne
- func (u *AdminUpsertOne) SetLang(v string) *AdminUpsertOne
- func (u *AdminUpsertOne) SetName(v string) *AdminUpsertOne
- func (u *AdminUpsertOne) SetPassword(v string) *AdminUpsertOne
- func (u *AdminUpsertOne) SetPassword2(v string) *AdminUpsertOne
- func (u *AdminUpsertOne) SetType(v uint8) *AdminUpsertOne
- func (u *AdminUpsertOne) SetUpdatedAt(v time.Time) *AdminUpsertOne
- func (u *AdminUpsertOne) SetUsername(v string) *AdminUpsertOne
- func (u *AdminUpsertOne) Update(set func(*AdminUpsert)) *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateAvatar() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateCreatedAt() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateDeletedAt() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateEmail() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateEmailVerifiedAt() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateLang() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateName() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateNewValues() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdatePassword() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdatePassword2() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateType() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateUpdatedAt() *AdminUpsertOne
- func (u *AdminUpsertOne) UpdateUsername() *AdminUpsertOne
- type Admins
- type AggregateFunc
- type Bank
- func (c *Bank) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Bank) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (b *Bank) QueryCountry() *CountryQuery
- func (b *Bank) QueryUsers() *UserQuery
- func (b *Bank) String() string
- func (b *Bank) Unwrap() *Bank
- func (b *Bank) Update() *BankUpdateOne
- func (b *Bank) Value(name string) (ent.Value, error)
- type BankClient
- func (c *BankClient) Create() *BankCreate
- func (c *BankClient) CreateBulk(builders ...*BankCreate) *BankCreateBulk
- func (c *BankClient) Delete() *BankDelete
- func (c *BankClient) DeleteOne(b *Bank) *BankDeleteOne
- func (c *BankClient) DeleteOneID(id uint64) *BankDeleteOne
- func (c *BankClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *BankClient) Get(ctx context.Context, id uint64) (*Bank, error)
- func (c *BankClient) GetX(ctx context.Context, id uint64) *Bank
- func (c *BankClient) Hooks() []Hook
- func (c *BankClient) Intercept(interceptors ...Interceptor)
- func (c *BankClient) Interceptors() []Interceptor
- func (c *BankClient) MapCreateBulk(slice any, setFunc func(*BankCreate, int)) *BankCreateBulk
- func (c *BankClient) Query() *BankQuery
- func (c *BankClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *BankClient) QueryCountry(b *Bank) *CountryQuery
- func (c *BankClient) QueryUsers(b *Bank) *UserQuery
- func (c *BankClient) Update() *BankUpdate
- func (c *BankClient) UpdateOne(b *Bank) *BankUpdateOne
- func (c *BankClient) UpdateOneID(id uint64) *BankUpdateOne
- func (c *BankClient) Use(hooks ...Hook)
- type BankCreate
- func (bc *BankCreate) AddUserIDs(ids ...uint64) *BankCreate
- func (bc *BankCreate) AddUsers(u ...*User) *BankCreate
- func (bc *BankCreate) Exec(ctx context.Context) error
- func (c *BankCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (bc *BankCreate) ExecX(ctx context.Context)
- func (bc *BankCreate) Mutation() *BankMutation
- func (bc *BankCreate) OnConflict(opts ...sql.ConflictOption) *BankUpsertOne
- func (bc *BankCreate) OnConflictColumns(columns ...string) *BankUpsertOne
- func (c *BankCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (bc *BankCreate) Save(ctx context.Context) (*Bank, error)
- func (bc *BankCreate) SaveX(ctx context.Context) *Bank
- func (bc *BankCreate) SetCountry(c *Country) *BankCreate
- func (bc *BankCreate) SetCountryID(u uint64) *BankCreate
- func (bc *BankCreate) SetCreatedAt(t time.Time) *BankCreate
- func (bc *BankCreate) SetDeletedAt(t time.Time) *BankCreate
- func (bc *BankCreate) SetID(u uint64) *BankCreate
- func (bc *BankCreate) SetNameEn(s string) *BankCreate
- func (bc *BankCreate) SetNameZh(s string) *BankCreate
- func (bc *BankCreate) SetNillableCountryID(u *uint64) *BankCreate
- func (bc *BankCreate) SetNillableCreatedAt(t *time.Time) *BankCreate
- func (bc *BankCreate) SetNillableDeletedAt(t *time.Time) *BankCreate
- func (bc *BankCreate) SetNillableUpdatedAt(t *time.Time) *BankCreate
- func (bc *BankCreate) SetUpdatedAt(t time.Time) *BankCreate
- type BankCreateBulk
- func (bcb *BankCreateBulk) Exec(ctx context.Context) error
- func (c *BankCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (bcb *BankCreateBulk) ExecX(ctx context.Context)
- func (bcb *BankCreateBulk) OnConflict(opts ...sql.ConflictOption) *BankUpsertBulk
- func (bcb *BankCreateBulk) OnConflictColumns(columns ...string) *BankUpsertBulk
- func (c *BankCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (bcb *BankCreateBulk) Save(ctx context.Context) ([]*Bank, error)
- func (bcb *BankCreateBulk) SaveX(ctx context.Context) []*Bank
- type BankDelete
- func (bd *BankDelete) Exec(ctx context.Context) (int, error)
- func (c *BankDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (bd *BankDelete) ExecX(ctx context.Context) int
- func (c *BankDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (bd *BankDelete) Where(ps ...predicate.Bank) *BankDelete
- type BankDeleteOne
- type BankEdges
- type BankGroupBy
- func (bgb *BankGroupBy) Aggregate(fns ...AggregateFunc) *BankGroupBy
- func (s *BankGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BankGroupBy) BoolX(ctx context.Context) bool
- func (s *BankGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BankGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BankGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BankGroupBy) Float64X(ctx context.Context) float64
- func (s *BankGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BankGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BankGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BankGroupBy) IntX(ctx context.Context) int
- func (s *BankGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BankGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BankGroupBy) Scan(ctx context.Context, v any) error
- func (s *BankGroupBy) ScanX(ctx context.Context, v any)
- func (s *BankGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BankGroupBy) StringX(ctx context.Context) string
- func (s *BankGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BankGroupBy) StringsX(ctx context.Context) []string
- type BankMutation
- func (m *BankMutation) AddField(name string, value ent.Value) error
- func (m *BankMutation) AddUserIDs(ids ...uint64)
- func (m *BankMutation) AddedEdges() []string
- func (m *BankMutation) AddedField(name string) (ent.Value, bool)
- func (m *BankMutation) AddedFields() []string
- func (m *BankMutation) AddedIDs(name string) []ent.Value
- func (m *BankMutation) ClearCountry()
- func (m *BankMutation) ClearCountryID()
- func (m *BankMutation) ClearDeletedAt()
- func (m *BankMutation) ClearEdge(name string) error
- func (m *BankMutation) ClearField(name string) error
- func (m *BankMutation) ClearUsers()
- func (m *BankMutation) ClearedEdges() []string
- func (m *BankMutation) ClearedFields() []string
- func (m BankMutation) Client() *Client
- func (m *BankMutation) CountryCleared() bool
- func (m *BankMutation) CountryID() (r uint64, exists bool)
- func (m *BankMutation) CountryIDCleared() bool
- func (m *BankMutation) CountryIDs() (ids []uint64)
- func (m *BankMutation) CreatedAt() (r time.Time, exists bool)
- func (m *BankMutation) DeletedAt() (r time.Time, exists bool)
- func (m *BankMutation) DeletedAtCleared() bool
- func (m *BankMutation) EdgeCleared(name string) bool
- func (c *BankMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *BankMutation) Field(name string) (ent.Value, bool)
- func (m *BankMutation) FieldCleared(name string) bool
- func (m *BankMutation) Fields() []string
- func (m *BankMutation) ID() (id uint64, exists bool)
- func (m *BankMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *BankMutation) NameEn() (r string, exists bool)
- func (m *BankMutation) NameZh() (r string, exists bool)
- func (m *BankMutation) OldCountryID(ctx context.Context) (v *uint64, err error)
- func (m *BankMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *BankMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *BankMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BankMutation) OldNameEn(ctx context.Context) (v string, err error)
- func (m *BankMutation) OldNameZh(ctx context.Context) (v string, err error)
- func (m *BankMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *BankMutation) Op() Op
- func (c *BankMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *BankMutation) RemoveUserIDs(ids ...uint64)
- func (m *BankMutation) RemovedEdges() []string
- func (m *BankMutation) RemovedIDs(name string) []ent.Value
- func (m *BankMutation) RemovedUsersIDs() (ids []uint64)
- func (m *BankMutation) ResetCountry()
- func (m *BankMutation) ResetCountryID()
- func (m *BankMutation) ResetCreatedAt()
- func (m *BankMutation) ResetDeletedAt()
- func (m *BankMutation) ResetEdge(name string) error
- func (m *BankMutation) ResetField(name string) error
- func (m *BankMutation) ResetNameEn()
- func (m *BankMutation) ResetNameZh()
- func (m *BankMutation) ResetUpdatedAt()
- func (m *BankMutation) ResetUsers()
- func (m *BankMutation) SetCountryID(u uint64)
- func (m *BankMutation) SetCreatedAt(t time.Time)
- func (m *BankMutation) SetDeletedAt(t time.Time)
- func (m *BankMutation) SetField(name string, value ent.Value) error
- func (m *BankMutation) SetID(id uint64)
- func (m *BankMutation) SetNameEn(s string)
- func (m *BankMutation) SetNameZh(s string)
- func (m *BankMutation) SetOp(op Op)
- func (m *BankMutation) SetUpdatedAt(t time.Time)
- func (m BankMutation) Tx() (*Tx, error)
- func (m *BankMutation) Type() string
- func (m *BankMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *BankMutation) UsersCleared() bool
- func (m *BankMutation) UsersIDs() (ids []uint64)
- func (m *BankMutation) Where(ps ...predicate.Bank)
- func (m *BankMutation) WhereP(ps ...func(*sql.Selector))
- type BankQuery
- func (bq *BankQuery) Aggregate(fns ...AggregateFunc) *BankSelect
- func (bq *BankQuery) All(ctx context.Context) ([]*Bank, error)
- func (bq *BankQuery) AllX(ctx context.Context) []*Bank
- func (bq *BankQuery) Clone() *BankQuery
- func (bq *BankQuery) Count(ctx context.Context) (int, error)
- func (bq *BankQuery) CountX(ctx context.Context) int
- func (c *BankQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (bq *BankQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BankQuery) ExistX(ctx context.Context) bool
- func (bq *BankQuery) First(ctx context.Context) (*Bank, error)
- func (bq *BankQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (bq *BankQuery) FirstIDX(ctx context.Context) uint64
- func (bq *BankQuery) FirstX(ctx context.Context) *Bank
- func (bq *BankQuery) GroupBy(field string, fields ...string) *BankGroupBy
- func (bq *BankQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (bq *BankQuery) IDsX(ctx context.Context) []uint64
- func (bq *BankQuery) Limit(limit int) *BankQuery
- func (bq *BankQuery) Offset(offset int) *BankQuery
- func (bq *BankQuery) Only(ctx context.Context) (*Bank, error)
- func (bq *BankQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (bq *BankQuery) OnlyIDX(ctx context.Context) uint64
- func (bq *BankQuery) OnlyX(ctx context.Context) *Bank
- func (bq *BankQuery) Order(o ...bank.OrderOption) *BankQuery
- func (c *BankQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (bq *BankQuery) QueryCountry() *CountryQuery
- func (bq *BankQuery) QueryUsers() *UserQuery
- func (bq *BankQuery) Select(fields ...string) *BankSelect
- func (bq *BankQuery) Unique(unique bool) *BankQuery
- func (bq *BankQuery) Where(ps ...predicate.Bank) *BankQuery
- func (bq *BankQuery) WithCountry(opts ...func(*CountryQuery)) *BankQuery
- func (bq *BankQuery) WithUsers(opts ...func(*UserQuery)) *BankQuery
- type BankSelect
- func (bs *BankSelect) Aggregate(fns ...AggregateFunc) *BankSelect
- func (s *BankSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BankSelect) BoolX(ctx context.Context) bool
- func (s *BankSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BankSelect) BoolsX(ctx context.Context) []bool
- func (c BankSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *BankSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BankSelect) Float64X(ctx context.Context) float64
- func (s *BankSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BankSelect) Float64sX(ctx context.Context) []float64
- func (s *BankSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BankSelect) IntX(ctx context.Context) int
- func (s *BankSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BankSelect) IntsX(ctx context.Context) []int
- func (c BankSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (bs *BankSelect) Scan(ctx context.Context, v any) error
- func (s *BankSelect) ScanX(ctx context.Context, v any)
- func (s *BankSelect) String(ctx context.Context) (_ string, err error)
- func (s *BankSelect) StringX(ctx context.Context) string
- func (s *BankSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BankSelect) StringsX(ctx context.Context) []string
- type BankUpdate
- func (bu *BankUpdate) AddUserIDs(ids ...uint64) *BankUpdate
- func (bu *BankUpdate) AddUsers(u ...*User) *BankUpdate
- func (bu *BankUpdate) ClearCountry() *BankUpdate
- func (bu *BankUpdate) ClearCountryID() *BankUpdate
- func (bu *BankUpdate) ClearDeletedAt() *BankUpdate
- func (bu *BankUpdate) ClearUsers() *BankUpdate
- func (bu *BankUpdate) Exec(ctx context.Context) error
- func (c *BankUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (bu *BankUpdate) ExecX(ctx context.Context)
- func (bu *BankUpdate) Mutation() *BankMutation
- func (c *BankUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (bu *BankUpdate) RemoveUserIDs(ids ...uint64) *BankUpdate
- func (bu *BankUpdate) RemoveUsers(u ...*User) *BankUpdate
- func (bu *BankUpdate) Save(ctx context.Context) (int, error)
- func (bu *BankUpdate) SaveX(ctx context.Context) int
- func (bu *BankUpdate) SetCountry(c *Country) *BankUpdate
- func (bu *BankUpdate) SetCountryID(u uint64) *BankUpdate
- func (bu *BankUpdate) SetCreatedAt(t time.Time) *BankUpdate
- func (bu *BankUpdate) SetDeletedAt(t time.Time) *BankUpdate
- func (bu *BankUpdate) SetNameEn(s string) *BankUpdate
- func (bu *BankUpdate) SetNameZh(s string) *BankUpdate
- func (bu *BankUpdate) SetNillableCountryID(u *uint64) *BankUpdate
- func (bu *BankUpdate) SetNillableCreatedAt(t *time.Time) *BankUpdate
- func (bu *BankUpdate) SetNillableDeletedAt(t *time.Time) *BankUpdate
- func (bu *BankUpdate) SetNillableNameEn(s *string) *BankUpdate
- func (bu *BankUpdate) SetNillableNameZh(s *string) *BankUpdate
- func (bu *BankUpdate) SetUpdatedAt(t time.Time) *BankUpdate
- func (bu *BankUpdate) Where(ps ...predicate.Bank) *BankUpdate
- type BankUpdateOne
- func (buo *BankUpdateOne) AddUserIDs(ids ...uint64) *BankUpdateOne
- func (buo *BankUpdateOne) AddUsers(u ...*User) *BankUpdateOne
- func (buo *BankUpdateOne) ClearCountry() *BankUpdateOne
- func (buo *BankUpdateOne) ClearCountryID() *BankUpdateOne
- func (buo *BankUpdateOne) ClearDeletedAt() *BankUpdateOne
- func (buo *BankUpdateOne) ClearUsers() *BankUpdateOne
- func (buo *BankUpdateOne) Exec(ctx context.Context) error
- func (c *BankUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (buo *BankUpdateOne) ExecX(ctx context.Context)
- func (buo *BankUpdateOne) Mutation() *BankMutation
- func (c *BankUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (buo *BankUpdateOne) RemoveUserIDs(ids ...uint64) *BankUpdateOne
- func (buo *BankUpdateOne) RemoveUsers(u ...*User) *BankUpdateOne
- func (buo *BankUpdateOne) Save(ctx context.Context) (*Bank, error)
- func (buo *BankUpdateOne) SaveX(ctx context.Context) *Bank
- func (buo *BankUpdateOne) Select(field string, fields ...string) *BankUpdateOne
- func (buo *BankUpdateOne) SetCountry(c *Country) *BankUpdateOne
- func (buo *BankUpdateOne) SetCountryID(u uint64) *BankUpdateOne
- func (buo *BankUpdateOne) SetCreatedAt(t time.Time) *BankUpdateOne
- func (buo *BankUpdateOne) SetDeletedAt(t time.Time) *BankUpdateOne
- func (buo *BankUpdateOne) SetNameEn(s string) *BankUpdateOne
- func (buo *BankUpdateOne) SetNameZh(s string) *BankUpdateOne
- func (buo *BankUpdateOne) SetNillableCountryID(u *uint64) *BankUpdateOne
- func (buo *BankUpdateOne) SetNillableCreatedAt(t *time.Time) *BankUpdateOne
- func (buo *BankUpdateOne) SetNillableDeletedAt(t *time.Time) *BankUpdateOne
- func (buo *BankUpdateOne) SetNillableNameEn(s *string) *BankUpdateOne
- func (buo *BankUpdateOne) SetNillableNameZh(s *string) *BankUpdateOne
- func (buo *BankUpdateOne) SetUpdatedAt(t time.Time) *BankUpdateOne
- func (buo *BankUpdateOne) Where(ps ...predicate.Bank) *BankUpdateOne
- type BankUpsert
- func (u *BankUpsert) ClearCountryID() *BankUpsert
- func (u *BankUpsert) ClearDeletedAt() *BankUpsert
- func (u *BankUpsert) SetCountryID(v uint64) *BankUpsert
- func (u *BankUpsert) SetCreatedAt(v time.Time) *BankUpsert
- func (u *BankUpsert) SetDeletedAt(v time.Time) *BankUpsert
- func (u *BankUpsert) SetNameEn(v string) *BankUpsert
- func (u *BankUpsert) SetNameZh(v string) *BankUpsert
- func (u *BankUpsert) SetUpdatedAt(v time.Time) *BankUpsert
- func (u *BankUpsert) UpdateCountryID() *BankUpsert
- func (u *BankUpsert) UpdateCreatedAt() *BankUpsert
- func (u *BankUpsert) UpdateDeletedAt() *BankUpsert
- func (u *BankUpsert) UpdateNameEn() *BankUpsert
- func (u *BankUpsert) UpdateNameZh() *BankUpsert
- func (u *BankUpsert) UpdateUpdatedAt() *BankUpsert
- type BankUpsertBulk
- func (u *BankUpsertBulk) ClearCountryID() *BankUpsertBulk
- func (u *BankUpsertBulk) ClearDeletedAt() *BankUpsertBulk
- func (u *BankUpsertBulk) DoNothing() *BankUpsertBulk
- func (u *BankUpsertBulk) Exec(ctx context.Context) error
- func (u *BankUpsertBulk) ExecX(ctx context.Context)
- func (u *BankUpsertBulk) Ignore() *BankUpsertBulk
- func (u *BankUpsertBulk) SetCountryID(v uint64) *BankUpsertBulk
- func (u *BankUpsertBulk) SetCreatedAt(v time.Time) *BankUpsertBulk
- func (u *BankUpsertBulk) SetDeletedAt(v time.Time) *BankUpsertBulk
- func (u *BankUpsertBulk) SetNameEn(v string) *BankUpsertBulk
- func (u *BankUpsertBulk) SetNameZh(v string) *BankUpsertBulk
- func (u *BankUpsertBulk) SetUpdatedAt(v time.Time) *BankUpsertBulk
- func (u *BankUpsertBulk) Update(set func(*BankUpsert)) *BankUpsertBulk
- func (u *BankUpsertBulk) UpdateCountryID() *BankUpsertBulk
- func (u *BankUpsertBulk) UpdateCreatedAt() *BankUpsertBulk
- func (u *BankUpsertBulk) UpdateDeletedAt() *BankUpsertBulk
- func (u *BankUpsertBulk) UpdateNameEn() *BankUpsertBulk
- func (u *BankUpsertBulk) UpdateNameZh() *BankUpsertBulk
- func (u *BankUpsertBulk) UpdateNewValues() *BankUpsertBulk
- func (u *BankUpsertBulk) UpdateUpdatedAt() *BankUpsertBulk
- type BankUpsertOne
- func (u *BankUpsertOne) ClearCountryID() *BankUpsertOne
- func (u *BankUpsertOne) ClearDeletedAt() *BankUpsertOne
- func (u *BankUpsertOne) DoNothing() *BankUpsertOne
- func (u *BankUpsertOne) Exec(ctx context.Context) error
- func (u *BankUpsertOne) ExecX(ctx context.Context)
- func (u *BankUpsertOne) ID(ctx context.Context) (id uint64, err error)
- func (u *BankUpsertOne) IDX(ctx context.Context) uint64
- func (u *BankUpsertOne) Ignore() *BankUpsertOne
- func (u *BankUpsertOne) SetCountryID(v uint64) *BankUpsertOne
- func (u *BankUpsertOne) SetCreatedAt(v time.Time) *BankUpsertOne
- func (u *BankUpsertOne) SetDeletedAt(v time.Time) *BankUpsertOne
- func (u *BankUpsertOne) SetNameEn(v string) *BankUpsertOne
- func (u *BankUpsertOne) SetNameZh(v string) *BankUpsertOne
- func (u *BankUpsertOne) SetUpdatedAt(v time.Time) *BankUpsertOne
- func (u *BankUpsertOne) Update(set func(*BankUpsert)) *BankUpsertOne
- func (u *BankUpsertOne) UpdateCountryID() *BankUpsertOne
- func (u *BankUpsertOne) UpdateCreatedAt() *BankUpsertOne
- func (u *BankUpsertOne) UpdateDeletedAt() *BankUpsertOne
- func (u *BankUpsertOne) UpdateNameEn() *BankUpsertOne
- func (u *BankUpsertOne) UpdateNameZh() *BankUpsertOne
- func (u *BankUpsertOne) UpdateNewValues() *BankUpsertOne
- func (u *BankUpsertOne) UpdateUpdatedAt() *BankUpsertOne
- type Banks
- type Client
- 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) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Countries
- type Country
- func (c *Country) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Country) QueryBanks() *BankQuery
- func (c *Country) QueryContactUsers() *UserQuery
- func (c *Country) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *Country) QueryLocations() *CountryLocationQuery
- func (c *Country) QueryUsers() *UserQuery
- func (c *Country) String() string
- func (c *Country) Unwrap() *Country
- func (c *Country) Update() *CountryUpdateOne
- func (c *Country) Value(name string) (ent.Value, error)
- type CountryClient
- func (c *CountryClient) Create() *CountryCreate
- func (c *CountryClient) CreateBulk(builders ...*CountryCreate) *CountryCreateBulk
- func (c *CountryClient) Delete() *CountryDelete
- func (c *CountryClient) DeleteOne(co *Country) *CountryDeleteOne
- func (c *CountryClient) DeleteOneID(id uint64) *CountryDeleteOne
- func (c *CountryClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *CountryClient) Get(ctx context.Context, id uint64) (*Country, error)
- func (c *CountryClient) GetX(ctx context.Context, id uint64) *Country
- func (c *CountryClient) Hooks() []Hook
- func (c *CountryClient) Intercept(interceptors ...Interceptor)
- func (c *CountryClient) Interceptors() []Interceptor
- func (c *CountryClient) MapCreateBulk(slice any, setFunc func(*CountryCreate, int)) *CountryCreateBulk
- func (c *CountryClient) Query() *CountryQuery
- func (c *CountryClient) QueryBanks(co *Country) *BankQuery
- func (c *CountryClient) QueryContactUsers(co *Country) *UserQuery
- func (c *CountryClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *CountryClient) QueryLocations(co *Country) *CountryLocationQuery
- func (c *CountryClient) QueryUsers(co *Country) *UserQuery
- func (c *CountryClient) Update() *CountryUpdate
- func (c *CountryClient) UpdateOne(co *Country) *CountryUpdateOne
- func (c *CountryClient) UpdateOneID(id uint64) *CountryUpdateOne
- func (c *CountryClient) Use(hooks ...Hook)
- type CountryCreate
- func (cc *CountryCreate) AddBankIDs(ids ...uint64) *CountryCreate
- func (cc *CountryCreate) AddBanks(b ...*Bank) *CountryCreate
- func (cc *CountryCreate) AddContactUserIDs(ids ...uint64) *CountryCreate
- func (cc *CountryCreate) AddContactUsers(u ...*User) *CountryCreate
- func (cc *CountryCreate) AddLocationIDs(ids ...uint64) *CountryCreate
- func (cc *CountryCreate) AddLocations(c ...*CountryLocation) *CountryCreate
- func (cc *CountryCreate) AddUserIDs(ids ...uint64) *CountryCreate
- func (cc *CountryCreate) AddUsers(u ...*User) *CountryCreate
- func (cc *CountryCreate) Exec(ctx context.Context) error
- func (c *CountryCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cc *CountryCreate) ExecX(ctx context.Context)
- func (cc *CountryCreate) Mutation() *CountryMutation
- func (cc *CountryCreate) OnConflict(opts ...sql.ConflictOption) *CountryUpsertOne
- func (cc *CountryCreate) OnConflictColumns(columns ...string) *CountryUpsertOne
- func (c *CountryCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cc *CountryCreate) Save(ctx context.Context) (*Country, error)
- func (cc *CountryCreate) SaveX(ctx context.Context) *Country
- func (cc *CountryCreate) SetCapital(s string) *CountryCreate
- func (cc *CountryCreate) SetConversionRate(f float64) *CountryCreate
- func (cc *CountryCreate) SetCreatedAt(t time.Time) *CountryCreate
- func (cc *CountryCreate) SetCurrencyCode(s string) *CountryCreate
- func (cc *CountryCreate) SetCurrencyName(s string) *CountryCreate
- func (cc *CountryCreate) SetCurrencySymbol(s string) *CountryCreate
- func (cc *CountryCreate) SetID(u uint64) *CountryCreate
- func (cc *CountryCreate) SetIso2(s string) *CountryCreate
- func (cc *CountryCreate) SetIso3(s string) *CountryCreate
- func (cc *CountryCreate) SetName(s string) *CountryCreate
- func (cc *CountryCreate) SetNillableCapital(s *string) *CountryCreate
- func (cc *CountryCreate) SetNillableConversionRate(f *float64) *CountryCreate
- func (cc *CountryCreate) SetNillableCreatedAt(t *time.Time) *CountryCreate
- func (cc *CountryCreate) SetNillableCurrencyCode(s *string) *CountryCreate
- func (cc *CountryCreate) SetNillableCurrencyName(s *string) *CountryCreate
- func (cc *CountryCreate) SetNillableCurrencySymbol(s *string) *CountryCreate
- func (cc *CountryCreate) SetNillableNumericCode(s *string) *CountryCreate
- func (cc *CountryCreate) SetNillableOfficialName(s *string) *CountryCreate
- func (cc *CountryCreate) SetNillablePhoneCode(s *string) *CountryCreate
- func (cc *CountryCreate) SetNillableStatus(u *uint8) *CountryCreate
- func (cc *CountryCreate) SetNillableUpdatedAt(t *time.Time) *CountryCreate
- func (cc *CountryCreate) SetNumericCode(s string) *CountryCreate
- func (cc *CountryCreate) SetOfficialName(s string) *CountryCreate
- func (cc *CountryCreate) SetPhoneCode(s string) *CountryCreate
- func (cc *CountryCreate) SetStatus(u uint8) *CountryCreate
- func (cc *CountryCreate) SetUpdatedAt(t time.Time) *CountryCreate
- type CountryCreateBulk
- func (ccb *CountryCreateBulk) Exec(ctx context.Context) error
- func (c *CountryCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ccb *CountryCreateBulk) ExecX(ctx context.Context)
- func (ccb *CountryCreateBulk) OnConflict(opts ...sql.ConflictOption) *CountryUpsertBulk
- func (ccb *CountryCreateBulk) OnConflictColumns(columns ...string) *CountryUpsertBulk
- func (c *CountryCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ccb *CountryCreateBulk) Save(ctx context.Context) ([]*Country, error)
- func (ccb *CountryCreateBulk) SaveX(ctx context.Context) []*Country
- type CountryDelete
- func (cd *CountryDelete) Exec(ctx context.Context) (int, error)
- func (c *CountryDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cd *CountryDelete) ExecX(ctx context.Context) int
- func (c *CountryDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cd *CountryDelete) Where(ps ...predicate.Country) *CountryDelete
- type CountryDeleteOne
- type CountryEdges
- type CountryGroupBy
- func (cgb *CountryGroupBy) Aggregate(fns ...AggregateFunc) *CountryGroupBy
- func (s *CountryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CountryGroupBy) BoolX(ctx context.Context) bool
- func (s *CountryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CountryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CountryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CountryGroupBy) Float64X(ctx context.Context) float64
- func (s *CountryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CountryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CountryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CountryGroupBy) IntX(ctx context.Context) int
- func (s *CountryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CountryGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CountryGroupBy) Scan(ctx context.Context, v any) error
- func (s *CountryGroupBy) ScanX(ctx context.Context, v any)
- func (s *CountryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CountryGroupBy) StringX(ctx context.Context) string
- func (s *CountryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CountryGroupBy) StringsX(ctx context.Context) []string
- type CountryLocation
- func (c *CountryLocation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cl *CountryLocation) QueryChildLocations() *CountryLocationQuery
- func (c *CountryLocation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cl *CountryLocation) QueryCountry() *CountryQuery
- func (cl *CountryLocation) QueryParent() *CountryLocationQuery
- func (cl *CountryLocation) String() string
- func (cl *CountryLocation) Unwrap() *CountryLocation
- func (cl *CountryLocation) Update() *CountryLocationUpdateOne
- func (cl *CountryLocation) Value(name string) (ent.Value, error)
- type CountryLocationClient
- func (c *CountryLocationClient) Create() *CountryLocationCreate
- func (c *CountryLocationClient) CreateBulk(builders ...*CountryLocationCreate) *CountryLocationCreateBulk
- func (c *CountryLocationClient) Delete() *CountryLocationDelete
- func (c *CountryLocationClient) DeleteOne(cl *CountryLocation) *CountryLocationDeleteOne
- func (c *CountryLocationClient) DeleteOneID(id uint64) *CountryLocationDeleteOne
- func (c *CountryLocationClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *CountryLocationClient) Get(ctx context.Context, id uint64) (*CountryLocation, error)
- func (c *CountryLocationClient) GetX(ctx context.Context, id uint64) *CountryLocation
- func (c *CountryLocationClient) Hooks() []Hook
- func (c *CountryLocationClient) Intercept(interceptors ...Interceptor)
- func (c *CountryLocationClient) Interceptors() []Interceptor
- func (c *CountryLocationClient) MapCreateBulk(slice any, setFunc func(*CountryLocationCreate, int)) *CountryLocationCreateBulk
- func (c *CountryLocationClient) Query() *CountryLocationQuery
- func (c *CountryLocationClient) QueryChildLocations(cl *CountryLocation) *CountryLocationQuery
- func (c *CountryLocationClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *CountryLocationClient) QueryCountry(cl *CountryLocation) *CountryQuery
- func (c *CountryLocationClient) QueryParent(cl *CountryLocation) *CountryLocationQuery
- func (c *CountryLocationClient) Update() *CountryLocationUpdate
- func (c *CountryLocationClient) UpdateOne(cl *CountryLocation) *CountryLocationUpdateOne
- func (c *CountryLocationClient) UpdateOneID(id uint64) *CountryLocationUpdateOne
- func (c *CountryLocationClient) Use(hooks ...Hook)
- type CountryLocationCreate
- func (clc *CountryLocationCreate) AddChildLocationIDs(ids ...uint64) *CountryLocationCreate
- func (clc *CountryLocationCreate) AddChildLocations(c ...*CountryLocation) *CountryLocationCreate
- func (clc *CountryLocationCreate) Exec(ctx context.Context) error
- func (c *CountryLocationCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (clc *CountryLocationCreate) ExecX(ctx context.Context)
- func (clc *CountryLocationCreate) Mutation() *CountryLocationMutation
- func (clc *CountryLocationCreate) OnConflict(opts ...sql.ConflictOption) *CountryLocationUpsertOne
- func (clc *CountryLocationCreate) OnConflictColumns(columns ...string) *CountryLocationUpsertOne
- func (c *CountryLocationCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (clc *CountryLocationCreate) Save(ctx context.Context) (*CountryLocation, error)
- func (clc *CountryLocationCreate) SaveX(ctx context.Context) *CountryLocation
- func (clc *CountryLocationCreate) SetCountry(c *Country) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetCountryID(u uint64) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetCreatedAt(t time.Time) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetDeletedAt(t time.Time) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetID(u uint64) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetNameEn(s string) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetNameZh(s string) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetNillableCountryID(u *uint64) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetNillableCreatedAt(t *time.Time) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetNillableDeletedAt(t *time.Time) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetNillableParentID(u *uint64) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetNillableSorting(u *uint64) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetNillableUpdatedAt(t *time.Time) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetParent(c *CountryLocation) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetParentID(u uint64) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetSorting(u uint64) *CountryLocationCreate
- func (clc *CountryLocationCreate) SetUpdatedAt(t time.Time) *CountryLocationCreate
- type CountryLocationCreateBulk
- func (clcb *CountryLocationCreateBulk) Exec(ctx context.Context) error
- func (c *CountryLocationCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (clcb *CountryLocationCreateBulk) ExecX(ctx context.Context)
- func (clcb *CountryLocationCreateBulk) OnConflict(opts ...sql.ConflictOption) *CountryLocationUpsertBulk
- func (clcb *CountryLocationCreateBulk) OnConflictColumns(columns ...string) *CountryLocationUpsertBulk
- func (c *CountryLocationCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (clcb *CountryLocationCreateBulk) Save(ctx context.Context) ([]*CountryLocation, error)
- func (clcb *CountryLocationCreateBulk) SaveX(ctx context.Context) []*CountryLocation
- type CountryLocationDelete
- func (cld *CountryLocationDelete) Exec(ctx context.Context) (int, error)
- func (c *CountryLocationDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cld *CountryLocationDelete) ExecX(ctx context.Context) int
- func (c *CountryLocationDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cld *CountryLocationDelete) Where(ps ...predicate.CountryLocation) *CountryLocationDelete
- type CountryLocationDeleteOne
- type CountryLocationEdges
- type CountryLocationGroupBy
- func (clgb *CountryLocationGroupBy) Aggregate(fns ...AggregateFunc) *CountryLocationGroupBy
- func (s *CountryLocationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CountryLocationGroupBy) BoolX(ctx context.Context) bool
- func (s *CountryLocationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CountryLocationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CountryLocationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CountryLocationGroupBy) Float64X(ctx context.Context) float64
- func (s *CountryLocationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CountryLocationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CountryLocationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CountryLocationGroupBy) IntX(ctx context.Context) int
- func (s *CountryLocationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CountryLocationGroupBy) IntsX(ctx context.Context) []int
- func (clgb *CountryLocationGroupBy) Scan(ctx context.Context, v any) error
- func (s *CountryLocationGroupBy) ScanX(ctx context.Context, v any)
- func (s *CountryLocationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CountryLocationGroupBy) StringX(ctx context.Context) string
- func (s *CountryLocationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CountryLocationGroupBy) StringsX(ctx context.Context) []string
- type CountryLocationMutation
- func (m *CountryLocationMutation) AddChildLocationIDs(ids ...uint64)
- func (m *CountryLocationMutation) AddField(name string, value ent.Value) error
- func (m *CountryLocationMutation) AddSorting(u int64)
- func (m *CountryLocationMutation) AddedEdges() []string
- func (m *CountryLocationMutation) AddedField(name string) (ent.Value, bool)
- func (m *CountryLocationMutation) AddedFields() []string
- func (m *CountryLocationMutation) AddedIDs(name string) []ent.Value
- func (m *CountryLocationMutation) AddedSorting() (r int64, exists bool)
- func (m *CountryLocationMutation) ChildLocationsCleared() bool
- func (m *CountryLocationMutation) ChildLocationsIDs() (ids []uint64)
- func (m *CountryLocationMutation) ClearChildLocations()
- func (m *CountryLocationMutation) ClearCountry()
- func (m *CountryLocationMutation) ClearCountryID()
- func (m *CountryLocationMutation) ClearDeletedAt()
- func (m *CountryLocationMutation) ClearEdge(name string) error
- func (m *CountryLocationMutation) ClearField(name string) error
- func (m *CountryLocationMutation) ClearParent()
- func (m *CountryLocationMutation) ClearParentID()
- func (m *CountryLocationMutation) ClearedEdges() []string
- func (m *CountryLocationMutation) ClearedFields() []string
- func (m CountryLocationMutation) Client() *Client
- func (m *CountryLocationMutation) CountryCleared() bool
- func (m *CountryLocationMutation) CountryID() (r uint64, exists bool)
- func (m *CountryLocationMutation) CountryIDCleared() bool
- func (m *CountryLocationMutation) CountryIDs() (ids []uint64)
- func (m *CountryLocationMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CountryLocationMutation) DeletedAt() (r time.Time, exists bool)
- func (m *CountryLocationMutation) DeletedAtCleared() bool
- func (m *CountryLocationMutation) EdgeCleared(name string) bool
- func (c *CountryLocationMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *CountryLocationMutation) Field(name string) (ent.Value, bool)
- func (m *CountryLocationMutation) FieldCleared(name string) bool
- func (m *CountryLocationMutation) Fields() []string
- func (m *CountryLocationMutation) ID() (id uint64, exists bool)
- func (m *CountryLocationMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *CountryLocationMutation) NameEn() (r string, exists bool)
- func (m *CountryLocationMutation) NameZh() (r string, exists bool)
- func (m *CountryLocationMutation) OldCountryID(ctx context.Context) (v *uint64, err error)
- func (m *CountryLocationMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CountryLocationMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *CountryLocationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CountryLocationMutation) OldNameEn(ctx context.Context) (v string, err error)
- func (m *CountryLocationMutation) OldNameZh(ctx context.Context) (v string, err error)
- func (m *CountryLocationMutation) OldParentID(ctx context.Context) (v *uint64, err error)
- func (m *CountryLocationMutation) OldSorting(ctx context.Context) (v uint64, err error)
- func (m *CountryLocationMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CountryLocationMutation) Op() Op
- func (m *CountryLocationMutation) ParentCleared() bool
- func (m *CountryLocationMutation) ParentID() (r uint64, exists bool)
- func (m *CountryLocationMutation) ParentIDCleared() bool
- func (m *CountryLocationMutation) ParentIDs() (ids []uint64)
- func (c *CountryLocationMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *CountryLocationMutation) RemoveChildLocationIDs(ids ...uint64)
- func (m *CountryLocationMutation) RemovedChildLocationsIDs() (ids []uint64)
- func (m *CountryLocationMutation) RemovedEdges() []string
- func (m *CountryLocationMutation) RemovedIDs(name string) []ent.Value
- func (m *CountryLocationMutation) ResetChildLocations()
- func (m *CountryLocationMutation) ResetCountry()
- func (m *CountryLocationMutation) ResetCountryID()
- func (m *CountryLocationMutation) ResetCreatedAt()
- func (m *CountryLocationMutation) ResetDeletedAt()
- func (m *CountryLocationMutation) ResetEdge(name string) error
- func (m *CountryLocationMutation) ResetField(name string) error
- func (m *CountryLocationMutation) ResetNameEn()
- func (m *CountryLocationMutation) ResetNameZh()
- func (m *CountryLocationMutation) ResetParent()
- func (m *CountryLocationMutation) ResetParentID()
- func (m *CountryLocationMutation) ResetSorting()
- func (m *CountryLocationMutation) ResetUpdatedAt()
- func (m *CountryLocationMutation) SetCountryID(u uint64)
- func (m *CountryLocationMutation) SetCreatedAt(t time.Time)
- func (m *CountryLocationMutation) SetDeletedAt(t time.Time)
- func (m *CountryLocationMutation) SetField(name string, value ent.Value) error
- func (m *CountryLocationMutation) SetID(id uint64)
- func (m *CountryLocationMutation) SetNameEn(s string)
- func (m *CountryLocationMutation) SetNameZh(s string)
- func (m *CountryLocationMutation) SetOp(op Op)
- func (m *CountryLocationMutation) SetParentID(u uint64)
- func (m *CountryLocationMutation) SetSorting(u uint64)
- func (m *CountryLocationMutation) SetUpdatedAt(t time.Time)
- func (m *CountryLocationMutation) Sorting() (r uint64, exists bool)
- func (m CountryLocationMutation) Tx() (*Tx, error)
- func (m *CountryLocationMutation) Type() string
- func (m *CountryLocationMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CountryLocationMutation) Where(ps ...predicate.CountryLocation)
- func (m *CountryLocationMutation) WhereP(ps ...func(*sql.Selector))
- type CountryLocationQuery
- func (clq *CountryLocationQuery) Aggregate(fns ...AggregateFunc) *CountryLocationSelect
- func (clq *CountryLocationQuery) All(ctx context.Context) ([]*CountryLocation, error)
- func (clq *CountryLocationQuery) AllX(ctx context.Context) []*CountryLocation
- func (clq *CountryLocationQuery) Clone() *CountryLocationQuery
- func (clq *CountryLocationQuery) Count(ctx context.Context) (int, error)
- func (clq *CountryLocationQuery) CountX(ctx context.Context) int
- func (c *CountryLocationQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (clq *CountryLocationQuery) Exist(ctx context.Context) (bool, error)
- func (clq *CountryLocationQuery) ExistX(ctx context.Context) bool
- func (clq *CountryLocationQuery) First(ctx context.Context) (*CountryLocation, error)
- func (clq *CountryLocationQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (clq *CountryLocationQuery) FirstIDX(ctx context.Context) uint64
- func (clq *CountryLocationQuery) FirstX(ctx context.Context) *CountryLocation
- func (clq *CountryLocationQuery) GroupBy(field string, fields ...string) *CountryLocationGroupBy
- func (clq *CountryLocationQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (clq *CountryLocationQuery) IDsX(ctx context.Context) []uint64
- func (clq *CountryLocationQuery) Limit(limit int) *CountryLocationQuery
- func (clq *CountryLocationQuery) Offset(offset int) *CountryLocationQuery
- func (clq *CountryLocationQuery) Only(ctx context.Context) (*CountryLocation, error)
- func (clq *CountryLocationQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (clq *CountryLocationQuery) OnlyIDX(ctx context.Context) uint64
- func (clq *CountryLocationQuery) OnlyX(ctx context.Context) *CountryLocation
- func (clq *CountryLocationQuery) Order(o ...countrylocation.OrderOption) *CountryLocationQuery
- func (clq *CountryLocationQuery) QueryChildLocations() *CountryLocationQuery
- func (c *CountryLocationQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (clq *CountryLocationQuery) QueryCountry() *CountryQuery
- func (clq *CountryLocationQuery) QueryParent() *CountryLocationQuery
- func (clq *CountryLocationQuery) Select(fields ...string) *CountryLocationSelect
- func (clq *CountryLocationQuery) Unique(unique bool) *CountryLocationQuery
- func (clq *CountryLocationQuery) Where(ps ...predicate.CountryLocation) *CountryLocationQuery
- func (clq *CountryLocationQuery) WithChildLocations(opts ...func(*CountryLocationQuery)) *CountryLocationQuery
- func (clq *CountryLocationQuery) WithCountry(opts ...func(*CountryQuery)) *CountryLocationQuery
- func (clq *CountryLocationQuery) WithParent(opts ...func(*CountryLocationQuery)) *CountryLocationQuery
- type CountryLocationSelect
- func (cls *CountryLocationSelect) Aggregate(fns ...AggregateFunc) *CountryLocationSelect
- func (s *CountryLocationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CountryLocationSelect) BoolX(ctx context.Context) bool
- func (s *CountryLocationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CountryLocationSelect) BoolsX(ctx context.Context) []bool
- func (c CountryLocationSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *CountryLocationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CountryLocationSelect) Float64X(ctx context.Context) float64
- func (s *CountryLocationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CountryLocationSelect) Float64sX(ctx context.Context) []float64
- func (s *CountryLocationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CountryLocationSelect) IntX(ctx context.Context) int
- func (s *CountryLocationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CountryLocationSelect) IntsX(ctx context.Context) []int
- func (c CountryLocationSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cls *CountryLocationSelect) Scan(ctx context.Context, v any) error
- func (s *CountryLocationSelect) ScanX(ctx context.Context, v any)
- func (s *CountryLocationSelect) String(ctx context.Context) (_ string, err error)
- func (s *CountryLocationSelect) StringX(ctx context.Context) string
- func (s *CountryLocationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CountryLocationSelect) StringsX(ctx context.Context) []string
- type CountryLocationUpdate
- func (clu *CountryLocationUpdate) AddChildLocationIDs(ids ...uint64) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) AddChildLocations(c ...*CountryLocation) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) AddSorting(u int64) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) ClearChildLocations() *CountryLocationUpdate
- func (clu *CountryLocationUpdate) ClearCountry() *CountryLocationUpdate
- func (clu *CountryLocationUpdate) ClearCountryID() *CountryLocationUpdate
- func (clu *CountryLocationUpdate) ClearDeletedAt() *CountryLocationUpdate
- func (clu *CountryLocationUpdate) ClearParent() *CountryLocationUpdate
- func (clu *CountryLocationUpdate) ClearParentID() *CountryLocationUpdate
- func (clu *CountryLocationUpdate) Exec(ctx context.Context) error
- func (c *CountryLocationUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (clu *CountryLocationUpdate) ExecX(ctx context.Context)
- func (clu *CountryLocationUpdate) Mutation() *CountryLocationMutation
- func (c *CountryLocationUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (clu *CountryLocationUpdate) RemoveChildLocationIDs(ids ...uint64) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) RemoveChildLocations(c ...*CountryLocation) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) Save(ctx context.Context) (int, error)
- func (clu *CountryLocationUpdate) SaveX(ctx context.Context) int
- func (clu *CountryLocationUpdate) SetCountry(c *Country) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetCountryID(u uint64) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetCreatedAt(t time.Time) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetDeletedAt(t time.Time) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetNameEn(s string) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetNameZh(s string) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetNillableCountryID(u *uint64) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetNillableCreatedAt(t *time.Time) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetNillableDeletedAt(t *time.Time) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetNillableNameEn(s *string) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetNillableNameZh(s *string) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetNillableParentID(u *uint64) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetNillableSorting(u *uint64) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetParent(c *CountryLocation) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetParentID(u uint64) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetSorting(u uint64) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) SetUpdatedAt(t time.Time) *CountryLocationUpdate
- func (clu *CountryLocationUpdate) Where(ps ...predicate.CountryLocation) *CountryLocationUpdate
- type CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) AddChildLocationIDs(ids ...uint64) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) AddChildLocations(c ...*CountryLocation) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) AddSorting(u int64) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) ClearChildLocations() *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) ClearCountry() *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) ClearCountryID() *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) ClearDeletedAt() *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) ClearParent() *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) ClearParentID() *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) Exec(ctx context.Context) error
- func (c *CountryLocationUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cluo *CountryLocationUpdateOne) ExecX(ctx context.Context)
- func (cluo *CountryLocationUpdateOne) Mutation() *CountryLocationMutation
- func (c *CountryLocationUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cluo *CountryLocationUpdateOne) RemoveChildLocationIDs(ids ...uint64) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) RemoveChildLocations(c ...*CountryLocation) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) Save(ctx context.Context) (*CountryLocation, error)
- func (cluo *CountryLocationUpdateOne) SaveX(ctx context.Context) *CountryLocation
- func (cluo *CountryLocationUpdateOne) Select(field string, fields ...string) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetCountry(c *Country) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetCountryID(u uint64) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetCreatedAt(t time.Time) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetDeletedAt(t time.Time) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetNameEn(s string) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetNameZh(s string) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetNillableCountryID(u *uint64) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetNillableCreatedAt(t *time.Time) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetNillableDeletedAt(t *time.Time) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetNillableNameEn(s *string) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetNillableNameZh(s *string) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetNillableParentID(u *uint64) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetNillableSorting(u *uint64) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetParent(c *CountryLocation) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetParentID(u uint64) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetSorting(u uint64) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) SetUpdatedAt(t time.Time) *CountryLocationUpdateOne
- func (cluo *CountryLocationUpdateOne) Where(ps ...predicate.CountryLocation) *CountryLocationUpdateOne
- type CountryLocationUpsert
- func (u *CountryLocationUpsert) AddSorting(v uint64) *CountryLocationUpsert
- func (u *CountryLocationUpsert) ClearCountryID() *CountryLocationUpsert
- func (u *CountryLocationUpsert) ClearDeletedAt() *CountryLocationUpsert
- func (u *CountryLocationUpsert) ClearParentID() *CountryLocationUpsert
- func (u *CountryLocationUpsert) SetCountryID(v uint64) *CountryLocationUpsert
- func (u *CountryLocationUpsert) SetCreatedAt(v time.Time) *CountryLocationUpsert
- func (u *CountryLocationUpsert) SetDeletedAt(v time.Time) *CountryLocationUpsert
- func (u *CountryLocationUpsert) SetNameEn(v string) *CountryLocationUpsert
- func (u *CountryLocationUpsert) SetNameZh(v string) *CountryLocationUpsert
- func (u *CountryLocationUpsert) SetParentID(v uint64) *CountryLocationUpsert
- func (u *CountryLocationUpsert) SetSorting(v uint64) *CountryLocationUpsert
- func (u *CountryLocationUpsert) SetUpdatedAt(v time.Time) *CountryLocationUpsert
- func (u *CountryLocationUpsert) UpdateCountryID() *CountryLocationUpsert
- func (u *CountryLocationUpsert) UpdateCreatedAt() *CountryLocationUpsert
- func (u *CountryLocationUpsert) UpdateDeletedAt() *CountryLocationUpsert
- func (u *CountryLocationUpsert) UpdateNameEn() *CountryLocationUpsert
- func (u *CountryLocationUpsert) UpdateNameZh() *CountryLocationUpsert
- func (u *CountryLocationUpsert) UpdateParentID() *CountryLocationUpsert
- func (u *CountryLocationUpsert) UpdateSorting() *CountryLocationUpsert
- func (u *CountryLocationUpsert) UpdateUpdatedAt() *CountryLocationUpsert
- type CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) AddSorting(v uint64) *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) ClearCountryID() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) ClearDeletedAt() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) ClearParentID() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) DoNothing() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) Exec(ctx context.Context) error
- func (u *CountryLocationUpsertBulk) ExecX(ctx context.Context)
- func (u *CountryLocationUpsertBulk) Ignore() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) SetCountryID(v uint64) *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) SetCreatedAt(v time.Time) *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) SetDeletedAt(v time.Time) *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) SetNameEn(v string) *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) SetNameZh(v string) *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) SetParentID(v uint64) *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) SetSorting(v uint64) *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) SetUpdatedAt(v time.Time) *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) Update(set func(*CountryLocationUpsert)) *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) UpdateCountryID() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) UpdateCreatedAt() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) UpdateDeletedAt() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) UpdateNameEn() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) UpdateNameZh() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) UpdateNewValues() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) UpdateParentID() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) UpdateSorting() *CountryLocationUpsertBulk
- func (u *CountryLocationUpsertBulk) UpdateUpdatedAt() *CountryLocationUpsertBulk
- type CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) AddSorting(v uint64) *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) ClearCountryID() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) ClearDeletedAt() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) ClearParentID() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) DoNothing() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) Exec(ctx context.Context) error
- func (u *CountryLocationUpsertOne) ExecX(ctx context.Context)
- func (u *CountryLocationUpsertOne) ID(ctx context.Context) (id uint64, err error)
- func (u *CountryLocationUpsertOne) IDX(ctx context.Context) uint64
- func (u *CountryLocationUpsertOne) Ignore() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) SetCountryID(v uint64) *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) SetCreatedAt(v time.Time) *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) SetDeletedAt(v time.Time) *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) SetNameEn(v string) *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) SetNameZh(v string) *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) SetParentID(v uint64) *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) SetSorting(v uint64) *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) SetUpdatedAt(v time.Time) *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) Update(set func(*CountryLocationUpsert)) *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) UpdateCountryID() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) UpdateCreatedAt() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) UpdateDeletedAt() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) UpdateNameEn() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) UpdateNameZh() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) UpdateNewValues() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) UpdateParentID() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) UpdateSorting() *CountryLocationUpsertOne
- func (u *CountryLocationUpsertOne) UpdateUpdatedAt() *CountryLocationUpsertOne
- type CountryLocations
- type CountryMutation
- func (m *CountryMutation) AddBankIDs(ids ...uint64)
- func (m *CountryMutation) AddContactUserIDs(ids ...uint64)
- func (m *CountryMutation) AddConversionRate(f float64)
- func (m *CountryMutation) AddField(name string, value ent.Value) error
- func (m *CountryMutation) AddLocationIDs(ids ...uint64)
- func (m *CountryMutation) AddStatus(u int8)
- func (m *CountryMutation) AddUserIDs(ids ...uint64)
- func (m *CountryMutation) AddedConversionRate() (r float64, exists bool)
- func (m *CountryMutation) AddedEdges() []string
- func (m *CountryMutation) AddedField(name string) (ent.Value, bool)
- func (m *CountryMutation) AddedFields() []string
- func (m *CountryMutation) AddedIDs(name string) []ent.Value
- func (m *CountryMutation) AddedStatus() (r int8, exists bool)
- func (m *CountryMutation) BanksCleared() bool
- func (m *CountryMutation) BanksIDs() (ids []uint64)
- func (m *CountryMutation) Capital() (r string, exists bool)
- func (m *CountryMutation) CapitalCleared() bool
- func (m *CountryMutation) ClearBanks()
- func (m *CountryMutation) ClearCapital()
- func (m *CountryMutation) ClearContactUsers()
- func (m *CountryMutation) ClearCurrencyCode()
- func (m *CountryMutation) ClearCurrencyName()
- func (m *CountryMutation) ClearCurrencySymbol()
- func (m *CountryMutation) ClearEdge(name string) error
- func (m *CountryMutation) ClearField(name string) error
- func (m *CountryMutation) ClearLocations()
- func (m *CountryMutation) ClearNumericCode()
- func (m *CountryMutation) ClearOfficialName()
- func (m *CountryMutation) ClearPhoneCode()
- func (m *CountryMutation) ClearUsers()
- func (m *CountryMutation) ClearedEdges() []string
- func (m *CountryMutation) ClearedFields() []string
- func (m CountryMutation) Client() *Client
- func (m *CountryMutation) ContactUsersCleared() bool
- func (m *CountryMutation) ContactUsersIDs() (ids []uint64)
- func (m *CountryMutation) ConversionRate() (r float64, exists bool)
- func (m *CountryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CountryMutation) CurrencyCode() (r string, exists bool)
- func (m *CountryMutation) CurrencyCodeCleared() bool
- func (m *CountryMutation) CurrencyName() (r string, exists bool)
- func (m *CountryMutation) CurrencyNameCleared() bool
- func (m *CountryMutation) CurrencySymbol() (r string, exists bool)
- func (m *CountryMutation) CurrencySymbolCleared() bool
- func (m *CountryMutation) EdgeCleared(name string) bool
- func (c *CountryMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *CountryMutation) Field(name string) (ent.Value, bool)
- func (m *CountryMutation) FieldCleared(name string) bool
- func (m *CountryMutation) Fields() []string
- func (m *CountryMutation) ID() (id uint64, exists bool)
- func (m *CountryMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *CountryMutation) Iso2() (r string, exists bool)
- func (m *CountryMutation) Iso3() (r string, exists bool)
- func (m *CountryMutation) LocationsCleared() bool
- func (m *CountryMutation) LocationsIDs() (ids []uint64)
- func (m *CountryMutation) Name() (r string, exists bool)
- func (m *CountryMutation) NumericCode() (r string, exists bool)
- func (m *CountryMutation) NumericCodeCleared() bool
- func (m *CountryMutation) OfficialName() (r string, exists bool)
- func (m *CountryMutation) OfficialNameCleared() bool
- func (m *CountryMutation) OldCapital(ctx context.Context) (v *string, err error)
- func (m *CountryMutation) OldConversionRate(ctx context.Context) (v float64, err error)
- func (m *CountryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CountryMutation) OldCurrencyCode(ctx context.Context) (v *string, err error)
- func (m *CountryMutation) OldCurrencyName(ctx context.Context) (v *string, err error)
- func (m *CountryMutation) OldCurrencySymbol(ctx context.Context) (v *string, err error)
- func (m *CountryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CountryMutation) OldIso2(ctx context.Context) (v string, err error)
- func (m *CountryMutation) OldIso3(ctx context.Context) (v string, err error)
- func (m *CountryMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CountryMutation) OldNumericCode(ctx context.Context) (v *string, err error)
- func (m *CountryMutation) OldOfficialName(ctx context.Context) (v *string, err error)
- func (m *CountryMutation) OldPhoneCode(ctx context.Context) (v *string, err error)
- func (m *CountryMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *CountryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CountryMutation) Op() Op
- func (m *CountryMutation) PhoneCode() (r string, exists bool)
- func (m *CountryMutation) PhoneCodeCleared() bool
- func (c *CountryMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *CountryMutation) RemoveBankIDs(ids ...uint64)
- func (m *CountryMutation) RemoveContactUserIDs(ids ...uint64)
- func (m *CountryMutation) RemoveLocationIDs(ids ...uint64)
- func (m *CountryMutation) RemoveUserIDs(ids ...uint64)
- func (m *CountryMutation) RemovedBanksIDs() (ids []uint64)
- func (m *CountryMutation) RemovedContactUsersIDs() (ids []uint64)
- func (m *CountryMutation) RemovedEdges() []string
- func (m *CountryMutation) RemovedIDs(name string) []ent.Value
- func (m *CountryMutation) RemovedLocationsIDs() (ids []uint64)
- func (m *CountryMutation) RemovedUsersIDs() (ids []uint64)
- func (m *CountryMutation) ResetBanks()
- func (m *CountryMutation) ResetCapital()
- func (m *CountryMutation) ResetContactUsers()
- func (m *CountryMutation) ResetConversionRate()
- func (m *CountryMutation) ResetCreatedAt()
- func (m *CountryMutation) ResetCurrencyCode()
- func (m *CountryMutation) ResetCurrencyName()
- func (m *CountryMutation) ResetCurrencySymbol()
- func (m *CountryMutation) ResetEdge(name string) error
- func (m *CountryMutation) ResetField(name string) error
- func (m *CountryMutation) ResetIso2()
- func (m *CountryMutation) ResetIso3()
- func (m *CountryMutation) ResetLocations()
- func (m *CountryMutation) ResetName()
- func (m *CountryMutation) ResetNumericCode()
- func (m *CountryMutation) ResetOfficialName()
- func (m *CountryMutation) ResetPhoneCode()
- func (m *CountryMutation) ResetStatus()
- func (m *CountryMutation) ResetUpdatedAt()
- func (m *CountryMutation) ResetUsers()
- func (m *CountryMutation) SetCapital(s string)
- func (m *CountryMutation) SetConversionRate(f float64)
- func (m *CountryMutation) SetCreatedAt(t time.Time)
- func (m *CountryMutation) SetCurrencyCode(s string)
- func (m *CountryMutation) SetCurrencyName(s string)
- func (m *CountryMutation) SetCurrencySymbol(s string)
- func (m *CountryMutation) SetField(name string, value ent.Value) error
- func (m *CountryMutation) SetID(id uint64)
- func (m *CountryMutation) SetIso2(s string)
- func (m *CountryMutation) SetIso3(s string)
- func (m *CountryMutation) SetName(s string)
- func (m *CountryMutation) SetNumericCode(s string)
- func (m *CountryMutation) SetOfficialName(s string)
- func (m *CountryMutation) SetOp(op Op)
- func (m *CountryMutation) SetPhoneCode(s string)
- func (m *CountryMutation) SetStatus(u uint8)
- func (m *CountryMutation) SetUpdatedAt(t time.Time)
- func (m *CountryMutation) Status() (r uint8, exists bool)
- func (m CountryMutation) Tx() (*Tx, error)
- func (m *CountryMutation) Type() string
- func (m *CountryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *CountryMutation) UsersCleared() bool
- func (m *CountryMutation) UsersIDs() (ids []uint64)
- func (m *CountryMutation) Where(ps ...predicate.Country)
- func (m *CountryMutation) WhereP(ps ...func(*sql.Selector))
- type CountryQuery
- func (cq *CountryQuery) Aggregate(fns ...AggregateFunc) *CountrySelect
- func (cq *CountryQuery) All(ctx context.Context) ([]*Country, error)
- func (cq *CountryQuery) AllX(ctx context.Context) []*Country
- func (cq *CountryQuery) Clone() *CountryQuery
- func (cq *CountryQuery) Count(ctx context.Context) (int, error)
- func (cq *CountryQuery) CountX(ctx context.Context) int
- func (c *CountryQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cq *CountryQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CountryQuery) ExistX(ctx context.Context) bool
- func (cq *CountryQuery) First(ctx context.Context) (*Country, error)
- func (cq *CountryQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (cq *CountryQuery) FirstIDX(ctx context.Context) uint64
- func (cq *CountryQuery) FirstX(ctx context.Context) *Country
- func (cq *CountryQuery) GroupBy(field string, fields ...string) *CountryGroupBy
- func (cq *CountryQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (cq *CountryQuery) IDsX(ctx context.Context) []uint64
- func (cq *CountryQuery) Limit(limit int) *CountryQuery
- func (cq *CountryQuery) Offset(offset int) *CountryQuery
- func (cq *CountryQuery) Only(ctx context.Context) (*Country, error)
- func (cq *CountryQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (cq *CountryQuery) OnlyIDX(ctx context.Context) uint64
- func (cq *CountryQuery) OnlyX(ctx context.Context) *Country
- func (cq *CountryQuery) Order(o ...country.OrderOption) *CountryQuery
- func (cq *CountryQuery) QueryBanks() *BankQuery
- func (cq *CountryQuery) QueryContactUsers() *UserQuery
- func (c *CountryQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cq *CountryQuery) QueryLocations() *CountryLocationQuery
- func (cq *CountryQuery) QueryUsers() *UserQuery
- func (cq *CountryQuery) Select(fields ...string) *CountrySelect
- func (cq *CountryQuery) Unique(unique bool) *CountryQuery
- func (cq *CountryQuery) Where(ps ...predicate.Country) *CountryQuery
- func (cq *CountryQuery) WithBanks(opts ...func(*BankQuery)) *CountryQuery
- func (cq *CountryQuery) WithContactUsers(opts ...func(*UserQuery)) *CountryQuery
- func (cq *CountryQuery) WithLocations(opts ...func(*CountryLocationQuery)) *CountryQuery
- func (cq *CountryQuery) WithUsers(opts ...func(*UserQuery)) *CountryQuery
- type CountrySelect
- func (cs *CountrySelect) Aggregate(fns ...AggregateFunc) *CountrySelect
- func (s *CountrySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CountrySelect) BoolX(ctx context.Context) bool
- func (s *CountrySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CountrySelect) BoolsX(ctx context.Context) []bool
- func (c CountrySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *CountrySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CountrySelect) Float64X(ctx context.Context) float64
- func (s *CountrySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CountrySelect) Float64sX(ctx context.Context) []float64
- func (s *CountrySelect) Int(ctx context.Context) (_ int, err error)
- func (s *CountrySelect) IntX(ctx context.Context) int
- func (s *CountrySelect) Ints(ctx context.Context) ([]int, error)
- func (s *CountrySelect) IntsX(ctx context.Context) []int
- func (c CountrySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cs *CountrySelect) Scan(ctx context.Context, v any) error
- func (s *CountrySelect) ScanX(ctx context.Context, v any)
- func (s *CountrySelect) String(ctx context.Context) (_ string, err error)
- func (s *CountrySelect) StringX(ctx context.Context) string
- func (s *CountrySelect) Strings(ctx context.Context) ([]string, error)
- func (s *CountrySelect) StringsX(ctx context.Context) []string
- type CountryUpdate
- func (cu *CountryUpdate) AddBankIDs(ids ...uint64) *CountryUpdate
- func (cu *CountryUpdate) AddBanks(b ...*Bank) *CountryUpdate
- func (cu *CountryUpdate) AddContactUserIDs(ids ...uint64) *CountryUpdate
- func (cu *CountryUpdate) AddContactUsers(u ...*User) *CountryUpdate
- func (cu *CountryUpdate) AddConversionRate(f float64) *CountryUpdate
- func (cu *CountryUpdate) AddLocationIDs(ids ...uint64) *CountryUpdate
- func (cu *CountryUpdate) AddLocations(c ...*CountryLocation) *CountryUpdate
- func (cu *CountryUpdate) AddStatus(u int8) *CountryUpdate
- func (cu *CountryUpdate) AddUserIDs(ids ...uint64) *CountryUpdate
- func (cu *CountryUpdate) AddUsers(u ...*User) *CountryUpdate
- func (cu *CountryUpdate) ClearBanks() *CountryUpdate
- func (cu *CountryUpdate) ClearCapital() *CountryUpdate
- func (cu *CountryUpdate) ClearContactUsers() *CountryUpdate
- func (cu *CountryUpdate) ClearCurrencyCode() *CountryUpdate
- func (cu *CountryUpdate) ClearCurrencyName() *CountryUpdate
- func (cu *CountryUpdate) ClearCurrencySymbol() *CountryUpdate
- func (cu *CountryUpdate) ClearLocations() *CountryUpdate
- func (cu *CountryUpdate) ClearNumericCode() *CountryUpdate
- func (cu *CountryUpdate) ClearOfficialName() *CountryUpdate
- func (cu *CountryUpdate) ClearPhoneCode() *CountryUpdate
- func (cu *CountryUpdate) ClearUsers() *CountryUpdate
- func (cu *CountryUpdate) Exec(ctx context.Context) error
- func (c *CountryUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cu *CountryUpdate) ExecX(ctx context.Context)
- func (cu *CountryUpdate) Mutation() *CountryMutation
- func (c *CountryUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cu *CountryUpdate) RemoveBankIDs(ids ...uint64) *CountryUpdate
- func (cu *CountryUpdate) RemoveBanks(b ...*Bank) *CountryUpdate
- func (cu *CountryUpdate) RemoveContactUserIDs(ids ...uint64) *CountryUpdate
- func (cu *CountryUpdate) RemoveContactUsers(u ...*User) *CountryUpdate
- func (cu *CountryUpdate) RemoveLocationIDs(ids ...uint64) *CountryUpdate
- func (cu *CountryUpdate) RemoveLocations(c ...*CountryLocation) *CountryUpdate
- func (cu *CountryUpdate) RemoveUserIDs(ids ...uint64) *CountryUpdate
- func (cu *CountryUpdate) RemoveUsers(u ...*User) *CountryUpdate
- func (cu *CountryUpdate) Save(ctx context.Context) (int, error)
- func (cu *CountryUpdate) SaveX(ctx context.Context) int
- func (cu *CountryUpdate) SetCapital(s string) *CountryUpdate
- func (cu *CountryUpdate) SetConversionRate(f float64) *CountryUpdate
- func (cu *CountryUpdate) SetCreatedAt(t time.Time) *CountryUpdate
- func (cu *CountryUpdate) SetCurrencyCode(s string) *CountryUpdate
- func (cu *CountryUpdate) SetCurrencyName(s string) *CountryUpdate
- func (cu *CountryUpdate) SetCurrencySymbol(s string) *CountryUpdate
- func (cu *CountryUpdate) SetIso2(s string) *CountryUpdate
- func (cu *CountryUpdate) SetIso3(s string) *CountryUpdate
- func (cu *CountryUpdate) SetName(s string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableCapital(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableConversionRate(f *float64) *CountryUpdate
- func (cu *CountryUpdate) SetNillableCreatedAt(t *time.Time) *CountryUpdate
- func (cu *CountryUpdate) SetNillableCurrencyCode(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableCurrencyName(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableCurrencySymbol(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableIso2(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableIso3(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableName(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableNumericCode(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableOfficialName(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillablePhoneCode(s *string) *CountryUpdate
- func (cu *CountryUpdate) SetNillableStatus(u *uint8) *CountryUpdate
- func (cu *CountryUpdate) SetNumericCode(s string) *CountryUpdate
- func (cu *CountryUpdate) SetOfficialName(s string) *CountryUpdate
- func (cu *CountryUpdate) SetPhoneCode(s string) *CountryUpdate
- func (cu *CountryUpdate) SetStatus(u uint8) *CountryUpdate
- func (cu *CountryUpdate) SetUpdatedAt(t time.Time) *CountryUpdate
- func (cu *CountryUpdate) Where(ps ...predicate.Country) *CountryUpdate
- type CountryUpdateOne
- func (cuo *CountryUpdateOne) AddBankIDs(ids ...uint64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddBanks(b ...*Bank) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddContactUserIDs(ids ...uint64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddContactUsers(u ...*User) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddConversionRate(f float64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddLocationIDs(ids ...uint64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddLocations(c ...*CountryLocation) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddStatus(u int8) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddUserIDs(ids ...uint64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) AddUsers(u ...*User) *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearBanks() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearCapital() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearContactUsers() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearCurrencyCode() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearCurrencyName() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearCurrencySymbol() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearLocations() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearNumericCode() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearOfficialName() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearPhoneCode() *CountryUpdateOne
- func (cuo *CountryUpdateOne) ClearUsers() *CountryUpdateOne
- func (cuo *CountryUpdateOne) Exec(ctx context.Context) error
- func (c *CountryUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (cuo *CountryUpdateOne) ExecX(ctx context.Context)
- func (cuo *CountryUpdateOne) Mutation() *CountryMutation
- func (c *CountryUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (cuo *CountryUpdateOne) RemoveBankIDs(ids ...uint64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) RemoveBanks(b ...*Bank) *CountryUpdateOne
- func (cuo *CountryUpdateOne) RemoveContactUserIDs(ids ...uint64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) RemoveContactUsers(u ...*User) *CountryUpdateOne
- func (cuo *CountryUpdateOne) RemoveLocationIDs(ids ...uint64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) RemoveLocations(c ...*CountryLocation) *CountryUpdateOne
- func (cuo *CountryUpdateOne) RemoveUserIDs(ids ...uint64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) RemoveUsers(u ...*User) *CountryUpdateOne
- func (cuo *CountryUpdateOne) Save(ctx context.Context) (*Country, error)
- func (cuo *CountryUpdateOne) SaveX(ctx context.Context) *Country
- func (cuo *CountryUpdateOne) Select(field string, fields ...string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetCapital(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetConversionRate(f float64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetCreatedAt(t time.Time) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetCurrencyCode(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetCurrencyName(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetCurrencySymbol(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetIso2(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetIso3(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetName(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableCapital(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableConversionRate(f *float64) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableCreatedAt(t *time.Time) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableCurrencyCode(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableCurrencyName(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableCurrencySymbol(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableIso2(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableIso3(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableName(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableNumericCode(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableOfficialName(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillablePhoneCode(s *string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNillableStatus(u *uint8) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetNumericCode(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetOfficialName(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetPhoneCode(s string) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetStatus(u uint8) *CountryUpdateOne
- func (cuo *CountryUpdateOne) SetUpdatedAt(t time.Time) *CountryUpdateOne
- func (cuo *CountryUpdateOne) Where(ps ...predicate.Country) *CountryUpdateOne
- type CountryUpsert
- func (u *CountryUpsert) AddConversionRate(v float64) *CountryUpsert
- func (u *CountryUpsert) AddStatus(v uint8) *CountryUpsert
- func (u *CountryUpsert) ClearCapital() *CountryUpsert
- func (u *CountryUpsert) ClearCurrencyCode() *CountryUpsert
- func (u *CountryUpsert) ClearCurrencyName() *CountryUpsert
- func (u *CountryUpsert) ClearCurrencySymbol() *CountryUpsert
- func (u *CountryUpsert) ClearNumericCode() *CountryUpsert
- func (u *CountryUpsert) ClearOfficialName() *CountryUpsert
- func (u *CountryUpsert) ClearPhoneCode() *CountryUpsert
- func (u *CountryUpsert) SetCapital(v string) *CountryUpsert
- func (u *CountryUpsert) SetConversionRate(v float64) *CountryUpsert
- func (u *CountryUpsert) SetCreatedAt(v time.Time) *CountryUpsert
- func (u *CountryUpsert) SetCurrencyCode(v string) *CountryUpsert
- func (u *CountryUpsert) SetCurrencyName(v string) *CountryUpsert
- func (u *CountryUpsert) SetCurrencySymbol(v string) *CountryUpsert
- func (u *CountryUpsert) SetIso2(v string) *CountryUpsert
- func (u *CountryUpsert) SetIso3(v string) *CountryUpsert
- func (u *CountryUpsert) SetName(v string) *CountryUpsert
- func (u *CountryUpsert) SetNumericCode(v string) *CountryUpsert
- func (u *CountryUpsert) SetOfficialName(v string) *CountryUpsert
- func (u *CountryUpsert) SetPhoneCode(v string) *CountryUpsert
- func (u *CountryUpsert) SetStatus(v uint8) *CountryUpsert
- func (u *CountryUpsert) SetUpdatedAt(v time.Time) *CountryUpsert
- func (u *CountryUpsert) UpdateCapital() *CountryUpsert
- func (u *CountryUpsert) UpdateConversionRate() *CountryUpsert
- func (u *CountryUpsert) UpdateCreatedAt() *CountryUpsert
- func (u *CountryUpsert) UpdateCurrencyCode() *CountryUpsert
- func (u *CountryUpsert) UpdateCurrencyName() *CountryUpsert
- func (u *CountryUpsert) UpdateCurrencySymbol() *CountryUpsert
- func (u *CountryUpsert) UpdateIso2() *CountryUpsert
- func (u *CountryUpsert) UpdateIso3() *CountryUpsert
- func (u *CountryUpsert) UpdateName() *CountryUpsert
- func (u *CountryUpsert) UpdateNumericCode() *CountryUpsert
- func (u *CountryUpsert) UpdateOfficialName() *CountryUpsert
- func (u *CountryUpsert) UpdatePhoneCode() *CountryUpsert
- func (u *CountryUpsert) UpdateStatus() *CountryUpsert
- func (u *CountryUpsert) UpdateUpdatedAt() *CountryUpsert
- type CountryUpsertBulk
- func (u *CountryUpsertBulk) AddConversionRate(v float64) *CountryUpsertBulk
- func (u *CountryUpsertBulk) AddStatus(v uint8) *CountryUpsertBulk
- func (u *CountryUpsertBulk) ClearCapital() *CountryUpsertBulk
- func (u *CountryUpsertBulk) ClearCurrencyCode() *CountryUpsertBulk
- func (u *CountryUpsertBulk) ClearCurrencyName() *CountryUpsertBulk
- func (u *CountryUpsertBulk) ClearCurrencySymbol() *CountryUpsertBulk
- func (u *CountryUpsertBulk) ClearNumericCode() *CountryUpsertBulk
- func (u *CountryUpsertBulk) ClearOfficialName() *CountryUpsertBulk
- func (u *CountryUpsertBulk) ClearPhoneCode() *CountryUpsertBulk
- func (u *CountryUpsertBulk) DoNothing() *CountryUpsertBulk
- func (u *CountryUpsertBulk) Exec(ctx context.Context) error
- func (u *CountryUpsertBulk) ExecX(ctx context.Context)
- func (u *CountryUpsertBulk) Ignore() *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetCapital(v string) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetConversionRate(v float64) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetCreatedAt(v time.Time) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetCurrencyCode(v string) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetCurrencyName(v string) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetCurrencySymbol(v string) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetIso2(v string) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetIso3(v string) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetName(v string) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetNumericCode(v string) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetOfficialName(v string) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetPhoneCode(v string) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetStatus(v uint8) *CountryUpsertBulk
- func (u *CountryUpsertBulk) SetUpdatedAt(v time.Time) *CountryUpsertBulk
- func (u *CountryUpsertBulk) Update(set func(*CountryUpsert)) *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateCapital() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateConversionRate() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateCreatedAt() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateCurrencyCode() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateCurrencyName() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateCurrencySymbol() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateIso2() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateIso3() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateName() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateNewValues() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateNumericCode() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateOfficialName() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdatePhoneCode() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateStatus() *CountryUpsertBulk
- func (u *CountryUpsertBulk) UpdateUpdatedAt() *CountryUpsertBulk
- type CountryUpsertOne
- func (u *CountryUpsertOne) AddConversionRate(v float64) *CountryUpsertOne
- func (u *CountryUpsertOne) AddStatus(v uint8) *CountryUpsertOne
- func (u *CountryUpsertOne) ClearCapital() *CountryUpsertOne
- func (u *CountryUpsertOne) ClearCurrencyCode() *CountryUpsertOne
- func (u *CountryUpsertOne) ClearCurrencyName() *CountryUpsertOne
- func (u *CountryUpsertOne) ClearCurrencySymbol() *CountryUpsertOne
- func (u *CountryUpsertOne) ClearNumericCode() *CountryUpsertOne
- func (u *CountryUpsertOne) ClearOfficialName() *CountryUpsertOne
- func (u *CountryUpsertOne) ClearPhoneCode() *CountryUpsertOne
- func (u *CountryUpsertOne) DoNothing() *CountryUpsertOne
- func (u *CountryUpsertOne) Exec(ctx context.Context) error
- func (u *CountryUpsertOne) ExecX(ctx context.Context)
- func (u *CountryUpsertOne) ID(ctx context.Context) (id uint64, err error)
- func (u *CountryUpsertOne) IDX(ctx context.Context) uint64
- func (u *CountryUpsertOne) Ignore() *CountryUpsertOne
- func (u *CountryUpsertOne) SetCapital(v string) *CountryUpsertOne
- func (u *CountryUpsertOne) SetConversionRate(v float64) *CountryUpsertOne
- func (u *CountryUpsertOne) SetCreatedAt(v time.Time) *CountryUpsertOne
- func (u *CountryUpsertOne) SetCurrencyCode(v string) *CountryUpsertOne
- func (u *CountryUpsertOne) SetCurrencyName(v string) *CountryUpsertOne
- func (u *CountryUpsertOne) SetCurrencySymbol(v string) *CountryUpsertOne
- func (u *CountryUpsertOne) SetIso2(v string) *CountryUpsertOne
- func (u *CountryUpsertOne) SetIso3(v string) *CountryUpsertOne
- func (u *CountryUpsertOne) SetName(v string) *CountryUpsertOne
- func (u *CountryUpsertOne) SetNumericCode(v string) *CountryUpsertOne
- func (u *CountryUpsertOne) SetOfficialName(v string) *CountryUpsertOne
- func (u *CountryUpsertOne) SetPhoneCode(v string) *CountryUpsertOne
- func (u *CountryUpsertOne) SetStatus(v uint8) *CountryUpsertOne
- func (u *CountryUpsertOne) SetUpdatedAt(v time.Time) *CountryUpsertOne
- func (u *CountryUpsertOne) Update(set func(*CountryUpsert)) *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateCapital() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateConversionRate() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateCreatedAt() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateCurrencyCode() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateCurrencyName() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateCurrencySymbol() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateIso2() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateIso3() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateName() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateNewValues() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateNumericCode() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateOfficialName() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdatePhoneCode() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateStatus() *CountryUpsertOne
- func (u *CountryUpsertOne) UpdateUpdatedAt() *CountryUpsertOne
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- type User
- func (c *User) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (u *User) QueryBank() *BankQuery
- func (u *User) QueryContactCountry() *CountryQuery
- func (c *User) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (u *User) QueryCountry() *CountryQuery
- func (u *User) QueryIntroducedUsers() *UserQuery
- func (u *User) QueryIntroducer() *UserQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- type UserClient
- 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 uint64) *UserDeleteOne
- func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *UserClient) Get(ctx context.Context, id uint64) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uint64) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryBank(u *User) *BankQuery
- func (c *UserClient) QueryContactCountry(u *User) *CountryQuery
- func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *UserClient) QueryCountry(u *User) *CountryQuery
- func (c *UserClient) QueryIntroducedUsers(u *User) *UserQuery
- func (c *UserClient) QueryIntroducer(u *User) *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uint64) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddIntroducedUserIDs(ids ...uint64) *UserCreate
- func (uc *UserCreate) AddIntroducedUsers(u ...*User) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAvatar(s string) *UserCreate
- func (uc *UserCreate) SetBanUntil(t time.Time) *UserCreate
- func (uc *UserCreate) SetBank(b *Bank) *UserCreate
- func (uc *UserCreate) SetBankAccountName(s string) *UserCreate
- func (uc *UserCreate) SetBankAccountNumber(s string) *UserCreate
- func (uc *UserCreate) SetBankID(u uint64) *UserCreate
- func (uc *UserCreate) SetContactCountry(c *Country) *UserCreate
- func (uc *UserCreate) SetContactCountryID(u uint64) *UserCreate
- func (uc *UserCreate) SetContactNumber(s string) *UserCreate
- func (uc *UserCreate) SetCountry(c *Country) *UserCreate
- func (uc *UserCreate) SetCountryID(u uint64) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetCredit1(f float64) *UserCreate
- func (uc *UserCreate) SetCredit2(f float64) *UserCreate
- func (uc *UserCreate) SetCredit3(f float64) *UserCreate
- func (uc *UserCreate) SetCredit4(f float64) *UserCreate
- func (uc *UserCreate) SetCredit5(f float64) *UserCreate
- func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetEmailVerifiedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetFirstLogin(b bool) *UserCreate
- func (uc *UserCreate) SetFullContactNumber(s string) *UserCreate
- func (uc *UserCreate) SetID(u uint64) *UserCreate
- func (uc *UserCreate) SetIntroducer(u *User) *UserCreate
- func (uc *UserCreate) SetIntroducerID(id uint64) *UserCreate
- func (uc *UserCreate) SetIntroducerUserID(u uint64) *UserCreate
- func (uc *UserCreate) SetLang(s string) *UserCreate
- func (uc *UserCreate) SetLastLoginAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNationalID(s string) *UserCreate
- func (uc *UserCreate) SetNewLoginAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetNillableAvatar(s *string) *UserCreate
- func (uc *UserCreate) SetNillableBanUntil(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableBankAccountName(s *string) *UserCreate
- func (uc *UserCreate) SetNillableBankAccountNumber(s *string) *UserCreate
- func (uc *UserCreate) SetNillableBankID(u *uint64) *UserCreate
- func (uc *UserCreate) SetNillableContactCountryID(u *uint64) *UserCreate
- func (uc *UserCreate) SetNillableContactNumber(s *string) *UserCreate
- func (uc *UserCreate) SetNillableCountryID(u *uint64) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableCredit1(f *float64) *UserCreate
- func (uc *UserCreate) SetNillableCredit2(f *float64) *UserCreate
- func (uc *UserCreate) SetNillableCredit3(f *float64) *UserCreate
- func (uc *UserCreate) SetNillableCredit4(f *float64) *UserCreate
- func (uc *UserCreate) SetNillableCredit5(f *float64) *UserCreate
- func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate
- func (uc *UserCreate) SetNillableEmailVerifiedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableFirstLogin(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableFullContactNumber(s *string) *UserCreate
- func (uc *UserCreate) SetNillableIntroducerID(id *uint64) *UserCreate
- func (uc *UserCreate) SetNillableIntroducerUserID(u *uint64) *UserCreate
- func (uc *UserCreate) SetNillableLang(s *string) *UserCreate
- func (uc *UserCreate) SetNillableLastLoginAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableName(s *string) *UserCreate
- func (uc *UserCreate) SetNillableNationalID(s *string) *UserCreate
- func (uc *UserCreate) SetNillableNewLoginAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableUnilevel(u *uint64) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableUsername(s *string) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetPassword2(s string) *UserCreate
- func (uc *UserCreate) SetUnilevel(u uint64) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- func (ud *UserDelete) Exec(ctx context.Context) (int, error)
- func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ud *UserDelete) ExecX(ctx context.Context) int
- func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- 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 (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddCredit1(f float64)
- func (m *UserMutation) AddCredit2(f float64)
- func (m *UserMutation) AddCredit3(f float64)
- func (m *UserMutation) AddCredit4(f float64)
- func (m *UserMutation) AddCredit5(f float64)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddIntroducedUserIDs(ids ...uint64)
- func (m *UserMutation) AddUnilevel(u int64)
- func (m *UserMutation) AddedCredit1() (r float64, exists bool)
- func (m *UserMutation) AddedCredit2() (r float64, exists bool)
- func (m *UserMutation) AddedCredit3() (r float64, exists bool)
- func (m *UserMutation) AddedCredit4() (r float64, exists bool)
- func (m *UserMutation) AddedCredit5() (r float64, 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) AddedUnilevel() (r int64, exists bool)
- func (m *UserMutation) Avatar() (r string, exists bool)
- func (m *UserMutation) AvatarCleared() bool
- func (m *UserMutation) BanUntil() (r time.Time, exists bool)
- func (m *UserMutation) BanUntilCleared() bool
- func (m *UserMutation) BankAccountName() (r string, exists bool)
- func (m *UserMutation) BankAccountNameCleared() bool
- func (m *UserMutation) BankAccountNumber() (r string, exists bool)
- func (m *UserMutation) BankAccountNumberCleared() bool
- func (m *UserMutation) BankCleared() bool
- func (m *UserMutation) BankID() (r uint64, exists bool)
- func (m *UserMutation) BankIDCleared() bool
- func (m *UserMutation) BankIDs() (ids []uint64)
- func (m *UserMutation) ClearAvatar()
- func (m *UserMutation) ClearBanUntil()
- func (m *UserMutation) ClearBank()
- func (m *UserMutation) ClearBankAccountName()
- func (m *UserMutation) ClearBankAccountNumber()
- func (m *UserMutation) ClearBankID()
- func (m *UserMutation) ClearContactCountry()
- func (m *UserMutation) ClearContactCountryID()
- func (m *UserMutation) ClearContactNumber()
- func (m *UserMutation) ClearCountry()
- func (m *UserMutation) ClearCountryID()
- func (m *UserMutation) ClearDeletedAt()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearEmail()
- func (m *UserMutation) ClearEmailVerifiedAt()
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearFullContactNumber()
- func (m *UserMutation) ClearIntroducedUsers()
- func (m *UserMutation) ClearIntroducer()
- func (m *UserMutation) ClearIntroducerUserID()
- func (m *UserMutation) ClearLastLoginAt()
- func (m *UserMutation) ClearName()
- func (m *UserMutation) ClearNationalID()
- func (m *UserMutation) ClearNewLoginAt()
- func (m *UserMutation) ClearUnilevel()
- func (m *UserMutation) ClearUsername()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) ContactCountryCleared() bool
- func (m *UserMutation) ContactCountryID() (r uint64, exists bool)
- func (m *UserMutation) ContactCountryIDCleared() bool
- func (m *UserMutation) ContactCountryIDs() (ids []uint64)
- func (m *UserMutation) ContactNumber() (r string, exists bool)
- func (m *UserMutation) ContactNumberCleared() bool
- func (m *UserMutation) CountryCleared() bool
- func (m *UserMutation) CountryID() (r uint64, exists bool)
- func (m *UserMutation) CountryIDCleared() bool
- func (m *UserMutation) CountryIDs() (ids []uint64)
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Credit1() (r float64, exists bool)
- func (m *UserMutation) Credit2() (r float64, exists bool)
- func (m *UserMutation) Credit3() (r float64, exists bool)
- func (m *UserMutation) Credit4() (r float64, exists bool)
- func (m *UserMutation) Credit5() (r float64, exists bool)
- func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
- func (m *UserMutation) DeletedAtCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) EmailCleared() bool
- func (m *UserMutation) EmailVerifiedAt() (r time.Time, exists bool)
- func (m *UserMutation) EmailVerifiedAtCleared() bool
- func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) FirstLogin() (r bool, exists bool)
- func (m *UserMutation) FullContactNumber() (r string, exists bool)
- func (m *UserMutation) FullContactNumberCleared() bool
- func (m *UserMutation) ID() (id uint64, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *UserMutation) IntroducedUsersCleared() bool
- func (m *UserMutation) IntroducedUsersIDs() (ids []uint64)
- func (m *UserMutation) IntroducerCleared() bool
- func (m *UserMutation) IntroducerID() (id uint64, exists bool)
- func (m *UserMutation) IntroducerIDs() (ids []uint64)
- func (m *UserMutation) IntroducerUserID() (r uint64, exists bool)
- func (m *UserMutation) IntroducerUserIDCleared() bool
- func (m *UserMutation) Lang() (r string, exists bool)
- func (m *UserMutation) LastLoginAt() (r time.Time, exists bool)
- func (m *UserMutation) LastLoginAtCleared() bool
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) NameCleared() bool
- func (m *UserMutation) NationalID() (r string, exists bool)
- func (m *UserMutation) NationalIDCleared() bool
- func (m *UserMutation) NewLoginAt() (r time.Time, exists bool)
- func (m *UserMutation) NewLoginAtCleared() bool
- func (m *UserMutation) OldAvatar(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldBanUntil(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldBankAccountName(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldBankAccountNumber(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldBankID(ctx context.Context) (v *uint64, err error)
- func (m *UserMutation) OldContactCountryID(ctx context.Context) (v *uint64, err error)
- func (m *UserMutation) OldContactNumber(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldCountryID(ctx context.Context) (v *uint64, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldCredit1(ctx context.Context) (v float64, err error)
- func (m *UserMutation) OldCredit2(ctx context.Context) (v float64, err error)
- func (m *UserMutation) OldCredit3(ctx context.Context) (v float64, err error)
- func (m *UserMutation) OldCredit4(ctx context.Context) (v float64, err error)
- func (m *UserMutation) OldCredit5(ctx context.Context) (v float64, err error)
- func (m *UserMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldEmailVerifiedAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldFirstLogin(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldFullContactNumber(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldIntroducerUserID(ctx context.Context) (v *uint64, err error)
- func (m *UserMutation) OldLang(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldLastLoginAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldNationalID(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldNewLoginAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword2(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUnilevel(ctx context.Context) (v *uint64, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) Password2() (r string, exists bool)
- func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *UserMutation) RemoveIntroducedUserIDs(ids ...uint64)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedIntroducedUsersIDs() (ids []uint64)
- func (m *UserMutation) ResetAvatar()
- func (m *UserMutation) ResetBanUntil()
- func (m *UserMutation) ResetBank()
- func (m *UserMutation) ResetBankAccountName()
- func (m *UserMutation) ResetBankAccountNumber()
- func (m *UserMutation) ResetBankID()
- func (m *UserMutation) ResetContactCountry()
- func (m *UserMutation) ResetContactCountryID()
- func (m *UserMutation) ResetContactNumber()
- func (m *UserMutation) ResetCountry()
- func (m *UserMutation) ResetCountryID()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetCredit1()
- func (m *UserMutation) ResetCredit2()
- func (m *UserMutation) ResetCredit3()
- func (m *UserMutation) ResetCredit4()
- func (m *UserMutation) ResetCredit5()
- func (m *UserMutation) ResetDeletedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetEmailVerifiedAt()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFirstLogin()
- func (m *UserMutation) ResetFullContactNumber()
- func (m *UserMutation) ResetIntroducedUsers()
- func (m *UserMutation) ResetIntroducer()
- func (m *UserMutation) ResetIntroducerUserID()
- func (m *UserMutation) ResetLang()
- func (m *UserMutation) ResetLastLoginAt()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetNationalID()
- func (m *UserMutation) ResetNewLoginAt()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetPassword2()
- func (m *UserMutation) ResetUnilevel()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetAvatar(s string)
- func (m *UserMutation) SetBanUntil(t time.Time)
- func (m *UserMutation) SetBankAccountName(s string)
- func (m *UserMutation) SetBankAccountNumber(s string)
- func (m *UserMutation) SetBankID(u uint64)
- func (m *UserMutation) SetContactCountryID(u uint64)
- func (m *UserMutation) SetContactNumber(s string)
- func (m *UserMutation) SetCountryID(u uint64)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetCredit1(f float64)
- func (m *UserMutation) SetCredit2(f float64)
- func (m *UserMutation) SetCredit3(f float64)
- func (m *UserMutation) SetCredit4(f float64)
- func (m *UserMutation) SetCredit5(f float64)
- func (m *UserMutation) SetDeletedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetEmailVerifiedAt(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetFirstLogin(b bool)
- func (m *UserMutation) SetFullContactNumber(s string)
- func (m *UserMutation) SetID(id uint64)
- func (m *UserMutation) SetIntroducerID(id uint64)
- func (m *UserMutation) SetIntroducerUserID(u uint64)
- func (m *UserMutation) SetLang(s string)
- func (m *UserMutation) SetLastLoginAt(t time.Time)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetNationalID(s string)
- func (m *UserMutation) SetNewLoginAt(t time.Time)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetPassword2(s string)
- func (m *UserMutation) SetUnilevel(u uint64)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) SetUsername(s string)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Unilevel() (r uint64, exists bool)
- func (m *UserMutation) UnilevelCleared() bool
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) UsernameCleared() bool
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 uint64, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uint64
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uint64
- 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 uint64, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uint64
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryBank() *BankQuery
- func (uq *UserQuery) QueryContactCountry() *CountryQuery
- func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uq *UserQuery) QueryCountry() *CountryQuery
- func (uq *UserQuery) QueryIntroducedUsers() *UserQuery
- func (uq *UserQuery) QueryIntroducer() *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) WithBank(opts ...func(*BankQuery)) *UserQuery
- func (uq *UserQuery) WithContactCountry(opts ...func(*CountryQuery)) *UserQuery
- func (uq *UserQuery) WithCountry(opts ...func(*CountryQuery)) *UserQuery
- func (uq *UserQuery) WithIntroducedUsers(opts ...func(*UserQuery)) *UserQuery
- func (uq *UserQuery) WithIntroducer(opts ...func(*UserQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- 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 (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddCredit1(f float64) *UserUpdate
- func (uu *UserUpdate) AddCredit2(f float64) *UserUpdate
- func (uu *UserUpdate) AddCredit3(f float64) *UserUpdate
- func (uu *UserUpdate) AddCredit4(f float64) *UserUpdate
- func (uu *UserUpdate) AddCredit5(f float64) *UserUpdate
- func (uu *UserUpdate) AddIntroducedUserIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) AddIntroducedUsers(u ...*User) *UserUpdate
- func (uu *UserUpdate) AddUnilevel(u int64) *UserUpdate
- func (uu *UserUpdate) ClearAvatar() *UserUpdate
- func (uu *UserUpdate) ClearBanUntil() *UserUpdate
- func (uu *UserUpdate) ClearBank() *UserUpdate
- func (uu *UserUpdate) ClearBankAccountName() *UserUpdate
- func (uu *UserUpdate) ClearBankAccountNumber() *UserUpdate
- func (uu *UserUpdate) ClearBankID() *UserUpdate
- func (uu *UserUpdate) ClearContactCountry() *UserUpdate
- func (uu *UserUpdate) ClearContactCountryID() *UserUpdate
- func (uu *UserUpdate) ClearContactNumber() *UserUpdate
- func (uu *UserUpdate) ClearCountry() *UserUpdate
- func (uu *UserUpdate) ClearCountryID() *UserUpdate
- func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
- func (uu *UserUpdate) ClearEmail() *UserUpdate
- func (uu *UserUpdate) ClearEmailVerifiedAt() *UserUpdate
- func (uu *UserUpdate) ClearFullContactNumber() *UserUpdate
- func (uu *UserUpdate) ClearIntroducedUsers() *UserUpdate
- func (uu *UserUpdate) ClearIntroducer() *UserUpdate
- func (uu *UserUpdate) ClearIntroducerUserID() *UserUpdate
- func (uu *UserUpdate) ClearLastLoginAt() *UserUpdate
- func (uu *UserUpdate) ClearName() *UserUpdate
- func (uu *UserUpdate) ClearNationalID() *UserUpdate
- func (uu *UserUpdate) ClearNewLoginAt() *UserUpdate
- func (uu *UserUpdate) ClearUnilevel() *UserUpdate
- func (uu *UserUpdate) ClearUsername() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uu *UserUpdate) RemoveIntroducedUserIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) RemoveIntroducedUsers(u ...*User) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAvatar(s string) *UserUpdate
- func (uu *UserUpdate) SetBanUntil(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetBank(b *Bank) *UserUpdate
- func (uu *UserUpdate) SetBankAccountName(s string) *UserUpdate
- func (uu *UserUpdate) SetBankAccountNumber(s string) *UserUpdate
- func (uu *UserUpdate) SetBankID(u uint64) *UserUpdate
- func (uu *UserUpdate) SetContactCountry(c *Country) *UserUpdate
- func (uu *UserUpdate) SetContactCountryID(u uint64) *UserUpdate
- func (uu *UserUpdate) SetContactNumber(s string) *UserUpdate
- func (uu *UserUpdate) SetCountry(c *Country) *UserUpdate
- func (uu *UserUpdate) SetCountryID(u uint64) *UserUpdate
- func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetCredit1(f float64) *UserUpdate
- func (uu *UserUpdate) SetCredit2(f float64) *UserUpdate
- func (uu *UserUpdate) SetCredit3(f float64) *UserUpdate
- func (uu *UserUpdate) SetCredit4(f float64) *UserUpdate
- func (uu *UserUpdate) SetCredit5(f float64) *UserUpdate
- func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetEmailVerifiedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetFirstLogin(b bool) *UserUpdate
- func (uu *UserUpdate) SetFullContactNumber(s string) *UserUpdate
- func (uu *UserUpdate) SetIntroducer(u *User) *UserUpdate
- func (uu *UserUpdate) SetIntroducerID(id uint64) *UserUpdate
- func (uu *UserUpdate) SetIntroducerUserID(u uint64) *UserUpdate
- func (uu *UserUpdate) SetLang(s string) *UserUpdate
- func (uu *UserUpdate) SetLastLoginAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNationalID(s string) *UserUpdate
- func (uu *UserUpdate) SetNewLoginAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableAvatar(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableBanUntil(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableBankAccountName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableBankAccountNumber(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableBankID(u *uint64) *UserUpdate
- func (uu *UserUpdate) SetNillableContactCountryID(u *uint64) *UserUpdate
- func (uu *UserUpdate) SetNillableContactNumber(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableCountryID(u *uint64) *UserUpdate
- func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableCredit1(f *float64) *UserUpdate
- func (uu *UserUpdate) SetNillableCredit2(f *float64) *UserUpdate
- func (uu *UserUpdate) SetNillableCredit3(f *float64) *UserUpdate
- func (uu *UserUpdate) SetNillableCredit4(f *float64) *UserUpdate
- func (uu *UserUpdate) SetNillableCredit5(f *float64) *UserUpdate
- func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableEmailVerifiedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableFirstLogin(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableFullContactNumber(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableIntroducerID(id *uint64) *UserUpdate
- func (uu *UserUpdate) SetNillableIntroducerUserID(u *uint64) *UserUpdate
- func (uu *UserUpdate) SetNillableLang(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableLastLoginAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableNationalID(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableNewLoginAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword2(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableUnilevel(u *uint64) *UserUpdate
- func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetPassword2(s string) *UserUpdate
- func (uu *UserUpdate) SetUnilevel(u uint64) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddCredit1(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCredit2(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCredit3(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCredit4(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCredit5(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddIntroducedUserIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddIntroducedUsers(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUnilevel(u int64) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAvatar() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBanUntil() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBank() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBankAccountName() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBankAccountNumber() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearBankID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearContactCountry() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearContactCountryID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearContactNumber() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCountry() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCountryID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmailVerifiedAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFullContactNumber() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearIntroducedUsers() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearIntroducer() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearIntroducerUserID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLastLoginAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearName() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearNationalID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearNewLoginAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUnilevel() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUsername() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uuo *UserUpdateOne) RemoveIntroducedUserIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveIntroducedUsers(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) SetAvatar(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBanUntil(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBank(b *Bank) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBankAccountName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBankAccountNumber(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBankID(u uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetContactCountry(c *Country) *UserUpdateOne
- func (uuo *UserUpdateOne) SetContactCountryID(u uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetContactNumber(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCountry(c *Country) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCountryID(u uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCredit1(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCredit2(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCredit3(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCredit4(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCredit5(f float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmailVerifiedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFirstLogin(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFullContactNumber(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIntroducer(u *User) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIntroducerID(id uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIntroducerUserID(u uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLang(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastLoginAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNationalID(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNewLoginAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAvatar(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBanUntil(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBankAccountName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBankAccountNumber(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBankID(u *uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableContactCountryID(u *uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableContactNumber(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCountryID(u *uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCredit1(f *float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCredit2(f *float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCredit3(f *float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCredit4(f *float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCredit5(f *float64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmailVerifiedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableFirstLogin(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableFullContactNumber(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIntroducerID(id *uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIntroducerUserID(u *uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLang(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastLoginAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableNationalID(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableNewLoginAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword2(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUnilevel(u *uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword2(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUnilevel(u uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) AddCredit1(v float64) *UserUpsert
- func (u *UserUpsert) AddCredit2(v float64) *UserUpsert
- func (u *UserUpsert) AddCredit3(v float64) *UserUpsert
- func (u *UserUpsert) AddCredit4(v float64) *UserUpsert
- func (u *UserUpsert) AddCredit5(v float64) *UserUpsert
- func (u *UserUpsert) AddUnilevel(v uint64) *UserUpsert
- func (u *UserUpsert) ClearAvatar() *UserUpsert
- func (u *UserUpsert) ClearBanUntil() *UserUpsert
- func (u *UserUpsert) ClearBankAccountName() *UserUpsert
- func (u *UserUpsert) ClearBankAccountNumber() *UserUpsert
- func (u *UserUpsert) ClearBankID() *UserUpsert
- func (u *UserUpsert) ClearContactCountryID() *UserUpsert
- func (u *UserUpsert) ClearContactNumber() *UserUpsert
- func (u *UserUpsert) ClearCountryID() *UserUpsert
- func (u *UserUpsert) ClearDeletedAt() *UserUpsert
- func (u *UserUpsert) ClearEmail() *UserUpsert
- func (u *UserUpsert) ClearEmailVerifiedAt() *UserUpsert
- func (u *UserUpsert) ClearFullContactNumber() *UserUpsert
- func (u *UserUpsert) ClearIntroducerUserID() *UserUpsert
- func (u *UserUpsert) ClearLastLoginAt() *UserUpsert
- func (u *UserUpsert) ClearName() *UserUpsert
- func (u *UserUpsert) ClearNationalID() *UserUpsert
- func (u *UserUpsert) ClearNewLoginAt() *UserUpsert
- func (u *UserUpsert) ClearUnilevel() *UserUpsert
- func (u *UserUpsert) ClearUsername() *UserUpsert
- func (u *UserUpsert) SetAvatar(v string) *UserUpsert
- func (u *UserUpsert) SetBanUntil(v time.Time) *UserUpsert
- func (u *UserUpsert) SetBankAccountName(v string) *UserUpsert
- func (u *UserUpsert) SetBankAccountNumber(v string) *UserUpsert
- func (u *UserUpsert) SetBankID(v uint64) *UserUpsert
- func (u *UserUpsert) SetContactCountryID(v uint64) *UserUpsert
- func (u *UserUpsert) SetContactNumber(v string) *UserUpsert
- func (u *UserUpsert) SetCountryID(v uint64) *UserUpsert
- func (u *UserUpsert) SetCreatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetCredit1(v float64) *UserUpsert
- func (u *UserUpsert) SetCredit2(v float64) *UserUpsert
- func (u *UserUpsert) SetCredit3(v float64) *UserUpsert
- func (u *UserUpsert) SetCredit4(v float64) *UserUpsert
- func (u *UserUpsert) SetCredit5(v float64) *UserUpsert
- func (u *UserUpsert) SetDeletedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetEmail(v string) *UserUpsert
- func (u *UserUpsert) SetEmailVerifiedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetFirstLogin(v bool) *UserUpsert
- func (u *UserUpsert) SetFullContactNumber(v string) *UserUpsert
- func (u *UserUpsert) SetIntroducerUserID(v uint64) *UserUpsert
- func (u *UserUpsert) SetLang(v string) *UserUpsert
- func (u *UserUpsert) SetLastLoginAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetName(v string) *UserUpsert
- func (u *UserUpsert) SetNationalID(v string) *UserUpsert
- func (u *UserUpsert) SetNewLoginAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetPassword(v string) *UserUpsert
- func (u *UserUpsert) SetPassword2(v string) *UserUpsert
- func (u *UserUpsert) SetUnilevel(v uint64) *UserUpsert
- func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetUsername(v string) *UserUpsert
- func (u *UserUpsert) UpdateAvatar() *UserUpsert
- func (u *UserUpsert) UpdateBanUntil() *UserUpsert
- func (u *UserUpsert) UpdateBankAccountName() *UserUpsert
- func (u *UserUpsert) UpdateBankAccountNumber() *UserUpsert
- func (u *UserUpsert) UpdateBankID() *UserUpsert
- func (u *UserUpsert) UpdateContactCountryID() *UserUpsert
- func (u *UserUpsert) UpdateContactNumber() *UserUpsert
- func (u *UserUpsert) UpdateCountryID() *UserUpsert
- func (u *UserUpsert) UpdateCreatedAt() *UserUpsert
- func (u *UserUpsert) UpdateCredit1() *UserUpsert
- func (u *UserUpsert) UpdateCredit2() *UserUpsert
- func (u *UserUpsert) UpdateCredit3() *UserUpsert
- func (u *UserUpsert) UpdateCredit4() *UserUpsert
- func (u *UserUpsert) UpdateCredit5() *UserUpsert
- func (u *UserUpsert) UpdateDeletedAt() *UserUpsert
- func (u *UserUpsert) UpdateEmail() *UserUpsert
- func (u *UserUpsert) UpdateEmailVerifiedAt() *UserUpsert
- func (u *UserUpsert) UpdateFirstLogin() *UserUpsert
- func (u *UserUpsert) UpdateFullContactNumber() *UserUpsert
- func (u *UserUpsert) UpdateIntroducerUserID() *UserUpsert
- func (u *UserUpsert) UpdateLang() *UserUpsert
- func (u *UserUpsert) UpdateLastLoginAt() *UserUpsert
- func (u *UserUpsert) UpdateName() *UserUpsert
- func (u *UserUpsert) UpdateNationalID() *UserUpsert
- func (u *UserUpsert) UpdateNewLoginAt() *UserUpsert
- func (u *UserUpsert) UpdatePassword() *UserUpsert
- func (u *UserUpsert) UpdatePassword2() *UserUpsert
- func (u *UserUpsert) UpdateUnilevel() *UserUpsert
- func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
- func (u *UserUpsert) UpdateUsername() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) AddCredit1(v float64) *UserUpsertBulk
- func (u *UserUpsertBulk) AddCredit2(v float64) *UserUpsertBulk
- func (u *UserUpsertBulk) AddCredit3(v float64) *UserUpsertBulk
- func (u *UserUpsertBulk) AddCredit4(v float64) *UserUpsertBulk
- func (u *UserUpsertBulk) AddCredit5(v float64) *UserUpsertBulk
- func (u *UserUpsertBulk) AddUnilevel(v uint64) *UserUpsertBulk
- func (u *UserUpsertBulk) ClearAvatar() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearBanUntil() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearBankAccountName() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearBankAccountNumber() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearBankID() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearContactCountryID() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearContactNumber() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearCountryID() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearDeletedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearEmail() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearEmailVerifiedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearFullContactNumber() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearIntroducerUserID() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearLastLoginAt() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearName() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearNationalID() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearNewLoginAt() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearUnilevel() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearUsername() *UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetAvatar(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetBanUntil(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetBankAccountName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetBankAccountNumber(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetBankID(v uint64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetContactCountryID(v uint64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetContactNumber(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetCountryID(v uint64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetCreatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetCredit1(v float64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetCredit2(v float64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetCredit3(v float64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetCredit4(v float64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetCredit5(v float64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetDeletedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetEmailVerifiedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetFirstLogin(v bool) *UserUpsertBulk
- func (u *UserUpsertBulk) SetFullContactNumber(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetIntroducerUserID(v uint64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetLang(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetLastLoginAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetNationalID(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetNewLoginAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPassword2(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUnilevel(v uint64) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateAvatar() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateBanUntil() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateBankAccountName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateBankAccountNumber() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateBankID() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateContactCountryID() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateContactNumber() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateCountryID() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateCreatedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateCredit1() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateCredit2() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateCredit3() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateCredit4() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateCredit5() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateDeletedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEmailVerifiedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateFirstLogin() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateFullContactNumber() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateIntroducerUserID() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateLang() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateLastLoginAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNationalID() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewLoginAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePassword2() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUnilevel() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) AddCredit1(v float64) *UserUpsertOne
- func (u *UserUpsertOne) AddCredit2(v float64) *UserUpsertOne
- func (u *UserUpsertOne) AddCredit3(v float64) *UserUpsertOne
- func (u *UserUpsertOne) AddCredit4(v float64) *UserUpsertOne
- func (u *UserUpsertOne) AddCredit5(v float64) *UserUpsertOne
- func (u *UserUpsertOne) AddUnilevel(v uint64) *UserUpsertOne
- func (u *UserUpsertOne) ClearAvatar() *UserUpsertOne
- func (u *UserUpsertOne) ClearBanUntil() *UserUpsertOne
- func (u *UserUpsertOne) ClearBankAccountName() *UserUpsertOne
- func (u *UserUpsertOne) ClearBankAccountNumber() *UserUpsertOne
- func (u *UserUpsertOne) ClearBankID() *UserUpsertOne
- func (u *UserUpsertOne) ClearContactCountryID() *UserUpsertOne
- func (u *UserUpsertOne) ClearContactNumber() *UserUpsertOne
- func (u *UserUpsertOne) ClearCountryID() *UserUpsertOne
- func (u *UserUpsertOne) ClearDeletedAt() *UserUpsertOne
- func (u *UserUpsertOne) ClearEmail() *UserUpsertOne
- func (u *UserUpsertOne) ClearEmailVerifiedAt() *UserUpsertOne
- func (u *UserUpsertOne) ClearFullContactNumber() *UserUpsertOne
- func (u *UserUpsertOne) ClearIntroducerUserID() *UserUpsertOne
- func (u *UserUpsertOne) ClearLastLoginAt() *UserUpsertOne
- func (u *UserUpsertOne) ClearName() *UserUpsertOne
- func (u *UserUpsertOne) ClearNationalID() *UserUpsertOne
- func (u *UserUpsertOne) ClearNewLoginAt() *UserUpsertOne
- func (u *UserUpsertOne) ClearUnilevel() *UserUpsertOne
- func (u *UserUpsertOne) ClearUsername() *UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id uint64, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) uint64
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetAvatar(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetBanUntil(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetBankAccountName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetBankAccountNumber(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetBankID(v uint64) *UserUpsertOne
- func (u *UserUpsertOne) SetContactCountryID(v uint64) *UserUpsertOne
- func (u *UserUpsertOne) SetContactNumber(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetCountryID(v uint64) *UserUpsertOne
- func (u *UserUpsertOne) SetCreatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetCredit1(v float64) *UserUpsertOne
- func (u *UserUpsertOne) SetCredit2(v float64) *UserUpsertOne
- func (u *UserUpsertOne) SetCredit3(v float64) *UserUpsertOne
- func (u *UserUpsertOne) SetCredit4(v float64) *UserUpsertOne
- func (u *UserUpsertOne) SetCredit5(v float64) *UserUpsertOne
- func (u *UserUpsertOne) SetDeletedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetEmailVerifiedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetFirstLogin(v bool) *UserUpsertOne
- func (u *UserUpsertOne) SetFullContactNumber(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetIntroducerUserID(v uint64) *UserUpsertOne
- func (u *UserUpsertOne) SetLang(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetLastLoginAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetNationalID(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetNewLoginAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetPassword2(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetUnilevel(v uint64) *UserUpsertOne
- func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateAvatar() *UserUpsertOne
- func (u *UserUpsertOne) UpdateBanUntil() *UserUpsertOne
- func (u *UserUpsertOne) UpdateBankAccountName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateBankAccountNumber() *UserUpsertOne
- func (u *UserUpsertOne) UpdateBankID() *UserUpsertOne
- func (u *UserUpsertOne) UpdateContactCountryID() *UserUpsertOne
- func (u *UserUpsertOne) UpdateContactNumber() *UserUpsertOne
- func (u *UserUpsertOne) UpdateCountryID() *UserUpsertOne
- func (u *UserUpsertOne) UpdateCreatedAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateCredit1() *UserUpsertOne
- func (u *UserUpsertOne) UpdateCredit2() *UserUpsertOne
- func (u *UserUpsertOne) UpdateCredit3() *UserUpsertOne
- func (u *UserUpsertOne) UpdateCredit4() *UserUpsertOne
- func (u *UserUpsertOne) UpdateCredit5() *UserUpsertOne
- func (u *UserUpsertOne) UpdateDeletedAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
- func (u *UserUpsertOne) UpdateEmailVerifiedAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateFirstLogin() *UserUpsertOne
- func (u *UserUpsertOne) UpdateFullContactNumber() *UserUpsertOne
- func (u *UserUpsertOne) UpdateIntroducerUserID() *UserUpsertOne
- func (u *UserUpsertOne) UpdateLang() *UserUpsertOne
- func (u *UserUpsertOne) UpdateLastLoginAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNationalID() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewLoginAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePassword2() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUnilevel() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAdmin = "Admin" TypeBank = "Bank" TypeCountry = "Country" TypeCountryLocation = "CountryLocation" TypeUser = "User" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Admin ¶
type Admin struct { // ID of the ent. // Primary key for the admin ID uint64 `json:"id,omitempty"` // Username of the admin Username string `json:"username,omitempty"` // Full name of the admin Name string `json:"name,omitempty"` // Email address of the admin Email string `json:"email,omitempty"` // Timestamp when email was verified EmailVerifiedAt *time.Time `json:"email_verified_at,omitempty"` // Password for the admin Password string `json:"password,omitempty"` // Second password for the admin Password2 string `json:"password2,omitempty"` // Preferred language of the admin Lang string `json:"lang,omitempty"` // Avatar of the admin Avatar *string `json:"avatar,omitempty"` // Type of the admin Type uint8 `json:"type,omitempty"` // Record creation timestamp CreatedAt time.Time `json:"created_at,omitempty"` // Record update timestamp UpdatedAt time.Time `json:"updated_at,omitempty"` // Record deleted timestamp DeletedAt *time.Time `json:"deleted_at,omitempty"` // contains filtered or unexported fields }
Admin is the model entity for the Admin schema.
func (*Admin) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Admin) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Admin) Unwrap ¶
Unwrap unwraps the Admin entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Admin) Update ¶
func (a *Admin) Update() *AdminUpdateOne
Update returns a builder for updating this Admin. Note that you need to call Admin.Unwrap() before calling this method if this Admin was returned from a transaction, and the transaction was committed or rolled back.
type AdminClient ¶
type AdminClient struct {
// contains filtered or unexported fields
}
AdminClient is a client for the Admin schema.
func NewAdminClient ¶
func NewAdminClient(c config) *AdminClient
NewAdminClient returns a client for the Admin from the given config.
func (*AdminClient) Create ¶
func (c *AdminClient) Create() *AdminCreate
Create returns a builder for creating a Admin entity.
func (*AdminClient) CreateBulk ¶
func (c *AdminClient) CreateBulk(builders ...*AdminCreate) *AdminCreateBulk
CreateBulk returns a builder for creating a bulk of Admin entities.
func (*AdminClient) Delete ¶
func (c *AdminClient) Delete() *AdminDelete
Delete returns a delete builder for Admin.
func (*AdminClient) DeleteOne ¶
func (c *AdminClient) DeleteOne(a *Admin) *AdminDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AdminClient) DeleteOneID ¶
func (c *AdminClient) DeleteOneID(id uint64) *AdminDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AdminClient) ExecContext ¶
func (c *AdminClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*AdminClient) GetX ¶
func (c *AdminClient) GetX(ctx context.Context, id uint64) *Admin
GetX is like Get, but panics if an error occurs.
func (*AdminClient) Intercept ¶
func (c *AdminClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `admin.Intercept(f(g(h())))`.
func (*AdminClient) Interceptors ¶
func (c *AdminClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AdminClient) MapCreateBulk ¶
func (c *AdminClient) MapCreateBulk(slice any, setFunc func(*AdminCreate, int)) *AdminCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*AdminClient) Query ¶
func (c *AdminClient) Query() *AdminQuery
Query returns a query builder for Admin.
func (*AdminClient) QueryContext ¶
func (c *AdminClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*AdminClient) Update ¶
func (c *AdminClient) Update() *AdminUpdate
Update returns an update builder for Admin.
func (*AdminClient) UpdateOne ¶
func (c *AdminClient) UpdateOne(a *Admin) *AdminUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AdminClient) UpdateOneID ¶
func (c *AdminClient) UpdateOneID(id uint64) *AdminUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AdminClient) Use ¶
func (c *AdminClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `admin.Hooks(f(g(h())))`.
type AdminCreate ¶
type AdminCreate struct {
// contains filtered or unexported fields
}
AdminCreate is the builder for creating a Admin entity.
func (*AdminCreate) Exec ¶
func (ac *AdminCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AdminCreate) ExecContext ¶
func (c *AdminCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*AdminCreate) ExecX ¶
func (ac *AdminCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminCreate) Mutation ¶
func (ac *AdminCreate) Mutation() *AdminMutation
Mutation returns the AdminMutation object of the builder.
func (*AdminCreate) OnConflict ¶
func (ac *AdminCreate) OnConflict(opts ...sql.ConflictOption) *AdminUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Admin.Create(). SetUsername(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AdminUpsert) { SetUsername(v+v). }). Exec(ctx)
func (*AdminCreate) OnConflictColumns ¶
func (ac *AdminCreate) OnConflictColumns(columns ...string) *AdminUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Admin.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AdminCreate) QueryContext ¶
func (c *AdminCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*AdminCreate) Save ¶
func (ac *AdminCreate) Save(ctx context.Context) (*Admin, error)
Save creates the Admin in the database.
func (*AdminCreate) SaveX ¶
func (ac *AdminCreate) SaveX(ctx context.Context) *Admin
SaveX calls Save and panics if Save returns an error.
func (*AdminCreate) SetAvatar ¶
func (ac *AdminCreate) SetAvatar(s string) *AdminCreate
SetAvatar sets the "avatar" field.
func (*AdminCreate) SetCreatedAt ¶
func (ac *AdminCreate) SetCreatedAt(t time.Time) *AdminCreate
SetCreatedAt sets the "created_at" field.
func (*AdminCreate) SetDeletedAt ¶
func (ac *AdminCreate) SetDeletedAt(t time.Time) *AdminCreate
SetDeletedAt sets the "deleted_at" field.
func (*AdminCreate) SetEmail ¶
func (ac *AdminCreate) SetEmail(s string) *AdminCreate
SetEmail sets the "email" field.
func (*AdminCreate) SetEmailVerifiedAt ¶
func (ac *AdminCreate) SetEmailVerifiedAt(t time.Time) *AdminCreate
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*AdminCreate) SetID ¶
func (ac *AdminCreate) SetID(u uint64) *AdminCreate
SetID sets the "id" field.
func (*AdminCreate) SetLang ¶
func (ac *AdminCreate) SetLang(s string) *AdminCreate
SetLang sets the "lang" field.
func (*AdminCreate) SetName ¶
func (ac *AdminCreate) SetName(s string) *AdminCreate
SetName sets the "name" field.
func (*AdminCreate) SetNillableAvatar ¶
func (ac *AdminCreate) SetNillableAvatar(s *string) *AdminCreate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*AdminCreate) SetNillableCreatedAt ¶
func (ac *AdminCreate) SetNillableCreatedAt(t *time.Time) *AdminCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AdminCreate) SetNillableDeletedAt ¶
func (ac *AdminCreate) SetNillableDeletedAt(t *time.Time) *AdminCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*AdminCreate) SetNillableEmail ¶
func (ac *AdminCreate) SetNillableEmail(s *string) *AdminCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AdminCreate) SetNillableEmailVerifiedAt ¶
func (ac *AdminCreate) SetNillableEmailVerifiedAt(t *time.Time) *AdminCreate
SetNillableEmailVerifiedAt sets the "email_verified_at" field if the given value is not nil.
func (*AdminCreate) SetNillableLang ¶
func (ac *AdminCreate) SetNillableLang(s *string) *AdminCreate
SetNillableLang sets the "lang" field if the given value is not nil.
func (*AdminCreate) SetNillableName ¶
func (ac *AdminCreate) SetNillableName(s *string) *AdminCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*AdminCreate) SetNillableType ¶
func (ac *AdminCreate) SetNillableType(u *uint8) *AdminCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*AdminCreate) SetNillableUpdatedAt ¶
func (ac *AdminCreate) SetNillableUpdatedAt(t *time.Time) *AdminCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AdminCreate) SetNillableUsername ¶
func (ac *AdminCreate) SetNillableUsername(s *string) *AdminCreate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AdminCreate) SetPassword ¶
func (ac *AdminCreate) SetPassword(s string) *AdminCreate
SetPassword sets the "password" field.
func (*AdminCreate) SetPassword2 ¶
func (ac *AdminCreate) SetPassword2(s string) *AdminCreate
SetPassword2 sets the "password2" field.
func (*AdminCreate) SetType ¶
func (ac *AdminCreate) SetType(u uint8) *AdminCreate
SetType sets the "type" field.
func (*AdminCreate) SetUpdatedAt ¶
func (ac *AdminCreate) SetUpdatedAt(t time.Time) *AdminCreate
SetUpdatedAt sets the "updated_at" field.
func (*AdminCreate) SetUsername ¶
func (ac *AdminCreate) SetUsername(s string) *AdminCreate
SetUsername sets the "username" field.
type AdminCreateBulk ¶
type AdminCreateBulk struct {
// contains filtered or unexported fields
}
AdminCreateBulk is the builder for creating many Admin entities in bulk.
func (*AdminCreateBulk) Exec ¶
func (acb *AdminCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AdminCreateBulk) ExecContext ¶
func (c *AdminCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*AdminCreateBulk) ExecX ¶
func (acb *AdminCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminCreateBulk) OnConflict ¶
func (acb *AdminCreateBulk) OnConflict(opts ...sql.ConflictOption) *AdminUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Admin.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AdminUpsert) { SetUsername(v+v). }). Exec(ctx)
func (*AdminCreateBulk) OnConflictColumns ¶
func (acb *AdminCreateBulk) OnConflictColumns(columns ...string) *AdminUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Admin.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AdminCreateBulk) QueryContext ¶
func (c *AdminCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type AdminDelete ¶
type AdminDelete struct {
// contains filtered or unexported fields
}
AdminDelete is the builder for deleting a Admin entity.
func (*AdminDelete) Exec ¶
func (ad *AdminDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AdminDelete) ExecContext ¶
func (c *AdminDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*AdminDelete) ExecX ¶
func (ad *AdminDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AdminDelete) QueryContext ¶
func (c *AdminDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*AdminDelete) Where ¶
func (ad *AdminDelete) Where(ps ...predicate.Admin) *AdminDelete
Where appends a list predicates to the AdminDelete builder.
type AdminDeleteOne ¶
type AdminDeleteOne struct {
// contains filtered or unexported fields
}
AdminDeleteOne is the builder for deleting a single Admin entity.
func (*AdminDeleteOne) Exec ¶
func (ado *AdminDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AdminDeleteOne) ExecX ¶
func (ado *AdminDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminDeleteOne) Where ¶
func (ado *AdminDeleteOne) Where(ps ...predicate.Admin) *AdminDeleteOne
Where appends a list predicates to the AdminDelete builder.
type AdminGroupBy ¶
type AdminGroupBy struct {
// contains filtered or unexported fields
}
AdminGroupBy is the group-by builder for Admin entities.
func (*AdminGroupBy) Aggregate ¶
func (agb *AdminGroupBy) Aggregate(fns ...AggregateFunc) *AdminGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AdminGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AdminGroupBy) Scan ¶
func (agb *AdminGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AdminGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AdminMutation ¶
type AdminMutation struct {
// contains filtered or unexported fields
}
AdminMutation represents an operation that mutates the Admin nodes in the graph.
func (*AdminMutation) AddField ¶
func (m *AdminMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AdminMutation) AddType ¶
func (m *AdminMutation) AddType(u int8)
AddType adds u to the "type" field.
func (*AdminMutation) AddedEdges ¶
func (m *AdminMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AdminMutation) AddedField ¶
func (m *AdminMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AdminMutation) AddedFields ¶
func (m *AdminMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AdminMutation) AddedIDs ¶
func (m *AdminMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AdminMutation) AddedType ¶
func (m *AdminMutation) AddedType() (r int8, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*AdminMutation) Avatar ¶
func (m *AdminMutation) Avatar() (r string, exists bool)
Avatar returns the value of the "avatar" field in the mutation.
func (*AdminMutation) AvatarCleared ¶
func (m *AdminMutation) AvatarCleared() bool
AvatarCleared returns if the "avatar" field was cleared in this mutation.
func (*AdminMutation) ClearAvatar ¶
func (m *AdminMutation) ClearAvatar()
ClearAvatar clears the value of the "avatar" field.
func (*AdminMutation) ClearDeletedAt ¶
func (m *AdminMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AdminMutation) ClearEdge ¶
func (m *AdminMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*AdminMutation) ClearEmail ¶
func (m *AdminMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*AdminMutation) ClearEmailVerifiedAt ¶
func (m *AdminMutation) ClearEmailVerifiedAt()
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*AdminMutation) ClearField ¶
func (m *AdminMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*AdminMutation) ClearName ¶
func (m *AdminMutation) ClearName()
ClearName clears the value of the "name" field.
func (*AdminMutation) ClearUsername ¶
func (m *AdminMutation) ClearUsername()
ClearUsername clears the value of the "username" field.
func (*AdminMutation) ClearedEdges ¶
func (m *AdminMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AdminMutation) ClearedFields ¶
func (m *AdminMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AdminMutation) Client ¶
func (m AdminMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*AdminMutation) CreatedAt ¶
func (m *AdminMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AdminMutation) DeletedAt ¶
func (m *AdminMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*AdminMutation) DeletedAtCleared ¶
func (m *AdminMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*AdminMutation) EdgeCleared ¶
func (m *AdminMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AdminMutation) Email ¶
func (m *AdminMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*AdminMutation) EmailCleared ¶
func (m *AdminMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*AdminMutation) EmailVerifiedAt ¶
func (m *AdminMutation) EmailVerifiedAt() (r time.Time, exists bool)
EmailVerifiedAt returns the value of the "email_verified_at" field in the mutation.
func (*AdminMutation) EmailVerifiedAtCleared ¶
func (m *AdminMutation) EmailVerifiedAtCleared() bool
EmailVerifiedAtCleared returns if the "email_verified_at" field was cleared in this mutation.
func (*AdminMutation) ExecContext ¶
func (c *AdminMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*AdminMutation) Field ¶
func (m *AdminMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*AdminMutation) FieldCleared ¶
func (m *AdminMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AdminMutation) Fields ¶
func (m *AdminMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*AdminMutation) GetType ¶
func (m *AdminMutation) GetType() (r uint8, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*AdminMutation) ID ¶
func (m *AdminMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AdminMutation) IDs ¶
func (m *AdminMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AdminMutation) Lang ¶
func (m *AdminMutation) Lang() (r string, exists bool)
Lang returns the value of the "lang" field in the mutation.
func (*AdminMutation) Name ¶
func (m *AdminMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AdminMutation) NameCleared ¶
func (m *AdminMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*AdminMutation) OldAvatar ¶
func (m *AdminMutation) OldAvatar(ctx context.Context) (v *string, err error)
OldAvatar returns the old "avatar" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldEmail ¶
func (m *AdminMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldEmailVerifiedAt ¶
OldEmailVerifiedAt returns the old "email_verified_at" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*AdminMutation) OldLang ¶
func (m *AdminMutation) OldLang(ctx context.Context) (v string, err error)
OldLang returns the old "lang" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldName ¶
func (m *AdminMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldPassword ¶
func (m *AdminMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldPassword2 ¶
func (m *AdminMutation) OldPassword2(ctx context.Context) (v string, err error)
OldPassword2 returns the old "password2" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldType ¶
func (m *AdminMutation) OldType(ctx context.Context) (v uint8, err error)
OldType returns the old "type" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) OldUsername ¶
func (m *AdminMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the Admin entity. If the Admin object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AdminMutation) Password ¶
func (m *AdminMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*AdminMutation) Password2 ¶
func (m *AdminMutation) Password2() (r string, exists bool)
Password2 returns the value of the "password2" field in the mutation.
func (*AdminMutation) QueryContext ¶
func (c *AdminMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*AdminMutation) RemovedEdges ¶
func (m *AdminMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AdminMutation) RemovedIDs ¶
func (m *AdminMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*AdminMutation) ResetAvatar ¶
func (m *AdminMutation) ResetAvatar()
ResetAvatar resets all changes to the "avatar" field.
func (*AdminMutation) ResetCreatedAt ¶
func (m *AdminMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AdminMutation) ResetDeletedAt ¶
func (m *AdminMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*AdminMutation) ResetEdge ¶
func (m *AdminMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*AdminMutation) ResetEmail ¶
func (m *AdminMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*AdminMutation) ResetEmailVerifiedAt ¶
func (m *AdminMutation) ResetEmailVerifiedAt()
ResetEmailVerifiedAt resets all changes to the "email_verified_at" field.
func (*AdminMutation) ResetField ¶
func (m *AdminMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*AdminMutation) ResetLang ¶
func (m *AdminMutation) ResetLang()
ResetLang resets all changes to the "lang" field.
func (*AdminMutation) ResetName ¶
func (m *AdminMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AdminMutation) ResetPassword ¶
func (m *AdminMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*AdminMutation) ResetPassword2 ¶
func (m *AdminMutation) ResetPassword2()
ResetPassword2 resets all changes to the "password2" field.
func (*AdminMutation) ResetType ¶
func (m *AdminMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*AdminMutation) ResetUpdatedAt ¶
func (m *AdminMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AdminMutation) ResetUsername ¶
func (m *AdminMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*AdminMutation) SetAvatar ¶
func (m *AdminMutation) SetAvatar(s string)
SetAvatar sets the "avatar" field.
func (*AdminMutation) SetCreatedAt ¶
func (m *AdminMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AdminMutation) SetDeletedAt ¶
func (m *AdminMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*AdminMutation) SetEmail ¶
func (m *AdminMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*AdminMutation) SetEmailVerifiedAt ¶
func (m *AdminMutation) SetEmailVerifiedAt(t time.Time)
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*AdminMutation) SetField ¶
func (m *AdminMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AdminMutation) SetID ¶
func (m *AdminMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Admin entities.
func (*AdminMutation) SetLang ¶
func (m *AdminMutation) SetLang(s string)
SetLang sets the "lang" field.
func (*AdminMutation) SetName ¶
func (m *AdminMutation) SetName(s string)
SetName sets the "name" field.
func (*AdminMutation) SetOp ¶
func (m *AdminMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AdminMutation) SetPassword ¶
func (m *AdminMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*AdminMutation) SetPassword2 ¶
func (m *AdminMutation) SetPassword2(s string)
SetPassword2 sets the "password2" field.
func (*AdminMutation) SetType ¶
func (m *AdminMutation) SetType(u uint8)
SetType sets the "type" field.
func (*AdminMutation) SetUpdatedAt ¶
func (m *AdminMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*AdminMutation) SetUsername ¶
func (m *AdminMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (AdminMutation) Tx ¶
func (m AdminMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AdminMutation) Type ¶
func (m *AdminMutation) Type() string
Type returns the node type of this mutation (Admin).
func (*AdminMutation) UpdatedAt ¶
func (m *AdminMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AdminMutation) Username ¶
func (m *AdminMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*AdminMutation) UsernameCleared ¶
func (m *AdminMutation) UsernameCleared() bool
UsernameCleared returns if the "username" field was cleared in this mutation.
func (*AdminMutation) Where ¶
func (m *AdminMutation) Where(ps ...predicate.Admin)
Where appends a list predicates to the AdminMutation builder.
func (*AdminMutation) WhereP ¶
func (m *AdminMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AdminMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AdminQuery ¶
type AdminQuery struct {
// contains filtered or unexported fields
}
AdminQuery is the builder for querying Admin entities.
func (*AdminQuery) Aggregate ¶
func (aq *AdminQuery) Aggregate(fns ...AggregateFunc) *AdminSelect
Aggregate returns a AdminSelect configured with the given aggregations.
func (*AdminQuery) All ¶
func (aq *AdminQuery) All(ctx context.Context) ([]*Admin, error)
All executes the query and returns a list of Admins.
func (*AdminQuery) AllX ¶
func (aq *AdminQuery) AllX(ctx context.Context) []*Admin
AllX is like All, but panics if an error occurs.
func (*AdminQuery) Clone ¶
func (aq *AdminQuery) Clone() *AdminQuery
Clone returns a duplicate of the AdminQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AdminQuery) Count ¶
func (aq *AdminQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AdminQuery) CountX ¶
func (aq *AdminQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AdminQuery) ExecContext ¶
func (c *AdminQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*AdminQuery) Exist ¶
func (aq *AdminQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AdminQuery) ExistX ¶
func (aq *AdminQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AdminQuery) First ¶
func (aq *AdminQuery) First(ctx context.Context) (*Admin, error)
First returns the first Admin entity from the query. Returns a *NotFoundError when no Admin was found.
func (*AdminQuery) FirstID ¶
func (aq *AdminQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Admin ID from the query. Returns a *NotFoundError when no Admin ID was found.
func (*AdminQuery) FirstIDX ¶
func (aq *AdminQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*AdminQuery) FirstX ¶
func (aq *AdminQuery) FirstX(ctx context.Context) *Admin
FirstX is like First, but panics if an error occurs.
func (*AdminQuery) GroupBy ¶
func (aq *AdminQuery) GroupBy(field string, fields ...string) *AdminGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Username string `json:"username,omitempty"` Count int `json:"count,omitempty"` } client.Admin.Query(). GroupBy(admin.FieldUsername). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AdminQuery) IDs ¶
func (aq *AdminQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Admin IDs.
func (*AdminQuery) IDsX ¶
func (aq *AdminQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*AdminQuery) Limit ¶
func (aq *AdminQuery) Limit(limit int) *AdminQuery
Limit the number of records to be returned by this query.
func (*AdminQuery) Offset ¶
func (aq *AdminQuery) Offset(offset int) *AdminQuery
Offset to start from.
func (*AdminQuery) Only ¶
func (aq *AdminQuery) Only(ctx context.Context) (*Admin, error)
Only returns a single Admin entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Admin entity is found. Returns a *NotFoundError when no Admin entities are found.
func (*AdminQuery) OnlyID ¶
func (aq *AdminQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Admin ID in the query. Returns a *NotSingularError when more than one Admin ID is found. Returns a *NotFoundError when no entities are found.
func (*AdminQuery) OnlyIDX ¶
func (aq *AdminQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AdminQuery) OnlyX ¶
func (aq *AdminQuery) OnlyX(ctx context.Context) *Admin
OnlyX is like Only, but panics if an error occurs.
func (*AdminQuery) Order ¶
func (aq *AdminQuery) Order(o ...admin.OrderOption) *AdminQuery
Order specifies how the records should be ordered.
func (*AdminQuery) QueryContext ¶
func (c *AdminQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*AdminQuery) Select ¶
func (aq *AdminQuery) Select(fields ...string) *AdminSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Username string `json:"username,omitempty"` } client.Admin.Query(). Select(admin.FieldUsername). Scan(ctx, &v)
func (*AdminQuery) Unique ¶
func (aq *AdminQuery) Unique(unique bool) *AdminQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*AdminQuery) Where ¶
func (aq *AdminQuery) Where(ps ...predicate.Admin) *AdminQuery
Where adds a new predicate for the AdminQuery builder.
type AdminSelect ¶
type AdminSelect struct { *AdminQuery // contains filtered or unexported fields }
AdminSelect is the builder for selecting fields of Admin entities.
func (*AdminSelect) Aggregate ¶
func (as *AdminSelect) Aggregate(fns ...AggregateFunc) *AdminSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AdminSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AdminSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (AdminSelect) ExecContext ¶
func (c AdminSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*AdminSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AdminSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AdminSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AdminSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (AdminSelect) QueryContext ¶
func (c AdminSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*AdminSelect) Scan ¶
func (as *AdminSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AdminSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AdminUpdate ¶
type AdminUpdate struct {
// contains filtered or unexported fields
}
AdminUpdate is the builder for updating Admin entities.
func (*AdminUpdate) AddType ¶
func (au *AdminUpdate) AddType(u int8) *AdminUpdate
AddType adds u to the "type" field.
func (*AdminUpdate) ClearAvatar ¶
func (au *AdminUpdate) ClearAvatar() *AdminUpdate
ClearAvatar clears the value of the "avatar" field.
func (*AdminUpdate) ClearDeletedAt ¶
func (au *AdminUpdate) ClearDeletedAt() *AdminUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AdminUpdate) ClearEmail ¶
func (au *AdminUpdate) ClearEmail() *AdminUpdate
ClearEmail clears the value of the "email" field.
func (*AdminUpdate) ClearEmailVerifiedAt ¶
func (au *AdminUpdate) ClearEmailVerifiedAt() *AdminUpdate
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*AdminUpdate) ClearName ¶
func (au *AdminUpdate) ClearName() *AdminUpdate
ClearName clears the value of the "name" field.
func (*AdminUpdate) ClearUsername ¶
func (au *AdminUpdate) ClearUsername() *AdminUpdate
ClearUsername clears the value of the "username" field.
func (*AdminUpdate) Exec ¶
func (au *AdminUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AdminUpdate) ExecContext ¶
func (c *AdminUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*AdminUpdate) ExecX ¶
func (au *AdminUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminUpdate) Mutation ¶
func (au *AdminUpdate) Mutation() *AdminMutation
Mutation returns the AdminMutation object of the builder.
func (*AdminUpdate) QueryContext ¶
func (c *AdminUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*AdminUpdate) Save ¶
func (au *AdminUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AdminUpdate) SaveX ¶
func (au *AdminUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AdminUpdate) SetAvatar ¶
func (au *AdminUpdate) SetAvatar(s string) *AdminUpdate
SetAvatar sets the "avatar" field.
func (*AdminUpdate) SetCreatedAt ¶
func (au *AdminUpdate) SetCreatedAt(t time.Time) *AdminUpdate
SetCreatedAt sets the "created_at" field.
func (*AdminUpdate) SetDeletedAt ¶
func (au *AdminUpdate) SetDeletedAt(t time.Time) *AdminUpdate
SetDeletedAt sets the "deleted_at" field.
func (*AdminUpdate) SetEmail ¶
func (au *AdminUpdate) SetEmail(s string) *AdminUpdate
SetEmail sets the "email" field.
func (*AdminUpdate) SetEmailVerifiedAt ¶
func (au *AdminUpdate) SetEmailVerifiedAt(t time.Time) *AdminUpdate
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*AdminUpdate) SetLang ¶
func (au *AdminUpdate) SetLang(s string) *AdminUpdate
SetLang sets the "lang" field.
func (*AdminUpdate) SetName ¶
func (au *AdminUpdate) SetName(s string) *AdminUpdate
SetName sets the "name" field.
func (*AdminUpdate) SetNillableAvatar ¶
func (au *AdminUpdate) SetNillableAvatar(s *string) *AdminUpdate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*AdminUpdate) SetNillableCreatedAt ¶
func (au *AdminUpdate) SetNillableCreatedAt(t *time.Time) *AdminUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AdminUpdate) SetNillableDeletedAt ¶
func (au *AdminUpdate) SetNillableDeletedAt(t *time.Time) *AdminUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*AdminUpdate) SetNillableEmail ¶
func (au *AdminUpdate) SetNillableEmail(s *string) *AdminUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AdminUpdate) SetNillableEmailVerifiedAt ¶
func (au *AdminUpdate) SetNillableEmailVerifiedAt(t *time.Time) *AdminUpdate
SetNillableEmailVerifiedAt sets the "email_verified_at" field if the given value is not nil.
func (*AdminUpdate) SetNillableLang ¶
func (au *AdminUpdate) SetNillableLang(s *string) *AdminUpdate
SetNillableLang sets the "lang" field if the given value is not nil.
func (*AdminUpdate) SetNillableName ¶
func (au *AdminUpdate) SetNillableName(s *string) *AdminUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*AdminUpdate) SetNillablePassword ¶
func (au *AdminUpdate) SetNillablePassword(s *string) *AdminUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*AdminUpdate) SetNillablePassword2 ¶
func (au *AdminUpdate) SetNillablePassword2(s *string) *AdminUpdate
SetNillablePassword2 sets the "password2" field if the given value is not nil.
func (*AdminUpdate) SetNillableType ¶
func (au *AdminUpdate) SetNillableType(u *uint8) *AdminUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*AdminUpdate) SetNillableUsername ¶
func (au *AdminUpdate) SetNillableUsername(s *string) *AdminUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AdminUpdate) SetPassword ¶
func (au *AdminUpdate) SetPassword(s string) *AdminUpdate
SetPassword sets the "password" field.
func (*AdminUpdate) SetPassword2 ¶
func (au *AdminUpdate) SetPassword2(s string) *AdminUpdate
SetPassword2 sets the "password2" field.
func (*AdminUpdate) SetType ¶
func (au *AdminUpdate) SetType(u uint8) *AdminUpdate
SetType sets the "type" field.
func (*AdminUpdate) SetUpdatedAt ¶
func (au *AdminUpdate) SetUpdatedAt(t time.Time) *AdminUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AdminUpdate) SetUsername ¶
func (au *AdminUpdate) SetUsername(s string) *AdminUpdate
SetUsername sets the "username" field.
func (*AdminUpdate) Where ¶
func (au *AdminUpdate) Where(ps ...predicate.Admin) *AdminUpdate
Where appends a list predicates to the AdminUpdate builder.
type AdminUpdateOne ¶
type AdminUpdateOne struct {
// contains filtered or unexported fields
}
AdminUpdateOne is the builder for updating a single Admin entity.
func (*AdminUpdateOne) AddType ¶
func (auo *AdminUpdateOne) AddType(u int8) *AdminUpdateOne
AddType adds u to the "type" field.
func (*AdminUpdateOne) ClearAvatar ¶
func (auo *AdminUpdateOne) ClearAvatar() *AdminUpdateOne
ClearAvatar clears the value of the "avatar" field.
func (*AdminUpdateOne) ClearDeletedAt ¶
func (auo *AdminUpdateOne) ClearDeletedAt() *AdminUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AdminUpdateOne) ClearEmail ¶
func (auo *AdminUpdateOne) ClearEmail() *AdminUpdateOne
ClearEmail clears the value of the "email" field.
func (*AdminUpdateOne) ClearEmailVerifiedAt ¶
func (auo *AdminUpdateOne) ClearEmailVerifiedAt() *AdminUpdateOne
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*AdminUpdateOne) ClearName ¶
func (auo *AdminUpdateOne) ClearName() *AdminUpdateOne
ClearName clears the value of the "name" field.
func (*AdminUpdateOne) ClearUsername ¶
func (auo *AdminUpdateOne) ClearUsername() *AdminUpdateOne
ClearUsername clears the value of the "username" field.
func (*AdminUpdateOne) Exec ¶
func (auo *AdminUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AdminUpdateOne) ExecContext ¶
func (c *AdminUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*AdminUpdateOne) ExecX ¶
func (auo *AdminUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminUpdateOne) Mutation ¶
func (auo *AdminUpdateOne) Mutation() *AdminMutation
Mutation returns the AdminMutation object of the builder.
func (*AdminUpdateOne) QueryContext ¶
func (c *AdminUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*AdminUpdateOne) Save ¶
func (auo *AdminUpdateOne) Save(ctx context.Context) (*Admin, error)
Save executes the query and returns the updated Admin entity.
func (*AdminUpdateOne) SaveX ¶
func (auo *AdminUpdateOne) SaveX(ctx context.Context) *Admin
SaveX is like Save, but panics if an error occurs.
func (*AdminUpdateOne) Select ¶
func (auo *AdminUpdateOne) Select(field string, fields ...string) *AdminUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AdminUpdateOne) SetAvatar ¶
func (auo *AdminUpdateOne) SetAvatar(s string) *AdminUpdateOne
SetAvatar sets the "avatar" field.
func (*AdminUpdateOne) SetCreatedAt ¶
func (auo *AdminUpdateOne) SetCreatedAt(t time.Time) *AdminUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AdminUpdateOne) SetDeletedAt ¶
func (auo *AdminUpdateOne) SetDeletedAt(t time.Time) *AdminUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*AdminUpdateOne) SetEmail ¶
func (auo *AdminUpdateOne) SetEmail(s string) *AdminUpdateOne
SetEmail sets the "email" field.
func (*AdminUpdateOne) SetEmailVerifiedAt ¶
func (auo *AdminUpdateOne) SetEmailVerifiedAt(t time.Time) *AdminUpdateOne
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*AdminUpdateOne) SetLang ¶
func (auo *AdminUpdateOne) SetLang(s string) *AdminUpdateOne
SetLang sets the "lang" field.
func (*AdminUpdateOne) SetName ¶
func (auo *AdminUpdateOne) SetName(s string) *AdminUpdateOne
SetName sets the "name" field.
func (*AdminUpdateOne) SetNillableAvatar ¶
func (auo *AdminUpdateOne) SetNillableAvatar(s *string) *AdminUpdateOne
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*AdminUpdateOne) SetNillableCreatedAt ¶
func (auo *AdminUpdateOne) SetNillableCreatedAt(t *time.Time) *AdminUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AdminUpdateOne) SetNillableDeletedAt ¶
func (auo *AdminUpdateOne) SetNillableDeletedAt(t *time.Time) *AdminUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*AdminUpdateOne) SetNillableEmail ¶
func (auo *AdminUpdateOne) SetNillableEmail(s *string) *AdminUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*AdminUpdateOne) SetNillableEmailVerifiedAt ¶
func (auo *AdminUpdateOne) SetNillableEmailVerifiedAt(t *time.Time) *AdminUpdateOne
SetNillableEmailVerifiedAt sets the "email_verified_at" field if the given value is not nil.
func (*AdminUpdateOne) SetNillableLang ¶
func (auo *AdminUpdateOne) SetNillableLang(s *string) *AdminUpdateOne
SetNillableLang sets the "lang" field if the given value is not nil.
func (*AdminUpdateOne) SetNillableName ¶
func (auo *AdminUpdateOne) SetNillableName(s *string) *AdminUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*AdminUpdateOne) SetNillablePassword ¶
func (auo *AdminUpdateOne) SetNillablePassword(s *string) *AdminUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*AdminUpdateOne) SetNillablePassword2 ¶
func (auo *AdminUpdateOne) SetNillablePassword2(s *string) *AdminUpdateOne
SetNillablePassword2 sets the "password2" field if the given value is not nil.
func (*AdminUpdateOne) SetNillableType ¶
func (auo *AdminUpdateOne) SetNillableType(u *uint8) *AdminUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*AdminUpdateOne) SetNillableUsername ¶
func (auo *AdminUpdateOne) SetNillableUsername(s *string) *AdminUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*AdminUpdateOne) SetPassword ¶
func (auo *AdminUpdateOne) SetPassword(s string) *AdminUpdateOne
SetPassword sets the "password" field.
func (*AdminUpdateOne) SetPassword2 ¶
func (auo *AdminUpdateOne) SetPassword2(s string) *AdminUpdateOne
SetPassword2 sets the "password2" field.
func (*AdminUpdateOne) SetType ¶
func (auo *AdminUpdateOne) SetType(u uint8) *AdminUpdateOne
SetType sets the "type" field.
func (*AdminUpdateOne) SetUpdatedAt ¶
func (auo *AdminUpdateOne) SetUpdatedAt(t time.Time) *AdminUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*AdminUpdateOne) SetUsername ¶
func (auo *AdminUpdateOne) SetUsername(s string) *AdminUpdateOne
SetUsername sets the "username" field.
func (*AdminUpdateOne) Where ¶
func (auo *AdminUpdateOne) Where(ps ...predicate.Admin) *AdminUpdateOne
Where appends a list predicates to the AdminUpdate builder.
type AdminUpsert ¶
AdminUpsert is the "OnConflict" setter.
func (*AdminUpsert) AddType ¶
func (u *AdminUpsert) AddType(v uint8) *AdminUpsert
AddType adds v to the "type" field.
func (*AdminUpsert) ClearAvatar ¶
func (u *AdminUpsert) ClearAvatar() *AdminUpsert
ClearAvatar clears the value of the "avatar" field.
func (*AdminUpsert) ClearDeletedAt ¶
func (u *AdminUpsert) ClearDeletedAt() *AdminUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AdminUpsert) ClearEmail ¶
func (u *AdminUpsert) ClearEmail() *AdminUpsert
ClearEmail clears the value of the "email" field.
func (*AdminUpsert) ClearEmailVerifiedAt ¶
func (u *AdminUpsert) ClearEmailVerifiedAt() *AdminUpsert
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*AdminUpsert) ClearName ¶
func (u *AdminUpsert) ClearName() *AdminUpsert
ClearName clears the value of the "name" field.
func (*AdminUpsert) ClearUsername ¶
func (u *AdminUpsert) ClearUsername() *AdminUpsert
ClearUsername clears the value of the "username" field.
func (*AdminUpsert) SetAvatar ¶
func (u *AdminUpsert) SetAvatar(v string) *AdminUpsert
SetAvatar sets the "avatar" field.
func (*AdminUpsert) SetCreatedAt ¶
func (u *AdminUpsert) SetCreatedAt(v time.Time) *AdminUpsert
SetCreatedAt sets the "created_at" field.
func (*AdminUpsert) SetDeletedAt ¶
func (u *AdminUpsert) SetDeletedAt(v time.Time) *AdminUpsert
SetDeletedAt sets the "deleted_at" field.
func (*AdminUpsert) SetEmail ¶
func (u *AdminUpsert) SetEmail(v string) *AdminUpsert
SetEmail sets the "email" field.
func (*AdminUpsert) SetEmailVerifiedAt ¶
func (u *AdminUpsert) SetEmailVerifiedAt(v time.Time) *AdminUpsert
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*AdminUpsert) SetLang ¶
func (u *AdminUpsert) SetLang(v string) *AdminUpsert
SetLang sets the "lang" field.
func (*AdminUpsert) SetName ¶
func (u *AdminUpsert) SetName(v string) *AdminUpsert
SetName sets the "name" field.
func (*AdminUpsert) SetPassword ¶
func (u *AdminUpsert) SetPassword(v string) *AdminUpsert
SetPassword sets the "password" field.
func (*AdminUpsert) SetPassword2 ¶
func (u *AdminUpsert) SetPassword2(v string) *AdminUpsert
SetPassword2 sets the "password2" field.
func (*AdminUpsert) SetType ¶
func (u *AdminUpsert) SetType(v uint8) *AdminUpsert
SetType sets the "type" field.
func (*AdminUpsert) SetUpdatedAt ¶
func (u *AdminUpsert) SetUpdatedAt(v time.Time) *AdminUpsert
SetUpdatedAt sets the "updated_at" field.
func (*AdminUpsert) SetUsername ¶
func (u *AdminUpsert) SetUsername(v string) *AdminUpsert
SetUsername sets the "username" field.
func (*AdminUpsert) UpdateAvatar ¶
func (u *AdminUpsert) UpdateAvatar() *AdminUpsert
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*AdminUpsert) UpdateCreatedAt ¶
func (u *AdminUpsert) UpdateCreatedAt() *AdminUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AdminUpsert) UpdateDeletedAt ¶
func (u *AdminUpsert) UpdateDeletedAt() *AdminUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*AdminUpsert) UpdateEmail ¶
func (u *AdminUpsert) UpdateEmail() *AdminUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AdminUpsert) UpdateEmailVerifiedAt ¶
func (u *AdminUpsert) UpdateEmailVerifiedAt() *AdminUpsert
UpdateEmailVerifiedAt sets the "email_verified_at" field to the value that was provided on create.
func (*AdminUpsert) UpdateLang ¶
func (u *AdminUpsert) UpdateLang() *AdminUpsert
UpdateLang sets the "lang" field to the value that was provided on create.
func (*AdminUpsert) UpdateName ¶
func (u *AdminUpsert) UpdateName() *AdminUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*AdminUpsert) UpdatePassword ¶
func (u *AdminUpsert) UpdatePassword() *AdminUpsert
UpdatePassword sets the "password" field to the value that was provided on create.
func (*AdminUpsert) UpdatePassword2 ¶
func (u *AdminUpsert) UpdatePassword2() *AdminUpsert
UpdatePassword2 sets the "password2" field to the value that was provided on create.
func (*AdminUpsert) UpdateType ¶
func (u *AdminUpsert) UpdateType() *AdminUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*AdminUpsert) UpdateUpdatedAt ¶
func (u *AdminUpsert) UpdateUpdatedAt() *AdminUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*AdminUpsert) UpdateUsername ¶
func (u *AdminUpsert) UpdateUsername() *AdminUpsert
UpdateUsername sets the "username" field to the value that was provided on create.
type AdminUpsertBulk ¶
type AdminUpsertBulk struct {
// contains filtered or unexported fields
}
AdminUpsertBulk is the builder for "upsert"-ing a bulk of Admin nodes.
func (*AdminUpsertBulk) AddType ¶
func (u *AdminUpsertBulk) AddType(v uint8) *AdminUpsertBulk
AddType adds v to the "type" field.
func (*AdminUpsertBulk) ClearAvatar ¶
func (u *AdminUpsertBulk) ClearAvatar() *AdminUpsertBulk
ClearAvatar clears the value of the "avatar" field.
func (*AdminUpsertBulk) ClearDeletedAt ¶
func (u *AdminUpsertBulk) ClearDeletedAt() *AdminUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AdminUpsertBulk) ClearEmail ¶
func (u *AdminUpsertBulk) ClearEmail() *AdminUpsertBulk
ClearEmail clears the value of the "email" field.
func (*AdminUpsertBulk) ClearEmailVerifiedAt ¶
func (u *AdminUpsertBulk) ClearEmailVerifiedAt() *AdminUpsertBulk
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*AdminUpsertBulk) ClearName ¶
func (u *AdminUpsertBulk) ClearName() *AdminUpsertBulk
ClearName clears the value of the "name" field.
func (*AdminUpsertBulk) ClearUsername ¶
func (u *AdminUpsertBulk) ClearUsername() *AdminUpsertBulk
ClearUsername clears the value of the "username" field.
func (*AdminUpsertBulk) DoNothing ¶
func (u *AdminUpsertBulk) DoNothing() *AdminUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AdminUpsertBulk) Exec ¶
func (u *AdminUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AdminUpsertBulk) ExecX ¶
func (u *AdminUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminUpsertBulk) Ignore ¶
func (u *AdminUpsertBulk) Ignore() *AdminUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Admin.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AdminUpsertBulk) SetAvatar ¶
func (u *AdminUpsertBulk) SetAvatar(v string) *AdminUpsertBulk
SetAvatar sets the "avatar" field.
func (*AdminUpsertBulk) SetCreatedAt ¶
func (u *AdminUpsertBulk) SetCreatedAt(v time.Time) *AdminUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*AdminUpsertBulk) SetDeletedAt ¶
func (u *AdminUpsertBulk) SetDeletedAt(v time.Time) *AdminUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*AdminUpsertBulk) SetEmail ¶
func (u *AdminUpsertBulk) SetEmail(v string) *AdminUpsertBulk
SetEmail sets the "email" field.
func (*AdminUpsertBulk) SetEmailVerifiedAt ¶
func (u *AdminUpsertBulk) SetEmailVerifiedAt(v time.Time) *AdminUpsertBulk
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*AdminUpsertBulk) SetLang ¶
func (u *AdminUpsertBulk) SetLang(v string) *AdminUpsertBulk
SetLang sets the "lang" field.
func (*AdminUpsertBulk) SetName ¶
func (u *AdminUpsertBulk) SetName(v string) *AdminUpsertBulk
SetName sets the "name" field.
func (*AdminUpsertBulk) SetPassword ¶
func (u *AdminUpsertBulk) SetPassword(v string) *AdminUpsertBulk
SetPassword sets the "password" field.
func (*AdminUpsertBulk) SetPassword2 ¶
func (u *AdminUpsertBulk) SetPassword2(v string) *AdminUpsertBulk
SetPassword2 sets the "password2" field.
func (*AdminUpsertBulk) SetType ¶
func (u *AdminUpsertBulk) SetType(v uint8) *AdminUpsertBulk
SetType sets the "type" field.
func (*AdminUpsertBulk) SetUpdatedAt ¶
func (u *AdminUpsertBulk) SetUpdatedAt(v time.Time) *AdminUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*AdminUpsertBulk) SetUsername ¶
func (u *AdminUpsertBulk) SetUsername(v string) *AdminUpsertBulk
SetUsername sets the "username" field.
func (*AdminUpsertBulk) Update ¶
func (u *AdminUpsertBulk) Update(set func(*AdminUpsert)) *AdminUpsertBulk
Update allows overriding fields `UPDATE` values. See the AdminCreateBulk.OnConflict documentation for more info.
func (*AdminUpsertBulk) UpdateAvatar ¶
func (u *AdminUpsertBulk) UpdateAvatar() *AdminUpsertBulk
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdateCreatedAt ¶
func (u *AdminUpsertBulk) UpdateCreatedAt() *AdminUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdateDeletedAt ¶
func (u *AdminUpsertBulk) UpdateDeletedAt() *AdminUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdateEmail ¶
func (u *AdminUpsertBulk) UpdateEmail() *AdminUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdateEmailVerifiedAt ¶
func (u *AdminUpsertBulk) UpdateEmailVerifiedAt() *AdminUpsertBulk
UpdateEmailVerifiedAt sets the "email_verified_at" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdateLang ¶
func (u *AdminUpsertBulk) UpdateLang() *AdminUpsertBulk
UpdateLang sets the "lang" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdateName ¶
func (u *AdminUpsertBulk) UpdateName() *AdminUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdateNewValues ¶
func (u *AdminUpsertBulk) UpdateNewValues() *AdminUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Admin.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(admin.FieldID) }), ). Exec(ctx)
func (*AdminUpsertBulk) UpdatePassword ¶
func (u *AdminUpsertBulk) UpdatePassword() *AdminUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdatePassword2 ¶
func (u *AdminUpsertBulk) UpdatePassword2() *AdminUpsertBulk
UpdatePassword2 sets the "password2" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdateType ¶
func (u *AdminUpsertBulk) UpdateType() *AdminUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdateUpdatedAt ¶
func (u *AdminUpsertBulk) UpdateUpdatedAt() *AdminUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*AdminUpsertBulk) UpdateUsername ¶
func (u *AdminUpsertBulk) UpdateUsername() *AdminUpsertBulk
UpdateUsername sets the "username" field to the value that was provided on create.
type AdminUpsertOne ¶
type AdminUpsertOne struct {
// contains filtered or unexported fields
}
AdminUpsertOne is the builder for "upsert"-ing
one Admin node.
func (*AdminUpsertOne) AddType ¶
func (u *AdminUpsertOne) AddType(v uint8) *AdminUpsertOne
AddType adds v to the "type" field.
func (*AdminUpsertOne) ClearAvatar ¶
func (u *AdminUpsertOne) ClearAvatar() *AdminUpsertOne
ClearAvatar clears the value of the "avatar" field.
func (*AdminUpsertOne) ClearDeletedAt ¶
func (u *AdminUpsertOne) ClearDeletedAt() *AdminUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*AdminUpsertOne) ClearEmail ¶
func (u *AdminUpsertOne) ClearEmail() *AdminUpsertOne
ClearEmail clears the value of the "email" field.
func (*AdminUpsertOne) ClearEmailVerifiedAt ¶
func (u *AdminUpsertOne) ClearEmailVerifiedAt() *AdminUpsertOne
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*AdminUpsertOne) ClearName ¶
func (u *AdminUpsertOne) ClearName() *AdminUpsertOne
ClearName clears the value of the "name" field.
func (*AdminUpsertOne) ClearUsername ¶
func (u *AdminUpsertOne) ClearUsername() *AdminUpsertOne
ClearUsername clears the value of the "username" field.
func (*AdminUpsertOne) DoNothing ¶
func (u *AdminUpsertOne) DoNothing() *AdminUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AdminUpsertOne) Exec ¶
func (u *AdminUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AdminUpsertOne) ExecX ¶
func (u *AdminUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AdminUpsertOne) ID ¶
func (u *AdminUpsertOne) ID(ctx context.Context) (id uint64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*AdminUpsertOne) IDX ¶
func (u *AdminUpsertOne) IDX(ctx context.Context) uint64
IDX is like ID, but panics if an error occurs.
func (*AdminUpsertOne) Ignore ¶
func (u *AdminUpsertOne) Ignore() *AdminUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Admin.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AdminUpsertOne) SetAvatar ¶
func (u *AdminUpsertOne) SetAvatar(v string) *AdminUpsertOne
SetAvatar sets the "avatar" field.
func (*AdminUpsertOne) SetCreatedAt ¶
func (u *AdminUpsertOne) SetCreatedAt(v time.Time) *AdminUpsertOne
SetCreatedAt sets the "created_at" field.
func (*AdminUpsertOne) SetDeletedAt ¶
func (u *AdminUpsertOne) SetDeletedAt(v time.Time) *AdminUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*AdminUpsertOne) SetEmail ¶
func (u *AdminUpsertOne) SetEmail(v string) *AdminUpsertOne
SetEmail sets the "email" field.
func (*AdminUpsertOne) SetEmailVerifiedAt ¶
func (u *AdminUpsertOne) SetEmailVerifiedAt(v time.Time) *AdminUpsertOne
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*AdminUpsertOne) SetLang ¶
func (u *AdminUpsertOne) SetLang(v string) *AdminUpsertOne
SetLang sets the "lang" field.
func (*AdminUpsertOne) SetName ¶
func (u *AdminUpsertOne) SetName(v string) *AdminUpsertOne
SetName sets the "name" field.
func (*AdminUpsertOne) SetPassword ¶
func (u *AdminUpsertOne) SetPassword(v string) *AdminUpsertOne
SetPassword sets the "password" field.
func (*AdminUpsertOne) SetPassword2 ¶
func (u *AdminUpsertOne) SetPassword2(v string) *AdminUpsertOne
SetPassword2 sets the "password2" field.
func (*AdminUpsertOne) SetType ¶
func (u *AdminUpsertOne) SetType(v uint8) *AdminUpsertOne
SetType sets the "type" field.
func (*AdminUpsertOne) SetUpdatedAt ¶
func (u *AdminUpsertOne) SetUpdatedAt(v time.Time) *AdminUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*AdminUpsertOne) SetUsername ¶
func (u *AdminUpsertOne) SetUsername(v string) *AdminUpsertOne
SetUsername sets the "username" field.
func (*AdminUpsertOne) Update ¶
func (u *AdminUpsertOne) Update(set func(*AdminUpsert)) *AdminUpsertOne
Update allows overriding fields `UPDATE` values. See the AdminCreate.OnConflict documentation for more info.
func (*AdminUpsertOne) UpdateAvatar ¶
func (u *AdminUpsertOne) UpdateAvatar() *AdminUpsertOne
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*AdminUpsertOne) UpdateCreatedAt ¶
func (u *AdminUpsertOne) UpdateCreatedAt() *AdminUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*AdminUpsertOne) UpdateDeletedAt ¶
func (u *AdminUpsertOne) UpdateDeletedAt() *AdminUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*AdminUpsertOne) UpdateEmail ¶
func (u *AdminUpsertOne) UpdateEmail() *AdminUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*AdminUpsertOne) UpdateEmailVerifiedAt ¶
func (u *AdminUpsertOne) UpdateEmailVerifiedAt() *AdminUpsertOne
UpdateEmailVerifiedAt sets the "email_verified_at" field to the value that was provided on create.
func (*AdminUpsertOne) UpdateLang ¶
func (u *AdminUpsertOne) UpdateLang() *AdminUpsertOne
UpdateLang sets the "lang" field to the value that was provided on create.
func (*AdminUpsertOne) UpdateName ¶
func (u *AdminUpsertOne) UpdateName() *AdminUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*AdminUpsertOne) UpdateNewValues ¶
func (u *AdminUpsertOne) UpdateNewValues() *AdminUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Admin.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(admin.FieldID) }), ). Exec(ctx)
func (*AdminUpsertOne) UpdatePassword ¶
func (u *AdminUpsertOne) UpdatePassword() *AdminUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*AdminUpsertOne) UpdatePassword2 ¶
func (u *AdminUpsertOne) UpdatePassword2() *AdminUpsertOne
UpdatePassword2 sets the "password2" field to the value that was provided on create.
func (*AdminUpsertOne) UpdateType ¶
func (u *AdminUpsertOne) UpdateType() *AdminUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*AdminUpsertOne) UpdateUpdatedAt ¶
func (u *AdminUpsertOne) UpdateUpdatedAt() *AdminUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*AdminUpsertOne) UpdateUsername ¶
func (u *AdminUpsertOne) UpdateUsername() *AdminUpsertOne
UpdateUsername sets the "username" field to the value that was provided on create.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Bank ¶
type Bank struct { // ID of the ent. // Primary key for the bank ID uint64 `json:"id,omitempty"` // Bank name in English NameEn string `json:"name_en,omitempty"` // Bank name in Chinese NameZh string `json:"name_zh,omitempty"` // Country of the bank CountryID *uint64 `json:"country_id,omitempty"` // Record creation timestamp CreatedAt time.Time `json:"created_at,omitempty"` // Record update timestamp UpdatedAt time.Time `json:"updated_at,omitempty"` // Record deleted timestamp DeletedAt *time.Time `json:"deleted_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BankQuery when eager-loading is set. Edges BankEdges `json:"edges"` // contains filtered or unexported fields }
Bank is the model entity for the Bank schema.
func (*Bank) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Bank) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Bank) QueryCountry ¶
func (b *Bank) QueryCountry() *CountryQuery
QueryCountry queries the "country" edge of the Bank entity.
func (*Bank) QueryUsers ¶
QueryUsers queries the "users" edge of the Bank entity.
func (*Bank) Unwrap ¶
Unwrap unwraps the Bank entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Bank) Update ¶
func (b *Bank) Update() *BankUpdateOne
Update returns a builder for updating this Bank. Note that you need to call Bank.Unwrap() before calling this method if this Bank was returned from a transaction, and the transaction was committed or rolled back.
type BankClient ¶
type BankClient struct {
// contains filtered or unexported fields
}
BankClient is a client for the Bank schema.
func NewBankClient ¶
func NewBankClient(c config) *BankClient
NewBankClient returns a client for the Bank from the given config.
func (*BankClient) Create ¶
func (c *BankClient) Create() *BankCreate
Create returns a builder for creating a Bank entity.
func (*BankClient) CreateBulk ¶
func (c *BankClient) CreateBulk(builders ...*BankCreate) *BankCreateBulk
CreateBulk returns a builder for creating a bulk of Bank entities.
func (*BankClient) Delete ¶
func (c *BankClient) Delete() *BankDelete
Delete returns a delete builder for Bank.
func (*BankClient) DeleteOne ¶
func (c *BankClient) DeleteOne(b *Bank) *BankDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BankClient) DeleteOneID ¶
func (c *BankClient) DeleteOneID(id uint64) *BankDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BankClient) ExecContext ¶
func (c *BankClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*BankClient) GetX ¶
func (c *BankClient) GetX(ctx context.Context, id uint64) *Bank
GetX is like Get, but panics if an error occurs.
func (*BankClient) Intercept ¶
func (c *BankClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `bank.Intercept(f(g(h())))`.
func (*BankClient) Interceptors ¶
func (c *BankClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BankClient) MapCreateBulk ¶
func (c *BankClient) MapCreateBulk(slice any, setFunc func(*BankCreate, int)) *BankCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*BankClient) Query ¶
func (c *BankClient) Query() *BankQuery
Query returns a query builder for Bank.
func (*BankClient) QueryContext ¶
func (c *BankClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*BankClient) QueryCountry ¶
func (c *BankClient) QueryCountry(b *Bank) *CountryQuery
QueryCountry queries the country edge of a Bank.
func (*BankClient) QueryUsers ¶
func (c *BankClient) QueryUsers(b *Bank) *UserQuery
QueryUsers queries the users edge of a Bank.
func (*BankClient) Update ¶
func (c *BankClient) Update() *BankUpdate
Update returns an update builder for Bank.
func (*BankClient) UpdateOne ¶
func (c *BankClient) UpdateOne(b *Bank) *BankUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BankClient) UpdateOneID ¶
func (c *BankClient) UpdateOneID(id uint64) *BankUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BankClient) Use ¶
func (c *BankClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `bank.Hooks(f(g(h())))`.
type BankCreate ¶
type BankCreate struct {
// contains filtered or unexported fields
}
BankCreate is the builder for creating a Bank entity.
func (*BankCreate) AddUserIDs ¶
func (bc *BankCreate) AddUserIDs(ids ...uint64) *BankCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*BankCreate) AddUsers ¶
func (bc *BankCreate) AddUsers(u ...*User) *BankCreate
AddUsers adds the "users" edges to the User entity.
func (*BankCreate) Exec ¶
func (bc *BankCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BankCreate) ExecContext ¶
func (c *BankCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*BankCreate) ExecX ¶
func (bc *BankCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BankCreate) Mutation ¶
func (bc *BankCreate) Mutation() *BankMutation
Mutation returns the BankMutation object of the builder.
func (*BankCreate) OnConflict ¶
func (bc *BankCreate) OnConflict(opts ...sql.ConflictOption) *BankUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Bank.Create(). SetNameEn(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.BankUpsert) { SetNameEn(v+v). }). Exec(ctx)
func (*BankCreate) OnConflictColumns ¶
func (bc *BankCreate) OnConflictColumns(columns ...string) *BankUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Bank.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*BankCreate) QueryContext ¶
func (c *BankCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*BankCreate) Save ¶
func (bc *BankCreate) Save(ctx context.Context) (*Bank, error)
Save creates the Bank in the database.
func (*BankCreate) SaveX ¶
func (bc *BankCreate) SaveX(ctx context.Context) *Bank
SaveX calls Save and panics if Save returns an error.
func (*BankCreate) SetCountry ¶
func (bc *BankCreate) SetCountry(c *Country) *BankCreate
SetCountry sets the "country" edge to the Country entity.
func (*BankCreate) SetCountryID ¶
func (bc *BankCreate) SetCountryID(u uint64) *BankCreate
SetCountryID sets the "country_id" field.
func (*BankCreate) SetCreatedAt ¶
func (bc *BankCreate) SetCreatedAt(t time.Time) *BankCreate
SetCreatedAt sets the "created_at" field.
func (*BankCreate) SetDeletedAt ¶
func (bc *BankCreate) SetDeletedAt(t time.Time) *BankCreate
SetDeletedAt sets the "deleted_at" field.
func (*BankCreate) SetID ¶
func (bc *BankCreate) SetID(u uint64) *BankCreate
SetID sets the "id" field.
func (*BankCreate) SetNameEn ¶
func (bc *BankCreate) SetNameEn(s string) *BankCreate
SetNameEn sets the "name_en" field.
func (*BankCreate) SetNameZh ¶
func (bc *BankCreate) SetNameZh(s string) *BankCreate
SetNameZh sets the "name_zh" field.
func (*BankCreate) SetNillableCountryID ¶
func (bc *BankCreate) SetNillableCountryID(u *uint64) *BankCreate
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*BankCreate) SetNillableCreatedAt ¶
func (bc *BankCreate) SetNillableCreatedAt(t *time.Time) *BankCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BankCreate) SetNillableDeletedAt ¶
func (bc *BankCreate) SetNillableDeletedAt(t *time.Time) *BankCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*BankCreate) SetNillableUpdatedAt ¶
func (bc *BankCreate) SetNillableUpdatedAt(t *time.Time) *BankCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*BankCreate) SetUpdatedAt ¶
func (bc *BankCreate) SetUpdatedAt(t time.Time) *BankCreate
SetUpdatedAt sets the "updated_at" field.
type BankCreateBulk ¶
type BankCreateBulk struct {
// contains filtered or unexported fields
}
BankCreateBulk is the builder for creating many Bank entities in bulk.
func (*BankCreateBulk) Exec ¶
func (bcb *BankCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BankCreateBulk) ExecContext ¶
func (c *BankCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*BankCreateBulk) ExecX ¶
func (bcb *BankCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BankCreateBulk) OnConflict ¶
func (bcb *BankCreateBulk) OnConflict(opts ...sql.ConflictOption) *BankUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Bank.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.BankUpsert) { SetNameEn(v+v). }). Exec(ctx)
func (*BankCreateBulk) OnConflictColumns ¶
func (bcb *BankCreateBulk) OnConflictColumns(columns ...string) *BankUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Bank.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*BankCreateBulk) QueryContext ¶
func (c *BankCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type BankDelete ¶
type BankDelete struct {
// contains filtered or unexported fields
}
BankDelete is the builder for deleting a Bank entity.
func (*BankDelete) Exec ¶
func (bd *BankDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BankDelete) ExecContext ¶
func (c *BankDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*BankDelete) ExecX ¶
func (bd *BankDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BankDelete) QueryContext ¶
func (c *BankDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*BankDelete) Where ¶
func (bd *BankDelete) Where(ps ...predicate.Bank) *BankDelete
Where appends a list predicates to the BankDelete builder.
type BankDeleteOne ¶
type BankDeleteOne struct {
// contains filtered or unexported fields
}
BankDeleteOne is the builder for deleting a single Bank entity.
func (*BankDeleteOne) Exec ¶
func (bdo *BankDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BankDeleteOne) ExecX ¶
func (bdo *BankDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BankDeleteOne) Where ¶
func (bdo *BankDeleteOne) Where(ps ...predicate.Bank) *BankDeleteOne
Where appends a list predicates to the BankDelete builder.
type BankEdges ¶
type BankEdges struct { // Country to which the bank belongs Country *Country `json:"country,omitempty"` // User bind with this bank Users []*User `json:"users,omitempty"` // contains filtered or unexported fields }
BankEdges holds the relations/edges for other nodes in the graph.
func (BankEdges) CountryOrErr ¶
CountryOrErr returns the Country value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (BankEdges) UsersOrErr ¶
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type BankGroupBy ¶
type BankGroupBy struct {
// contains filtered or unexported fields
}
BankGroupBy is the group-by builder for Bank entities.
func (*BankGroupBy) Aggregate ¶
func (bgb *BankGroupBy) Aggregate(fns ...AggregateFunc) *BankGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BankGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BankGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BankGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BankGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BankGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BankGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BankGroupBy) Scan ¶
func (bgb *BankGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BankGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BankMutation ¶
type BankMutation struct {
// contains filtered or unexported fields
}
BankMutation represents an operation that mutates the Bank nodes in the graph.
func (*BankMutation) AddField ¶
func (m *BankMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*BankMutation) AddUserIDs ¶
func (m *BankMutation) AddUserIDs(ids ...uint64)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*BankMutation) AddedEdges ¶
func (m *BankMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BankMutation) AddedField ¶
func (m *BankMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*BankMutation) AddedFields ¶
func (m *BankMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BankMutation) AddedIDs ¶
func (m *BankMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BankMutation) ClearCountry ¶
func (m *BankMutation) ClearCountry()
ClearCountry clears the "country" edge to the Country entity.
func (*BankMutation) ClearCountryID ¶
func (m *BankMutation) ClearCountryID()
ClearCountryID clears the value of the "country_id" field.
func (*BankMutation) ClearDeletedAt ¶
func (m *BankMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BankMutation) ClearEdge ¶
func (m *BankMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*BankMutation) ClearField ¶
func (m *BankMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*BankMutation) ClearUsers ¶
func (m *BankMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*BankMutation) ClearedEdges ¶
func (m *BankMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BankMutation) ClearedFields ¶
func (m *BankMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BankMutation) Client ¶
func (m BankMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*BankMutation) CountryCleared ¶
func (m *BankMutation) CountryCleared() bool
CountryCleared reports if the "country" edge to the Country entity was cleared.
func (*BankMutation) CountryID ¶
func (m *BankMutation) CountryID() (r uint64, exists bool)
CountryID returns the value of the "country_id" field in the mutation.
func (*BankMutation) CountryIDCleared ¶
func (m *BankMutation) CountryIDCleared() bool
CountryIDCleared returns if the "country_id" field was cleared in this mutation.
func (*BankMutation) CountryIDs ¶
func (m *BankMutation) CountryIDs() (ids []uint64)
CountryIDs returns the "country" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CountryID instead. It exists only for internal usage by the builders.
func (*BankMutation) CreatedAt ¶
func (m *BankMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*BankMutation) DeletedAt ¶
func (m *BankMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*BankMutation) DeletedAtCleared ¶
func (m *BankMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*BankMutation) EdgeCleared ¶
func (m *BankMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BankMutation) ExecContext ¶
func (c *BankMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*BankMutation) Field ¶
func (m *BankMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*BankMutation) FieldCleared ¶
func (m *BankMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BankMutation) Fields ¶
func (m *BankMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*BankMutation) ID ¶
func (m *BankMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*BankMutation) IDs ¶
func (m *BankMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*BankMutation) NameEn ¶
func (m *BankMutation) NameEn() (r string, exists bool)
NameEn returns the value of the "name_en" field in the mutation.
func (*BankMutation) NameZh ¶
func (m *BankMutation) NameZh() (r string, exists bool)
NameZh returns the value of the "name_zh" field in the mutation.
func (*BankMutation) OldCountryID ¶
func (m *BankMutation) OldCountryID(ctx context.Context) (v *uint64, err error)
OldCountryID returns the old "country_id" field's value of the Bank entity. If the Bank object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BankMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Bank entity. If the Bank object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BankMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Bank entity. If the Bank object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BankMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*BankMutation) OldNameEn ¶
func (m *BankMutation) OldNameEn(ctx context.Context) (v string, err error)
OldNameEn returns the old "name_en" field's value of the Bank entity. If the Bank object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BankMutation) OldNameZh ¶
func (m *BankMutation) OldNameZh(ctx context.Context) (v string, err error)
OldNameZh returns the old "name_zh" field's value of the Bank entity. If the Bank object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BankMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Bank entity. If the Bank object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BankMutation) QueryContext ¶
func (c *BankMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*BankMutation) RemoveUserIDs ¶
func (m *BankMutation) RemoveUserIDs(ids ...uint64)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*BankMutation) RemovedEdges ¶
func (m *BankMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BankMutation) RemovedIDs ¶
func (m *BankMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*BankMutation) RemovedUsersIDs ¶
func (m *BankMutation) RemovedUsersIDs() (ids []uint64)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*BankMutation) ResetCountry ¶
func (m *BankMutation) ResetCountry()
ResetCountry resets all changes to the "country" edge.
func (*BankMutation) ResetCountryID ¶
func (m *BankMutation) ResetCountryID()
ResetCountryID resets all changes to the "country_id" field.
func (*BankMutation) ResetCreatedAt ¶
func (m *BankMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*BankMutation) ResetDeletedAt ¶
func (m *BankMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*BankMutation) ResetEdge ¶
func (m *BankMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*BankMutation) ResetField ¶
func (m *BankMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*BankMutation) ResetNameEn ¶
func (m *BankMutation) ResetNameEn()
ResetNameEn resets all changes to the "name_en" field.
func (*BankMutation) ResetNameZh ¶
func (m *BankMutation) ResetNameZh()
ResetNameZh resets all changes to the "name_zh" field.
func (*BankMutation) ResetUpdatedAt ¶
func (m *BankMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*BankMutation) ResetUsers ¶
func (m *BankMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*BankMutation) SetCountryID ¶
func (m *BankMutation) SetCountryID(u uint64)
SetCountryID sets the "country_id" field.
func (*BankMutation) SetCreatedAt ¶
func (m *BankMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*BankMutation) SetDeletedAt ¶
func (m *BankMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*BankMutation) SetField ¶
func (m *BankMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*BankMutation) SetID ¶
func (m *BankMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Bank entities.
func (*BankMutation) SetNameEn ¶
func (m *BankMutation) SetNameEn(s string)
SetNameEn sets the "name_en" field.
func (*BankMutation) SetNameZh ¶
func (m *BankMutation) SetNameZh(s string)
SetNameZh sets the "name_zh" field.
func (*BankMutation) SetOp ¶
func (m *BankMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BankMutation) SetUpdatedAt ¶
func (m *BankMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (BankMutation) Tx ¶
func (m BankMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BankMutation) Type ¶
func (m *BankMutation) Type() string
Type returns the node type of this mutation (Bank).
func (*BankMutation) UpdatedAt ¶
func (m *BankMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*BankMutation) UsersCleared ¶
func (m *BankMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*BankMutation) UsersIDs ¶
func (m *BankMutation) UsersIDs() (ids []uint64)
UsersIDs returns the "users" edge IDs in the mutation.
func (*BankMutation) Where ¶
func (m *BankMutation) Where(ps ...predicate.Bank)
Where appends a list predicates to the BankMutation builder.
func (*BankMutation) WhereP ¶
func (m *BankMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BankMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type BankQuery ¶
type BankQuery struct {
// contains filtered or unexported fields
}
BankQuery is the builder for querying Bank entities.
func (*BankQuery) Aggregate ¶
func (bq *BankQuery) Aggregate(fns ...AggregateFunc) *BankSelect
Aggregate returns a BankSelect configured with the given aggregations.
func (*BankQuery) Clone ¶
Clone returns a duplicate of the BankQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BankQuery) ExecContext ¶
func (c *BankQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*BankQuery) First ¶
First returns the first Bank entity from the query. Returns a *NotFoundError when no Bank was found.
func (*BankQuery) FirstID ¶
FirstID returns the first Bank ID from the query. Returns a *NotFoundError when no Bank ID was found.
func (*BankQuery) GroupBy ¶
func (bq *BankQuery) GroupBy(field string, fields ...string) *BankGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { NameEn string `json:"name_en,omitempty"` Count int `json:"count,omitempty"` } client.Bank.Query(). GroupBy(bank.FieldNameEn). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BankQuery) Only ¶
Only returns a single Bank entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Bank entity is found. Returns a *NotFoundError when no Bank entities are found.
func (*BankQuery) OnlyID ¶
OnlyID is like Only, but returns the only Bank ID in the query. Returns a *NotSingularError when more than one Bank ID is found. Returns a *NotFoundError when no entities are found.
func (*BankQuery) Order ¶
func (bq *BankQuery) Order(o ...bank.OrderOption) *BankQuery
Order specifies how the records should be ordered.
func (*BankQuery) QueryContext ¶
func (c *BankQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*BankQuery) QueryCountry ¶
func (bq *BankQuery) QueryCountry() *CountryQuery
QueryCountry chains the current query on the "country" edge.
func (*BankQuery) QueryUsers ¶
QueryUsers chains the current query on the "users" edge.
func (*BankQuery) Select ¶
func (bq *BankQuery) Select(fields ...string) *BankSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { NameEn string `json:"name_en,omitempty"` } client.Bank.Query(). Select(bank.FieldNameEn). Scan(ctx, &v)
func (*BankQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*BankQuery) WithCountry ¶
func (bq *BankQuery) WithCountry(opts ...func(*CountryQuery)) *BankQuery
WithCountry tells the query-builder to eager-load the nodes that are connected to the "country" edge. The optional arguments are used to configure the query builder of the edge.
type BankSelect ¶
type BankSelect struct { *BankQuery // contains filtered or unexported fields }
BankSelect is the builder for selecting fields of Bank entities.
func (*BankSelect) Aggregate ¶
func (bs *BankSelect) Aggregate(fns ...AggregateFunc) *BankSelect
Aggregate adds the given aggregation functions to the selector query.
func (*BankSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BankSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (BankSelect) ExecContext ¶
func (c BankSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*BankSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BankSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BankSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BankSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (BankSelect) QueryContext ¶
func (c BankSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*BankSelect) Scan ¶
func (bs *BankSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BankSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BankUpdate ¶
type BankUpdate struct {
// contains filtered or unexported fields
}
BankUpdate is the builder for updating Bank entities.
func (*BankUpdate) AddUserIDs ¶
func (bu *BankUpdate) AddUserIDs(ids ...uint64) *BankUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*BankUpdate) AddUsers ¶
func (bu *BankUpdate) AddUsers(u ...*User) *BankUpdate
AddUsers adds the "users" edges to the User entity.
func (*BankUpdate) ClearCountry ¶
func (bu *BankUpdate) ClearCountry() *BankUpdate
ClearCountry clears the "country" edge to the Country entity.
func (*BankUpdate) ClearCountryID ¶
func (bu *BankUpdate) ClearCountryID() *BankUpdate
ClearCountryID clears the value of the "country_id" field.
func (*BankUpdate) ClearDeletedAt ¶
func (bu *BankUpdate) ClearDeletedAt() *BankUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BankUpdate) ClearUsers ¶
func (bu *BankUpdate) ClearUsers() *BankUpdate
ClearUsers clears all "users" edges to the User entity.
func (*BankUpdate) Exec ¶
func (bu *BankUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BankUpdate) ExecContext ¶
func (c *BankUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*BankUpdate) ExecX ¶
func (bu *BankUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BankUpdate) Mutation ¶
func (bu *BankUpdate) Mutation() *BankMutation
Mutation returns the BankMutation object of the builder.
func (*BankUpdate) QueryContext ¶
func (c *BankUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*BankUpdate) RemoveUserIDs ¶
func (bu *BankUpdate) RemoveUserIDs(ids ...uint64) *BankUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*BankUpdate) RemoveUsers ¶
func (bu *BankUpdate) RemoveUsers(u ...*User) *BankUpdate
RemoveUsers removes "users" edges to User entities.
func (*BankUpdate) Save ¶
func (bu *BankUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BankUpdate) SaveX ¶
func (bu *BankUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BankUpdate) SetCountry ¶
func (bu *BankUpdate) SetCountry(c *Country) *BankUpdate
SetCountry sets the "country" edge to the Country entity.
func (*BankUpdate) SetCountryID ¶
func (bu *BankUpdate) SetCountryID(u uint64) *BankUpdate
SetCountryID sets the "country_id" field.
func (*BankUpdate) SetCreatedAt ¶
func (bu *BankUpdate) SetCreatedAt(t time.Time) *BankUpdate
SetCreatedAt sets the "created_at" field.
func (*BankUpdate) SetDeletedAt ¶
func (bu *BankUpdate) SetDeletedAt(t time.Time) *BankUpdate
SetDeletedAt sets the "deleted_at" field.
func (*BankUpdate) SetNameEn ¶
func (bu *BankUpdate) SetNameEn(s string) *BankUpdate
SetNameEn sets the "name_en" field.
func (*BankUpdate) SetNameZh ¶
func (bu *BankUpdate) SetNameZh(s string) *BankUpdate
SetNameZh sets the "name_zh" field.
func (*BankUpdate) SetNillableCountryID ¶
func (bu *BankUpdate) SetNillableCountryID(u *uint64) *BankUpdate
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*BankUpdate) SetNillableCreatedAt ¶
func (bu *BankUpdate) SetNillableCreatedAt(t *time.Time) *BankUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BankUpdate) SetNillableDeletedAt ¶
func (bu *BankUpdate) SetNillableDeletedAt(t *time.Time) *BankUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*BankUpdate) SetNillableNameEn ¶
func (bu *BankUpdate) SetNillableNameEn(s *string) *BankUpdate
SetNillableNameEn sets the "name_en" field if the given value is not nil.
func (*BankUpdate) SetNillableNameZh ¶
func (bu *BankUpdate) SetNillableNameZh(s *string) *BankUpdate
SetNillableNameZh sets the "name_zh" field if the given value is not nil.
func (*BankUpdate) SetUpdatedAt ¶
func (bu *BankUpdate) SetUpdatedAt(t time.Time) *BankUpdate
SetUpdatedAt sets the "updated_at" field.
func (*BankUpdate) Where ¶
func (bu *BankUpdate) Where(ps ...predicate.Bank) *BankUpdate
Where appends a list predicates to the BankUpdate builder.
type BankUpdateOne ¶
type BankUpdateOne struct {
// contains filtered or unexported fields
}
BankUpdateOne is the builder for updating a single Bank entity.
func (*BankUpdateOne) AddUserIDs ¶
func (buo *BankUpdateOne) AddUserIDs(ids ...uint64) *BankUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*BankUpdateOne) AddUsers ¶
func (buo *BankUpdateOne) AddUsers(u ...*User) *BankUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*BankUpdateOne) ClearCountry ¶
func (buo *BankUpdateOne) ClearCountry() *BankUpdateOne
ClearCountry clears the "country" edge to the Country entity.
func (*BankUpdateOne) ClearCountryID ¶
func (buo *BankUpdateOne) ClearCountryID() *BankUpdateOne
ClearCountryID clears the value of the "country_id" field.
func (*BankUpdateOne) ClearDeletedAt ¶
func (buo *BankUpdateOne) ClearDeletedAt() *BankUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BankUpdateOne) ClearUsers ¶
func (buo *BankUpdateOne) ClearUsers() *BankUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*BankUpdateOne) Exec ¶
func (buo *BankUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BankUpdateOne) ExecContext ¶
func (c *BankUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*BankUpdateOne) ExecX ¶
func (buo *BankUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BankUpdateOne) Mutation ¶
func (buo *BankUpdateOne) Mutation() *BankMutation
Mutation returns the BankMutation object of the builder.
func (*BankUpdateOne) QueryContext ¶
func (c *BankUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*BankUpdateOne) RemoveUserIDs ¶
func (buo *BankUpdateOne) RemoveUserIDs(ids ...uint64) *BankUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*BankUpdateOne) RemoveUsers ¶
func (buo *BankUpdateOne) RemoveUsers(u ...*User) *BankUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*BankUpdateOne) Save ¶
func (buo *BankUpdateOne) Save(ctx context.Context) (*Bank, error)
Save executes the query and returns the updated Bank entity.
func (*BankUpdateOne) SaveX ¶
func (buo *BankUpdateOne) SaveX(ctx context.Context) *Bank
SaveX is like Save, but panics if an error occurs.
func (*BankUpdateOne) Select ¶
func (buo *BankUpdateOne) Select(field string, fields ...string) *BankUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BankUpdateOne) SetCountry ¶
func (buo *BankUpdateOne) SetCountry(c *Country) *BankUpdateOne
SetCountry sets the "country" edge to the Country entity.
func (*BankUpdateOne) SetCountryID ¶
func (buo *BankUpdateOne) SetCountryID(u uint64) *BankUpdateOne
SetCountryID sets the "country_id" field.
func (*BankUpdateOne) SetCreatedAt ¶
func (buo *BankUpdateOne) SetCreatedAt(t time.Time) *BankUpdateOne
SetCreatedAt sets the "created_at" field.
func (*BankUpdateOne) SetDeletedAt ¶
func (buo *BankUpdateOne) SetDeletedAt(t time.Time) *BankUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*BankUpdateOne) SetNameEn ¶
func (buo *BankUpdateOne) SetNameEn(s string) *BankUpdateOne
SetNameEn sets the "name_en" field.
func (*BankUpdateOne) SetNameZh ¶
func (buo *BankUpdateOne) SetNameZh(s string) *BankUpdateOne
SetNameZh sets the "name_zh" field.
func (*BankUpdateOne) SetNillableCountryID ¶
func (buo *BankUpdateOne) SetNillableCountryID(u *uint64) *BankUpdateOne
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*BankUpdateOne) SetNillableCreatedAt ¶
func (buo *BankUpdateOne) SetNillableCreatedAt(t *time.Time) *BankUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BankUpdateOne) SetNillableDeletedAt ¶
func (buo *BankUpdateOne) SetNillableDeletedAt(t *time.Time) *BankUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*BankUpdateOne) SetNillableNameEn ¶
func (buo *BankUpdateOne) SetNillableNameEn(s *string) *BankUpdateOne
SetNillableNameEn sets the "name_en" field if the given value is not nil.
func (*BankUpdateOne) SetNillableNameZh ¶
func (buo *BankUpdateOne) SetNillableNameZh(s *string) *BankUpdateOne
SetNillableNameZh sets the "name_zh" field if the given value is not nil.
func (*BankUpdateOne) SetUpdatedAt ¶
func (buo *BankUpdateOne) SetUpdatedAt(t time.Time) *BankUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*BankUpdateOne) Where ¶
func (buo *BankUpdateOne) Where(ps ...predicate.Bank) *BankUpdateOne
Where appends a list predicates to the BankUpdate builder.
type BankUpsert ¶
BankUpsert is the "OnConflict" setter.
func (*BankUpsert) ClearCountryID ¶
func (u *BankUpsert) ClearCountryID() *BankUpsert
ClearCountryID clears the value of the "country_id" field.
func (*BankUpsert) ClearDeletedAt ¶
func (u *BankUpsert) ClearDeletedAt() *BankUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BankUpsert) SetCountryID ¶
func (u *BankUpsert) SetCountryID(v uint64) *BankUpsert
SetCountryID sets the "country_id" field.
func (*BankUpsert) SetCreatedAt ¶
func (u *BankUpsert) SetCreatedAt(v time.Time) *BankUpsert
SetCreatedAt sets the "created_at" field.
func (*BankUpsert) SetDeletedAt ¶
func (u *BankUpsert) SetDeletedAt(v time.Time) *BankUpsert
SetDeletedAt sets the "deleted_at" field.
func (*BankUpsert) SetNameEn ¶
func (u *BankUpsert) SetNameEn(v string) *BankUpsert
SetNameEn sets the "name_en" field.
func (*BankUpsert) SetNameZh ¶
func (u *BankUpsert) SetNameZh(v string) *BankUpsert
SetNameZh sets the "name_zh" field.
func (*BankUpsert) SetUpdatedAt ¶
func (u *BankUpsert) SetUpdatedAt(v time.Time) *BankUpsert
SetUpdatedAt sets the "updated_at" field.
func (*BankUpsert) UpdateCountryID ¶
func (u *BankUpsert) UpdateCountryID() *BankUpsert
UpdateCountryID sets the "country_id" field to the value that was provided on create.
func (*BankUpsert) UpdateCreatedAt ¶
func (u *BankUpsert) UpdateCreatedAt() *BankUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*BankUpsert) UpdateDeletedAt ¶
func (u *BankUpsert) UpdateDeletedAt() *BankUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*BankUpsert) UpdateNameEn ¶
func (u *BankUpsert) UpdateNameEn() *BankUpsert
UpdateNameEn sets the "name_en" field to the value that was provided on create.
func (*BankUpsert) UpdateNameZh ¶
func (u *BankUpsert) UpdateNameZh() *BankUpsert
UpdateNameZh sets the "name_zh" field to the value that was provided on create.
func (*BankUpsert) UpdateUpdatedAt ¶
func (u *BankUpsert) UpdateUpdatedAt() *BankUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type BankUpsertBulk ¶
type BankUpsertBulk struct {
// contains filtered or unexported fields
}
BankUpsertBulk is the builder for "upsert"-ing a bulk of Bank nodes.
func (*BankUpsertBulk) ClearCountryID ¶
func (u *BankUpsertBulk) ClearCountryID() *BankUpsertBulk
ClearCountryID clears the value of the "country_id" field.
func (*BankUpsertBulk) ClearDeletedAt ¶
func (u *BankUpsertBulk) ClearDeletedAt() *BankUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BankUpsertBulk) DoNothing ¶
func (u *BankUpsertBulk) DoNothing() *BankUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*BankUpsertBulk) Exec ¶
func (u *BankUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BankUpsertBulk) ExecX ¶
func (u *BankUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BankUpsertBulk) Ignore ¶
func (u *BankUpsertBulk) Ignore() *BankUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Bank.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*BankUpsertBulk) SetCountryID ¶
func (u *BankUpsertBulk) SetCountryID(v uint64) *BankUpsertBulk
SetCountryID sets the "country_id" field.
func (*BankUpsertBulk) SetCreatedAt ¶
func (u *BankUpsertBulk) SetCreatedAt(v time.Time) *BankUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*BankUpsertBulk) SetDeletedAt ¶
func (u *BankUpsertBulk) SetDeletedAt(v time.Time) *BankUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*BankUpsertBulk) SetNameEn ¶
func (u *BankUpsertBulk) SetNameEn(v string) *BankUpsertBulk
SetNameEn sets the "name_en" field.
func (*BankUpsertBulk) SetNameZh ¶
func (u *BankUpsertBulk) SetNameZh(v string) *BankUpsertBulk
SetNameZh sets the "name_zh" field.
func (*BankUpsertBulk) SetUpdatedAt ¶
func (u *BankUpsertBulk) SetUpdatedAt(v time.Time) *BankUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*BankUpsertBulk) Update ¶
func (u *BankUpsertBulk) Update(set func(*BankUpsert)) *BankUpsertBulk
Update allows overriding fields `UPDATE` values. See the BankCreateBulk.OnConflict documentation for more info.
func (*BankUpsertBulk) UpdateCountryID ¶
func (u *BankUpsertBulk) UpdateCountryID() *BankUpsertBulk
UpdateCountryID sets the "country_id" field to the value that was provided on create.
func (*BankUpsertBulk) UpdateCreatedAt ¶
func (u *BankUpsertBulk) UpdateCreatedAt() *BankUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*BankUpsertBulk) UpdateDeletedAt ¶
func (u *BankUpsertBulk) UpdateDeletedAt() *BankUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*BankUpsertBulk) UpdateNameEn ¶
func (u *BankUpsertBulk) UpdateNameEn() *BankUpsertBulk
UpdateNameEn sets the "name_en" field to the value that was provided on create.
func (*BankUpsertBulk) UpdateNameZh ¶
func (u *BankUpsertBulk) UpdateNameZh() *BankUpsertBulk
UpdateNameZh sets the "name_zh" field to the value that was provided on create.
func (*BankUpsertBulk) UpdateNewValues ¶
func (u *BankUpsertBulk) UpdateNewValues() *BankUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Bank.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(bank.FieldID) }), ). Exec(ctx)
func (*BankUpsertBulk) UpdateUpdatedAt ¶
func (u *BankUpsertBulk) UpdateUpdatedAt() *BankUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type BankUpsertOne ¶
type BankUpsertOne struct {
// contains filtered or unexported fields
}
BankUpsertOne is the builder for "upsert"-ing
one Bank node.
func (*BankUpsertOne) ClearCountryID ¶
func (u *BankUpsertOne) ClearCountryID() *BankUpsertOne
ClearCountryID clears the value of the "country_id" field.
func (*BankUpsertOne) ClearDeletedAt ¶
func (u *BankUpsertOne) ClearDeletedAt() *BankUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*BankUpsertOne) DoNothing ¶
func (u *BankUpsertOne) DoNothing() *BankUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*BankUpsertOne) Exec ¶
func (u *BankUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*BankUpsertOne) ExecX ¶
func (u *BankUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BankUpsertOne) ID ¶
func (u *BankUpsertOne) ID(ctx context.Context) (id uint64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*BankUpsertOne) IDX ¶
func (u *BankUpsertOne) IDX(ctx context.Context) uint64
IDX is like ID, but panics if an error occurs.
func (*BankUpsertOne) Ignore ¶
func (u *BankUpsertOne) Ignore() *BankUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Bank.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*BankUpsertOne) SetCountryID ¶
func (u *BankUpsertOne) SetCountryID(v uint64) *BankUpsertOne
SetCountryID sets the "country_id" field.
func (*BankUpsertOne) SetCreatedAt ¶
func (u *BankUpsertOne) SetCreatedAt(v time.Time) *BankUpsertOne
SetCreatedAt sets the "created_at" field.
func (*BankUpsertOne) SetDeletedAt ¶
func (u *BankUpsertOne) SetDeletedAt(v time.Time) *BankUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*BankUpsertOne) SetNameEn ¶
func (u *BankUpsertOne) SetNameEn(v string) *BankUpsertOne
SetNameEn sets the "name_en" field.
func (*BankUpsertOne) SetNameZh ¶
func (u *BankUpsertOne) SetNameZh(v string) *BankUpsertOne
SetNameZh sets the "name_zh" field.
func (*BankUpsertOne) SetUpdatedAt ¶
func (u *BankUpsertOne) SetUpdatedAt(v time.Time) *BankUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*BankUpsertOne) Update ¶
func (u *BankUpsertOne) Update(set func(*BankUpsert)) *BankUpsertOne
Update allows overriding fields `UPDATE` values. See the BankCreate.OnConflict documentation for more info.
func (*BankUpsertOne) UpdateCountryID ¶
func (u *BankUpsertOne) UpdateCountryID() *BankUpsertOne
UpdateCountryID sets the "country_id" field to the value that was provided on create.
func (*BankUpsertOne) UpdateCreatedAt ¶
func (u *BankUpsertOne) UpdateCreatedAt() *BankUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*BankUpsertOne) UpdateDeletedAt ¶
func (u *BankUpsertOne) UpdateDeletedAt() *BankUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*BankUpsertOne) UpdateNameEn ¶
func (u *BankUpsertOne) UpdateNameEn() *BankUpsertOne
UpdateNameEn sets the "name_en" field to the value that was provided on create.
func (*BankUpsertOne) UpdateNameZh ¶
func (u *BankUpsertOne) UpdateNameZh() *BankUpsertOne
UpdateNameZh sets the "name_zh" field to the value that was provided on create.
func (*BankUpsertOne) UpdateNewValues ¶
func (u *BankUpsertOne) UpdateNewValues() *BankUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Bank.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(bank.FieldID) }), ). Exec(ctx)
func (*BankUpsertOne) UpdateUpdatedAt ¶
func (u *BankUpsertOne) UpdateUpdatedAt() *BankUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Admin is the client for interacting with the Admin builders. Admin *AdminClient // Bank is the client for interacting with the Bank builders. Bank *BankClient // Country is the client for interacting with the Country builders. Country *CountryClient // CountryLocation is the client for interacting with the CountryLocation builders. CountryLocation *CountryLocationClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Admin. Query(). Count(ctx)
func (*Client) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (*Client) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Country ¶
type Country struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // ISO 3166-1 alpha-2 country code Iso2 string `json:"iso2,omitempty"` // ISO 3166-1 alpha-3 country code Iso3 string `json:"iso3,omitempty"` // Country name Name string `json:"name,omitempty"` // Official country name OfficialName *string `json:"official_name,omitempty"` // ISO 3166-1 numeric code NumericCode *string `json:"numeric_code,omitempty"` // Country calling code, e.g., +1 for US PhoneCode *string `json:"phone_code,omitempty"` // Capital city of the country Capital *string `json:"capital,omitempty"` // Currency name CurrencyName *string `json:"currency_name,omitempty"` // ISO 4217 currency code CurrencyCode *string `json:"currency_code,omitempty"` // Currency symbol CurrencySymbol *string `json:"currency_symbol,omitempty"` // Conversion rate ConversionRate float64 `json:"conversion_rate,omitempty"` // Status Status uint8 `json:"status,omitempty"` // Record creation timestamp CreatedAt time.Time `json:"created_at,omitempty"` // Record update timestamp UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CountryQuery when eager-loading is set. Edges CountryEdges `json:"edges"` // contains filtered or unexported fields }
Country is the model entity for the Country schema.
func (*Country) ExecContext ¶
func (c *Country) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Country) QueryBanks ¶
QueryBanks queries the "banks" edge of the Country entity.
func (*Country) QueryContactUsers ¶
QueryContactUsers queries the "contact_users" edge of the Country entity.
func (*Country) QueryContext ¶
func (c *Country) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Country) QueryLocations ¶
func (c *Country) QueryLocations() *CountryLocationQuery
QueryLocations queries the "locations" edge of the Country entity.
func (*Country) QueryUsers ¶
QueryUsers queries the "users" edge of the Country entity.
func (*Country) Unwrap ¶
Unwrap unwraps the Country entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Country) Update ¶
func (c *Country) Update() *CountryUpdateOne
Update returns a builder for updating this Country. Note that you need to call Country.Unwrap() before calling this method if this Country was returned from a transaction, and the transaction was committed or rolled back.
type CountryClient ¶
type CountryClient struct {
// contains filtered or unexported fields
}
CountryClient is a client for the Country schema.
func NewCountryClient ¶
func NewCountryClient(c config) *CountryClient
NewCountryClient returns a client for the Country from the given config.
func (*CountryClient) Create ¶
func (c *CountryClient) Create() *CountryCreate
Create returns a builder for creating a Country entity.
func (*CountryClient) CreateBulk ¶
func (c *CountryClient) CreateBulk(builders ...*CountryCreate) *CountryCreateBulk
CreateBulk returns a builder for creating a bulk of Country entities.
func (*CountryClient) Delete ¶
func (c *CountryClient) Delete() *CountryDelete
Delete returns a delete builder for Country.
func (*CountryClient) DeleteOne ¶
func (c *CountryClient) DeleteOne(co *Country) *CountryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CountryClient) DeleteOneID ¶
func (c *CountryClient) DeleteOneID(id uint64) *CountryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CountryClient) ExecContext ¶
func (c *CountryClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryClient) GetX ¶
func (c *CountryClient) GetX(ctx context.Context, id uint64) *Country
GetX is like Get, but panics if an error occurs.
func (*CountryClient) Hooks ¶
func (c *CountryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CountryClient) Intercept ¶
func (c *CountryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `country.Intercept(f(g(h())))`.
func (*CountryClient) Interceptors ¶
func (c *CountryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CountryClient) MapCreateBulk ¶
func (c *CountryClient) MapCreateBulk(slice any, setFunc func(*CountryCreate, int)) *CountryCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CountryClient) Query ¶
func (c *CountryClient) Query() *CountryQuery
Query returns a query builder for Country.
func (*CountryClient) QueryBanks ¶
func (c *CountryClient) QueryBanks(co *Country) *BankQuery
QueryBanks queries the banks edge of a Country.
func (*CountryClient) QueryContactUsers ¶
func (c *CountryClient) QueryContactUsers(co *Country) *UserQuery
QueryContactUsers queries the contact_users edge of a Country.
func (*CountryClient) QueryContext ¶
func (c *CountryClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryClient) QueryLocations ¶
func (c *CountryClient) QueryLocations(co *Country) *CountryLocationQuery
QueryLocations queries the locations edge of a Country.
func (*CountryClient) QueryUsers ¶
func (c *CountryClient) QueryUsers(co *Country) *UserQuery
QueryUsers queries the users edge of a Country.
func (*CountryClient) Update ¶
func (c *CountryClient) Update() *CountryUpdate
Update returns an update builder for Country.
func (*CountryClient) UpdateOne ¶
func (c *CountryClient) UpdateOne(co *Country) *CountryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CountryClient) UpdateOneID ¶
func (c *CountryClient) UpdateOneID(id uint64) *CountryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CountryClient) Use ¶
func (c *CountryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `country.Hooks(f(g(h())))`.
type CountryCreate ¶
type CountryCreate struct {
// contains filtered or unexported fields
}
CountryCreate is the builder for creating a Country entity.
func (*CountryCreate) AddBankIDs ¶
func (cc *CountryCreate) AddBankIDs(ids ...uint64) *CountryCreate
AddBankIDs adds the "banks" edge to the Bank entity by IDs.
func (*CountryCreate) AddBanks ¶
func (cc *CountryCreate) AddBanks(b ...*Bank) *CountryCreate
AddBanks adds the "banks" edges to the Bank entity.
func (*CountryCreate) AddContactUserIDs ¶
func (cc *CountryCreate) AddContactUserIDs(ids ...uint64) *CountryCreate
AddContactUserIDs adds the "contact_users" edge to the User entity by IDs.
func (*CountryCreate) AddContactUsers ¶
func (cc *CountryCreate) AddContactUsers(u ...*User) *CountryCreate
AddContactUsers adds the "contact_users" edges to the User entity.
func (*CountryCreate) AddLocationIDs ¶
func (cc *CountryCreate) AddLocationIDs(ids ...uint64) *CountryCreate
AddLocationIDs adds the "locations" edge to the CountryLocation entity by IDs.
func (*CountryCreate) AddLocations ¶
func (cc *CountryCreate) AddLocations(c ...*CountryLocation) *CountryCreate
AddLocations adds the "locations" edges to the CountryLocation entity.
func (*CountryCreate) AddUserIDs ¶
func (cc *CountryCreate) AddUserIDs(ids ...uint64) *CountryCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*CountryCreate) AddUsers ¶
func (cc *CountryCreate) AddUsers(u ...*User) *CountryCreate
AddUsers adds the "users" edges to the User entity.
func (*CountryCreate) Exec ¶
func (cc *CountryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryCreate) ExecContext ¶
func (c *CountryCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryCreate) ExecX ¶
func (cc *CountryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryCreate) Mutation ¶
func (cc *CountryCreate) Mutation() *CountryMutation
Mutation returns the CountryMutation object of the builder.
func (*CountryCreate) OnConflict ¶
func (cc *CountryCreate) OnConflict(opts ...sql.ConflictOption) *CountryUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Country.Create(). SetIso2(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.CountryUpsert) { SetIso2(v+v). }). Exec(ctx)
func (*CountryCreate) OnConflictColumns ¶
func (cc *CountryCreate) OnConflictColumns(columns ...string) *CountryUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Country.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CountryCreate) QueryContext ¶
func (c *CountryCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryCreate) Save ¶
func (cc *CountryCreate) Save(ctx context.Context) (*Country, error)
Save creates the Country in the database.
func (*CountryCreate) SaveX ¶
func (cc *CountryCreate) SaveX(ctx context.Context) *Country
SaveX calls Save and panics if Save returns an error.
func (*CountryCreate) SetCapital ¶
func (cc *CountryCreate) SetCapital(s string) *CountryCreate
SetCapital sets the "capital" field.
func (*CountryCreate) SetConversionRate ¶
func (cc *CountryCreate) SetConversionRate(f float64) *CountryCreate
SetConversionRate sets the "conversion_rate" field.
func (*CountryCreate) SetCreatedAt ¶
func (cc *CountryCreate) SetCreatedAt(t time.Time) *CountryCreate
SetCreatedAt sets the "created_at" field.
func (*CountryCreate) SetCurrencyCode ¶
func (cc *CountryCreate) SetCurrencyCode(s string) *CountryCreate
SetCurrencyCode sets the "currency_code" field.
func (*CountryCreate) SetCurrencyName ¶
func (cc *CountryCreate) SetCurrencyName(s string) *CountryCreate
SetCurrencyName sets the "currency_name" field.
func (*CountryCreate) SetCurrencySymbol ¶
func (cc *CountryCreate) SetCurrencySymbol(s string) *CountryCreate
SetCurrencySymbol sets the "currency_symbol" field.
func (*CountryCreate) SetID ¶
func (cc *CountryCreate) SetID(u uint64) *CountryCreate
SetID sets the "id" field.
func (*CountryCreate) SetIso2 ¶
func (cc *CountryCreate) SetIso2(s string) *CountryCreate
SetIso2 sets the "iso2" field.
func (*CountryCreate) SetIso3 ¶
func (cc *CountryCreate) SetIso3(s string) *CountryCreate
SetIso3 sets the "iso3" field.
func (*CountryCreate) SetName ¶
func (cc *CountryCreate) SetName(s string) *CountryCreate
SetName sets the "name" field.
func (*CountryCreate) SetNillableCapital ¶
func (cc *CountryCreate) SetNillableCapital(s *string) *CountryCreate
SetNillableCapital sets the "capital" field if the given value is not nil.
func (*CountryCreate) SetNillableConversionRate ¶
func (cc *CountryCreate) SetNillableConversionRate(f *float64) *CountryCreate
SetNillableConversionRate sets the "conversion_rate" field if the given value is not nil.
func (*CountryCreate) SetNillableCreatedAt ¶
func (cc *CountryCreate) SetNillableCreatedAt(t *time.Time) *CountryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CountryCreate) SetNillableCurrencyCode ¶
func (cc *CountryCreate) SetNillableCurrencyCode(s *string) *CountryCreate
SetNillableCurrencyCode sets the "currency_code" field if the given value is not nil.
func (*CountryCreate) SetNillableCurrencyName ¶
func (cc *CountryCreate) SetNillableCurrencyName(s *string) *CountryCreate
SetNillableCurrencyName sets the "currency_name" field if the given value is not nil.
func (*CountryCreate) SetNillableCurrencySymbol ¶
func (cc *CountryCreate) SetNillableCurrencySymbol(s *string) *CountryCreate
SetNillableCurrencySymbol sets the "currency_symbol" field if the given value is not nil.
func (*CountryCreate) SetNillableNumericCode ¶
func (cc *CountryCreate) SetNillableNumericCode(s *string) *CountryCreate
SetNillableNumericCode sets the "numeric_code" field if the given value is not nil.
func (*CountryCreate) SetNillableOfficialName ¶
func (cc *CountryCreate) SetNillableOfficialName(s *string) *CountryCreate
SetNillableOfficialName sets the "official_name" field if the given value is not nil.
func (*CountryCreate) SetNillablePhoneCode ¶
func (cc *CountryCreate) SetNillablePhoneCode(s *string) *CountryCreate
SetNillablePhoneCode sets the "phone_code" field if the given value is not nil.
func (*CountryCreate) SetNillableStatus ¶
func (cc *CountryCreate) SetNillableStatus(u *uint8) *CountryCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CountryCreate) SetNillableUpdatedAt ¶
func (cc *CountryCreate) SetNillableUpdatedAt(t *time.Time) *CountryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CountryCreate) SetNumericCode ¶
func (cc *CountryCreate) SetNumericCode(s string) *CountryCreate
SetNumericCode sets the "numeric_code" field.
func (*CountryCreate) SetOfficialName ¶
func (cc *CountryCreate) SetOfficialName(s string) *CountryCreate
SetOfficialName sets the "official_name" field.
func (*CountryCreate) SetPhoneCode ¶
func (cc *CountryCreate) SetPhoneCode(s string) *CountryCreate
SetPhoneCode sets the "phone_code" field.
func (*CountryCreate) SetStatus ¶
func (cc *CountryCreate) SetStatus(u uint8) *CountryCreate
SetStatus sets the "status" field.
func (*CountryCreate) SetUpdatedAt ¶
func (cc *CountryCreate) SetUpdatedAt(t time.Time) *CountryCreate
SetUpdatedAt sets the "updated_at" field.
type CountryCreateBulk ¶
type CountryCreateBulk struct {
// contains filtered or unexported fields
}
CountryCreateBulk is the builder for creating many Country entities in bulk.
func (*CountryCreateBulk) Exec ¶
func (ccb *CountryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryCreateBulk) ExecContext ¶
func (c *CountryCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryCreateBulk) ExecX ¶
func (ccb *CountryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryCreateBulk) OnConflict ¶
func (ccb *CountryCreateBulk) OnConflict(opts ...sql.ConflictOption) *CountryUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Country.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.CountryUpsert) { SetIso2(v+v). }). Exec(ctx)
func (*CountryCreateBulk) OnConflictColumns ¶
func (ccb *CountryCreateBulk) OnConflictColumns(columns ...string) *CountryUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Country.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CountryCreateBulk) QueryContext ¶
func (c *CountryCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type CountryDelete ¶
type CountryDelete struct {
// contains filtered or unexported fields
}
CountryDelete is the builder for deleting a Country entity.
func (*CountryDelete) Exec ¶
func (cd *CountryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CountryDelete) ExecContext ¶
func (c *CountryDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryDelete) ExecX ¶
func (cd *CountryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CountryDelete) QueryContext ¶
func (c *CountryDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryDelete) Where ¶
func (cd *CountryDelete) Where(ps ...predicate.Country) *CountryDelete
Where appends a list predicates to the CountryDelete builder.
type CountryDeleteOne ¶
type CountryDeleteOne struct {
// contains filtered or unexported fields
}
CountryDeleteOne is the builder for deleting a single Country entity.
func (*CountryDeleteOne) Exec ¶
func (cdo *CountryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CountryDeleteOne) ExecX ¶
func (cdo *CountryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryDeleteOne) Where ¶
func (cdo *CountryDeleteOne) Where(ps ...predicate.Country) *CountryDeleteOne
Where appends a list predicates to the CountryDelete builder.
type CountryEdges ¶
type CountryEdges struct { // Locations belonging to the country Locations []*CountryLocation `json:"locations,omitempty"` // Banks belonging to the country Banks []*Bank `json:"banks,omitempty"` // Users belonging to the country Users []*User `json:"users,omitempty"` // Contact country Users belonging to the country ContactUsers []*User `json:"contact_users,omitempty"` // contains filtered or unexported fields }
CountryEdges holds the relations/edges for other nodes in the graph.
func (CountryEdges) BanksOrErr ¶
func (e CountryEdges) BanksOrErr() ([]*Bank, error)
BanksOrErr returns the Banks value or an error if the edge was not loaded in eager-loading.
func (CountryEdges) ContactUsersOrErr ¶
func (e CountryEdges) ContactUsersOrErr() ([]*User, error)
ContactUsersOrErr returns the ContactUsers value or an error if the edge was not loaded in eager-loading.
func (CountryEdges) LocationsOrErr ¶
func (e CountryEdges) LocationsOrErr() ([]*CountryLocation, error)
LocationsOrErr returns the Locations value or an error if the edge was not loaded in eager-loading.
func (CountryEdges) UsersOrErr ¶
func (e CountryEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type CountryGroupBy ¶
type CountryGroupBy struct {
// contains filtered or unexported fields
}
CountryGroupBy is the group-by builder for Country entities.
func (*CountryGroupBy) Aggregate ¶
func (cgb *CountryGroupBy) Aggregate(fns ...AggregateFunc) *CountryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CountryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CountryGroupBy) Scan ¶
func (cgb *CountryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CountryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CountryLocation ¶
type CountryLocation struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Country of the location CountryID *uint64 `json:"country_id,omitempty"` // If present, it is area; this is state id ParentID *uint64 `json:"parent_id,omitempty"` // Sorting order Sorting uint64 `json:"sorting,omitempty"` // Location name in English NameEn string `json:"name_en,omitempty"` // Location name in Chinese NameZh string `json:"name_zh,omitempty"` // Record creation timestamp CreatedAt time.Time `json:"created_at,omitempty"` // Record update timestamp UpdatedAt time.Time `json:"updated_at,omitempty"` // Record deletion timestamp DeletedAt *time.Time `json:"deleted_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the CountryLocationQuery when eager-loading is set. Edges CountryLocationEdges `json:"edges"` // contains filtered or unexported fields }
CountryLocation is the model entity for the CountryLocation schema.
func (*CountryLocation) ExecContext ¶
func (c *CountryLocation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryLocation) QueryChildLocations ¶
func (cl *CountryLocation) QueryChildLocations() *CountryLocationQuery
QueryChildLocations queries the "child_locations" edge of the CountryLocation entity.
func (*CountryLocation) QueryContext ¶
func (c *CountryLocation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryLocation) QueryCountry ¶
func (cl *CountryLocation) QueryCountry() *CountryQuery
QueryCountry queries the "country" edge of the CountryLocation entity.
func (*CountryLocation) QueryParent ¶
func (cl *CountryLocation) QueryParent() *CountryLocationQuery
QueryParent queries the "parent" edge of the CountryLocation entity.
func (*CountryLocation) String ¶
func (cl *CountryLocation) String() string
String implements the fmt.Stringer.
func (*CountryLocation) Unwrap ¶
func (cl *CountryLocation) Unwrap() *CountryLocation
Unwrap unwraps the CountryLocation entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*CountryLocation) Update ¶
func (cl *CountryLocation) Update() *CountryLocationUpdateOne
Update returns a builder for updating this CountryLocation. Note that you need to call CountryLocation.Unwrap() before calling this method if this CountryLocation was returned from a transaction, and the transaction was committed or rolled back.
type CountryLocationClient ¶
type CountryLocationClient struct {
// contains filtered or unexported fields
}
CountryLocationClient is a client for the CountryLocation schema.
func NewCountryLocationClient ¶
func NewCountryLocationClient(c config) *CountryLocationClient
NewCountryLocationClient returns a client for the CountryLocation from the given config.
func (*CountryLocationClient) Create ¶
func (c *CountryLocationClient) Create() *CountryLocationCreate
Create returns a builder for creating a CountryLocation entity.
func (*CountryLocationClient) CreateBulk ¶
func (c *CountryLocationClient) CreateBulk(builders ...*CountryLocationCreate) *CountryLocationCreateBulk
CreateBulk returns a builder for creating a bulk of CountryLocation entities.
func (*CountryLocationClient) Delete ¶
func (c *CountryLocationClient) Delete() *CountryLocationDelete
Delete returns a delete builder for CountryLocation.
func (*CountryLocationClient) DeleteOne ¶
func (c *CountryLocationClient) DeleteOne(cl *CountryLocation) *CountryLocationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CountryLocationClient) DeleteOneID ¶
func (c *CountryLocationClient) DeleteOneID(id uint64) *CountryLocationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CountryLocationClient) ExecContext ¶
func (c *CountryLocationClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryLocationClient) Get ¶
func (c *CountryLocationClient) Get(ctx context.Context, id uint64) (*CountryLocation, error)
Get returns a CountryLocation entity by its id.
func (*CountryLocationClient) GetX ¶
func (c *CountryLocationClient) GetX(ctx context.Context, id uint64) *CountryLocation
GetX is like Get, but panics if an error occurs.
func (*CountryLocationClient) Hooks ¶
func (c *CountryLocationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CountryLocationClient) Intercept ¶
func (c *CountryLocationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `countrylocation.Intercept(f(g(h())))`.
func (*CountryLocationClient) Interceptors ¶
func (c *CountryLocationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CountryLocationClient) MapCreateBulk ¶
func (c *CountryLocationClient) MapCreateBulk(slice any, setFunc func(*CountryLocationCreate, int)) *CountryLocationCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CountryLocationClient) Query ¶
func (c *CountryLocationClient) Query() *CountryLocationQuery
Query returns a query builder for CountryLocation.
func (*CountryLocationClient) QueryChildLocations ¶
func (c *CountryLocationClient) QueryChildLocations(cl *CountryLocation) *CountryLocationQuery
QueryChildLocations queries the child_locations edge of a CountryLocation.
func (*CountryLocationClient) QueryContext ¶
func (c *CountryLocationClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryLocationClient) QueryCountry ¶
func (c *CountryLocationClient) QueryCountry(cl *CountryLocation) *CountryQuery
QueryCountry queries the country edge of a CountryLocation.
func (*CountryLocationClient) QueryParent ¶
func (c *CountryLocationClient) QueryParent(cl *CountryLocation) *CountryLocationQuery
QueryParent queries the parent edge of a CountryLocation.
func (*CountryLocationClient) Update ¶
func (c *CountryLocationClient) Update() *CountryLocationUpdate
Update returns an update builder for CountryLocation.
func (*CountryLocationClient) UpdateOne ¶
func (c *CountryLocationClient) UpdateOne(cl *CountryLocation) *CountryLocationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CountryLocationClient) UpdateOneID ¶
func (c *CountryLocationClient) UpdateOneID(id uint64) *CountryLocationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CountryLocationClient) Use ¶
func (c *CountryLocationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `countrylocation.Hooks(f(g(h())))`.
type CountryLocationCreate ¶
type CountryLocationCreate struct {
// contains filtered or unexported fields
}
CountryLocationCreate is the builder for creating a CountryLocation entity.
func (*CountryLocationCreate) AddChildLocationIDs ¶
func (clc *CountryLocationCreate) AddChildLocationIDs(ids ...uint64) *CountryLocationCreate
AddChildLocationIDs adds the "child_locations" edge to the CountryLocation entity by IDs.
func (*CountryLocationCreate) AddChildLocations ¶
func (clc *CountryLocationCreate) AddChildLocations(c ...*CountryLocation) *CountryLocationCreate
AddChildLocations adds the "child_locations" edges to the CountryLocation entity.
func (*CountryLocationCreate) Exec ¶
func (clc *CountryLocationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryLocationCreate) ExecContext ¶
func (c *CountryLocationCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryLocationCreate) ExecX ¶
func (clc *CountryLocationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryLocationCreate) Mutation ¶
func (clc *CountryLocationCreate) Mutation() *CountryLocationMutation
Mutation returns the CountryLocationMutation object of the builder.
func (*CountryLocationCreate) OnConflict ¶
func (clc *CountryLocationCreate) OnConflict(opts ...sql.ConflictOption) *CountryLocationUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.CountryLocation.Create(). SetCountryID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.CountryLocationUpsert) { SetCountryID(v+v). }). Exec(ctx)
func (*CountryLocationCreate) OnConflictColumns ¶
func (clc *CountryLocationCreate) OnConflictColumns(columns ...string) *CountryLocationUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.CountryLocation.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CountryLocationCreate) QueryContext ¶
func (c *CountryLocationCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryLocationCreate) Save ¶
func (clc *CountryLocationCreate) Save(ctx context.Context) (*CountryLocation, error)
Save creates the CountryLocation in the database.
func (*CountryLocationCreate) SaveX ¶
func (clc *CountryLocationCreate) SaveX(ctx context.Context) *CountryLocation
SaveX calls Save and panics if Save returns an error.
func (*CountryLocationCreate) SetCountry ¶
func (clc *CountryLocationCreate) SetCountry(c *Country) *CountryLocationCreate
SetCountry sets the "country" edge to the Country entity.
func (*CountryLocationCreate) SetCountryID ¶
func (clc *CountryLocationCreate) SetCountryID(u uint64) *CountryLocationCreate
SetCountryID sets the "country_id" field.
func (*CountryLocationCreate) SetCreatedAt ¶
func (clc *CountryLocationCreate) SetCreatedAt(t time.Time) *CountryLocationCreate
SetCreatedAt sets the "created_at" field.
func (*CountryLocationCreate) SetDeletedAt ¶
func (clc *CountryLocationCreate) SetDeletedAt(t time.Time) *CountryLocationCreate
SetDeletedAt sets the "deleted_at" field.
func (*CountryLocationCreate) SetID ¶
func (clc *CountryLocationCreate) SetID(u uint64) *CountryLocationCreate
SetID sets the "id" field.
func (*CountryLocationCreate) SetNameEn ¶
func (clc *CountryLocationCreate) SetNameEn(s string) *CountryLocationCreate
SetNameEn sets the "name_en" field.
func (*CountryLocationCreate) SetNameZh ¶
func (clc *CountryLocationCreate) SetNameZh(s string) *CountryLocationCreate
SetNameZh sets the "name_zh" field.
func (*CountryLocationCreate) SetNillableCountryID ¶
func (clc *CountryLocationCreate) SetNillableCountryID(u *uint64) *CountryLocationCreate
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*CountryLocationCreate) SetNillableCreatedAt ¶
func (clc *CountryLocationCreate) SetNillableCreatedAt(t *time.Time) *CountryLocationCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CountryLocationCreate) SetNillableDeletedAt ¶
func (clc *CountryLocationCreate) SetNillableDeletedAt(t *time.Time) *CountryLocationCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CountryLocationCreate) SetNillableParentID ¶
func (clc *CountryLocationCreate) SetNillableParentID(u *uint64) *CountryLocationCreate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*CountryLocationCreate) SetNillableSorting ¶
func (clc *CountryLocationCreate) SetNillableSorting(u *uint64) *CountryLocationCreate
SetNillableSorting sets the "sorting" field if the given value is not nil.
func (*CountryLocationCreate) SetNillableUpdatedAt ¶
func (clc *CountryLocationCreate) SetNillableUpdatedAt(t *time.Time) *CountryLocationCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*CountryLocationCreate) SetParent ¶
func (clc *CountryLocationCreate) SetParent(c *CountryLocation) *CountryLocationCreate
SetParent sets the "parent" edge to the CountryLocation entity.
func (*CountryLocationCreate) SetParentID ¶
func (clc *CountryLocationCreate) SetParentID(u uint64) *CountryLocationCreate
SetParentID sets the "parent_id" field.
func (*CountryLocationCreate) SetSorting ¶
func (clc *CountryLocationCreate) SetSorting(u uint64) *CountryLocationCreate
SetSorting sets the "sorting" field.
func (*CountryLocationCreate) SetUpdatedAt ¶
func (clc *CountryLocationCreate) SetUpdatedAt(t time.Time) *CountryLocationCreate
SetUpdatedAt sets the "updated_at" field.
type CountryLocationCreateBulk ¶
type CountryLocationCreateBulk struct {
// contains filtered or unexported fields
}
CountryLocationCreateBulk is the builder for creating many CountryLocation entities in bulk.
func (*CountryLocationCreateBulk) Exec ¶
func (clcb *CountryLocationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryLocationCreateBulk) ExecContext ¶
func (c *CountryLocationCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryLocationCreateBulk) ExecX ¶
func (clcb *CountryLocationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryLocationCreateBulk) OnConflict ¶
func (clcb *CountryLocationCreateBulk) OnConflict(opts ...sql.ConflictOption) *CountryLocationUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.CountryLocation.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.CountryLocationUpsert) { SetCountryID(v+v). }). Exec(ctx)
func (*CountryLocationCreateBulk) OnConflictColumns ¶
func (clcb *CountryLocationCreateBulk) OnConflictColumns(columns ...string) *CountryLocationUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.CountryLocation.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CountryLocationCreateBulk) QueryContext ¶
func (c *CountryLocationCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryLocationCreateBulk) Save ¶
func (clcb *CountryLocationCreateBulk) Save(ctx context.Context) ([]*CountryLocation, error)
Save creates the CountryLocation entities in the database.
func (*CountryLocationCreateBulk) SaveX ¶
func (clcb *CountryLocationCreateBulk) SaveX(ctx context.Context) []*CountryLocation
SaveX is like Save, but panics if an error occurs.
type CountryLocationDelete ¶
type CountryLocationDelete struct {
// contains filtered or unexported fields
}
CountryLocationDelete is the builder for deleting a CountryLocation entity.
func (*CountryLocationDelete) Exec ¶
func (cld *CountryLocationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CountryLocationDelete) ExecContext ¶
func (c *CountryLocationDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryLocationDelete) ExecX ¶
func (cld *CountryLocationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CountryLocationDelete) QueryContext ¶
func (c *CountryLocationDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryLocationDelete) Where ¶
func (cld *CountryLocationDelete) Where(ps ...predicate.CountryLocation) *CountryLocationDelete
Where appends a list predicates to the CountryLocationDelete builder.
type CountryLocationDeleteOne ¶
type CountryLocationDeleteOne struct {
// contains filtered or unexported fields
}
CountryLocationDeleteOne is the builder for deleting a single CountryLocation entity.
func (*CountryLocationDeleteOne) Exec ¶
func (cldo *CountryLocationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CountryLocationDeleteOne) ExecX ¶
func (cldo *CountryLocationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryLocationDeleteOne) Where ¶
func (cldo *CountryLocationDeleteOne) Where(ps ...predicate.CountryLocation) *CountryLocationDeleteOne
Where appends a list predicates to the CountryLocationDelete builder.
type CountryLocationEdges ¶
type CountryLocationEdges struct { // Country of the location Country *Country `json:"country,omitempty"` // Parent location (e.g., state of an area) Parent *CountryLocation `json:"parent,omitempty"` // Child locations of this parent ChildLocations []*CountryLocation `json:"child_locations,omitempty"` // contains filtered or unexported fields }
CountryLocationEdges holds the relations/edges for other nodes in the graph.
func (CountryLocationEdges) ChildLocationsOrErr ¶
func (e CountryLocationEdges) ChildLocationsOrErr() ([]*CountryLocation, error)
ChildLocationsOrErr returns the ChildLocations value or an error if the edge was not loaded in eager-loading.
func (CountryLocationEdges) CountryOrErr ¶
func (e CountryLocationEdges) CountryOrErr() (*Country, error)
CountryOrErr returns the Country value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (CountryLocationEdges) ParentOrErr ¶
func (e CountryLocationEdges) ParentOrErr() (*CountryLocation, error)
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type CountryLocationGroupBy ¶
type CountryLocationGroupBy struct {
// contains filtered or unexported fields
}
CountryLocationGroupBy is the group-by builder for CountryLocation entities.
func (*CountryLocationGroupBy) Aggregate ¶
func (clgb *CountryLocationGroupBy) Aggregate(fns ...AggregateFunc) *CountryLocationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CountryLocationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CountryLocationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CountryLocationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CountryLocationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CountryLocationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*CountryLocationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CountryLocationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CountryLocationGroupBy) Scan ¶
func (clgb *CountryLocationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CountryLocationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CountryLocationMutation ¶
type CountryLocationMutation struct {
// contains filtered or unexported fields
}
CountryLocationMutation represents an operation that mutates the CountryLocation nodes in the graph.
func (*CountryLocationMutation) AddChildLocationIDs ¶
func (m *CountryLocationMutation) AddChildLocationIDs(ids ...uint64)
AddChildLocationIDs adds the "child_locations" edge to the CountryLocation entity by ids.
func (*CountryLocationMutation) AddField ¶
func (m *CountryLocationMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*CountryLocationMutation) AddSorting ¶
func (m *CountryLocationMutation) AddSorting(u int64)
AddSorting adds u to the "sorting" field.
func (*CountryLocationMutation) AddedEdges ¶
func (m *CountryLocationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CountryLocationMutation) AddedField ¶
func (m *CountryLocationMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*CountryLocationMutation) AddedFields ¶
func (m *CountryLocationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CountryLocationMutation) AddedIDs ¶
func (m *CountryLocationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CountryLocationMutation) AddedSorting ¶
func (m *CountryLocationMutation) AddedSorting() (r int64, exists bool)
AddedSorting returns the value that was added to the "sorting" field in this mutation.
func (*CountryLocationMutation) ChildLocationsCleared ¶
func (m *CountryLocationMutation) ChildLocationsCleared() bool
ChildLocationsCleared reports if the "child_locations" edge to the CountryLocation entity was cleared.
func (*CountryLocationMutation) ChildLocationsIDs ¶
func (m *CountryLocationMutation) ChildLocationsIDs() (ids []uint64)
ChildLocationsIDs returns the "child_locations" edge IDs in the mutation.
func (*CountryLocationMutation) ClearChildLocations ¶
func (m *CountryLocationMutation) ClearChildLocations()
ClearChildLocations clears the "child_locations" edge to the CountryLocation entity.
func (*CountryLocationMutation) ClearCountry ¶
func (m *CountryLocationMutation) ClearCountry()
ClearCountry clears the "country" edge to the Country entity.
func (*CountryLocationMutation) ClearCountryID ¶
func (m *CountryLocationMutation) ClearCountryID()
ClearCountryID clears the value of the "country_id" field.
func (*CountryLocationMutation) ClearDeletedAt ¶
func (m *CountryLocationMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CountryLocationMutation) ClearEdge ¶
func (m *CountryLocationMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*CountryLocationMutation) ClearField ¶
func (m *CountryLocationMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*CountryLocationMutation) ClearParent ¶
func (m *CountryLocationMutation) ClearParent()
ClearParent clears the "parent" edge to the CountryLocation entity.
func (*CountryLocationMutation) ClearParentID ¶
func (m *CountryLocationMutation) ClearParentID()
ClearParentID clears the value of the "parent_id" field.
func (*CountryLocationMutation) ClearedEdges ¶
func (m *CountryLocationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CountryLocationMutation) ClearedFields ¶
func (m *CountryLocationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CountryLocationMutation) Client ¶
func (m CountryLocationMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*CountryLocationMutation) CountryCleared ¶
func (m *CountryLocationMutation) CountryCleared() bool
CountryCleared reports if the "country" edge to the Country entity was cleared.
func (*CountryLocationMutation) CountryID ¶
func (m *CountryLocationMutation) CountryID() (r uint64, exists bool)
CountryID returns the value of the "country_id" field in the mutation.
func (*CountryLocationMutation) CountryIDCleared ¶
func (m *CountryLocationMutation) CountryIDCleared() bool
CountryIDCleared returns if the "country_id" field was cleared in this mutation.
func (*CountryLocationMutation) CountryIDs ¶
func (m *CountryLocationMutation) CountryIDs() (ids []uint64)
CountryIDs returns the "country" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CountryID instead. It exists only for internal usage by the builders.
func (*CountryLocationMutation) CreatedAt ¶
func (m *CountryLocationMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CountryLocationMutation) DeletedAt ¶
func (m *CountryLocationMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*CountryLocationMutation) DeletedAtCleared ¶
func (m *CountryLocationMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*CountryLocationMutation) EdgeCleared ¶
func (m *CountryLocationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CountryLocationMutation) ExecContext ¶
func (c *CountryLocationMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryLocationMutation) Field ¶
func (m *CountryLocationMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*CountryLocationMutation) FieldCleared ¶
func (m *CountryLocationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CountryLocationMutation) Fields ¶
func (m *CountryLocationMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*CountryLocationMutation) ID ¶
func (m *CountryLocationMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CountryLocationMutation) IDs ¶
func (m *CountryLocationMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CountryLocationMutation) NameEn ¶
func (m *CountryLocationMutation) NameEn() (r string, exists bool)
NameEn returns the value of the "name_en" field in the mutation.
func (*CountryLocationMutation) NameZh ¶
func (m *CountryLocationMutation) NameZh() (r string, exists bool)
NameZh returns the value of the "name_zh" field in the mutation.
func (*CountryLocationMutation) OldCountryID ¶
func (m *CountryLocationMutation) OldCountryID(ctx context.Context) (v *uint64, err error)
OldCountryID returns the old "country_id" field's value of the CountryLocation entity. If the CountryLocation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryLocationMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the CountryLocation entity. If the CountryLocation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryLocationMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the CountryLocation entity. If the CountryLocation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryLocationMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*CountryLocationMutation) OldNameEn ¶
func (m *CountryLocationMutation) OldNameEn(ctx context.Context) (v string, err error)
OldNameEn returns the old "name_en" field's value of the CountryLocation entity. If the CountryLocation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryLocationMutation) OldNameZh ¶
func (m *CountryLocationMutation) OldNameZh(ctx context.Context) (v string, err error)
OldNameZh returns the old "name_zh" field's value of the CountryLocation entity. If the CountryLocation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryLocationMutation) OldParentID ¶
func (m *CountryLocationMutation) OldParentID(ctx context.Context) (v *uint64, err error)
OldParentID returns the old "parent_id" field's value of the CountryLocation entity. If the CountryLocation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryLocationMutation) OldSorting ¶
func (m *CountryLocationMutation) OldSorting(ctx context.Context) (v uint64, err error)
OldSorting returns the old "sorting" field's value of the CountryLocation entity. If the CountryLocation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryLocationMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the CountryLocation entity. If the CountryLocation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryLocationMutation) Op ¶
func (m *CountryLocationMutation) Op() Op
Op returns the operation name.
func (*CountryLocationMutation) ParentCleared ¶
func (m *CountryLocationMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the CountryLocation entity was cleared.
func (*CountryLocationMutation) ParentID ¶
func (m *CountryLocationMutation) ParentID() (r uint64, exists bool)
ParentID returns the value of the "parent_id" field in the mutation.
func (*CountryLocationMutation) ParentIDCleared ¶
func (m *CountryLocationMutation) ParentIDCleared() bool
ParentIDCleared returns if the "parent_id" field was cleared in this mutation.
func (*CountryLocationMutation) ParentIDs ¶
func (m *CountryLocationMutation) ParentIDs() (ids []uint64)
ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.
func (*CountryLocationMutation) QueryContext ¶
func (c *CountryLocationMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryLocationMutation) RemoveChildLocationIDs ¶
func (m *CountryLocationMutation) RemoveChildLocationIDs(ids ...uint64)
RemoveChildLocationIDs removes the "child_locations" edge to the CountryLocation entity by IDs.
func (*CountryLocationMutation) RemovedChildLocationsIDs ¶
func (m *CountryLocationMutation) RemovedChildLocationsIDs() (ids []uint64)
RemovedChildLocations returns the removed IDs of the "child_locations" edge to the CountryLocation entity.
func (*CountryLocationMutation) RemovedEdges ¶
func (m *CountryLocationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CountryLocationMutation) RemovedIDs ¶
func (m *CountryLocationMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*CountryLocationMutation) ResetChildLocations ¶
func (m *CountryLocationMutation) ResetChildLocations()
ResetChildLocations resets all changes to the "child_locations" edge.
func (*CountryLocationMutation) ResetCountry ¶
func (m *CountryLocationMutation) ResetCountry()
ResetCountry resets all changes to the "country" edge.
func (*CountryLocationMutation) ResetCountryID ¶
func (m *CountryLocationMutation) ResetCountryID()
ResetCountryID resets all changes to the "country_id" field.
func (*CountryLocationMutation) ResetCreatedAt ¶
func (m *CountryLocationMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CountryLocationMutation) ResetDeletedAt ¶
func (m *CountryLocationMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*CountryLocationMutation) ResetEdge ¶
func (m *CountryLocationMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*CountryLocationMutation) ResetField ¶
func (m *CountryLocationMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*CountryLocationMutation) ResetNameEn ¶
func (m *CountryLocationMutation) ResetNameEn()
ResetNameEn resets all changes to the "name_en" field.
func (*CountryLocationMutation) ResetNameZh ¶
func (m *CountryLocationMutation) ResetNameZh()
ResetNameZh resets all changes to the "name_zh" field.
func (*CountryLocationMutation) ResetParent ¶
func (m *CountryLocationMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*CountryLocationMutation) ResetParentID ¶
func (m *CountryLocationMutation) ResetParentID()
ResetParentID resets all changes to the "parent_id" field.
func (*CountryLocationMutation) ResetSorting ¶
func (m *CountryLocationMutation) ResetSorting()
ResetSorting resets all changes to the "sorting" field.
func (*CountryLocationMutation) ResetUpdatedAt ¶
func (m *CountryLocationMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CountryLocationMutation) SetCountryID ¶
func (m *CountryLocationMutation) SetCountryID(u uint64)
SetCountryID sets the "country_id" field.
func (*CountryLocationMutation) SetCreatedAt ¶
func (m *CountryLocationMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CountryLocationMutation) SetDeletedAt ¶
func (m *CountryLocationMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*CountryLocationMutation) SetField ¶
func (m *CountryLocationMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*CountryLocationMutation) SetID ¶
func (m *CountryLocationMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of CountryLocation entities.
func (*CountryLocationMutation) SetNameEn ¶
func (m *CountryLocationMutation) SetNameEn(s string)
SetNameEn sets the "name_en" field.
func (*CountryLocationMutation) SetNameZh ¶
func (m *CountryLocationMutation) SetNameZh(s string)
SetNameZh sets the "name_zh" field.
func (*CountryLocationMutation) SetOp ¶
func (m *CountryLocationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CountryLocationMutation) SetParentID ¶
func (m *CountryLocationMutation) SetParentID(u uint64)
SetParentID sets the "parent_id" field.
func (*CountryLocationMutation) SetSorting ¶
func (m *CountryLocationMutation) SetSorting(u uint64)
SetSorting sets the "sorting" field.
func (*CountryLocationMutation) SetUpdatedAt ¶
func (m *CountryLocationMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CountryLocationMutation) Sorting ¶
func (m *CountryLocationMutation) Sorting() (r uint64, exists bool)
Sorting returns the value of the "sorting" field in the mutation.
func (CountryLocationMutation) Tx ¶
func (m CountryLocationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CountryLocationMutation) Type ¶
func (m *CountryLocationMutation) Type() string
Type returns the node type of this mutation (CountryLocation).
func (*CountryLocationMutation) UpdatedAt ¶
func (m *CountryLocationMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CountryLocationMutation) Where ¶
func (m *CountryLocationMutation) Where(ps ...predicate.CountryLocation)
Where appends a list predicates to the CountryLocationMutation builder.
func (*CountryLocationMutation) WhereP ¶
func (m *CountryLocationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CountryLocationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CountryLocationQuery ¶
type CountryLocationQuery struct {
// contains filtered or unexported fields
}
CountryLocationQuery is the builder for querying CountryLocation entities.
func (*CountryLocationQuery) Aggregate ¶
func (clq *CountryLocationQuery) Aggregate(fns ...AggregateFunc) *CountryLocationSelect
Aggregate returns a CountryLocationSelect configured with the given aggregations.
func (*CountryLocationQuery) All ¶
func (clq *CountryLocationQuery) All(ctx context.Context) ([]*CountryLocation, error)
All executes the query and returns a list of CountryLocations.
func (*CountryLocationQuery) AllX ¶
func (clq *CountryLocationQuery) AllX(ctx context.Context) []*CountryLocation
AllX is like All, but panics if an error occurs.
func (*CountryLocationQuery) Clone ¶
func (clq *CountryLocationQuery) Clone() *CountryLocationQuery
Clone returns a duplicate of the CountryLocationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CountryLocationQuery) Count ¶
func (clq *CountryLocationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CountryLocationQuery) CountX ¶
func (clq *CountryLocationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CountryLocationQuery) ExecContext ¶
func (c *CountryLocationQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryLocationQuery) Exist ¶
func (clq *CountryLocationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CountryLocationQuery) ExistX ¶
func (clq *CountryLocationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CountryLocationQuery) First ¶
func (clq *CountryLocationQuery) First(ctx context.Context) (*CountryLocation, error)
First returns the first CountryLocation entity from the query. Returns a *NotFoundError when no CountryLocation was found.
func (*CountryLocationQuery) FirstID ¶
func (clq *CountryLocationQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first CountryLocation ID from the query. Returns a *NotFoundError when no CountryLocation ID was found.
func (*CountryLocationQuery) FirstIDX ¶
func (clq *CountryLocationQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*CountryLocationQuery) FirstX ¶
func (clq *CountryLocationQuery) FirstX(ctx context.Context) *CountryLocation
FirstX is like First, but panics if an error occurs.
func (*CountryLocationQuery) GroupBy ¶
func (clq *CountryLocationQuery) GroupBy(field string, fields ...string) *CountryLocationGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CountryID uint64 `json:"country_id,omitempty"` Count int `json:"count,omitempty"` } client.CountryLocation.Query(). GroupBy(countrylocation.FieldCountryID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CountryLocationQuery) IDs ¶
func (clq *CountryLocationQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of CountryLocation IDs.
func (*CountryLocationQuery) IDsX ¶
func (clq *CountryLocationQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*CountryLocationQuery) Limit ¶
func (clq *CountryLocationQuery) Limit(limit int) *CountryLocationQuery
Limit the number of records to be returned by this query.
func (*CountryLocationQuery) Offset ¶
func (clq *CountryLocationQuery) Offset(offset int) *CountryLocationQuery
Offset to start from.
func (*CountryLocationQuery) Only ¶
func (clq *CountryLocationQuery) Only(ctx context.Context) (*CountryLocation, error)
Only returns a single CountryLocation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one CountryLocation entity is found. Returns a *NotFoundError when no CountryLocation entities are found.
func (*CountryLocationQuery) OnlyID ¶
func (clq *CountryLocationQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only CountryLocation ID in the query. Returns a *NotSingularError when more than one CountryLocation ID is found. Returns a *NotFoundError when no entities are found.
func (*CountryLocationQuery) OnlyIDX ¶
func (clq *CountryLocationQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CountryLocationQuery) OnlyX ¶
func (clq *CountryLocationQuery) OnlyX(ctx context.Context) *CountryLocation
OnlyX is like Only, but panics if an error occurs.
func (*CountryLocationQuery) Order ¶
func (clq *CountryLocationQuery) Order(o ...countrylocation.OrderOption) *CountryLocationQuery
Order specifies how the records should be ordered.
func (*CountryLocationQuery) QueryChildLocations ¶
func (clq *CountryLocationQuery) QueryChildLocations() *CountryLocationQuery
QueryChildLocations chains the current query on the "child_locations" edge.
func (*CountryLocationQuery) QueryContext ¶
func (c *CountryLocationQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryLocationQuery) QueryCountry ¶
func (clq *CountryLocationQuery) QueryCountry() *CountryQuery
QueryCountry chains the current query on the "country" edge.
func (*CountryLocationQuery) QueryParent ¶
func (clq *CountryLocationQuery) QueryParent() *CountryLocationQuery
QueryParent chains the current query on the "parent" edge.
func (*CountryLocationQuery) Select ¶
func (clq *CountryLocationQuery) Select(fields ...string) *CountryLocationSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CountryID uint64 `json:"country_id,omitempty"` } client.CountryLocation.Query(). Select(countrylocation.FieldCountryID). Scan(ctx, &v)
func (*CountryLocationQuery) Unique ¶
func (clq *CountryLocationQuery) Unique(unique bool) *CountryLocationQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*CountryLocationQuery) Where ¶
func (clq *CountryLocationQuery) Where(ps ...predicate.CountryLocation) *CountryLocationQuery
Where adds a new predicate for the CountryLocationQuery builder.
func (*CountryLocationQuery) WithChildLocations ¶
func (clq *CountryLocationQuery) WithChildLocations(opts ...func(*CountryLocationQuery)) *CountryLocationQuery
WithChildLocations tells the query-builder to eager-load the nodes that are connected to the "child_locations" edge. The optional arguments are used to configure the query builder of the edge.
func (*CountryLocationQuery) WithCountry ¶
func (clq *CountryLocationQuery) WithCountry(opts ...func(*CountryQuery)) *CountryLocationQuery
WithCountry tells the query-builder to eager-load the nodes that are connected to the "country" edge. The optional arguments are used to configure the query builder of the edge.
func (*CountryLocationQuery) WithParent ¶
func (clq *CountryLocationQuery) WithParent(opts ...func(*CountryLocationQuery)) *CountryLocationQuery
WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.
type CountryLocationSelect ¶
type CountryLocationSelect struct { *CountryLocationQuery // contains filtered or unexported fields }
CountryLocationSelect is the builder for selecting fields of CountryLocation entities.
func (*CountryLocationSelect) Aggregate ¶
func (cls *CountryLocationSelect) Aggregate(fns ...AggregateFunc) *CountryLocationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CountryLocationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CountryLocationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (CountryLocationSelect) ExecContext ¶
func (c CountryLocationSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryLocationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CountryLocationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CountryLocationSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*CountryLocationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CountryLocationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (CountryLocationSelect) QueryContext ¶
func (c CountryLocationSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryLocationSelect) Scan ¶
func (cls *CountryLocationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CountryLocationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CountryLocationUpdate ¶
type CountryLocationUpdate struct {
// contains filtered or unexported fields
}
CountryLocationUpdate is the builder for updating CountryLocation entities.
func (*CountryLocationUpdate) AddChildLocationIDs ¶
func (clu *CountryLocationUpdate) AddChildLocationIDs(ids ...uint64) *CountryLocationUpdate
AddChildLocationIDs adds the "child_locations" edge to the CountryLocation entity by IDs.
func (*CountryLocationUpdate) AddChildLocations ¶
func (clu *CountryLocationUpdate) AddChildLocations(c ...*CountryLocation) *CountryLocationUpdate
AddChildLocations adds the "child_locations" edges to the CountryLocation entity.
func (*CountryLocationUpdate) AddSorting ¶
func (clu *CountryLocationUpdate) AddSorting(u int64) *CountryLocationUpdate
AddSorting adds u to the "sorting" field.
func (*CountryLocationUpdate) ClearChildLocations ¶
func (clu *CountryLocationUpdate) ClearChildLocations() *CountryLocationUpdate
ClearChildLocations clears all "child_locations" edges to the CountryLocation entity.
func (*CountryLocationUpdate) ClearCountry ¶
func (clu *CountryLocationUpdate) ClearCountry() *CountryLocationUpdate
ClearCountry clears the "country" edge to the Country entity.
func (*CountryLocationUpdate) ClearCountryID ¶
func (clu *CountryLocationUpdate) ClearCountryID() *CountryLocationUpdate
ClearCountryID clears the value of the "country_id" field.
func (*CountryLocationUpdate) ClearDeletedAt ¶
func (clu *CountryLocationUpdate) ClearDeletedAt() *CountryLocationUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CountryLocationUpdate) ClearParent ¶
func (clu *CountryLocationUpdate) ClearParent() *CountryLocationUpdate
ClearParent clears the "parent" edge to the CountryLocation entity.
func (*CountryLocationUpdate) ClearParentID ¶
func (clu *CountryLocationUpdate) ClearParentID() *CountryLocationUpdate
ClearParentID clears the value of the "parent_id" field.
func (*CountryLocationUpdate) Exec ¶
func (clu *CountryLocationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryLocationUpdate) ExecContext ¶
func (c *CountryLocationUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryLocationUpdate) ExecX ¶
func (clu *CountryLocationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryLocationUpdate) Mutation ¶
func (clu *CountryLocationUpdate) Mutation() *CountryLocationMutation
Mutation returns the CountryLocationMutation object of the builder.
func (*CountryLocationUpdate) QueryContext ¶
func (c *CountryLocationUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryLocationUpdate) RemoveChildLocationIDs ¶
func (clu *CountryLocationUpdate) RemoveChildLocationIDs(ids ...uint64) *CountryLocationUpdate
RemoveChildLocationIDs removes the "child_locations" edge to CountryLocation entities by IDs.
func (*CountryLocationUpdate) RemoveChildLocations ¶
func (clu *CountryLocationUpdate) RemoveChildLocations(c ...*CountryLocation) *CountryLocationUpdate
RemoveChildLocations removes "child_locations" edges to CountryLocation entities.
func (*CountryLocationUpdate) Save ¶
func (clu *CountryLocationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CountryLocationUpdate) SaveX ¶
func (clu *CountryLocationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CountryLocationUpdate) SetCountry ¶
func (clu *CountryLocationUpdate) SetCountry(c *Country) *CountryLocationUpdate
SetCountry sets the "country" edge to the Country entity.
func (*CountryLocationUpdate) SetCountryID ¶
func (clu *CountryLocationUpdate) SetCountryID(u uint64) *CountryLocationUpdate
SetCountryID sets the "country_id" field.
func (*CountryLocationUpdate) SetCreatedAt ¶
func (clu *CountryLocationUpdate) SetCreatedAt(t time.Time) *CountryLocationUpdate
SetCreatedAt sets the "created_at" field.
func (*CountryLocationUpdate) SetDeletedAt ¶
func (clu *CountryLocationUpdate) SetDeletedAt(t time.Time) *CountryLocationUpdate
SetDeletedAt sets the "deleted_at" field.
func (*CountryLocationUpdate) SetNameEn ¶
func (clu *CountryLocationUpdate) SetNameEn(s string) *CountryLocationUpdate
SetNameEn sets the "name_en" field.
func (*CountryLocationUpdate) SetNameZh ¶
func (clu *CountryLocationUpdate) SetNameZh(s string) *CountryLocationUpdate
SetNameZh sets the "name_zh" field.
func (*CountryLocationUpdate) SetNillableCountryID ¶
func (clu *CountryLocationUpdate) SetNillableCountryID(u *uint64) *CountryLocationUpdate
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*CountryLocationUpdate) SetNillableCreatedAt ¶
func (clu *CountryLocationUpdate) SetNillableCreatedAt(t *time.Time) *CountryLocationUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CountryLocationUpdate) SetNillableDeletedAt ¶
func (clu *CountryLocationUpdate) SetNillableDeletedAt(t *time.Time) *CountryLocationUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CountryLocationUpdate) SetNillableNameEn ¶
func (clu *CountryLocationUpdate) SetNillableNameEn(s *string) *CountryLocationUpdate
SetNillableNameEn sets the "name_en" field if the given value is not nil.
func (*CountryLocationUpdate) SetNillableNameZh ¶
func (clu *CountryLocationUpdate) SetNillableNameZh(s *string) *CountryLocationUpdate
SetNillableNameZh sets the "name_zh" field if the given value is not nil.
func (*CountryLocationUpdate) SetNillableParentID ¶
func (clu *CountryLocationUpdate) SetNillableParentID(u *uint64) *CountryLocationUpdate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*CountryLocationUpdate) SetNillableSorting ¶
func (clu *CountryLocationUpdate) SetNillableSorting(u *uint64) *CountryLocationUpdate
SetNillableSorting sets the "sorting" field if the given value is not nil.
func (*CountryLocationUpdate) SetParent ¶
func (clu *CountryLocationUpdate) SetParent(c *CountryLocation) *CountryLocationUpdate
SetParent sets the "parent" edge to the CountryLocation entity.
func (*CountryLocationUpdate) SetParentID ¶
func (clu *CountryLocationUpdate) SetParentID(u uint64) *CountryLocationUpdate
SetParentID sets the "parent_id" field.
func (*CountryLocationUpdate) SetSorting ¶
func (clu *CountryLocationUpdate) SetSorting(u uint64) *CountryLocationUpdate
SetSorting sets the "sorting" field.
func (*CountryLocationUpdate) SetUpdatedAt ¶
func (clu *CountryLocationUpdate) SetUpdatedAt(t time.Time) *CountryLocationUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CountryLocationUpdate) Where ¶
func (clu *CountryLocationUpdate) Where(ps ...predicate.CountryLocation) *CountryLocationUpdate
Where appends a list predicates to the CountryLocationUpdate builder.
type CountryLocationUpdateOne ¶
type CountryLocationUpdateOne struct {
// contains filtered or unexported fields
}
CountryLocationUpdateOne is the builder for updating a single CountryLocation entity.
func (*CountryLocationUpdateOne) AddChildLocationIDs ¶
func (cluo *CountryLocationUpdateOne) AddChildLocationIDs(ids ...uint64) *CountryLocationUpdateOne
AddChildLocationIDs adds the "child_locations" edge to the CountryLocation entity by IDs.
func (*CountryLocationUpdateOne) AddChildLocations ¶
func (cluo *CountryLocationUpdateOne) AddChildLocations(c ...*CountryLocation) *CountryLocationUpdateOne
AddChildLocations adds the "child_locations" edges to the CountryLocation entity.
func (*CountryLocationUpdateOne) AddSorting ¶
func (cluo *CountryLocationUpdateOne) AddSorting(u int64) *CountryLocationUpdateOne
AddSorting adds u to the "sorting" field.
func (*CountryLocationUpdateOne) ClearChildLocations ¶
func (cluo *CountryLocationUpdateOne) ClearChildLocations() *CountryLocationUpdateOne
ClearChildLocations clears all "child_locations" edges to the CountryLocation entity.
func (*CountryLocationUpdateOne) ClearCountry ¶
func (cluo *CountryLocationUpdateOne) ClearCountry() *CountryLocationUpdateOne
ClearCountry clears the "country" edge to the Country entity.
func (*CountryLocationUpdateOne) ClearCountryID ¶
func (cluo *CountryLocationUpdateOne) ClearCountryID() *CountryLocationUpdateOne
ClearCountryID clears the value of the "country_id" field.
func (*CountryLocationUpdateOne) ClearDeletedAt ¶
func (cluo *CountryLocationUpdateOne) ClearDeletedAt() *CountryLocationUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CountryLocationUpdateOne) ClearParent ¶
func (cluo *CountryLocationUpdateOne) ClearParent() *CountryLocationUpdateOne
ClearParent clears the "parent" edge to the CountryLocation entity.
func (*CountryLocationUpdateOne) ClearParentID ¶
func (cluo *CountryLocationUpdateOne) ClearParentID() *CountryLocationUpdateOne
ClearParentID clears the value of the "parent_id" field.
func (*CountryLocationUpdateOne) Exec ¶
func (cluo *CountryLocationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CountryLocationUpdateOne) ExecContext ¶
func (c *CountryLocationUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryLocationUpdateOne) ExecX ¶
func (cluo *CountryLocationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryLocationUpdateOne) Mutation ¶
func (cluo *CountryLocationUpdateOne) Mutation() *CountryLocationMutation
Mutation returns the CountryLocationMutation object of the builder.
func (*CountryLocationUpdateOne) QueryContext ¶
func (c *CountryLocationUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryLocationUpdateOne) RemoveChildLocationIDs ¶
func (cluo *CountryLocationUpdateOne) RemoveChildLocationIDs(ids ...uint64) *CountryLocationUpdateOne
RemoveChildLocationIDs removes the "child_locations" edge to CountryLocation entities by IDs.
func (*CountryLocationUpdateOne) RemoveChildLocations ¶
func (cluo *CountryLocationUpdateOne) RemoveChildLocations(c ...*CountryLocation) *CountryLocationUpdateOne
RemoveChildLocations removes "child_locations" edges to CountryLocation entities.
func (*CountryLocationUpdateOne) Save ¶
func (cluo *CountryLocationUpdateOne) Save(ctx context.Context) (*CountryLocation, error)
Save executes the query and returns the updated CountryLocation entity.
func (*CountryLocationUpdateOne) SaveX ¶
func (cluo *CountryLocationUpdateOne) SaveX(ctx context.Context) *CountryLocation
SaveX is like Save, but panics if an error occurs.
func (*CountryLocationUpdateOne) Select ¶
func (cluo *CountryLocationUpdateOne) Select(field string, fields ...string) *CountryLocationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CountryLocationUpdateOne) SetCountry ¶
func (cluo *CountryLocationUpdateOne) SetCountry(c *Country) *CountryLocationUpdateOne
SetCountry sets the "country" edge to the Country entity.
func (*CountryLocationUpdateOne) SetCountryID ¶
func (cluo *CountryLocationUpdateOne) SetCountryID(u uint64) *CountryLocationUpdateOne
SetCountryID sets the "country_id" field.
func (*CountryLocationUpdateOne) SetCreatedAt ¶
func (cluo *CountryLocationUpdateOne) SetCreatedAt(t time.Time) *CountryLocationUpdateOne
SetCreatedAt sets the "created_at" field.
func (*CountryLocationUpdateOne) SetDeletedAt ¶
func (cluo *CountryLocationUpdateOne) SetDeletedAt(t time.Time) *CountryLocationUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*CountryLocationUpdateOne) SetNameEn ¶
func (cluo *CountryLocationUpdateOne) SetNameEn(s string) *CountryLocationUpdateOne
SetNameEn sets the "name_en" field.
func (*CountryLocationUpdateOne) SetNameZh ¶
func (cluo *CountryLocationUpdateOne) SetNameZh(s string) *CountryLocationUpdateOne
SetNameZh sets the "name_zh" field.
func (*CountryLocationUpdateOne) SetNillableCountryID ¶
func (cluo *CountryLocationUpdateOne) SetNillableCountryID(u *uint64) *CountryLocationUpdateOne
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*CountryLocationUpdateOne) SetNillableCreatedAt ¶
func (cluo *CountryLocationUpdateOne) SetNillableCreatedAt(t *time.Time) *CountryLocationUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CountryLocationUpdateOne) SetNillableDeletedAt ¶
func (cluo *CountryLocationUpdateOne) SetNillableDeletedAt(t *time.Time) *CountryLocationUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*CountryLocationUpdateOne) SetNillableNameEn ¶
func (cluo *CountryLocationUpdateOne) SetNillableNameEn(s *string) *CountryLocationUpdateOne
SetNillableNameEn sets the "name_en" field if the given value is not nil.
func (*CountryLocationUpdateOne) SetNillableNameZh ¶
func (cluo *CountryLocationUpdateOne) SetNillableNameZh(s *string) *CountryLocationUpdateOne
SetNillableNameZh sets the "name_zh" field if the given value is not nil.
func (*CountryLocationUpdateOne) SetNillableParentID ¶
func (cluo *CountryLocationUpdateOne) SetNillableParentID(u *uint64) *CountryLocationUpdateOne
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*CountryLocationUpdateOne) SetNillableSorting ¶
func (cluo *CountryLocationUpdateOne) SetNillableSorting(u *uint64) *CountryLocationUpdateOne
SetNillableSorting sets the "sorting" field if the given value is not nil.
func (*CountryLocationUpdateOne) SetParent ¶
func (cluo *CountryLocationUpdateOne) SetParent(c *CountryLocation) *CountryLocationUpdateOne
SetParent sets the "parent" edge to the CountryLocation entity.
func (*CountryLocationUpdateOne) SetParentID ¶
func (cluo *CountryLocationUpdateOne) SetParentID(u uint64) *CountryLocationUpdateOne
SetParentID sets the "parent_id" field.
func (*CountryLocationUpdateOne) SetSorting ¶
func (cluo *CountryLocationUpdateOne) SetSorting(u uint64) *CountryLocationUpdateOne
SetSorting sets the "sorting" field.
func (*CountryLocationUpdateOne) SetUpdatedAt ¶
func (cluo *CountryLocationUpdateOne) SetUpdatedAt(t time.Time) *CountryLocationUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CountryLocationUpdateOne) Where ¶
func (cluo *CountryLocationUpdateOne) Where(ps ...predicate.CountryLocation) *CountryLocationUpdateOne
Where appends a list predicates to the CountryLocationUpdate builder.
type CountryLocationUpsert ¶
CountryLocationUpsert is the "OnConflict" setter.
func (*CountryLocationUpsert) AddSorting ¶
func (u *CountryLocationUpsert) AddSorting(v uint64) *CountryLocationUpsert
AddSorting adds v to the "sorting" field.
func (*CountryLocationUpsert) ClearCountryID ¶
func (u *CountryLocationUpsert) ClearCountryID() *CountryLocationUpsert
ClearCountryID clears the value of the "country_id" field.
func (*CountryLocationUpsert) ClearDeletedAt ¶
func (u *CountryLocationUpsert) ClearDeletedAt() *CountryLocationUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CountryLocationUpsert) ClearParentID ¶
func (u *CountryLocationUpsert) ClearParentID() *CountryLocationUpsert
ClearParentID clears the value of the "parent_id" field.
func (*CountryLocationUpsert) SetCountryID ¶
func (u *CountryLocationUpsert) SetCountryID(v uint64) *CountryLocationUpsert
SetCountryID sets the "country_id" field.
func (*CountryLocationUpsert) SetCreatedAt ¶
func (u *CountryLocationUpsert) SetCreatedAt(v time.Time) *CountryLocationUpsert
SetCreatedAt sets the "created_at" field.
func (*CountryLocationUpsert) SetDeletedAt ¶
func (u *CountryLocationUpsert) SetDeletedAt(v time.Time) *CountryLocationUpsert
SetDeletedAt sets the "deleted_at" field.
func (*CountryLocationUpsert) SetNameEn ¶
func (u *CountryLocationUpsert) SetNameEn(v string) *CountryLocationUpsert
SetNameEn sets the "name_en" field.
func (*CountryLocationUpsert) SetNameZh ¶
func (u *CountryLocationUpsert) SetNameZh(v string) *CountryLocationUpsert
SetNameZh sets the "name_zh" field.
func (*CountryLocationUpsert) SetParentID ¶
func (u *CountryLocationUpsert) SetParentID(v uint64) *CountryLocationUpsert
SetParentID sets the "parent_id" field.
func (*CountryLocationUpsert) SetSorting ¶
func (u *CountryLocationUpsert) SetSorting(v uint64) *CountryLocationUpsert
SetSorting sets the "sorting" field.
func (*CountryLocationUpsert) SetUpdatedAt ¶
func (u *CountryLocationUpsert) SetUpdatedAt(v time.Time) *CountryLocationUpsert
SetUpdatedAt sets the "updated_at" field.
func (*CountryLocationUpsert) UpdateCountryID ¶
func (u *CountryLocationUpsert) UpdateCountryID() *CountryLocationUpsert
UpdateCountryID sets the "country_id" field to the value that was provided on create.
func (*CountryLocationUpsert) UpdateCreatedAt ¶
func (u *CountryLocationUpsert) UpdateCreatedAt() *CountryLocationUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*CountryLocationUpsert) UpdateDeletedAt ¶
func (u *CountryLocationUpsert) UpdateDeletedAt() *CountryLocationUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*CountryLocationUpsert) UpdateNameEn ¶
func (u *CountryLocationUpsert) UpdateNameEn() *CountryLocationUpsert
UpdateNameEn sets the "name_en" field to the value that was provided on create.
func (*CountryLocationUpsert) UpdateNameZh ¶
func (u *CountryLocationUpsert) UpdateNameZh() *CountryLocationUpsert
UpdateNameZh sets the "name_zh" field to the value that was provided on create.
func (*CountryLocationUpsert) UpdateParentID ¶
func (u *CountryLocationUpsert) UpdateParentID() *CountryLocationUpsert
UpdateParentID sets the "parent_id" field to the value that was provided on create.
func (*CountryLocationUpsert) UpdateSorting ¶
func (u *CountryLocationUpsert) UpdateSorting() *CountryLocationUpsert
UpdateSorting sets the "sorting" field to the value that was provided on create.
func (*CountryLocationUpsert) UpdateUpdatedAt ¶
func (u *CountryLocationUpsert) UpdateUpdatedAt() *CountryLocationUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type CountryLocationUpsertBulk ¶
type CountryLocationUpsertBulk struct {
// contains filtered or unexported fields
}
CountryLocationUpsertBulk is the builder for "upsert"-ing a bulk of CountryLocation nodes.
func (*CountryLocationUpsertBulk) AddSorting ¶
func (u *CountryLocationUpsertBulk) AddSorting(v uint64) *CountryLocationUpsertBulk
AddSorting adds v to the "sorting" field.
func (*CountryLocationUpsertBulk) ClearCountryID ¶
func (u *CountryLocationUpsertBulk) ClearCountryID() *CountryLocationUpsertBulk
ClearCountryID clears the value of the "country_id" field.
func (*CountryLocationUpsertBulk) ClearDeletedAt ¶
func (u *CountryLocationUpsertBulk) ClearDeletedAt() *CountryLocationUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CountryLocationUpsertBulk) ClearParentID ¶
func (u *CountryLocationUpsertBulk) ClearParentID() *CountryLocationUpsertBulk
ClearParentID clears the value of the "parent_id" field.
func (*CountryLocationUpsertBulk) DoNothing ¶
func (u *CountryLocationUpsertBulk) DoNothing() *CountryLocationUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CountryLocationUpsertBulk) Exec ¶
func (u *CountryLocationUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryLocationUpsertBulk) ExecX ¶
func (u *CountryLocationUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryLocationUpsertBulk) Ignore ¶
func (u *CountryLocationUpsertBulk) Ignore() *CountryLocationUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.CountryLocation.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CountryLocationUpsertBulk) SetCountryID ¶
func (u *CountryLocationUpsertBulk) SetCountryID(v uint64) *CountryLocationUpsertBulk
SetCountryID sets the "country_id" field.
func (*CountryLocationUpsertBulk) SetCreatedAt ¶
func (u *CountryLocationUpsertBulk) SetCreatedAt(v time.Time) *CountryLocationUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*CountryLocationUpsertBulk) SetDeletedAt ¶
func (u *CountryLocationUpsertBulk) SetDeletedAt(v time.Time) *CountryLocationUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*CountryLocationUpsertBulk) SetNameEn ¶
func (u *CountryLocationUpsertBulk) SetNameEn(v string) *CountryLocationUpsertBulk
SetNameEn sets the "name_en" field.
func (*CountryLocationUpsertBulk) SetNameZh ¶
func (u *CountryLocationUpsertBulk) SetNameZh(v string) *CountryLocationUpsertBulk
SetNameZh sets the "name_zh" field.
func (*CountryLocationUpsertBulk) SetParentID ¶
func (u *CountryLocationUpsertBulk) SetParentID(v uint64) *CountryLocationUpsertBulk
SetParentID sets the "parent_id" field.
func (*CountryLocationUpsertBulk) SetSorting ¶
func (u *CountryLocationUpsertBulk) SetSorting(v uint64) *CountryLocationUpsertBulk
SetSorting sets the "sorting" field.
func (*CountryLocationUpsertBulk) SetUpdatedAt ¶
func (u *CountryLocationUpsertBulk) SetUpdatedAt(v time.Time) *CountryLocationUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*CountryLocationUpsertBulk) Update ¶
func (u *CountryLocationUpsertBulk) Update(set func(*CountryLocationUpsert)) *CountryLocationUpsertBulk
Update allows overriding fields `UPDATE` values. See the CountryLocationCreateBulk.OnConflict documentation for more info.
func (*CountryLocationUpsertBulk) UpdateCountryID ¶
func (u *CountryLocationUpsertBulk) UpdateCountryID() *CountryLocationUpsertBulk
UpdateCountryID sets the "country_id" field to the value that was provided on create.
func (*CountryLocationUpsertBulk) UpdateCreatedAt ¶
func (u *CountryLocationUpsertBulk) UpdateCreatedAt() *CountryLocationUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*CountryLocationUpsertBulk) UpdateDeletedAt ¶
func (u *CountryLocationUpsertBulk) UpdateDeletedAt() *CountryLocationUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*CountryLocationUpsertBulk) UpdateNameEn ¶
func (u *CountryLocationUpsertBulk) UpdateNameEn() *CountryLocationUpsertBulk
UpdateNameEn sets the "name_en" field to the value that was provided on create.
func (*CountryLocationUpsertBulk) UpdateNameZh ¶
func (u *CountryLocationUpsertBulk) UpdateNameZh() *CountryLocationUpsertBulk
UpdateNameZh sets the "name_zh" field to the value that was provided on create.
func (*CountryLocationUpsertBulk) UpdateNewValues ¶
func (u *CountryLocationUpsertBulk) UpdateNewValues() *CountryLocationUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.CountryLocation.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(countrylocation.FieldID) }), ). Exec(ctx)
func (*CountryLocationUpsertBulk) UpdateParentID ¶
func (u *CountryLocationUpsertBulk) UpdateParentID() *CountryLocationUpsertBulk
UpdateParentID sets the "parent_id" field to the value that was provided on create.
func (*CountryLocationUpsertBulk) UpdateSorting ¶
func (u *CountryLocationUpsertBulk) UpdateSorting() *CountryLocationUpsertBulk
UpdateSorting sets the "sorting" field to the value that was provided on create.
func (*CountryLocationUpsertBulk) UpdateUpdatedAt ¶
func (u *CountryLocationUpsertBulk) UpdateUpdatedAt() *CountryLocationUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type CountryLocationUpsertOne ¶
type CountryLocationUpsertOne struct {
// contains filtered or unexported fields
}
CountryLocationUpsertOne is the builder for "upsert"-ing
one CountryLocation node.
func (*CountryLocationUpsertOne) AddSorting ¶
func (u *CountryLocationUpsertOne) AddSorting(v uint64) *CountryLocationUpsertOne
AddSorting adds v to the "sorting" field.
func (*CountryLocationUpsertOne) ClearCountryID ¶
func (u *CountryLocationUpsertOne) ClearCountryID() *CountryLocationUpsertOne
ClearCountryID clears the value of the "country_id" field.
func (*CountryLocationUpsertOne) ClearDeletedAt ¶
func (u *CountryLocationUpsertOne) ClearDeletedAt() *CountryLocationUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*CountryLocationUpsertOne) ClearParentID ¶
func (u *CountryLocationUpsertOne) ClearParentID() *CountryLocationUpsertOne
ClearParentID clears the value of the "parent_id" field.
func (*CountryLocationUpsertOne) DoNothing ¶
func (u *CountryLocationUpsertOne) DoNothing() *CountryLocationUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CountryLocationUpsertOne) Exec ¶
func (u *CountryLocationUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryLocationUpsertOne) ExecX ¶
func (u *CountryLocationUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryLocationUpsertOne) ID ¶
func (u *CountryLocationUpsertOne) ID(ctx context.Context) (id uint64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*CountryLocationUpsertOne) IDX ¶
func (u *CountryLocationUpsertOne) IDX(ctx context.Context) uint64
IDX is like ID, but panics if an error occurs.
func (*CountryLocationUpsertOne) Ignore ¶
func (u *CountryLocationUpsertOne) Ignore() *CountryLocationUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.CountryLocation.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CountryLocationUpsertOne) SetCountryID ¶
func (u *CountryLocationUpsertOne) SetCountryID(v uint64) *CountryLocationUpsertOne
SetCountryID sets the "country_id" field.
func (*CountryLocationUpsertOne) SetCreatedAt ¶
func (u *CountryLocationUpsertOne) SetCreatedAt(v time.Time) *CountryLocationUpsertOne
SetCreatedAt sets the "created_at" field.
func (*CountryLocationUpsertOne) SetDeletedAt ¶
func (u *CountryLocationUpsertOne) SetDeletedAt(v time.Time) *CountryLocationUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*CountryLocationUpsertOne) SetNameEn ¶
func (u *CountryLocationUpsertOne) SetNameEn(v string) *CountryLocationUpsertOne
SetNameEn sets the "name_en" field.
func (*CountryLocationUpsertOne) SetNameZh ¶
func (u *CountryLocationUpsertOne) SetNameZh(v string) *CountryLocationUpsertOne
SetNameZh sets the "name_zh" field.
func (*CountryLocationUpsertOne) SetParentID ¶
func (u *CountryLocationUpsertOne) SetParentID(v uint64) *CountryLocationUpsertOne
SetParentID sets the "parent_id" field.
func (*CountryLocationUpsertOne) SetSorting ¶
func (u *CountryLocationUpsertOne) SetSorting(v uint64) *CountryLocationUpsertOne
SetSorting sets the "sorting" field.
func (*CountryLocationUpsertOne) SetUpdatedAt ¶
func (u *CountryLocationUpsertOne) SetUpdatedAt(v time.Time) *CountryLocationUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*CountryLocationUpsertOne) Update ¶
func (u *CountryLocationUpsertOne) Update(set func(*CountryLocationUpsert)) *CountryLocationUpsertOne
Update allows overriding fields `UPDATE` values. See the CountryLocationCreate.OnConflict documentation for more info.
func (*CountryLocationUpsertOne) UpdateCountryID ¶
func (u *CountryLocationUpsertOne) UpdateCountryID() *CountryLocationUpsertOne
UpdateCountryID sets the "country_id" field to the value that was provided on create.
func (*CountryLocationUpsertOne) UpdateCreatedAt ¶
func (u *CountryLocationUpsertOne) UpdateCreatedAt() *CountryLocationUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*CountryLocationUpsertOne) UpdateDeletedAt ¶
func (u *CountryLocationUpsertOne) UpdateDeletedAt() *CountryLocationUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*CountryLocationUpsertOne) UpdateNameEn ¶
func (u *CountryLocationUpsertOne) UpdateNameEn() *CountryLocationUpsertOne
UpdateNameEn sets the "name_en" field to the value that was provided on create.
func (*CountryLocationUpsertOne) UpdateNameZh ¶
func (u *CountryLocationUpsertOne) UpdateNameZh() *CountryLocationUpsertOne
UpdateNameZh sets the "name_zh" field to the value that was provided on create.
func (*CountryLocationUpsertOne) UpdateNewValues ¶
func (u *CountryLocationUpsertOne) UpdateNewValues() *CountryLocationUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.CountryLocation.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(countrylocation.FieldID) }), ). Exec(ctx)
func (*CountryLocationUpsertOne) UpdateParentID ¶
func (u *CountryLocationUpsertOne) UpdateParentID() *CountryLocationUpsertOne
UpdateParentID sets the "parent_id" field to the value that was provided on create.
func (*CountryLocationUpsertOne) UpdateSorting ¶
func (u *CountryLocationUpsertOne) UpdateSorting() *CountryLocationUpsertOne
UpdateSorting sets the "sorting" field to the value that was provided on create.
func (*CountryLocationUpsertOne) UpdateUpdatedAt ¶
func (u *CountryLocationUpsertOne) UpdateUpdatedAt() *CountryLocationUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type CountryLocations ¶
type CountryLocations []*CountryLocation
CountryLocations is a parsable slice of CountryLocation.
type CountryMutation ¶
type CountryMutation struct {
// contains filtered or unexported fields
}
CountryMutation represents an operation that mutates the Country nodes in the graph.
func (*CountryMutation) AddBankIDs ¶
func (m *CountryMutation) AddBankIDs(ids ...uint64)
AddBankIDs adds the "banks" edge to the Bank entity by ids.
func (*CountryMutation) AddContactUserIDs ¶
func (m *CountryMutation) AddContactUserIDs(ids ...uint64)
AddContactUserIDs adds the "contact_users" edge to the User entity by ids.
func (*CountryMutation) AddConversionRate ¶
func (m *CountryMutation) AddConversionRate(f float64)
AddConversionRate adds f to the "conversion_rate" field.
func (*CountryMutation) AddField ¶
func (m *CountryMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*CountryMutation) AddLocationIDs ¶
func (m *CountryMutation) AddLocationIDs(ids ...uint64)
AddLocationIDs adds the "locations" edge to the CountryLocation entity by ids.
func (*CountryMutation) AddStatus ¶
func (m *CountryMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*CountryMutation) AddUserIDs ¶
func (m *CountryMutation) AddUserIDs(ids ...uint64)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*CountryMutation) AddedConversionRate ¶
func (m *CountryMutation) AddedConversionRate() (r float64, exists bool)
AddedConversionRate returns the value that was added to the "conversion_rate" field in this mutation.
func (*CountryMutation) AddedEdges ¶
func (m *CountryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CountryMutation) AddedField ¶
func (m *CountryMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*CountryMutation) AddedFields ¶
func (m *CountryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CountryMutation) AddedIDs ¶
func (m *CountryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CountryMutation) AddedStatus ¶
func (m *CountryMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*CountryMutation) BanksCleared ¶
func (m *CountryMutation) BanksCleared() bool
BanksCleared reports if the "banks" edge to the Bank entity was cleared.
func (*CountryMutation) BanksIDs ¶
func (m *CountryMutation) BanksIDs() (ids []uint64)
BanksIDs returns the "banks" edge IDs in the mutation.
func (*CountryMutation) Capital ¶
func (m *CountryMutation) Capital() (r string, exists bool)
Capital returns the value of the "capital" field in the mutation.
func (*CountryMutation) CapitalCleared ¶
func (m *CountryMutation) CapitalCleared() bool
CapitalCleared returns if the "capital" field was cleared in this mutation.
func (*CountryMutation) ClearBanks ¶
func (m *CountryMutation) ClearBanks()
ClearBanks clears the "banks" edge to the Bank entity.
func (*CountryMutation) ClearCapital ¶
func (m *CountryMutation) ClearCapital()
ClearCapital clears the value of the "capital" field.
func (*CountryMutation) ClearContactUsers ¶
func (m *CountryMutation) ClearContactUsers()
ClearContactUsers clears the "contact_users" edge to the User entity.
func (*CountryMutation) ClearCurrencyCode ¶
func (m *CountryMutation) ClearCurrencyCode()
ClearCurrencyCode clears the value of the "currency_code" field.
func (*CountryMutation) ClearCurrencyName ¶
func (m *CountryMutation) ClearCurrencyName()
ClearCurrencyName clears the value of the "currency_name" field.
func (*CountryMutation) ClearCurrencySymbol ¶
func (m *CountryMutation) ClearCurrencySymbol()
ClearCurrencySymbol clears the value of the "currency_symbol" field.
func (*CountryMutation) ClearEdge ¶
func (m *CountryMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*CountryMutation) ClearField ¶
func (m *CountryMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*CountryMutation) ClearLocations ¶
func (m *CountryMutation) ClearLocations()
ClearLocations clears the "locations" edge to the CountryLocation entity.
func (*CountryMutation) ClearNumericCode ¶
func (m *CountryMutation) ClearNumericCode()
ClearNumericCode clears the value of the "numeric_code" field.
func (*CountryMutation) ClearOfficialName ¶
func (m *CountryMutation) ClearOfficialName()
ClearOfficialName clears the value of the "official_name" field.
func (*CountryMutation) ClearPhoneCode ¶
func (m *CountryMutation) ClearPhoneCode()
ClearPhoneCode clears the value of the "phone_code" field.
func (*CountryMutation) ClearUsers ¶
func (m *CountryMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*CountryMutation) ClearedEdges ¶
func (m *CountryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CountryMutation) ClearedFields ¶
func (m *CountryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CountryMutation) Client ¶
func (m CountryMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*CountryMutation) ContactUsersCleared ¶
func (m *CountryMutation) ContactUsersCleared() bool
ContactUsersCleared reports if the "contact_users" edge to the User entity was cleared.
func (*CountryMutation) ContactUsersIDs ¶
func (m *CountryMutation) ContactUsersIDs() (ids []uint64)
ContactUsersIDs returns the "contact_users" edge IDs in the mutation.
func (*CountryMutation) ConversionRate ¶
func (m *CountryMutation) ConversionRate() (r float64, exists bool)
ConversionRate returns the value of the "conversion_rate" field in the mutation.
func (*CountryMutation) CreatedAt ¶
func (m *CountryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CountryMutation) CurrencyCode ¶
func (m *CountryMutation) CurrencyCode() (r string, exists bool)
CurrencyCode returns the value of the "currency_code" field in the mutation.
func (*CountryMutation) CurrencyCodeCleared ¶
func (m *CountryMutation) CurrencyCodeCleared() bool
CurrencyCodeCleared returns if the "currency_code" field was cleared in this mutation.
func (*CountryMutation) CurrencyName ¶
func (m *CountryMutation) CurrencyName() (r string, exists bool)
CurrencyName returns the value of the "currency_name" field in the mutation.
func (*CountryMutation) CurrencyNameCleared ¶
func (m *CountryMutation) CurrencyNameCleared() bool
CurrencyNameCleared returns if the "currency_name" field was cleared in this mutation.
func (*CountryMutation) CurrencySymbol ¶
func (m *CountryMutation) CurrencySymbol() (r string, exists bool)
CurrencySymbol returns the value of the "currency_symbol" field in the mutation.
func (*CountryMutation) CurrencySymbolCleared ¶
func (m *CountryMutation) CurrencySymbolCleared() bool
CurrencySymbolCleared returns if the "currency_symbol" field was cleared in this mutation.
func (*CountryMutation) EdgeCleared ¶
func (m *CountryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CountryMutation) ExecContext ¶
func (c *CountryMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryMutation) Field ¶
func (m *CountryMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*CountryMutation) FieldCleared ¶
func (m *CountryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CountryMutation) Fields ¶
func (m *CountryMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*CountryMutation) ID ¶
func (m *CountryMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CountryMutation) IDs ¶
func (m *CountryMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*CountryMutation) Iso2 ¶
func (m *CountryMutation) Iso2() (r string, exists bool)
Iso2 returns the value of the "iso2" field in the mutation.
func (*CountryMutation) Iso3 ¶
func (m *CountryMutation) Iso3() (r string, exists bool)
Iso3 returns the value of the "iso3" field in the mutation.
func (*CountryMutation) LocationsCleared ¶
func (m *CountryMutation) LocationsCleared() bool
LocationsCleared reports if the "locations" edge to the CountryLocation entity was cleared.
func (*CountryMutation) LocationsIDs ¶
func (m *CountryMutation) LocationsIDs() (ids []uint64)
LocationsIDs returns the "locations" edge IDs in the mutation.
func (*CountryMutation) Name ¶
func (m *CountryMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*CountryMutation) NumericCode ¶
func (m *CountryMutation) NumericCode() (r string, exists bool)
NumericCode returns the value of the "numeric_code" field in the mutation.
func (*CountryMutation) NumericCodeCleared ¶
func (m *CountryMutation) NumericCodeCleared() bool
NumericCodeCleared returns if the "numeric_code" field was cleared in this mutation.
func (*CountryMutation) OfficialName ¶
func (m *CountryMutation) OfficialName() (r string, exists bool)
OfficialName returns the value of the "official_name" field in the mutation.
func (*CountryMutation) OfficialNameCleared ¶
func (m *CountryMutation) OfficialNameCleared() bool
OfficialNameCleared returns if the "official_name" field was cleared in this mutation.
func (*CountryMutation) OldCapital ¶
func (m *CountryMutation) OldCapital(ctx context.Context) (v *string, err error)
OldCapital returns the old "capital" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldConversionRate ¶
func (m *CountryMutation) OldConversionRate(ctx context.Context) (v float64, err error)
OldConversionRate returns the old "conversion_rate" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldCurrencyCode ¶
func (m *CountryMutation) OldCurrencyCode(ctx context.Context) (v *string, err error)
OldCurrencyCode returns the old "currency_code" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldCurrencyName ¶
func (m *CountryMutation) OldCurrencyName(ctx context.Context) (v *string, err error)
OldCurrencyName returns the old "currency_name" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldCurrencySymbol ¶
func (m *CountryMutation) OldCurrencySymbol(ctx context.Context) (v *string, err error)
OldCurrencySymbol returns the old "currency_symbol" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*CountryMutation) OldIso2 ¶
func (m *CountryMutation) OldIso2(ctx context.Context) (v string, err error)
OldIso2 returns the old "iso2" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldIso3 ¶
func (m *CountryMutation) OldIso3(ctx context.Context) (v string, err error)
OldIso3 returns the old "iso3" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldName ¶
func (m *CountryMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldNumericCode ¶
func (m *CountryMutation) OldNumericCode(ctx context.Context) (v *string, err error)
OldNumericCode returns the old "numeric_code" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldOfficialName ¶
func (m *CountryMutation) OldOfficialName(ctx context.Context) (v *string, err error)
OldOfficialName returns the old "official_name" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldPhoneCode ¶
func (m *CountryMutation) OldPhoneCode(ctx context.Context) (v *string, err error)
OldPhoneCode returns the old "phone_code" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldStatus ¶
func (m *CountryMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Country entity. If the Country object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CountryMutation) PhoneCode ¶
func (m *CountryMutation) PhoneCode() (r string, exists bool)
PhoneCode returns the value of the "phone_code" field in the mutation.
func (*CountryMutation) PhoneCodeCleared ¶
func (m *CountryMutation) PhoneCodeCleared() bool
PhoneCodeCleared returns if the "phone_code" field was cleared in this mutation.
func (*CountryMutation) QueryContext ¶
func (c *CountryMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryMutation) RemoveBankIDs ¶
func (m *CountryMutation) RemoveBankIDs(ids ...uint64)
RemoveBankIDs removes the "banks" edge to the Bank entity by IDs.
func (*CountryMutation) RemoveContactUserIDs ¶
func (m *CountryMutation) RemoveContactUserIDs(ids ...uint64)
RemoveContactUserIDs removes the "contact_users" edge to the User entity by IDs.
func (*CountryMutation) RemoveLocationIDs ¶
func (m *CountryMutation) RemoveLocationIDs(ids ...uint64)
RemoveLocationIDs removes the "locations" edge to the CountryLocation entity by IDs.
func (*CountryMutation) RemoveUserIDs ¶
func (m *CountryMutation) RemoveUserIDs(ids ...uint64)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*CountryMutation) RemovedBanksIDs ¶
func (m *CountryMutation) RemovedBanksIDs() (ids []uint64)
RemovedBanks returns the removed IDs of the "banks" edge to the Bank entity.
func (*CountryMutation) RemovedContactUsersIDs ¶
func (m *CountryMutation) RemovedContactUsersIDs() (ids []uint64)
RemovedContactUsers returns the removed IDs of the "contact_users" edge to the User entity.
func (*CountryMutation) RemovedEdges ¶
func (m *CountryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CountryMutation) RemovedIDs ¶
func (m *CountryMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*CountryMutation) RemovedLocationsIDs ¶
func (m *CountryMutation) RemovedLocationsIDs() (ids []uint64)
RemovedLocations returns the removed IDs of the "locations" edge to the CountryLocation entity.
func (*CountryMutation) RemovedUsersIDs ¶
func (m *CountryMutation) RemovedUsersIDs() (ids []uint64)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*CountryMutation) ResetBanks ¶
func (m *CountryMutation) ResetBanks()
ResetBanks resets all changes to the "banks" edge.
func (*CountryMutation) ResetCapital ¶
func (m *CountryMutation) ResetCapital()
ResetCapital resets all changes to the "capital" field.
func (*CountryMutation) ResetContactUsers ¶
func (m *CountryMutation) ResetContactUsers()
ResetContactUsers resets all changes to the "contact_users" edge.
func (*CountryMutation) ResetConversionRate ¶
func (m *CountryMutation) ResetConversionRate()
ResetConversionRate resets all changes to the "conversion_rate" field.
func (*CountryMutation) ResetCreatedAt ¶
func (m *CountryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CountryMutation) ResetCurrencyCode ¶
func (m *CountryMutation) ResetCurrencyCode()
ResetCurrencyCode resets all changes to the "currency_code" field.
func (*CountryMutation) ResetCurrencyName ¶
func (m *CountryMutation) ResetCurrencyName()
ResetCurrencyName resets all changes to the "currency_name" field.
func (*CountryMutation) ResetCurrencySymbol ¶
func (m *CountryMutation) ResetCurrencySymbol()
ResetCurrencySymbol resets all changes to the "currency_symbol" field.
func (*CountryMutation) ResetEdge ¶
func (m *CountryMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*CountryMutation) ResetField ¶
func (m *CountryMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*CountryMutation) ResetIso2 ¶
func (m *CountryMutation) ResetIso2()
ResetIso2 resets all changes to the "iso2" field.
func (*CountryMutation) ResetIso3 ¶
func (m *CountryMutation) ResetIso3()
ResetIso3 resets all changes to the "iso3" field.
func (*CountryMutation) ResetLocations ¶
func (m *CountryMutation) ResetLocations()
ResetLocations resets all changes to the "locations" edge.
func (*CountryMutation) ResetName ¶
func (m *CountryMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*CountryMutation) ResetNumericCode ¶
func (m *CountryMutation) ResetNumericCode()
ResetNumericCode resets all changes to the "numeric_code" field.
func (*CountryMutation) ResetOfficialName ¶
func (m *CountryMutation) ResetOfficialName()
ResetOfficialName resets all changes to the "official_name" field.
func (*CountryMutation) ResetPhoneCode ¶
func (m *CountryMutation) ResetPhoneCode()
ResetPhoneCode resets all changes to the "phone_code" field.
func (*CountryMutation) ResetStatus ¶
func (m *CountryMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*CountryMutation) ResetUpdatedAt ¶
func (m *CountryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*CountryMutation) ResetUsers ¶
func (m *CountryMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*CountryMutation) SetCapital ¶
func (m *CountryMutation) SetCapital(s string)
SetCapital sets the "capital" field.
func (*CountryMutation) SetConversionRate ¶
func (m *CountryMutation) SetConversionRate(f float64)
SetConversionRate sets the "conversion_rate" field.
func (*CountryMutation) SetCreatedAt ¶
func (m *CountryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CountryMutation) SetCurrencyCode ¶
func (m *CountryMutation) SetCurrencyCode(s string)
SetCurrencyCode sets the "currency_code" field.
func (*CountryMutation) SetCurrencyName ¶
func (m *CountryMutation) SetCurrencyName(s string)
SetCurrencyName sets the "currency_name" field.
func (*CountryMutation) SetCurrencySymbol ¶
func (m *CountryMutation) SetCurrencySymbol(s string)
SetCurrencySymbol sets the "currency_symbol" field.
func (*CountryMutation) SetField ¶
func (m *CountryMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*CountryMutation) SetID ¶
func (m *CountryMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Country entities.
func (*CountryMutation) SetIso2 ¶
func (m *CountryMutation) SetIso2(s string)
SetIso2 sets the "iso2" field.
func (*CountryMutation) SetIso3 ¶
func (m *CountryMutation) SetIso3(s string)
SetIso3 sets the "iso3" field.
func (*CountryMutation) SetName ¶
func (m *CountryMutation) SetName(s string)
SetName sets the "name" field.
func (*CountryMutation) SetNumericCode ¶
func (m *CountryMutation) SetNumericCode(s string)
SetNumericCode sets the "numeric_code" field.
func (*CountryMutation) SetOfficialName ¶
func (m *CountryMutation) SetOfficialName(s string)
SetOfficialName sets the "official_name" field.
func (*CountryMutation) SetOp ¶
func (m *CountryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CountryMutation) SetPhoneCode ¶
func (m *CountryMutation) SetPhoneCode(s string)
SetPhoneCode sets the "phone_code" field.
func (*CountryMutation) SetStatus ¶
func (m *CountryMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*CountryMutation) SetUpdatedAt ¶
func (m *CountryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*CountryMutation) Status ¶
func (m *CountryMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (CountryMutation) Tx ¶
func (m CountryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CountryMutation) Type ¶
func (m *CountryMutation) Type() string
Type returns the node type of this mutation (Country).
func (*CountryMutation) UpdatedAt ¶
func (m *CountryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*CountryMutation) UsersCleared ¶
func (m *CountryMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*CountryMutation) UsersIDs ¶
func (m *CountryMutation) UsersIDs() (ids []uint64)
UsersIDs returns the "users" edge IDs in the mutation.
func (*CountryMutation) Where ¶
func (m *CountryMutation) Where(ps ...predicate.Country)
Where appends a list predicates to the CountryMutation builder.
func (*CountryMutation) WhereP ¶
func (m *CountryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CountryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CountryQuery ¶
type CountryQuery struct {
// contains filtered or unexported fields
}
CountryQuery is the builder for querying Country entities.
func (*CountryQuery) Aggregate ¶
func (cq *CountryQuery) Aggregate(fns ...AggregateFunc) *CountrySelect
Aggregate returns a CountrySelect configured with the given aggregations.
func (*CountryQuery) All ¶
func (cq *CountryQuery) All(ctx context.Context) ([]*Country, error)
All executes the query and returns a list of Countries.
func (*CountryQuery) AllX ¶
func (cq *CountryQuery) AllX(ctx context.Context) []*Country
AllX is like All, but panics if an error occurs.
func (*CountryQuery) Clone ¶
func (cq *CountryQuery) Clone() *CountryQuery
Clone returns a duplicate of the CountryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CountryQuery) Count ¶
func (cq *CountryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CountryQuery) CountX ¶
func (cq *CountryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CountryQuery) ExecContext ¶
func (c *CountryQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryQuery) Exist ¶
func (cq *CountryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CountryQuery) ExistX ¶
func (cq *CountryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CountryQuery) First ¶
func (cq *CountryQuery) First(ctx context.Context) (*Country, error)
First returns the first Country entity from the query. Returns a *NotFoundError when no Country was found.
func (*CountryQuery) FirstID ¶
func (cq *CountryQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Country ID from the query. Returns a *NotFoundError when no Country ID was found.
func (*CountryQuery) FirstIDX ¶
func (cq *CountryQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*CountryQuery) FirstX ¶
func (cq *CountryQuery) FirstX(ctx context.Context) *Country
FirstX is like First, but panics if an error occurs.
func (*CountryQuery) GroupBy ¶
func (cq *CountryQuery) GroupBy(field string, fields ...string) *CountryGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Iso2 string `json:"iso2,omitempty"` Count int `json:"count,omitempty"` } client.Country.Query(). GroupBy(country.FieldIso2). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CountryQuery) IDs ¶
func (cq *CountryQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Country IDs.
func (*CountryQuery) IDsX ¶
func (cq *CountryQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*CountryQuery) Limit ¶
func (cq *CountryQuery) Limit(limit int) *CountryQuery
Limit the number of records to be returned by this query.
func (*CountryQuery) Offset ¶
func (cq *CountryQuery) Offset(offset int) *CountryQuery
Offset to start from.
func (*CountryQuery) Only ¶
func (cq *CountryQuery) Only(ctx context.Context) (*Country, error)
Only returns a single Country entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Country entity is found. Returns a *NotFoundError when no Country entities are found.
func (*CountryQuery) OnlyID ¶
func (cq *CountryQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Country ID in the query. Returns a *NotSingularError when more than one Country ID is found. Returns a *NotFoundError when no entities are found.
func (*CountryQuery) OnlyIDX ¶
func (cq *CountryQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CountryQuery) OnlyX ¶
func (cq *CountryQuery) OnlyX(ctx context.Context) *Country
OnlyX is like Only, but panics if an error occurs.
func (*CountryQuery) Order ¶
func (cq *CountryQuery) Order(o ...country.OrderOption) *CountryQuery
Order specifies how the records should be ordered.
func (*CountryQuery) QueryBanks ¶
func (cq *CountryQuery) QueryBanks() *BankQuery
QueryBanks chains the current query on the "banks" edge.
func (*CountryQuery) QueryContactUsers ¶
func (cq *CountryQuery) QueryContactUsers() *UserQuery
QueryContactUsers chains the current query on the "contact_users" edge.
func (*CountryQuery) QueryContext ¶
func (c *CountryQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryQuery) QueryLocations ¶
func (cq *CountryQuery) QueryLocations() *CountryLocationQuery
QueryLocations chains the current query on the "locations" edge.
func (*CountryQuery) QueryUsers ¶
func (cq *CountryQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*CountryQuery) Select ¶
func (cq *CountryQuery) Select(fields ...string) *CountrySelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Iso2 string `json:"iso2,omitempty"` } client.Country.Query(). Select(country.FieldIso2). Scan(ctx, &v)
func (*CountryQuery) Unique ¶
func (cq *CountryQuery) Unique(unique bool) *CountryQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*CountryQuery) Where ¶
func (cq *CountryQuery) Where(ps ...predicate.Country) *CountryQuery
Where adds a new predicate for the CountryQuery builder.
func (*CountryQuery) WithBanks ¶
func (cq *CountryQuery) WithBanks(opts ...func(*BankQuery)) *CountryQuery
WithBanks tells the query-builder to eager-load the nodes that are connected to the "banks" edge. The optional arguments are used to configure the query builder of the edge.
func (*CountryQuery) WithContactUsers ¶
func (cq *CountryQuery) WithContactUsers(opts ...func(*UserQuery)) *CountryQuery
WithContactUsers tells the query-builder to eager-load the nodes that are connected to the "contact_users" edge. The optional arguments are used to configure the query builder of the edge.
func (*CountryQuery) WithLocations ¶
func (cq *CountryQuery) WithLocations(opts ...func(*CountryLocationQuery)) *CountryQuery
WithLocations tells the query-builder to eager-load the nodes that are connected to the "locations" edge. The optional arguments are used to configure the query builder of the edge.
func (*CountryQuery) WithUsers ¶
func (cq *CountryQuery) WithUsers(opts ...func(*UserQuery)) *CountryQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type CountrySelect ¶
type CountrySelect struct { *CountryQuery // contains filtered or unexported fields }
CountrySelect is the builder for selecting fields of Country entities.
func (*CountrySelect) Aggregate ¶
func (cs *CountrySelect) Aggregate(fns ...AggregateFunc) *CountrySelect
Aggregate adds the given aggregation functions to the selector query.
func (*CountrySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CountrySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (CountrySelect) ExecContext ¶
func (c CountrySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountrySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CountrySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CountrySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CountrySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (CountrySelect) QueryContext ¶
func (c CountrySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountrySelect) Scan ¶
func (cs *CountrySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CountrySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CountryUpdate ¶
type CountryUpdate struct {
// contains filtered or unexported fields
}
CountryUpdate is the builder for updating Country entities.
func (*CountryUpdate) AddBankIDs ¶
func (cu *CountryUpdate) AddBankIDs(ids ...uint64) *CountryUpdate
AddBankIDs adds the "banks" edge to the Bank entity by IDs.
func (*CountryUpdate) AddBanks ¶
func (cu *CountryUpdate) AddBanks(b ...*Bank) *CountryUpdate
AddBanks adds the "banks" edges to the Bank entity.
func (*CountryUpdate) AddContactUserIDs ¶
func (cu *CountryUpdate) AddContactUserIDs(ids ...uint64) *CountryUpdate
AddContactUserIDs adds the "contact_users" edge to the User entity by IDs.
func (*CountryUpdate) AddContactUsers ¶
func (cu *CountryUpdate) AddContactUsers(u ...*User) *CountryUpdate
AddContactUsers adds the "contact_users" edges to the User entity.
func (*CountryUpdate) AddConversionRate ¶
func (cu *CountryUpdate) AddConversionRate(f float64) *CountryUpdate
AddConversionRate adds f to the "conversion_rate" field.
func (*CountryUpdate) AddLocationIDs ¶
func (cu *CountryUpdate) AddLocationIDs(ids ...uint64) *CountryUpdate
AddLocationIDs adds the "locations" edge to the CountryLocation entity by IDs.
func (*CountryUpdate) AddLocations ¶
func (cu *CountryUpdate) AddLocations(c ...*CountryLocation) *CountryUpdate
AddLocations adds the "locations" edges to the CountryLocation entity.
func (*CountryUpdate) AddStatus ¶
func (cu *CountryUpdate) AddStatus(u int8) *CountryUpdate
AddStatus adds u to the "status" field.
func (*CountryUpdate) AddUserIDs ¶
func (cu *CountryUpdate) AddUserIDs(ids ...uint64) *CountryUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*CountryUpdate) AddUsers ¶
func (cu *CountryUpdate) AddUsers(u ...*User) *CountryUpdate
AddUsers adds the "users" edges to the User entity.
func (*CountryUpdate) ClearBanks ¶
func (cu *CountryUpdate) ClearBanks() *CountryUpdate
ClearBanks clears all "banks" edges to the Bank entity.
func (*CountryUpdate) ClearCapital ¶
func (cu *CountryUpdate) ClearCapital() *CountryUpdate
ClearCapital clears the value of the "capital" field.
func (*CountryUpdate) ClearContactUsers ¶
func (cu *CountryUpdate) ClearContactUsers() *CountryUpdate
ClearContactUsers clears all "contact_users" edges to the User entity.
func (*CountryUpdate) ClearCurrencyCode ¶
func (cu *CountryUpdate) ClearCurrencyCode() *CountryUpdate
ClearCurrencyCode clears the value of the "currency_code" field.
func (*CountryUpdate) ClearCurrencyName ¶
func (cu *CountryUpdate) ClearCurrencyName() *CountryUpdate
ClearCurrencyName clears the value of the "currency_name" field.
func (*CountryUpdate) ClearCurrencySymbol ¶
func (cu *CountryUpdate) ClearCurrencySymbol() *CountryUpdate
ClearCurrencySymbol clears the value of the "currency_symbol" field.
func (*CountryUpdate) ClearLocations ¶
func (cu *CountryUpdate) ClearLocations() *CountryUpdate
ClearLocations clears all "locations" edges to the CountryLocation entity.
func (*CountryUpdate) ClearNumericCode ¶
func (cu *CountryUpdate) ClearNumericCode() *CountryUpdate
ClearNumericCode clears the value of the "numeric_code" field.
func (*CountryUpdate) ClearOfficialName ¶
func (cu *CountryUpdate) ClearOfficialName() *CountryUpdate
ClearOfficialName clears the value of the "official_name" field.
func (*CountryUpdate) ClearPhoneCode ¶
func (cu *CountryUpdate) ClearPhoneCode() *CountryUpdate
ClearPhoneCode clears the value of the "phone_code" field.
func (*CountryUpdate) ClearUsers ¶
func (cu *CountryUpdate) ClearUsers() *CountryUpdate
ClearUsers clears all "users" edges to the User entity.
func (*CountryUpdate) Exec ¶
func (cu *CountryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryUpdate) ExecContext ¶
func (c *CountryUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryUpdate) ExecX ¶
func (cu *CountryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryUpdate) Mutation ¶
func (cu *CountryUpdate) Mutation() *CountryMutation
Mutation returns the CountryMutation object of the builder.
func (*CountryUpdate) QueryContext ¶
func (c *CountryUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryUpdate) RemoveBankIDs ¶
func (cu *CountryUpdate) RemoveBankIDs(ids ...uint64) *CountryUpdate
RemoveBankIDs removes the "banks" edge to Bank entities by IDs.
func (*CountryUpdate) RemoveBanks ¶
func (cu *CountryUpdate) RemoveBanks(b ...*Bank) *CountryUpdate
RemoveBanks removes "banks" edges to Bank entities.
func (*CountryUpdate) RemoveContactUserIDs ¶
func (cu *CountryUpdate) RemoveContactUserIDs(ids ...uint64) *CountryUpdate
RemoveContactUserIDs removes the "contact_users" edge to User entities by IDs.
func (*CountryUpdate) RemoveContactUsers ¶
func (cu *CountryUpdate) RemoveContactUsers(u ...*User) *CountryUpdate
RemoveContactUsers removes "contact_users" edges to User entities.
func (*CountryUpdate) RemoveLocationIDs ¶
func (cu *CountryUpdate) RemoveLocationIDs(ids ...uint64) *CountryUpdate
RemoveLocationIDs removes the "locations" edge to CountryLocation entities by IDs.
func (*CountryUpdate) RemoveLocations ¶
func (cu *CountryUpdate) RemoveLocations(c ...*CountryLocation) *CountryUpdate
RemoveLocations removes "locations" edges to CountryLocation entities.
func (*CountryUpdate) RemoveUserIDs ¶
func (cu *CountryUpdate) RemoveUserIDs(ids ...uint64) *CountryUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*CountryUpdate) RemoveUsers ¶
func (cu *CountryUpdate) RemoveUsers(u ...*User) *CountryUpdate
RemoveUsers removes "users" edges to User entities.
func (*CountryUpdate) Save ¶
func (cu *CountryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CountryUpdate) SaveX ¶
func (cu *CountryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CountryUpdate) SetCapital ¶
func (cu *CountryUpdate) SetCapital(s string) *CountryUpdate
SetCapital sets the "capital" field.
func (*CountryUpdate) SetConversionRate ¶
func (cu *CountryUpdate) SetConversionRate(f float64) *CountryUpdate
SetConversionRate sets the "conversion_rate" field.
func (*CountryUpdate) SetCreatedAt ¶
func (cu *CountryUpdate) SetCreatedAt(t time.Time) *CountryUpdate
SetCreatedAt sets the "created_at" field.
func (*CountryUpdate) SetCurrencyCode ¶
func (cu *CountryUpdate) SetCurrencyCode(s string) *CountryUpdate
SetCurrencyCode sets the "currency_code" field.
func (*CountryUpdate) SetCurrencyName ¶
func (cu *CountryUpdate) SetCurrencyName(s string) *CountryUpdate
SetCurrencyName sets the "currency_name" field.
func (*CountryUpdate) SetCurrencySymbol ¶
func (cu *CountryUpdate) SetCurrencySymbol(s string) *CountryUpdate
SetCurrencySymbol sets the "currency_symbol" field.
func (*CountryUpdate) SetIso2 ¶
func (cu *CountryUpdate) SetIso2(s string) *CountryUpdate
SetIso2 sets the "iso2" field.
func (*CountryUpdate) SetIso3 ¶
func (cu *CountryUpdate) SetIso3(s string) *CountryUpdate
SetIso3 sets the "iso3" field.
func (*CountryUpdate) SetName ¶
func (cu *CountryUpdate) SetName(s string) *CountryUpdate
SetName sets the "name" field.
func (*CountryUpdate) SetNillableCapital ¶
func (cu *CountryUpdate) SetNillableCapital(s *string) *CountryUpdate
SetNillableCapital sets the "capital" field if the given value is not nil.
func (*CountryUpdate) SetNillableConversionRate ¶
func (cu *CountryUpdate) SetNillableConversionRate(f *float64) *CountryUpdate
SetNillableConversionRate sets the "conversion_rate" field if the given value is not nil.
func (*CountryUpdate) SetNillableCreatedAt ¶
func (cu *CountryUpdate) SetNillableCreatedAt(t *time.Time) *CountryUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CountryUpdate) SetNillableCurrencyCode ¶
func (cu *CountryUpdate) SetNillableCurrencyCode(s *string) *CountryUpdate
SetNillableCurrencyCode sets the "currency_code" field if the given value is not nil.
func (*CountryUpdate) SetNillableCurrencyName ¶
func (cu *CountryUpdate) SetNillableCurrencyName(s *string) *CountryUpdate
SetNillableCurrencyName sets the "currency_name" field if the given value is not nil.
func (*CountryUpdate) SetNillableCurrencySymbol ¶
func (cu *CountryUpdate) SetNillableCurrencySymbol(s *string) *CountryUpdate
SetNillableCurrencySymbol sets the "currency_symbol" field if the given value is not nil.
func (*CountryUpdate) SetNillableIso2 ¶
func (cu *CountryUpdate) SetNillableIso2(s *string) *CountryUpdate
SetNillableIso2 sets the "iso2" field if the given value is not nil.
func (*CountryUpdate) SetNillableIso3 ¶
func (cu *CountryUpdate) SetNillableIso3(s *string) *CountryUpdate
SetNillableIso3 sets the "iso3" field if the given value is not nil.
func (*CountryUpdate) SetNillableName ¶
func (cu *CountryUpdate) SetNillableName(s *string) *CountryUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*CountryUpdate) SetNillableNumericCode ¶
func (cu *CountryUpdate) SetNillableNumericCode(s *string) *CountryUpdate
SetNillableNumericCode sets the "numeric_code" field if the given value is not nil.
func (*CountryUpdate) SetNillableOfficialName ¶
func (cu *CountryUpdate) SetNillableOfficialName(s *string) *CountryUpdate
SetNillableOfficialName sets the "official_name" field if the given value is not nil.
func (*CountryUpdate) SetNillablePhoneCode ¶
func (cu *CountryUpdate) SetNillablePhoneCode(s *string) *CountryUpdate
SetNillablePhoneCode sets the "phone_code" field if the given value is not nil.
func (*CountryUpdate) SetNillableStatus ¶
func (cu *CountryUpdate) SetNillableStatus(u *uint8) *CountryUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CountryUpdate) SetNumericCode ¶
func (cu *CountryUpdate) SetNumericCode(s string) *CountryUpdate
SetNumericCode sets the "numeric_code" field.
func (*CountryUpdate) SetOfficialName ¶
func (cu *CountryUpdate) SetOfficialName(s string) *CountryUpdate
SetOfficialName sets the "official_name" field.
func (*CountryUpdate) SetPhoneCode ¶
func (cu *CountryUpdate) SetPhoneCode(s string) *CountryUpdate
SetPhoneCode sets the "phone_code" field.
func (*CountryUpdate) SetStatus ¶
func (cu *CountryUpdate) SetStatus(u uint8) *CountryUpdate
SetStatus sets the "status" field.
func (*CountryUpdate) SetUpdatedAt ¶
func (cu *CountryUpdate) SetUpdatedAt(t time.Time) *CountryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*CountryUpdate) Where ¶
func (cu *CountryUpdate) Where(ps ...predicate.Country) *CountryUpdate
Where appends a list predicates to the CountryUpdate builder.
type CountryUpdateOne ¶
type CountryUpdateOne struct {
// contains filtered or unexported fields
}
CountryUpdateOne is the builder for updating a single Country entity.
func (*CountryUpdateOne) AddBankIDs ¶
func (cuo *CountryUpdateOne) AddBankIDs(ids ...uint64) *CountryUpdateOne
AddBankIDs adds the "banks" edge to the Bank entity by IDs.
func (*CountryUpdateOne) AddBanks ¶
func (cuo *CountryUpdateOne) AddBanks(b ...*Bank) *CountryUpdateOne
AddBanks adds the "banks" edges to the Bank entity.
func (*CountryUpdateOne) AddContactUserIDs ¶
func (cuo *CountryUpdateOne) AddContactUserIDs(ids ...uint64) *CountryUpdateOne
AddContactUserIDs adds the "contact_users" edge to the User entity by IDs.
func (*CountryUpdateOne) AddContactUsers ¶
func (cuo *CountryUpdateOne) AddContactUsers(u ...*User) *CountryUpdateOne
AddContactUsers adds the "contact_users" edges to the User entity.
func (*CountryUpdateOne) AddConversionRate ¶
func (cuo *CountryUpdateOne) AddConversionRate(f float64) *CountryUpdateOne
AddConversionRate adds f to the "conversion_rate" field.
func (*CountryUpdateOne) AddLocationIDs ¶
func (cuo *CountryUpdateOne) AddLocationIDs(ids ...uint64) *CountryUpdateOne
AddLocationIDs adds the "locations" edge to the CountryLocation entity by IDs.
func (*CountryUpdateOne) AddLocations ¶
func (cuo *CountryUpdateOne) AddLocations(c ...*CountryLocation) *CountryUpdateOne
AddLocations adds the "locations" edges to the CountryLocation entity.
func (*CountryUpdateOne) AddStatus ¶
func (cuo *CountryUpdateOne) AddStatus(u int8) *CountryUpdateOne
AddStatus adds u to the "status" field.
func (*CountryUpdateOne) AddUserIDs ¶
func (cuo *CountryUpdateOne) AddUserIDs(ids ...uint64) *CountryUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*CountryUpdateOne) AddUsers ¶
func (cuo *CountryUpdateOne) AddUsers(u ...*User) *CountryUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*CountryUpdateOne) ClearBanks ¶
func (cuo *CountryUpdateOne) ClearBanks() *CountryUpdateOne
ClearBanks clears all "banks" edges to the Bank entity.
func (*CountryUpdateOne) ClearCapital ¶
func (cuo *CountryUpdateOne) ClearCapital() *CountryUpdateOne
ClearCapital clears the value of the "capital" field.
func (*CountryUpdateOne) ClearContactUsers ¶
func (cuo *CountryUpdateOne) ClearContactUsers() *CountryUpdateOne
ClearContactUsers clears all "contact_users" edges to the User entity.
func (*CountryUpdateOne) ClearCurrencyCode ¶
func (cuo *CountryUpdateOne) ClearCurrencyCode() *CountryUpdateOne
ClearCurrencyCode clears the value of the "currency_code" field.
func (*CountryUpdateOne) ClearCurrencyName ¶
func (cuo *CountryUpdateOne) ClearCurrencyName() *CountryUpdateOne
ClearCurrencyName clears the value of the "currency_name" field.
func (*CountryUpdateOne) ClearCurrencySymbol ¶
func (cuo *CountryUpdateOne) ClearCurrencySymbol() *CountryUpdateOne
ClearCurrencySymbol clears the value of the "currency_symbol" field.
func (*CountryUpdateOne) ClearLocations ¶
func (cuo *CountryUpdateOne) ClearLocations() *CountryUpdateOne
ClearLocations clears all "locations" edges to the CountryLocation entity.
func (*CountryUpdateOne) ClearNumericCode ¶
func (cuo *CountryUpdateOne) ClearNumericCode() *CountryUpdateOne
ClearNumericCode clears the value of the "numeric_code" field.
func (*CountryUpdateOne) ClearOfficialName ¶
func (cuo *CountryUpdateOne) ClearOfficialName() *CountryUpdateOne
ClearOfficialName clears the value of the "official_name" field.
func (*CountryUpdateOne) ClearPhoneCode ¶
func (cuo *CountryUpdateOne) ClearPhoneCode() *CountryUpdateOne
ClearPhoneCode clears the value of the "phone_code" field.
func (*CountryUpdateOne) ClearUsers ¶
func (cuo *CountryUpdateOne) ClearUsers() *CountryUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*CountryUpdateOne) Exec ¶
func (cuo *CountryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CountryUpdateOne) ExecContext ¶
func (c *CountryUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*CountryUpdateOne) ExecX ¶
func (cuo *CountryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryUpdateOne) Mutation ¶
func (cuo *CountryUpdateOne) Mutation() *CountryMutation
Mutation returns the CountryMutation object of the builder.
func (*CountryUpdateOne) QueryContext ¶
func (c *CountryUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*CountryUpdateOne) RemoveBankIDs ¶
func (cuo *CountryUpdateOne) RemoveBankIDs(ids ...uint64) *CountryUpdateOne
RemoveBankIDs removes the "banks" edge to Bank entities by IDs.
func (*CountryUpdateOne) RemoveBanks ¶
func (cuo *CountryUpdateOne) RemoveBanks(b ...*Bank) *CountryUpdateOne
RemoveBanks removes "banks" edges to Bank entities.
func (*CountryUpdateOne) RemoveContactUserIDs ¶
func (cuo *CountryUpdateOne) RemoveContactUserIDs(ids ...uint64) *CountryUpdateOne
RemoveContactUserIDs removes the "contact_users" edge to User entities by IDs.
func (*CountryUpdateOne) RemoveContactUsers ¶
func (cuo *CountryUpdateOne) RemoveContactUsers(u ...*User) *CountryUpdateOne
RemoveContactUsers removes "contact_users" edges to User entities.
func (*CountryUpdateOne) RemoveLocationIDs ¶
func (cuo *CountryUpdateOne) RemoveLocationIDs(ids ...uint64) *CountryUpdateOne
RemoveLocationIDs removes the "locations" edge to CountryLocation entities by IDs.
func (*CountryUpdateOne) RemoveLocations ¶
func (cuo *CountryUpdateOne) RemoveLocations(c ...*CountryLocation) *CountryUpdateOne
RemoveLocations removes "locations" edges to CountryLocation entities.
func (*CountryUpdateOne) RemoveUserIDs ¶
func (cuo *CountryUpdateOne) RemoveUserIDs(ids ...uint64) *CountryUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*CountryUpdateOne) RemoveUsers ¶
func (cuo *CountryUpdateOne) RemoveUsers(u ...*User) *CountryUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*CountryUpdateOne) Save ¶
func (cuo *CountryUpdateOne) Save(ctx context.Context) (*Country, error)
Save executes the query and returns the updated Country entity.
func (*CountryUpdateOne) SaveX ¶
func (cuo *CountryUpdateOne) SaveX(ctx context.Context) *Country
SaveX is like Save, but panics if an error occurs.
func (*CountryUpdateOne) Select ¶
func (cuo *CountryUpdateOne) Select(field string, fields ...string) *CountryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CountryUpdateOne) SetCapital ¶
func (cuo *CountryUpdateOne) SetCapital(s string) *CountryUpdateOne
SetCapital sets the "capital" field.
func (*CountryUpdateOne) SetConversionRate ¶
func (cuo *CountryUpdateOne) SetConversionRate(f float64) *CountryUpdateOne
SetConversionRate sets the "conversion_rate" field.
func (*CountryUpdateOne) SetCreatedAt ¶
func (cuo *CountryUpdateOne) SetCreatedAt(t time.Time) *CountryUpdateOne
SetCreatedAt sets the "created_at" field.
func (*CountryUpdateOne) SetCurrencyCode ¶
func (cuo *CountryUpdateOne) SetCurrencyCode(s string) *CountryUpdateOne
SetCurrencyCode sets the "currency_code" field.
func (*CountryUpdateOne) SetCurrencyName ¶
func (cuo *CountryUpdateOne) SetCurrencyName(s string) *CountryUpdateOne
SetCurrencyName sets the "currency_name" field.
func (*CountryUpdateOne) SetCurrencySymbol ¶
func (cuo *CountryUpdateOne) SetCurrencySymbol(s string) *CountryUpdateOne
SetCurrencySymbol sets the "currency_symbol" field.
func (*CountryUpdateOne) SetIso2 ¶
func (cuo *CountryUpdateOne) SetIso2(s string) *CountryUpdateOne
SetIso2 sets the "iso2" field.
func (*CountryUpdateOne) SetIso3 ¶
func (cuo *CountryUpdateOne) SetIso3(s string) *CountryUpdateOne
SetIso3 sets the "iso3" field.
func (*CountryUpdateOne) SetName ¶
func (cuo *CountryUpdateOne) SetName(s string) *CountryUpdateOne
SetName sets the "name" field.
func (*CountryUpdateOne) SetNillableCapital ¶
func (cuo *CountryUpdateOne) SetNillableCapital(s *string) *CountryUpdateOne
SetNillableCapital sets the "capital" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableConversionRate ¶
func (cuo *CountryUpdateOne) SetNillableConversionRate(f *float64) *CountryUpdateOne
SetNillableConversionRate sets the "conversion_rate" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableCreatedAt ¶
func (cuo *CountryUpdateOne) SetNillableCreatedAt(t *time.Time) *CountryUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableCurrencyCode ¶
func (cuo *CountryUpdateOne) SetNillableCurrencyCode(s *string) *CountryUpdateOne
SetNillableCurrencyCode sets the "currency_code" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableCurrencyName ¶
func (cuo *CountryUpdateOne) SetNillableCurrencyName(s *string) *CountryUpdateOne
SetNillableCurrencyName sets the "currency_name" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableCurrencySymbol ¶
func (cuo *CountryUpdateOne) SetNillableCurrencySymbol(s *string) *CountryUpdateOne
SetNillableCurrencySymbol sets the "currency_symbol" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableIso2 ¶
func (cuo *CountryUpdateOne) SetNillableIso2(s *string) *CountryUpdateOne
SetNillableIso2 sets the "iso2" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableIso3 ¶
func (cuo *CountryUpdateOne) SetNillableIso3(s *string) *CountryUpdateOne
SetNillableIso3 sets the "iso3" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableName ¶
func (cuo *CountryUpdateOne) SetNillableName(s *string) *CountryUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableNumericCode ¶
func (cuo *CountryUpdateOne) SetNillableNumericCode(s *string) *CountryUpdateOne
SetNillableNumericCode sets the "numeric_code" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableOfficialName ¶
func (cuo *CountryUpdateOne) SetNillableOfficialName(s *string) *CountryUpdateOne
SetNillableOfficialName sets the "official_name" field if the given value is not nil.
func (*CountryUpdateOne) SetNillablePhoneCode ¶
func (cuo *CountryUpdateOne) SetNillablePhoneCode(s *string) *CountryUpdateOne
SetNillablePhoneCode sets the "phone_code" field if the given value is not nil.
func (*CountryUpdateOne) SetNillableStatus ¶
func (cuo *CountryUpdateOne) SetNillableStatus(u *uint8) *CountryUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*CountryUpdateOne) SetNumericCode ¶
func (cuo *CountryUpdateOne) SetNumericCode(s string) *CountryUpdateOne
SetNumericCode sets the "numeric_code" field.
func (*CountryUpdateOne) SetOfficialName ¶
func (cuo *CountryUpdateOne) SetOfficialName(s string) *CountryUpdateOne
SetOfficialName sets the "official_name" field.
func (*CountryUpdateOne) SetPhoneCode ¶
func (cuo *CountryUpdateOne) SetPhoneCode(s string) *CountryUpdateOne
SetPhoneCode sets the "phone_code" field.
func (*CountryUpdateOne) SetStatus ¶
func (cuo *CountryUpdateOne) SetStatus(u uint8) *CountryUpdateOne
SetStatus sets the "status" field.
func (*CountryUpdateOne) SetUpdatedAt ¶
func (cuo *CountryUpdateOne) SetUpdatedAt(t time.Time) *CountryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*CountryUpdateOne) Where ¶
func (cuo *CountryUpdateOne) Where(ps ...predicate.Country) *CountryUpdateOne
Where appends a list predicates to the CountryUpdate builder.
type CountryUpsert ¶
CountryUpsert is the "OnConflict" setter.
func (*CountryUpsert) AddConversionRate ¶
func (u *CountryUpsert) AddConversionRate(v float64) *CountryUpsert
AddConversionRate adds v to the "conversion_rate" field.
func (*CountryUpsert) AddStatus ¶
func (u *CountryUpsert) AddStatus(v uint8) *CountryUpsert
AddStatus adds v to the "status" field.
func (*CountryUpsert) ClearCapital ¶
func (u *CountryUpsert) ClearCapital() *CountryUpsert
ClearCapital clears the value of the "capital" field.
func (*CountryUpsert) ClearCurrencyCode ¶
func (u *CountryUpsert) ClearCurrencyCode() *CountryUpsert
ClearCurrencyCode clears the value of the "currency_code" field.
func (*CountryUpsert) ClearCurrencyName ¶
func (u *CountryUpsert) ClearCurrencyName() *CountryUpsert
ClearCurrencyName clears the value of the "currency_name" field.
func (*CountryUpsert) ClearCurrencySymbol ¶
func (u *CountryUpsert) ClearCurrencySymbol() *CountryUpsert
ClearCurrencySymbol clears the value of the "currency_symbol" field.
func (*CountryUpsert) ClearNumericCode ¶
func (u *CountryUpsert) ClearNumericCode() *CountryUpsert
ClearNumericCode clears the value of the "numeric_code" field.
func (*CountryUpsert) ClearOfficialName ¶
func (u *CountryUpsert) ClearOfficialName() *CountryUpsert
ClearOfficialName clears the value of the "official_name" field.
func (*CountryUpsert) ClearPhoneCode ¶
func (u *CountryUpsert) ClearPhoneCode() *CountryUpsert
ClearPhoneCode clears the value of the "phone_code" field.
func (*CountryUpsert) SetCapital ¶
func (u *CountryUpsert) SetCapital(v string) *CountryUpsert
SetCapital sets the "capital" field.
func (*CountryUpsert) SetConversionRate ¶
func (u *CountryUpsert) SetConversionRate(v float64) *CountryUpsert
SetConversionRate sets the "conversion_rate" field.
func (*CountryUpsert) SetCreatedAt ¶
func (u *CountryUpsert) SetCreatedAt(v time.Time) *CountryUpsert
SetCreatedAt sets the "created_at" field.
func (*CountryUpsert) SetCurrencyCode ¶
func (u *CountryUpsert) SetCurrencyCode(v string) *CountryUpsert
SetCurrencyCode sets the "currency_code" field.
func (*CountryUpsert) SetCurrencyName ¶
func (u *CountryUpsert) SetCurrencyName(v string) *CountryUpsert
SetCurrencyName sets the "currency_name" field.
func (*CountryUpsert) SetCurrencySymbol ¶
func (u *CountryUpsert) SetCurrencySymbol(v string) *CountryUpsert
SetCurrencySymbol sets the "currency_symbol" field.
func (*CountryUpsert) SetIso2 ¶
func (u *CountryUpsert) SetIso2(v string) *CountryUpsert
SetIso2 sets the "iso2" field.
func (*CountryUpsert) SetIso3 ¶
func (u *CountryUpsert) SetIso3(v string) *CountryUpsert
SetIso3 sets the "iso3" field.
func (*CountryUpsert) SetName ¶
func (u *CountryUpsert) SetName(v string) *CountryUpsert
SetName sets the "name" field.
func (*CountryUpsert) SetNumericCode ¶
func (u *CountryUpsert) SetNumericCode(v string) *CountryUpsert
SetNumericCode sets the "numeric_code" field.
func (*CountryUpsert) SetOfficialName ¶
func (u *CountryUpsert) SetOfficialName(v string) *CountryUpsert
SetOfficialName sets the "official_name" field.
func (*CountryUpsert) SetPhoneCode ¶
func (u *CountryUpsert) SetPhoneCode(v string) *CountryUpsert
SetPhoneCode sets the "phone_code" field.
func (*CountryUpsert) SetStatus ¶
func (u *CountryUpsert) SetStatus(v uint8) *CountryUpsert
SetStatus sets the "status" field.
func (*CountryUpsert) SetUpdatedAt ¶
func (u *CountryUpsert) SetUpdatedAt(v time.Time) *CountryUpsert
SetUpdatedAt sets the "updated_at" field.
func (*CountryUpsert) UpdateCapital ¶
func (u *CountryUpsert) UpdateCapital() *CountryUpsert
UpdateCapital sets the "capital" field to the value that was provided on create.
func (*CountryUpsert) UpdateConversionRate ¶
func (u *CountryUpsert) UpdateConversionRate() *CountryUpsert
UpdateConversionRate sets the "conversion_rate" field to the value that was provided on create.
func (*CountryUpsert) UpdateCreatedAt ¶
func (u *CountryUpsert) UpdateCreatedAt() *CountryUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*CountryUpsert) UpdateCurrencyCode ¶
func (u *CountryUpsert) UpdateCurrencyCode() *CountryUpsert
UpdateCurrencyCode sets the "currency_code" field to the value that was provided on create.
func (*CountryUpsert) UpdateCurrencyName ¶
func (u *CountryUpsert) UpdateCurrencyName() *CountryUpsert
UpdateCurrencyName sets the "currency_name" field to the value that was provided on create.
func (*CountryUpsert) UpdateCurrencySymbol ¶
func (u *CountryUpsert) UpdateCurrencySymbol() *CountryUpsert
UpdateCurrencySymbol sets the "currency_symbol" field to the value that was provided on create.
func (*CountryUpsert) UpdateIso2 ¶
func (u *CountryUpsert) UpdateIso2() *CountryUpsert
UpdateIso2 sets the "iso2" field to the value that was provided on create.
func (*CountryUpsert) UpdateIso3 ¶
func (u *CountryUpsert) UpdateIso3() *CountryUpsert
UpdateIso3 sets the "iso3" field to the value that was provided on create.
func (*CountryUpsert) UpdateName ¶
func (u *CountryUpsert) UpdateName() *CountryUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*CountryUpsert) UpdateNumericCode ¶
func (u *CountryUpsert) UpdateNumericCode() *CountryUpsert
UpdateNumericCode sets the "numeric_code" field to the value that was provided on create.
func (*CountryUpsert) UpdateOfficialName ¶
func (u *CountryUpsert) UpdateOfficialName() *CountryUpsert
UpdateOfficialName sets the "official_name" field to the value that was provided on create.
func (*CountryUpsert) UpdatePhoneCode ¶
func (u *CountryUpsert) UpdatePhoneCode() *CountryUpsert
UpdatePhoneCode sets the "phone_code" field to the value that was provided on create.
func (*CountryUpsert) UpdateStatus ¶
func (u *CountryUpsert) UpdateStatus() *CountryUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
func (*CountryUpsert) UpdateUpdatedAt ¶
func (u *CountryUpsert) UpdateUpdatedAt() *CountryUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type CountryUpsertBulk ¶
type CountryUpsertBulk struct {
// contains filtered or unexported fields
}
CountryUpsertBulk is the builder for "upsert"-ing a bulk of Country nodes.
func (*CountryUpsertBulk) AddConversionRate ¶
func (u *CountryUpsertBulk) AddConversionRate(v float64) *CountryUpsertBulk
AddConversionRate adds v to the "conversion_rate" field.
func (*CountryUpsertBulk) AddStatus ¶
func (u *CountryUpsertBulk) AddStatus(v uint8) *CountryUpsertBulk
AddStatus adds v to the "status" field.
func (*CountryUpsertBulk) ClearCapital ¶
func (u *CountryUpsertBulk) ClearCapital() *CountryUpsertBulk
ClearCapital clears the value of the "capital" field.
func (*CountryUpsertBulk) ClearCurrencyCode ¶
func (u *CountryUpsertBulk) ClearCurrencyCode() *CountryUpsertBulk
ClearCurrencyCode clears the value of the "currency_code" field.
func (*CountryUpsertBulk) ClearCurrencyName ¶
func (u *CountryUpsertBulk) ClearCurrencyName() *CountryUpsertBulk
ClearCurrencyName clears the value of the "currency_name" field.
func (*CountryUpsertBulk) ClearCurrencySymbol ¶
func (u *CountryUpsertBulk) ClearCurrencySymbol() *CountryUpsertBulk
ClearCurrencySymbol clears the value of the "currency_symbol" field.
func (*CountryUpsertBulk) ClearNumericCode ¶
func (u *CountryUpsertBulk) ClearNumericCode() *CountryUpsertBulk
ClearNumericCode clears the value of the "numeric_code" field.
func (*CountryUpsertBulk) ClearOfficialName ¶
func (u *CountryUpsertBulk) ClearOfficialName() *CountryUpsertBulk
ClearOfficialName clears the value of the "official_name" field.
func (*CountryUpsertBulk) ClearPhoneCode ¶
func (u *CountryUpsertBulk) ClearPhoneCode() *CountryUpsertBulk
ClearPhoneCode clears the value of the "phone_code" field.
func (*CountryUpsertBulk) DoNothing ¶
func (u *CountryUpsertBulk) DoNothing() *CountryUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CountryUpsertBulk) Exec ¶
func (u *CountryUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryUpsertBulk) ExecX ¶
func (u *CountryUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryUpsertBulk) Ignore ¶
func (u *CountryUpsertBulk) Ignore() *CountryUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Country.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CountryUpsertBulk) SetCapital ¶
func (u *CountryUpsertBulk) SetCapital(v string) *CountryUpsertBulk
SetCapital sets the "capital" field.
func (*CountryUpsertBulk) SetConversionRate ¶
func (u *CountryUpsertBulk) SetConversionRate(v float64) *CountryUpsertBulk
SetConversionRate sets the "conversion_rate" field.
func (*CountryUpsertBulk) SetCreatedAt ¶
func (u *CountryUpsertBulk) SetCreatedAt(v time.Time) *CountryUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*CountryUpsertBulk) SetCurrencyCode ¶
func (u *CountryUpsertBulk) SetCurrencyCode(v string) *CountryUpsertBulk
SetCurrencyCode sets the "currency_code" field.
func (*CountryUpsertBulk) SetCurrencyName ¶
func (u *CountryUpsertBulk) SetCurrencyName(v string) *CountryUpsertBulk
SetCurrencyName sets the "currency_name" field.
func (*CountryUpsertBulk) SetCurrencySymbol ¶
func (u *CountryUpsertBulk) SetCurrencySymbol(v string) *CountryUpsertBulk
SetCurrencySymbol sets the "currency_symbol" field.
func (*CountryUpsertBulk) SetIso2 ¶
func (u *CountryUpsertBulk) SetIso2(v string) *CountryUpsertBulk
SetIso2 sets the "iso2" field.
func (*CountryUpsertBulk) SetIso3 ¶
func (u *CountryUpsertBulk) SetIso3(v string) *CountryUpsertBulk
SetIso3 sets the "iso3" field.
func (*CountryUpsertBulk) SetName ¶
func (u *CountryUpsertBulk) SetName(v string) *CountryUpsertBulk
SetName sets the "name" field.
func (*CountryUpsertBulk) SetNumericCode ¶
func (u *CountryUpsertBulk) SetNumericCode(v string) *CountryUpsertBulk
SetNumericCode sets the "numeric_code" field.
func (*CountryUpsertBulk) SetOfficialName ¶
func (u *CountryUpsertBulk) SetOfficialName(v string) *CountryUpsertBulk
SetOfficialName sets the "official_name" field.
func (*CountryUpsertBulk) SetPhoneCode ¶
func (u *CountryUpsertBulk) SetPhoneCode(v string) *CountryUpsertBulk
SetPhoneCode sets the "phone_code" field.
func (*CountryUpsertBulk) SetStatus ¶
func (u *CountryUpsertBulk) SetStatus(v uint8) *CountryUpsertBulk
SetStatus sets the "status" field.
func (*CountryUpsertBulk) SetUpdatedAt ¶
func (u *CountryUpsertBulk) SetUpdatedAt(v time.Time) *CountryUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*CountryUpsertBulk) Update ¶
func (u *CountryUpsertBulk) Update(set func(*CountryUpsert)) *CountryUpsertBulk
Update allows overriding fields `UPDATE` values. See the CountryCreateBulk.OnConflict documentation for more info.
func (*CountryUpsertBulk) UpdateCapital ¶
func (u *CountryUpsertBulk) UpdateCapital() *CountryUpsertBulk
UpdateCapital sets the "capital" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateConversionRate ¶
func (u *CountryUpsertBulk) UpdateConversionRate() *CountryUpsertBulk
UpdateConversionRate sets the "conversion_rate" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateCreatedAt ¶
func (u *CountryUpsertBulk) UpdateCreatedAt() *CountryUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateCurrencyCode ¶
func (u *CountryUpsertBulk) UpdateCurrencyCode() *CountryUpsertBulk
UpdateCurrencyCode sets the "currency_code" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateCurrencyName ¶
func (u *CountryUpsertBulk) UpdateCurrencyName() *CountryUpsertBulk
UpdateCurrencyName sets the "currency_name" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateCurrencySymbol ¶
func (u *CountryUpsertBulk) UpdateCurrencySymbol() *CountryUpsertBulk
UpdateCurrencySymbol sets the "currency_symbol" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateIso2 ¶
func (u *CountryUpsertBulk) UpdateIso2() *CountryUpsertBulk
UpdateIso2 sets the "iso2" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateIso3 ¶
func (u *CountryUpsertBulk) UpdateIso3() *CountryUpsertBulk
UpdateIso3 sets the "iso3" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateName ¶
func (u *CountryUpsertBulk) UpdateName() *CountryUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateNewValues ¶
func (u *CountryUpsertBulk) UpdateNewValues() *CountryUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Country.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(country.FieldID) }), ). Exec(ctx)
func (*CountryUpsertBulk) UpdateNumericCode ¶
func (u *CountryUpsertBulk) UpdateNumericCode() *CountryUpsertBulk
UpdateNumericCode sets the "numeric_code" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateOfficialName ¶
func (u *CountryUpsertBulk) UpdateOfficialName() *CountryUpsertBulk
UpdateOfficialName sets the "official_name" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdatePhoneCode ¶
func (u *CountryUpsertBulk) UpdatePhoneCode() *CountryUpsertBulk
UpdatePhoneCode sets the "phone_code" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateStatus ¶
func (u *CountryUpsertBulk) UpdateStatus() *CountryUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
func (*CountryUpsertBulk) UpdateUpdatedAt ¶
func (u *CountryUpsertBulk) UpdateUpdatedAt() *CountryUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type CountryUpsertOne ¶
type CountryUpsertOne struct {
// contains filtered or unexported fields
}
CountryUpsertOne is the builder for "upsert"-ing
one Country node.
func (*CountryUpsertOne) AddConversionRate ¶
func (u *CountryUpsertOne) AddConversionRate(v float64) *CountryUpsertOne
AddConversionRate adds v to the "conversion_rate" field.
func (*CountryUpsertOne) AddStatus ¶
func (u *CountryUpsertOne) AddStatus(v uint8) *CountryUpsertOne
AddStatus adds v to the "status" field.
func (*CountryUpsertOne) ClearCapital ¶
func (u *CountryUpsertOne) ClearCapital() *CountryUpsertOne
ClearCapital clears the value of the "capital" field.
func (*CountryUpsertOne) ClearCurrencyCode ¶
func (u *CountryUpsertOne) ClearCurrencyCode() *CountryUpsertOne
ClearCurrencyCode clears the value of the "currency_code" field.
func (*CountryUpsertOne) ClearCurrencyName ¶
func (u *CountryUpsertOne) ClearCurrencyName() *CountryUpsertOne
ClearCurrencyName clears the value of the "currency_name" field.
func (*CountryUpsertOne) ClearCurrencySymbol ¶
func (u *CountryUpsertOne) ClearCurrencySymbol() *CountryUpsertOne
ClearCurrencySymbol clears the value of the "currency_symbol" field.
func (*CountryUpsertOne) ClearNumericCode ¶
func (u *CountryUpsertOne) ClearNumericCode() *CountryUpsertOne
ClearNumericCode clears the value of the "numeric_code" field.
func (*CountryUpsertOne) ClearOfficialName ¶
func (u *CountryUpsertOne) ClearOfficialName() *CountryUpsertOne
ClearOfficialName clears the value of the "official_name" field.
func (*CountryUpsertOne) ClearPhoneCode ¶
func (u *CountryUpsertOne) ClearPhoneCode() *CountryUpsertOne
ClearPhoneCode clears the value of the "phone_code" field.
func (*CountryUpsertOne) DoNothing ¶
func (u *CountryUpsertOne) DoNothing() *CountryUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CountryUpsertOne) Exec ¶
func (u *CountryUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*CountryUpsertOne) ExecX ¶
func (u *CountryUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CountryUpsertOne) ID ¶
func (u *CountryUpsertOne) ID(ctx context.Context) (id uint64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*CountryUpsertOne) IDX ¶
func (u *CountryUpsertOne) IDX(ctx context.Context) uint64
IDX is like ID, but panics if an error occurs.
func (*CountryUpsertOne) Ignore ¶
func (u *CountryUpsertOne) Ignore() *CountryUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Country.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CountryUpsertOne) SetCapital ¶
func (u *CountryUpsertOne) SetCapital(v string) *CountryUpsertOne
SetCapital sets the "capital" field.
func (*CountryUpsertOne) SetConversionRate ¶
func (u *CountryUpsertOne) SetConversionRate(v float64) *CountryUpsertOne
SetConversionRate sets the "conversion_rate" field.
func (*CountryUpsertOne) SetCreatedAt ¶
func (u *CountryUpsertOne) SetCreatedAt(v time.Time) *CountryUpsertOne
SetCreatedAt sets the "created_at" field.
func (*CountryUpsertOne) SetCurrencyCode ¶
func (u *CountryUpsertOne) SetCurrencyCode(v string) *CountryUpsertOne
SetCurrencyCode sets the "currency_code" field.
func (*CountryUpsertOne) SetCurrencyName ¶
func (u *CountryUpsertOne) SetCurrencyName(v string) *CountryUpsertOne
SetCurrencyName sets the "currency_name" field.
func (*CountryUpsertOne) SetCurrencySymbol ¶
func (u *CountryUpsertOne) SetCurrencySymbol(v string) *CountryUpsertOne
SetCurrencySymbol sets the "currency_symbol" field.
func (*CountryUpsertOne) SetIso2 ¶
func (u *CountryUpsertOne) SetIso2(v string) *CountryUpsertOne
SetIso2 sets the "iso2" field.
func (*CountryUpsertOne) SetIso3 ¶
func (u *CountryUpsertOne) SetIso3(v string) *CountryUpsertOne
SetIso3 sets the "iso3" field.
func (*CountryUpsertOne) SetName ¶
func (u *CountryUpsertOne) SetName(v string) *CountryUpsertOne
SetName sets the "name" field.
func (*CountryUpsertOne) SetNumericCode ¶
func (u *CountryUpsertOne) SetNumericCode(v string) *CountryUpsertOne
SetNumericCode sets the "numeric_code" field.
func (*CountryUpsertOne) SetOfficialName ¶
func (u *CountryUpsertOne) SetOfficialName(v string) *CountryUpsertOne
SetOfficialName sets the "official_name" field.
func (*CountryUpsertOne) SetPhoneCode ¶
func (u *CountryUpsertOne) SetPhoneCode(v string) *CountryUpsertOne
SetPhoneCode sets the "phone_code" field.
func (*CountryUpsertOne) SetStatus ¶
func (u *CountryUpsertOne) SetStatus(v uint8) *CountryUpsertOne
SetStatus sets the "status" field.
func (*CountryUpsertOne) SetUpdatedAt ¶
func (u *CountryUpsertOne) SetUpdatedAt(v time.Time) *CountryUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*CountryUpsertOne) Update ¶
func (u *CountryUpsertOne) Update(set func(*CountryUpsert)) *CountryUpsertOne
Update allows overriding fields `UPDATE` values. See the CountryCreate.OnConflict documentation for more info.
func (*CountryUpsertOne) UpdateCapital ¶
func (u *CountryUpsertOne) UpdateCapital() *CountryUpsertOne
UpdateCapital sets the "capital" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateConversionRate ¶
func (u *CountryUpsertOne) UpdateConversionRate() *CountryUpsertOne
UpdateConversionRate sets the "conversion_rate" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateCreatedAt ¶
func (u *CountryUpsertOne) UpdateCreatedAt() *CountryUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateCurrencyCode ¶
func (u *CountryUpsertOne) UpdateCurrencyCode() *CountryUpsertOne
UpdateCurrencyCode sets the "currency_code" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateCurrencyName ¶
func (u *CountryUpsertOne) UpdateCurrencyName() *CountryUpsertOne
UpdateCurrencyName sets the "currency_name" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateCurrencySymbol ¶
func (u *CountryUpsertOne) UpdateCurrencySymbol() *CountryUpsertOne
UpdateCurrencySymbol sets the "currency_symbol" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateIso2 ¶
func (u *CountryUpsertOne) UpdateIso2() *CountryUpsertOne
UpdateIso2 sets the "iso2" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateIso3 ¶
func (u *CountryUpsertOne) UpdateIso3() *CountryUpsertOne
UpdateIso3 sets the "iso3" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateName ¶
func (u *CountryUpsertOne) UpdateName() *CountryUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateNewValues ¶
func (u *CountryUpsertOne) UpdateNewValues() *CountryUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.Country.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(country.FieldID) }), ). Exec(ctx)
func (*CountryUpsertOne) UpdateNumericCode ¶
func (u *CountryUpsertOne) UpdateNumericCode() *CountryUpsertOne
UpdateNumericCode sets the "numeric_code" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateOfficialName ¶
func (u *CountryUpsertOne) UpdateOfficialName() *CountryUpsertOne
UpdateOfficialName sets the "official_name" field to the value that was provided on create.
func (*CountryUpsertOne) UpdatePhoneCode ¶
func (u *CountryUpsertOne) UpdatePhoneCode() *CountryUpsertOne
UpdatePhoneCode sets the "phone_code" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateStatus ¶
func (u *CountryUpsertOne) UpdateStatus() *CountryUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
func (*CountryUpsertOne) UpdateUpdatedAt ¶
func (u *CountryUpsertOne) UpdateUpdatedAt() *CountryUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Admin is the client for interacting with the Admin builders. Admin *AdminClient // Bank is the client for interacting with the Bank builders. Bank *BankClient // Country is the client for interacting with the Country builders. Country *CountryClient // CountryLocation is the client for interacting with the CountryLocation builders. CountryLocation *CountryLocationClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type User ¶
type User struct { // ID of the ent. // Primary key for the user ID uint64 `json:"id,omitempty"` // Username of the user Username string `json:"username,omitempty"` // Full name of the user Name string `json:"name,omitempty"` // Email address of the user Email string `json:"email,omitempty"` // Timestamp when email was verified EmailVerifiedAt *time.Time `json:"email_verified_at,omitempty"` // Password for the user Password string `json:"-"` // Second password for the user Password2 string `json:"-"` // Country ID of the user CountryID *uint64 `json:"country_id,omitempty"` // Contact country ID of the user ContactCountryID *uint64 `json:"contact_country_id,omitempty"` // Contact number of the user ContactNumber *string `json:"contact_number,omitempty"` // Full contact number of the user FullContactNumber *string `json:"full_contact_number,omitempty"` // ID of the introducer user IntroducerUserID *uint64 `json:"introducer_user_id,omitempty"` // Preferred language of the user Lang string `json:"lang,omitempty"` // Avatar of the user Avatar *string `json:"avatar,omitempty"` // Credit 1 balance Credit1 float64 `json:"credit_1,omitempty"` // Credit 2 balance Credit2 float64 `json:"credit_2,omitempty"` // Credit 3 balance Credit3 float64 `json:"credit_3,omitempty"` // Credit 4 balance Credit4 float64 `json:"credit_4,omitempty"` // Credit 5 balance Credit5 float64 `json:"credit_5,omitempty"` // Bank ID of the user BankID *uint64 `json:"bank_id,omitempty"` // Bank account name of the user BankAccountName *string `json:"bank_account_name,omitempty"` // Bank account number of the user BankAccountNumber *string `json:"bank_account_number,omitempty"` // National ID of the user NationalID *string `json:"national_id,omitempty"` // Whether this is the user's first login FirstLogin bool `json:"first_login,omitempty"` // Timestamp until the user is banned BanUntil *time.Time `json:"ban_until,omitempty"` // Timestamp of the user's latest login NewLoginAt *time.Time `json:"new_login_at,omitempty"` // Timestamp of the user's last login LastLoginAt *time.Time `json:"last_login_at,omitempty"` // Unilevel of the user Unilevel *uint64 `json:"unilevel,omitempty"` // Record creation timestamp CreatedAt time.Time `json:"created_at,omitempty"` // Record update timestamp UpdatedAt time.Time `json:"updated_at,omitempty"` // Record deleted timestamp DeletedAt *time.Time `json:"deleted_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) ExecContext ¶
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*User) QueryContactCountry ¶
func (u *User) QueryContactCountry() *CountryQuery
QueryContactCountry queries the "contact_country" edge of the User entity.
func (*User) QueryContext ¶
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*User) QueryCountry ¶
func (u *User) QueryCountry() *CountryQuery
QueryCountry queries the "country" edge of the User entity.
func (*User) QueryIntroducedUsers ¶
QueryIntroducedUsers queries the "introduced_users" edge of the User entity.
func (*User) QueryIntroducer ¶
QueryIntroducer queries the "introducer" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uint64) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) ExecContext ¶
func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id uint64) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryBank ¶
func (c *UserClient) QueryBank(u *User) *BankQuery
QueryBank queries the bank edge of a User.
func (*UserClient) QueryContactCountry ¶
func (c *UserClient) QueryContactCountry(u *User) *CountryQuery
QueryContactCountry queries the contact_country edge of a User.
func (*UserClient) QueryContext ¶
func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserClient) QueryCountry ¶
func (c *UserClient) QueryCountry(u *User) *CountryQuery
QueryCountry queries the country edge of a User.
func (*UserClient) QueryIntroducedUsers ¶
func (c *UserClient) QueryIntroducedUsers(u *User) *UserQuery
QueryIntroducedUsers queries the introduced_users edge of a User.
func (*UserClient) QueryIntroducer ¶
func (c *UserClient) QueryIntroducer(u *User) *UserQuery
QueryIntroducer queries the introducer edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uint64) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddIntroducedUserIDs ¶
func (uc *UserCreate) AddIntroducedUserIDs(ids ...uint64) *UserCreate
AddIntroducedUserIDs adds the "introduced_users" edge to the User entity by IDs.
func (*UserCreate) AddIntroducedUsers ¶
func (uc *UserCreate) AddIntroducedUsers(u ...*User) *UserCreate
AddIntroducedUsers adds the "introduced_users" edges to the User entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecContext ¶
func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetUsername(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetUsername(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) QueryContext ¶
func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAvatar ¶
func (uc *UserCreate) SetAvatar(s string) *UserCreate
SetAvatar sets the "avatar" field.
func (*UserCreate) SetBanUntil ¶
func (uc *UserCreate) SetBanUntil(t time.Time) *UserCreate
SetBanUntil sets the "ban_until" field.
func (*UserCreate) SetBank ¶
func (uc *UserCreate) SetBank(b *Bank) *UserCreate
SetBank sets the "bank" edge to the Bank entity.
func (*UserCreate) SetBankAccountName ¶
func (uc *UserCreate) SetBankAccountName(s string) *UserCreate
SetBankAccountName sets the "bank_account_name" field.
func (*UserCreate) SetBankAccountNumber ¶
func (uc *UserCreate) SetBankAccountNumber(s string) *UserCreate
SetBankAccountNumber sets the "bank_account_number" field.
func (*UserCreate) SetBankID ¶
func (uc *UserCreate) SetBankID(u uint64) *UserCreate
SetBankID sets the "bank_id" field.
func (*UserCreate) SetContactCountry ¶
func (uc *UserCreate) SetContactCountry(c *Country) *UserCreate
SetContactCountry sets the "contact_country" edge to the Country entity.
func (*UserCreate) SetContactCountryID ¶
func (uc *UserCreate) SetContactCountryID(u uint64) *UserCreate
SetContactCountryID sets the "contact_country_id" field.
func (*UserCreate) SetContactNumber ¶
func (uc *UserCreate) SetContactNumber(s string) *UserCreate
SetContactNumber sets the "contact_number" field.
func (*UserCreate) SetCountry ¶
func (uc *UserCreate) SetCountry(c *Country) *UserCreate
SetCountry sets the "country" edge to the Country entity.
func (*UserCreate) SetCountryID ¶
func (uc *UserCreate) SetCountryID(u uint64) *UserCreate
SetCountryID sets the "country_id" field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetCredit1 ¶
func (uc *UserCreate) SetCredit1(f float64) *UserCreate
SetCredit1 sets the "credit_1" field.
func (*UserCreate) SetCredit2 ¶
func (uc *UserCreate) SetCredit2(f float64) *UserCreate
SetCredit2 sets the "credit_2" field.
func (*UserCreate) SetCredit3 ¶
func (uc *UserCreate) SetCredit3(f float64) *UserCreate
SetCredit3 sets the "credit_3" field.
func (*UserCreate) SetCredit4 ¶
func (uc *UserCreate) SetCredit4(f float64) *UserCreate
SetCredit4 sets the "credit_4" field.
func (*UserCreate) SetCredit5 ¶
func (uc *UserCreate) SetCredit5(f float64) *UserCreate
SetCredit5 sets the "credit_5" field.
func (*UserCreate) SetDeletedAt ¶
func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
SetDeletedAt sets the "deleted_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetEmailVerifiedAt ¶
func (uc *UserCreate) SetEmailVerifiedAt(t time.Time) *UserCreate
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*UserCreate) SetFirstLogin ¶
func (uc *UserCreate) SetFirstLogin(b bool) *UserCreate
SetFirstLogin sets the "first_login" field.
func (*UserCreate) SetFullContactNumber ¶
func (uc *UserCreate) SetFullContactNumber(s string) *UserCreate
SetFullContactNumber sets the "full_contact_number" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uint64) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIntroducer ¶
func (uc *UserCreate) SetIntroducer(u *User) *UserCreate
SetIntroducer sets the "introducer" edge to the User entity.
func (*UserCreate) SetIntroducerID ¶
func (uc *UserCreate) SetIntroducerID(id uint64) *UserCreate
SetIntroducerID sets the "introducer" edge to the User entity by ID.
func (*UserCreate) SetIntroducerUserID ¶
func (uc *UserCreate) SetIntroducerUserID(u uint64) *UserCreate
SetIntroducerUserID sets the "introducer_user_id" field.
func (*UserCreate) SetLang ¶
func (uc *UserCreate) SetLang(s string) *UserCreate
SetLang sets the "lang" field.
func (*UserCreate) SetLastLoginAt ¶
func (uc *UserCreate) SetLastLoginAt(t time.Time) *UserCreate
SetLastLoginAt sets the "last_login_at" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNationalID ¶
func (uc *UserCreate) SetNationalID(s string) *UserCreate
SetNationalID sets the "national_id" field.
func (*UserCreate) SetNewLoginAt ¶
func (uc *UserCreate) SetNewLoginAt(t time.Time) *UserCreate
SetNewLoginAt sets the "new_login_at" field.
func (*UserCreate) SetNillableAvatar ¶
func (uc *UserCreate) SetNillableAvatar(s *string) *UserCreate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserCreate) SetNillableBanUntil ¶
func (uc *UserCreate) SetNillableBanUntil(t *time.Time) *UserCreate
SetNillableBanUntil sets the "ban_until" field if the given value is not nil.
func (*UserCreate) SetNillableBankAccountName ¶
func (uc *UserCreate) SetNillableBankAccountName(s *string) *UserCreate
SetNillableBankAccountName sets the "bank_account_name" field if the given value is not nil.
func (*UserCreate) SetNillableBankAccountNumber ¶
func (uc *UserCreate) SetNillableBankAccountNumber(s *string) *UserCreate
SetNillableBankAccountNumber sets the "bank_account_number" field if the given value is not nil.
func (*UserCreate) SetNillableBankID ¶
func (uc *UserCreate) SetNillableBankID(u *uint64) *UserCreate
SetNillableBankID sets the "bank_id" field if the given value is not nil.
func (*UserCreate) SetNillableContactCountryID ¶
func (uc *UserCreate) SetNillableContactCountryID(u *uint64) *UserCreate
SetNillableContactCountryID sets the "contact_country_id" field if the given value is not nil.
func (*UserCreate) SetNillableContactNumber ¶
func (uc *UserCreate) SetNillableContactNumber(s *string) *UserCreate
SetNillableContactNumber sets the "contact_number" field if the given value is not nil.
func (*UserCreate) SetNillableCountryID ¶
func (uc *UserCreate) SetNillableCountryID(u *uint64) *UserCreate
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableCredit1 ¶
func (uc *UserCreate) SetNillableCredit1(f *float64) *UserCreate
SetNillableCredit1 sets the "credit_1" field if the given value is not nil.
func (*UserCreate) SetNillableCredit2 ¶
func (uc *UserCreate) SetNillableCredit2(f *float64) *UserCreate
SetNillableCredit2 sets the "credit_2" field if the given value is not nil.
func (*UserCreate) SetNillableCredit3 ¶
func (uc *UserCreate) SetNillableCredit3(f *float64) *UserCreate
SetNillableCredit3 sets the "credit_3" field if the given value is not nil.
func (*UserCreate) SetNillableCredit4 ¶
func (uc *UserCreate) SetNillableCredit4(f *float64) *UserCreate
SetNillableCredit4 sets the "credit_4" field if the given value is not nil.
func (*UserCreate) SetNillableCredit5 ¶
func (uc *UserCreate) SetNillableCredit5(f *float64) *UserCreate
SetNillableCredit5 sets the "credit_5" field if the given value is not nil.
func (*UserCreate) SetNillableDeletedAt ¶
func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserCreate) SetNillableEmail ¶
func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserCreate) SetNillableEmailVerifiedAt ¶
func (uc *UserCreate) SetNillableEmailVerifiedAt(t *time.Time) *UserCreate
SetNillableEmailVerifiedAt sets the "email_verified_at" field if the given value is not nil.
func (*UserCreate) SetNillableFirstLogin ¶
func (uc *UserCreate) SetNillableFirstLogin(b *bool) *UserCreate
SetNillableFirstLogin sets the "first_login" field if the given value is not nil.
func (*UserCreate) SetNillableFullContactNumber ¶
func (uc *UserCreate) SetNillableFullContactNumber(s *string) *UserCreate
SetNillableFullContactNumber sets the "full_contact_number" field if the given value is not nil.
func (*UserCreate) SetNillableIntroducerID ¶
func (uc *UserCreate) SetNillableIntroducerID(id *uint64) *UserCreate
SetNillableIntroducerID sets the "introducer" edge to the User entity by ID if the given value is not nil.
func (*UserCreate) SetNillableIntroducerUserID ¶
func (uc *UserCreate) SetNillableIntroducerUserID(u *uint64) *UserCreate
SetNillableIntroducerUserID sets the "introducer_user_id" field if the given value is not nil.
func (*UserCreate) SetNillableLang ¶
func (uc *UserCreate) SetNillableLang(s *string) *UserCreate
SetNillableLang sets the "lang" field if the given value is not nil.
func (*UserCreate) SetNillableLastLoginAt ¶
func (uc *UserCreate) SetNillableLastLoginAt(t *time.Time) *UserCreate
SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.
func (*UserCreate) SetNillableName ¶
func (uc *UserCreate) SetNillableName(s *string) *UserCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserCreate) SetNillableNationalID ¶
func (uc *UserCreate) SetNillableNationalID(s *string) *UserCreate
SetNillableNationalID sets the "national_id" field if the given value is not nil.
func (*UserCreate) SetNillableNewLoginAt ¶
func (uc *UserCreate) SetNillableNewLoginAt(t *time.Time) *UserCreate
SetNillableNewLoginAt sets the "new_login_at" field if the given value is not nil.
func (*UserCreate) SetNillableUnilevel ¶
func (uc *UserCreate) SetNillableUnilevel(u *uint64) *UserCreate
SetNillableUnilevel sets the "unilevel" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetNillableUsername ¶
func (uc *UserCreate) SetNillableUsername(s *string) *UserCreate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetPassword2 ¶
func (uc *UserCreate) SetPassword2(s string) *UserCreate
SetPassword2 sets the "password2" field.
func (*UserCreate) SetUnilevel ¶
func (uc *UserCreate) SetUnilevel(u uint64) *UserCreate
SetUnilevel sets the "unilevel" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecContext ¶
func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetUsername(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreateBulk) QueryContext ¶
func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecContext ¶
func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) QueryContext ¶
func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Country of the user Country *Country `json:"country,omitempty"` // Contact country of the user ContactCountry *Country `json:"contact_country,omitempty"` // Introducer user Introducer *User `json:"introducer,omitempty"` // Bank associated with the user Bank *Bank `json:"bank,omitempty"` // Users introduced by this user IntroducedUsers []*User `json:"introduced_users,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) BankOrErr ¶
BankOrErr returns the Bank value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) ContactCountryOrErr ¶
ContactCountryOrErr returns the ContactCountry value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) CountryOrErr ¶
CountryOrErr returns the Country value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) IntroducedUsersOrErr ¶
IntroducedUsersOrErr returns the IntroducedUsers value or an error if the edge was not loaded in eager-loading.
func (UserEdges) IntroducerOrErr ¶
IntroducerOrErr returns the Introducer value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddCredit1 ¶
func (m *UserMutation) AddCredit1(f float64)
AddCredit1 adds f to the "credit_1" field.
func (*UserMutation) AddCredit2 ¶
func (m *UserMutation) AddCredit2(f float64)
AddCredit2 adds f to the "credit_2" field.
func (*UserMutation) AddCredit3 ¶
func (m *UserMutation) AddCredit3(f float64)
AddCredit3 adds f to the "credit_3" field.
func (*UserMutation) AddCredit4 ¶
func (m *UserMutation) AddCredit4(f float64)
AddCredit4 adds f to the "credit_4" field.
func (*UserMutation) AddCredit5 ¶
func (m *UserMutation) AddCredit5(f float64)
AddCredit5 adds f to the "credit_5" field.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddIntroducedUserIDs ¶
func (m *UserMutation) AddIntroducedUserIDs(ids ...uint64)
AddIntroducedUserIDs adds the "introduced_users" edge to the User entity by ids.
func (*UserMutation) AddUnilevel ¶
func (m *UserMutation) AddUnilevel(u int64)
AddUnilevel adds u to the "unilevel" field.
func (*UserMutation) AddedCredit1 ¶
func (m *UserMutation) AddedCredit1() (r float64, exists bool)
AddedCredit1 returns the value that was added to the "credit_1" field in this mutation.
func (*UserMutation) AddedCredit2 ¶
func (m *UserMutation) AddedCredit2() (r float64, exists bool)
AddedCredit2 returns the value that was added to the "credit_2" field in this mutation.
func (*UserMutation) AddedCredit3 ¶
func (m *UserMutation) AddedCredit3() (r float64, exists bool)
AddedCredit3 returns the value that was added to the "credit_3" field in this mutation.
func (*UserMutation) AddedCredit4 ¶
func (m *UserMutation) AddedCredit4() (r float64, exists bool)
AddedCredit4 returns the value that was added to the "credit_4" field in this mutation.
func (*UserMutation) AddedCredit5 ¶
func (m *UserMutation) AddedCredit5() (r float64, exists bool)
AddedCredit5 returns the value that was added to the "credit_5" field in this mutation.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AddedUnilevel ¶
func (m *UserMutation) AddedUnilevel() (r int64, exists bool)
AddedUnilevel returns the value that was added to the "unilevel" field in this mutation.
func (*UserMutation) Avatar ¶
func (m *UserMutation) Avatar() (r string, exists bool)
Avatar returns the value of the "avatar" field in the mutation.
func (*UserMutation) AvatarCleared ¶
func (m *UserMutation) AvatarCleared() bool
AvatarCleared returns if the "avatar" field was cleared in this mutation.
func (*UserMutation) BanUntil ¶
func (m *UserMutation) BanUntil() (r time.Time, exists bool)
BanUntil returns the value of the "ban_until" field in the mutation.
func (*UserMutation) BanUntilCleared ¶
func (m *UserMutation) BanUntilCleared() bool
BanUntilCleared returns if the "ban_until" field was cleared in this mutation.
func (*UserMutation) BankAccountName ¶
func (m *UserMutation) BankAccountName() (r string, exists bool)
BankAccountName returns the value of the "bank_account_name" field in the mutation.
func (*UserMutation) BankAccountNameCleared ¶
func (m *UserMutation) BankAccountNameCleared() bool
BankAccountNameCleared returns if the "bank_account_name" field was cleared in this mutation.
func (*UserMutation) BankAccountNumber ¶
func (m *UserMutation) BankAccountNumber() (r string, exists bool)
BankAccountNumber returns the value of the "bank_account_number" field in the mutation.
func (*UserMutation) BankAccountNumberCleared ¶
func (m *UserMutation) BankAccountNumberCleared() bool
BankAccountNumberCleared returns if the "bank_account_number" field was cleared in this mutation.
func (*UserMutation) BankCleared ¶
func (m *UserMutation) BankCleared() bool
BankCleared reports if the "bank" edge to the Bank entity was cleared.
func (*UserMutation) BankID ¶
func (m *UserMutation) BankID() (r uint64, exists bool)
BankID returns the value of the "bank_id" field in the mutation.
func (*UserMutation) BankIDCleared ¶
func (m *UserMutation) BankIDCleared() bool
BankIDCleared returns if the "bank_id" field was cleared in this mutation.
func (*UserMutation) BankIDs ¶
func (m *UserMutation) BankIDs() (ids []uint64)
BankIDs returns the "bank" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BankID instead. It exists only for internal usage by the builders.
func (*UserMutation) ClearAvatar ¶
func (m *UserMutation) ClearAvatar()
ClearAvatar clears the value of the "avatar" field.
func (*UserMutation) ClearBanUntil ¶
func (m *UserMutation) ClearBanUntil()
ClearBanUntil clears the value of the "ban_until" field.
func (*UserMutation) ClearBank ¶
func (m *UserMutation) ClearBank()
ClearBank clears the "bank" edge to the Bank entity.
func (*UserMutation) ClearBankAccountName ¶
func (m *UserMutation) ClearBankAccountName()
ClearBankAccountName clears the value of the "bank_account_name" field.
func (*UserMutation) ClearBankAccountNumber ¶
func (m *UserMutation) ClearBankAccountNumber()
ClearBankAccountNumber clears the value of the "bank_account_number" field.
func (*UserMutation) ClearBankID ¶
func (m *UserMutation) ClearBankID()
ClearBankID clears the value of the "bank_id" field.
func (*UserMutation) ClearContactCountry ¶
func (m *UserMutation) ClearContactCountry()
ClearContactCountry clears the "contact_country" edge to the Country entity.
func (*UserMutation) ClearContactCountryID ¶
func (m *UserMutation) ClearContactCountryID()
ClearContactCountryID clears the value of the "contact_country_id" field.
func (*UserMutation) ClearContactNumber ¶
func (m *UserMutation) ClearContactNumber()
ClearContactNumber clears the value of the "contact_number" field.
func (*UserMutation) ClearCountry ¶
func (m *UserMutation) ClearCountry()
ClearCountry clears the "country" edge to the Country entity.
func (*UserMutation) ClearCountryID ¶
func (m *UserMutation) ClearCountryID()
ClearCountryID clears the value of the "country_id" field.
func (*UserMutation) ClearDeletedAt ¶
func (m *UserMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearEmail ¶
func (m *UserMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*UserMutation) ClearEmailVerifiedAt ¶
func (m *UserMutation) ClearEmailVerifiedAt()
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearFullContactNumber ¶
func (m *UserMutation) ClearFullContactNumber()
ClearFullContactNumber clears the value of the "full_contact_number" field.
func (*UserMutation) ClearIntroducedUsers ¶
func (m *UserMutation) ClearIntroducedUsers()
ClearIntroducedUsers clears the "introduced_users" edge to the User entity.
func (*UserMutation) ClearIntroducer ¶
func (m *UserMutation) ClearIntroducer()
ClearIntroducer clears the "introducer" edge to the User entity.
func (*UserMutation) ClearIntroducerUserID ¶
func (m *UserMutation) ClearIntroducerUserID()
ClearIntroducerUserID clears the value of the "introducer_user_id" field.
func (*UserMutation) ClearLastLoginAt ¶
func (m *UserMutation) ClearLastLoginAt()
ClearLastLoginAt clears the value of the "last_login_at" field.
func (*UserMutation) ClearName ¶
func (m *UserMutation) ClearName()
ClearName clears the value of the "name" field.
func (*UserMutation) ClearNationalID ¶
func (m *UserMutation) ClearNationalID()
ClearNationalID clears the value of the "national_id" field.
func (*UserMutation) ClearNewLoginAt ¶
func (m *UserMutation) ClearNewLoginAt()
ClearNewLoginAt clears the value of the "new_login_at" field.
func (*UserMutation) ClearUnilevel ¶
func (m *UserMutation) ClearUnilevel()
ClearUnilevel clears the value of the "unilevel" field.
func (*UserMutation) ClearUsername ¶
func (m *UserMutation) ClearUsername()
ClearUsername clears the value of the "username" field.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) ContactCountryCleared ¶
func (m *UserMutation) ContactCountryCleared() bool
ContactCountryCleared reports if the "contact_country" edge to the Country entity was cleared.
func (*UserMutation) ContactCountryID ¶
func (m *UserMutation) ContactCountryID() (r uint64, exists bool)
ContactCountryID returns the value of the "contact_country_id" field in the mutation.
func (*UserMutation) ContactCountryIDCleared ¶
func (m *UserMutation) ContactCountryIDCleared() bool
ContactCountryIDCleared returns if the "contact_country_id" field was cleared in this mutation.
func (*UserMutation) ContactCountryIDs ¶
func (m *UserMutation) ContactCountryIDs() (ids []uint64)
ContactCountryIDs returns the "contact_country" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ContactCountryID instead. It exists only for internal usage by the builders.
func (*UserMutation) ContactNumber ¶
func (m *UserMutation) ContactNumber() (r string, exists bool)
ContactNumber returns the value of the "contact_number" field in the mutation.
func (*UserMutation) ContactNumberCleared ¶
func (m *UserMutation) ContactNumberCleared() bool
ContactNumberCleared returns if the "contact_number" field was cleared in this mutation.
func (*UserMutation) CountryCleared ¶
func (m *UserMutation) CountryCleared() bool
CountryCleared reports if the "country" edge to the Country entity was cleared.
func (*UserMutation) CountryID ¶
func (m *UserMutation) CountryID() (r uint64, exists bool)
CountryID returns the value of the "country_id" field in the mutation.
func (*UserMutation) CountryIDCleared ¶
func (m *UserMutation) CountryIDCleared() bool
CountryIDCleared returns if the "country_id" field was cleared in this mutation.
func (*UserMutation) CountryIDs ¶
func (m *UserMutation) CountryIDs() (ids []uint64)
CountryIDs returns the "country" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CountryID instead. It exists only for internal usage by the builders.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) Credit1 ¶
func (m *UserMutation) Credit1() (r float64, exists bool)
Credit1 returns the value of the "credit_1" field in the mutation.
func (*UserMutation) Credit2 ¶
func (m *UserMutation) Credit2() (r float64, exists bool)
Credit2 returns the value of the "credit_2" field in the mutation.
func (*UserMutation) Credit3 ¶
func (m *UserMutation) Credit3() (r float64, exists bool)
Credit3 returns the value of the "credit_3" field in the mutation.
func (*UserMutation) Credit4 ¶
func (m *UserMutation) Credit4() (r float64, exists bool)
Credit4 returns the value of the "credit_4" field in the mutation.
func (*UserMutation) Credit5 ¶
func (m *UserMutation) Credit5() (r float64, exists bool)
Credit5 returns the value of the "credit_5" field in the mutation.
func (*UserMutation) DeletedAt ¶
func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*UserMutation) DeletedAtCleared ¶
func (m *UserMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) EmailCleared ¶
func (m *UserMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*UserMutation) EmailVerifiedAt ¶
func (m *UserMutation) EmailVerifiedAt() (r time.Time, exists bool)
EmailVerifiedAt returns the value of the "email_verified_at" field in the mutation.
func (*UserMutation) EmailVerifiedAtCleared ¶
func (m *UserMutation) EmailVerifiedAtCleared() bool
EmailVerifiedAtCleared returns if the "email_verified_at" field was cleared in this mutation.
func (*UserMutation) ExecContext ¶
func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) FirstLogin ¶
func (m *UserMutation) FirstLogin() (r bool, exists bool)
FirstLogin returns the value of the "first_login" field in the mutation.
func (*UserMutation) FullContactNumber ¶
func (m *UserMutation) FullContactNumber() (r string, exists bool)
FullContactNumber returns the value of the "full_contact_number" field in the mutation.
func (*UserMutation) FullContactNumberCleared ¶
func (m *UserMutation) FullContactNumberCleared() bool
FullContactNumberCleared returns if the "full_contact_number" field was cleared in this mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) IntroducedUsersCleared ¶
func (m *UserMutation) IntroducedUsersCleared() bool
IntroducedUsersCleared reports if the "introduced_users" edge to the User entity was cleared.
func (*UserMutation) IntroducedUsersIDs ¶
func (m *UserMutation) IntroducedUsersIDs() (ids []uint64)
IntroducedUsersIDs returns the "introduced_users" edge IDs in the mutation.
func (*UserMutation) IntroducerCleared ¶
func (m *UserMutation) IntroducerCleared() bool
IntroducerCleared reports if the "introducer" edge to the User entity was cleared.
func (*UserMutation) IntroducerID ¶
func (m *UserMutation) IntroducerID() (id uint64, exists bool)
IntroducerID returns the "introducer" edge ID in the mutation.
func (*UserMutation) IntroducerIDs ¶
func (m *UserMutation) IntroducerIDs() (ids []uint64)
IntroducerIDs returns the "introducer" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use IntroducerID instead. It exists only for internal usage by the builders.
func (*UserMutation) IntroducerUserID ¶
func (m *UserMutation) IntroducerUserID() (r uint64, exists bool)
IntroducerUserID returns the value of the "introducer_user_id" field in the mutation.
func (*UserMutation) IntroducerUserIDCleared ¶
func (m *UserMutation) IntroducerUserIDCleared() bool
IntroducerUserIDCleared returns if the "introducer_user_id" field was cleared in this mutation.
func (*UserMutation) Lang ¶
func (m *UserMutation) Lang() (r string, exists bool)
Lang returns the value of the "lang" field in the mutation.
func (*UserMutation) LastLoginAt ¶
func (m *UserMutation) LastLoginAt() (r time.Time, exists bool)
LastLoginAt returns the value of the "last_login_at" field in the mutation.
func (*UserMutation) LastLoginAtCleared ¶
func (m *UserMutation) LastLoginAtCleared() bool
LastLoginAtCleared returns if the "last_login_at" field was cleared in this mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) NameCleared ¶
func (m *UserMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*UserMutation) NationalID ¶
func (m *UserMutation) NationalID() (r string, exists bool)
NationalID returns the value of the "national_id" field in the mutation.
func (*UserMutation) NationalIDCleared ¶
func (m *UserMutation) NationalIDCleared() bool
NationalIDCleared returns if the "national_id" field was cleared in this mutation.
func (*UserMutation) NewLoginAt ¶
func (m *UserMutation) NewLoginAt() (r time.Time, exists bool)
NewLoginAt returns the value of the "new_login_at" field in the mutation.
func (*UserMutation) NewLoginAtCleared ¶
func (m *UserMutation) NewLoginAtCleared() bool
NewLoginAtCleared returns if the "new_login_at" field was cleared in this mutation.
func (*UserMutation) OldAvatar ¶
func (m *UserMutation) OldAvatar(ctx context.Context) (v *string, err error)
OldAvatar returns the old "avatar" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldBanUntil ¶
OldBanUntil returns the old "ban_until" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldBankAccountName ¶
func (m *UserMutation) OldBankAccountName(ctx context.Context) (v *string, err error)
OldBankAccountName returns the old "bank_account_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldBankAccountNumber ¶
func (m *UserMutation) OldBankAccountNumber(ctx context.Context) (v *string, err error)
OldBankAccountNumber returns the old "bank_account_number" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldBankID ¶
func (m *UserMutation) OldBankID(ctx context.Context) (v *uint64, err error)
OldBankID returns the old "bank_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldContactCountryID ¶
func (m *UserMutation) OldContactCountryID(ctx context.Context) (v *uint64, err error)
OldContactCountryID returns the old "contact_country_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldContactNumber ¶
func (m *UserMutation) OldContactNumber(ctx context.Context) (v *string, err error)
OldContactNumber returns the old "contact_number" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCountryID ¶
func (m *UserMutation) OldCountryID(ctx context.Context) (v *uint64, err error)
OldCountryID returns the old "country_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCredit1 ¶
func (m *UserMutation) OldCredit1(ctx context.Context) (v float64, err error)
OldCredit1 returns the old "credit_1" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCredit2 ¶
func (m *UserMutation) OldCredit2(ctx context.Context) (v float64, err error)
OldCredit2 returns the old "credit_2" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCredit3 ¶
func (m *UserMutation) OldCredit3(ctx context.Context) (v float64, err error)
OldCredit3 returns the old "credit_3" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCredit4 ¶
func (m *UserMutation) OldCredit4(ctx context.Context) (v float64, err error)
OldCredit4 returns the old "credit_4" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCredit5 ¶
func (m *UserMutation) OldCredit5(ctx context.Context) (v float64, err error)
OldCredit5 returns the old "credit_5" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmailVerifiedAt ¶
OldEmailVerifiedAt returns the old "email_verified_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldFirstLogin ¶
func (m *UserMutation) OldFirstLogin(ctx context.Context) (v bool, err error)
OldFirstLogin returns the old "first_login" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldFullContactNumber ¶
func (m *UserMutation) OldFullContactNumber(ctx context.Context) (v *string, err error)
OldFullContactNumber returns the old "full_contact_number" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldIntroducerUserID ¶
func (m *UserMutation) OldIntroducerUserID(ctx context.Context) (v *uint64, err error)
OldIntroducerUserID returns the old "introducer_user_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldLang ¶
func (m *UserMutation) OldLang(ctx context.Context) (v string, err error)
OldLang returns the old "lang" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldLastLoginAt ¶
OldLastLoginAt returns the old "last_login_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldNationalID ¶
func (m *UserMutation) OldNationalID(ctx context.Context) (v *string, err error)
OldNationalID returns the old "national_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldNewLoginAt ¶
OldNewLoginAt returns the old "new_login_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword2 ¶
func (m *UserMutation) OldPassword2(ctx context.Context) (v string, err error)
OldPassword2 returns the old "password2" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUnilevel ¶
func (m *UserMutation) OldUnilevel(ctx context.Context) (v *uint64, err error)
OldUnilevel returns the old "unilevel" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) Password2 ¶
func (m *UserMutation) Password2() (r string, exists bool)
Password2 returns the value of the "password2" field in the mutation.
func (*UserMutation) QueryContext ¶
func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserMutation) RemoveIntroducedUserIDs ¶
func (m *UserMutation) RemoveIntroducedUserIDs(ids ...uint64)
RemoveIntroducedUserIDs removes the "introduced_users" edge to the User entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedIntroducedUsersIDs ¶
func (m *UserMutation) RemovedIntroducedUsersIDs() (ids []uint64)
RemovedIntroducedUsers returns the removed IDs of the "introduced_users" edge to the User entity.
func (*UserMutation) ResetAvatar ¶
func (m *UserMutation) ResetAvatar()
ResetAvatar resets all changes to the "avatar" field.
func (*UserMutation) ResetBanUntil ¶
func (m *UserMutation) ResetBanUntil()
ResetBanUntil resets all changes to the "ban_until" field.
func (*UserMutation) ResetBank ¶
func (m *UserMutation) ResetBank()
ResetBank resets all changes to the "bank" edge.
func (*UserMutation) ResetBankAccountName ¶
func (m *UserMutation) ResetBankAccountName()
ResetBankAccountName resets all changes to the "bank_account_name" field.
func (*UserMutation) ResetBankAccountNumber ¶
func (m *UserMutation) ResetBankAccountNumber()
ResetBankAccountNumber resets all changes to the "bank_account_number" field.
func (*UserMutation) ResetBankID ¶
func (m *UserMutation) ResetBankID()
ResetBankID resets all changes to the "bank_id" field.
func (*UserMutation) ResetContactCountry ¶
func (m *UserMutation) ResetContactCountry()
ResetContactCountry resets all changes to the "contact_country" edge.
func (*UserMutation) ResetContactCountryID ¶
func (m *UserMutation) ResetContactCountryID()
ResetContactCountryID resets all changes to the "contact_country_id" field.
func (*UserMutation) ResetContactNumber ¶
func (m *UserMutation) ResetContactNumber()
ResetContactNumber resets all changes to the "contact_number" field.
func (*UserMutation) ResetCountry ¶
func (m *UserMutation) ResetCountry()
ResetCountry resets all changes to the "country" edge.
func (*UserMutation) ResetCountryID ¶
func (m *UserMutation) ResetCountryID()
ResetCountryID resets all changes to the "country_id" field.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetCredit1 ¶
func (m *UserMutation) ResetCredit1()
ResetCredit1 resets all changes to the "credit_1" field.
func (*UserMutation) ResetCredit2 ¶
func (m *UserMutation) ResetCredit2()
ResetCredit2 resets all changes to the "credit_2" field.
func (*UserMutation) ResetCredit3 ¶
func (m *UserMutation) ResetCredit3()
ResetCredit3 resets all changes to the "credit_3" field.
func (*UserMutation) ResetCredit4 ¶
func (m *UserMutation) ResetCredit4()
ResetCredit4 resets all changes to the "credit_4" field.
func (*UserMutation) ResetCredit5 ¶
func (m *UserMutation) ResetCredit5()
ResetCredit5 resets all changes to the "credit_5" field.
func (*UserMutation) ResetDeletedAt ¶
func (m *UserMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetEmailVerifiedAt ¶
func (m *UserMutation) ResetEmailVerifiedAt()
ResetEmailVerifiedAt resets all changes to the "email_verified_at" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetFirstLogin ¶
func (m *UserMutation) ResetFirstLogin()
ResetFirstLogin resets all changes to the "first_login" field.
func (*UserMutation) ResetFullContactNumber ¶
func (m *UserMutation) ResetFullContactNumber()
ResetFullContactNumber resets all changes to the "full_contact_number" field.
func (*UserMutation) ResetIntroducedUsers ¶
func (m *UserMutation) ResetIntroducedUsers()
ResetIntroducedUsers resets all changes to the "introduced_users" edge.
func (*UserMutation) ResetIntroducer ¶
func (m *UserMutation) ResetIntroducer()
ResetIntroducer resets all changes to the "introducer" edge.
func (*UserMutation) ResetIntroducerUserID ¶
func (m *UserMutation) ResetIntroducerUserID()
ResetIntroducerUserID resets all changes to the "introducer_user_id" field.
func (*UserMutation) ResetLang ¶
func (m *UserMutation) ResetLang()
ResetLang resets all changes to the "lang" field.
func (*UserMutation) ResetLastLoginAt ¶
func (m *UserMutation) ResetLastLoginAt()
ResetLastLoginAt resets all changes to the "last_login_at" field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetNationalID ¶
func (m *UserMutation) ResetNationalID()
ResetNationalID resets all changes to the "national_id" field.
func (*UserMutation) ResetNewLoginAt ¶
func (m *UserMutation) ResetNewLoginAt()
ResetNewLoginAt resets all changes to the "new_login_at" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetPassword2 ¶
func (m *UserMutation) ResetPassword2()
ResetPassword2 resets all changes to the "password2" field.
func (*UserMutation) ResetUnilevel ¶
func (m *UserMutation) ResetUnilevel()
ResetUnilevel resets all changes to the "unilevel" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetAvatar ¶
func (m *UserMutation) SetAvatar(s string)
SetAvatar sets the "avatar" field.
func (*UserMutation) SetBanUntil ¶
func (m *UserMutation) SetBanUntil(t time.Time)
SetBanUntil sets the "ban_until" field.
func (*UserMutation) SetBankAccountName ¶
func (m *UserMutation) SetBankAccountName(s string)
SetBankAccountName sets the "bank_account_name" field.
func (*UserMutation) SetBankAccountNumber ¶
func (m *UserMutation) SetBankAccountNumber(s string)
SetBankAccountNumber sets the "bank_account_number" field.
func (*UserMutation) SetBankID ¶
func (m *UserMutation) SetBankID(u uint64)
SetBankID sets the "bank_id" field.
func (*UserMutation) SetContactCountryID ¶
func (m *UserMutation) SetContactCountryID(u uint64)
SetContactCountryID sets the "contact_country_id" field.
func (*UserMutation) SetContactNumber ¶
func (m *UserMutation) SetContactNumber(s string)
SetContactNumber sets the "contact_number" field.
func (*UserMutation) SetCountryID ¶
func (m *UserMutation) SetCountryID(u uint64)
SetCountryID sets the "country_id" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetCredit1 ¶
func (m *UserMutation) SetCredit1(f float64)
SetCredit1 sets the "credit_1" field.
func (*UserMutation) SetCredit2 ¶
func (m *UserMutation) SetCredit2(f float64)
SetCredit2 sets the "credit_2" field.
func (*UserMutation) SetCredit3 ¶
func (m *UserMutation) SetCredit3(f float64)
SetCredit3 sets the "credit_3" field.
func (*UserMutation) SetCredit4 ¶
func (m *UserMutation) SetCredit4(f float64)
SetCredit4 sets the "credit_4" field.
func (*UserMutation) SetCredit5 ¶
func (m *UserMutation) SetCredit5(f float64)
SetCredit5 sets the "credit_5" field.
func (*UserMutation) SetDeletedAt ¶
func (m *UserMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetEmailVerifiedAt ¶
func (m *UserMutation) SetEmailVerifiedAt(t time.Time)
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetFirstLogin ¶
func (m *UserMutation) SetFirstLogin(b bool)
SetFirstLogin sets the "first_login" field.
func (*UserMutation) SetFullContactNumber ¶
func (m *UserMutation) SetFullContactNumber(s string)
SetFullContactNumber sets the "full_contact_number" field.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIntroducerID ¶
func (m *UserMutation) SetIntroducerID(id uint64)
SetIntroducerID sets the "introducer" edge to the User entity by id.
func (*UserMutation) SetIntroducerUserID ¶
func (m *UserMutation) SetIntroducerUserID(u uint64)
SetIntroducerUserID sets the "introducer_user_id" field.
func (*UserMutation) SetLang ¶
func (m *UserMutation) SetLang(s string)
SetLang sets the "lang" field.
func (*UserMutation) SetLastLoginAt ¶
func (m *UserMutation) SetLastLoginAt(t time.Time)
SetLastLoginAt sets the "last_login_at" field.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetNationalID ¶
func (m *UserMutation) SetNationalID(s string)
SetNationalID sets the "national_id" field.
func (*UserMutation) SetNewLoginAt ¶
func (m *UserMutation) SetNewLoginAt(t time.Time)
SetNewLoginAt sets the "new_login_at" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetPassword2 ¶
func (m *UserMutation) SetPassword2(s string)
SetPassword2 sets the "password2" field.
func (*UserMutation) SetUnilevel ¶
func (m *UserMutation) SetUnilevel(u uint64)
SetUnilevel sets the "unilevel" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Unilevel ¶
func (m *UserMutation) Unilevel() (r uint64, exists bool)
Unilevel returns the value of the "unilevel" field in the mutation.
func (*UserMutation) UnilevelCleared ¶
func (m *UserMutation) UnilevelCleared() bool
UnilevelCleared returns if the "unilevel" field was cleared in this mutation.
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) UsernameCleared ¶
func (m *UserMutation) UsernameCleared() bool
UsernameCleared returns if the "username" field was cleared in this mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) ExecContext ¶
func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Username string `json:"username,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldUsername). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryContactCountry ¶
func (uq *UserQuery) QueryContactCountry() *CountryQuery
QueryContactCountry chains the current query on the "contact_country" edge.
func (*UserQuery) QueryContext ¶
func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserQuery) QueryCountry ¶
func (uq *UserQuery) QueryCountry() *CountryQuery
QueryCountry chains the current query on the "country" edge.
func (*UserQuery) QueryIntroducedUsers ¶
QueryIntroducedUsers chains the current query on the "introduced_users" edge.
func (*UserQuery) QueryIntroducer ¶
QueryIntroducer chains the current query on the "introducer" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Username string `json:"username,omitempty"` } client.User.Query(). Select(user.FieldUsername). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithBank ¶
WithBank tells the query-builder to eager-load the nodes that are connected to the "bank" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithContactCountry ¶
func (uq *UserQuery) WithContactCountry(opts ...func(*CountryQuery)) *UserQuery
WithContactCountry tells the query-builder to eager-load the nodes that are connected to the "contact_country" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithCountry ¶
func (uq *UserQuery) WithCountry(opts ...func(*CountryQuery)) *UserQuery
WithCountry tells the query-builder to eager-load the nodes that are connected to the "country" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithIntroducedUsers ¶
WithIntroducedUsers tells the query-builder to eager-load the nodes that are connected to the "introduced_users" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithIntroducer ¶
WithIntroducer tells the query-builder to eager-load the nodes that are connected to the "introducer" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (UserSelect) ExecContext ¶
func (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (UserSelect) QueryContext ¶
func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddCredit1 ¶
func (uu *UserUpdate) AddCredit1(f float64) *UserUpdate
AddCredit1 adds f to the "credit_1" field.
func (*UserUpdate) AddCredit2 ¶
func (uu *UserUpdate) AddCredit2(f float64) *UserUpdate
AddCredit2 adds f to the "credit_2" field.
func (*UserUpdate) AddCredit3 ¶
func (uu *UserUpdate) AddCredit3(f float64) *UserUpdate
AddCredit3 adds f to the "credit_3" field.
func (*UserUpdate) AddCredit4 ¶
func (uu *UserUpdate) AddCredit4(f float64) *UserUpdate
AddCredit4 adds f to the "credit_4" field.
func (*UserUpdate) AddCredit5 ¶
func (uu *UserUpdate) AddCredit5(f float64) *UserUpdate
AddCredit5 adds f to the "credit_5" field.
func (*UserUpdate) AddIntroducedUserIDs ¶
func (uu *UserUpdate) AddIntroducedUserIDs(ids ...uint64) *UserUpdate
AddIntroducedUserIDs adds the "introduced_users" edge to the User entity by IDs.
func (*UserUpdate) AddIntroducedUsers ¶
func (uu *UserUpdate) AddIntroducedUsers(u ...*User) *UserUpdate
AddIntroducedUsers adds the "introduced_users" edges to the User entity.
func (*UserUpdate) AddUnilevel ¶
func (uu *UserUpdate) AddUnilevel(u int64) *UserUpdate
AddUnilevel adds u to the "unilevel" field.
func (*UserUpdate) ClearAvatar ¶
func (uu *UserUpdate) ClearAvatar() *UserUpdate
ClearAvatar clears the value of the "avatar" field.
func (*UserUpdate) ClearBanUntil ¶
func (uu *UserUpdate) ClearBanUntil() *UserUpdate
ClearBanUntil clears the value of the "ban_until" field.
func (*UserUpdate) ClearBank ¶
func (uu *UserUpdate) ClearBank() *UserUpdate
ClearBank clears the "bank" edge to the Bank entity.
func (*UserUpdate) ClearBankAccountName ¶
func (uu *UserUpdate) ClearBankAccountName() *UserUpdate
ClearBankAccountName clears the value of the "bank_account_name" field.
func (*UserUpdate) ClearBankAccountNumber ¶
func (uu *UserUpdate) ClearBankAccountNumber() *UserUpdate
ClearBankAccountNumber clears the value of the "bank_account_number" field.
func (*UserUpdate) ClearBankID ¶
func (uu *UserUpdate) ClearBankID() *UserUpdate
ClearBankID clears the value of the "bank_id" field.
func (*UserUpdate) ClearContactCountry ¶
func (uu *UserUpdate) ClearContactCountry() *UserUpdate
ClearContactCountry clears the "contact_country" edge to the Country entity.
func (*UserUpdate) ClearContactCountryID ¶
func (uu *UserUpdate) ClearContactCountryID() *UserUpdate
ClearContactCountryID clears the value of the "contact_country_id" field.
func (*UserUpdate) ClearContactNumber ¶
func (uu *UserUpdate) ClearContactNumber() *UserUpdate
ClearContactNumber clears the value of the "contact_number" field.
func (*UserUpdate) ClearCountry ¶
func (uu *UserUpdate) ClearCountry() *UserUpdate
ClearCountry clears the "country" edge to the Country entity.
func (*UserUpdate) ClearCountryID ¶
func (uu *UserUpdate) ClearCountryID() *UserUpdate
ClearCountryID clears the value of the "country_id" field.
func (*UserUpdate) ClearDeletedAt ¶
func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdate) ClearEmail ¶
func (uu *UserUpdate) ClearEmail() *UserUpdate
ClearEmail clears the value of the "email" field.
func (*UserUpdate) ClearEmailVerifiedAt ¶
func (uu *UserUpdate) ClearEmailVerifiedAt() *UserUpdate
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*UserUpdate) ClearFullContactNumber ¶
func (uu *UserUpdate) ClearFullContactNumber() *UserUpdate
ClearFullContactNumber clears the value of the "full_contact_number" field.
func (*UserUpdate) ClearIntroducedUsers ¶
func (uu *UserUpdate) ClearIntroducedUsers() *UserUpdate
ClearIntroducedUsers clears all "introduced_users" edges to the User entity.
func (*UserUpdate) ClearIntroducer ¶
func (uu *UserUpdate) ClearIntroducer() *UserUpdate
ClearIntroducer clears the "introducer" edge to the User entity.
func (*UserUpdate) ClearIntroducerUserID ¶
func (uu *UserUpdate) ClearIntroducerUserID() *UserUpdate
ClearIntroducerUserID clears the value of the "introducer_user_id" field.
func (*UserUpdate) ClearLastLoginAt ¶
func (uu *UserUpdate) ClearLastLoginAt() *UserUpdate
ClearLastLoginAt clears the value of the "last_login_at" field.
func (*UserUpdate) ClearName ¶
func (uu *UserUpdate) ClearName() *UserUpdate
ClearName clears the value of the "name" field.
func (*UserUpdate) ClearNationalID ¶
func (uu *UserUpdate) ClearNationalID() *UserUpdate
ClearNationalID clears the value of the "national_id" field.
func (*UserUpdate) ClearNewLoginAt ¶
func (uu *UserUpdate) ClearNewLoginAt() *UserUpdate
ClearNewLoginAt clears the value of the "new_login_at" field.
func (*UserUpdate) ClearUnilevel ¶
func (uu *UserUpdate) ClearUnilevel() *UserUpdate
ClearUnilevel clears the value of the "unilevel" field.
func (*UserUpdate) ClearUsername ¶
func (uu *UserUpdate) ClearUsername() *UserUpdate
ClearUsername clears the value of the "username" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecContext ¶
func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) QueryContext ¶
func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserUpdate) RemoveIntroducedUserIDs ¶
func (uu *UserUpdate) RemoveIntroducedUserIDs(ids ...uint64) *UserUpdate
RemoveIntroducedUserIDs removes the "introduced_users" edge to User entities by IDs.
func (*UserUpdate) RemoveIntroducedUsers ¶
func (uu *UserUpdate) RemoveIntroducedUsers(u ...*User) *UserUpdate
RemoveIntroducedUsers removes "introduced_users" edges to User entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAvatar ¶
func (uu *UserUpdate) SetAvatar(s string) *UserUpdate
SetAvatar sets the "avatar" field.
func (*UserUpdate) SetBanUntil ¶
func (uu *UserUpdate) SetBanUntil(t time.Time) *UserUpdate
SetBanUntil sets the "ban_until" field.
func (*UserUpdate) SetBank ¶
func (uu *UserUpdate) SetBank(b *Bank) *UserUpdate
SetBank sets the "bank" edge to the Bank entity.
func (*UserUpdate) SetBankAccountName ¶
func (uu *UserUpdate) SetBankAccountName(s string) *UserUpdate
SetBankAccountName sets the "bank_account_name" field.
func (*UserUpdate) SetBankAccountNumber ¶
func (uu *UserUpdate) SetBankAccountNumber(s string) *UserUpdate
SetBankAccountNumber sets the "bank_account_number" field.
func (*UserUpdate) SetBankID ¶
func (uu *UserUpdate) SetBankID(u uint64) *UserUpdate
SetBankID sets the "bank_id" field.
func (*UserUpdate) SetContactCountry ¶
func (uu *UserUpdate) SetContactCountry(c *Country) *UserUpdate
SetContactCountry sets the "contact_country" edge to the Country entity.
func (*UserUpdate) SetContactCountryID ¶
func (uu *UserUpdate) SetContactCountryID(u uint64) *UserUpdate
SetContactCountryID sets the "contact_country_id" field.
func (*UserUpdate) SetContactNumber ¶
func (uu *UserUpdate) SetContactNumber(s string) *UserUpdate
SetContactNumber sets the "contact_number" field.
func (*UserUpdate) SetCountry ¶
func (uu *UserUpdate) SetCountry(c *Country) *UserUpdate
SetCountry sets the "country" edge to the Country entity.
func (*UserUpdate) SetCountryID ¶
func (uu *UserUpdate) SetCountryID(u uint64) *UserUpdate
SetCountryID sets the "country_id" field.
func (*UserUpdate) SetCreatedAt ¶
func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
SetCreatedAt sets the "created_at" field.
func (*UserUpdate) SetCredit1 ¶
func (uu *UserUpdate) SetCredit1(f float64) *UserUpdate
SetCredit1 sets the "credit_1" field.
func (*UserUpdate) SetCredit2 ¶
func (uu *UserUpdate) SetCredit2(f float64) *UserUpdate
SetCredit2 sets the "credit_2" field.
func (*UserUpdate) SetCredit3 ¶
func (uu *UserUpdate) SetCredit3(f float64) *UserUpdate
SetCredit3 sets the "credit_3" field.
func (*UserUpdate) SetCredit4 ¶
func (uu *UserUpdate) SetCredit4(f float64) *UserUpdate
SetCredit4 sets the "credit_4" field.
func (*UserUpdate) SetCredit5 ¶
func (uu *UserUpdate) SetCredit5(f float64) *UserUpdate
SetCredit5 sets the "credit_5" field.
func (*UserUpdate) SetDeletedAt ¶
func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetEmailVerifiedAt ¶
func (uu *UserUpdate) SetEmailVerifiedAt(t time.Time) *UserUpdate
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*UserUpdate) SetFirstLogin ¶
func (uu *UserUpdate) SetFirstLogin(b bool) *UserUpdate
SetFirstLogin sets the "first_login" field.
func (*UserUpdate) SetFullContactNumber ¶
func (uu *UserUpdate) SetFullContactNumber(s string) *UserUpdate
SetFullContactNumber sets the "full_contact_number" field.
func (*UserUpdate) SetIntroducer ¶
func (uu *UserUpdate) SetIntroducer(u *User) *UserUpdate
SetIntroducer sets the "introducer" edge to the User entity.
func (*UserUpdate) SetIntroducerID ¶
func (uu *UserUpdate) SetIntroducerID(id uint64) *UserUpdate
SetIntroducerID sets the "introducer" edge to the User entity by ID.
func (*UserUpdate) SetIntroducerUserID ¶
func (uu *UserUpdate) SetIntroducerUserID(u uint64) *UserUpdate
SetIntroducerUserID sets the "introducer_user_id" field.
func (*UserUpdate) SetLang ¶
func (uu *UserUpdate) SetLang(s string) *UserUpdate
SetLang sets the "lang" field.
func (*UserUpdate) SetLastLoginAt ¶
func (uu *UserUpdate) SetLastLoginAt(t time.Time) *UserUpdate
SetLastLoginAt sets the "last_login_at" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNationalID ¶
func (uu *UserUpdate) SetNationalID(s string) *UserUpdate
SetNationalID sets the "national_id" field.
func (*UserUpdate) SetNewLoginAt ¶
func (uu *UserUpdate) SetNewLoginAt(t time.Time) *UserUpdate
SetNewLoginAt sets the "new_login_at" field.
func (*UserUpdate) SetNillableAvatar ¶
func (uu *UserUpdate) SetNillableAvatar(s *string) *UserUpdate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserUpdate) SetNillableBanUntil ¶
func (uu *UserUpdate) SetNillableBanUntil(t *time.Time) *UserUpdate
SetNillableBanUntil sets the "ban_until" field if the given value is not nil.
func (*UserUpdate) SetNillableBankAccountName ¶
func (uu *UserUpdate) SetNillableBankAccountName(s *string) *UserUpdate
SetNillableBankAccountName sets the "bank_account_name" field if the given value is not nil.
func (*UserUpdate) SetNillableBankAccountNumber ¶
func (uu *UserUpdate) SetNillableBankAccountNumber(s *string) *UserUpdate
SetNillableBankAccountNumber sets the "bank_account_number" field if the given value is not nil.
func (*UserUpdate) SetNillableBankID ¶
func (uu *UserUpdate) SetNillableBankID(u *uint64) *UserUpdate
SetNillableBankID sets the "bank_id" field if the given value is not nil.
func (*UserUpdate) SetNillableContactCountryID ¶
func (uu *UserUpdate) SetNillableContactCountryID(u *uint64) *UserUpdate
SetNillableContactCountryID sets the "contact_country_id" field if the given value is not nil.
func (*UserUpdate) SetNillableContactNumber ¶
func (uu *UserUpdate) SetNillableContactNumber(s *string) *UserUpdate
SetNillableContactNumber sets the "contact_number" field if the given value is not nil.
func (*UserUpdate) SetNillableCountryID ¶
func (uu *UserUpdate) SetNillableCountryID(u *uint64) *UserUpdate
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*UserUpdate) SetNillableCreatedAt ¶
func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdate) SetNillableCredit1 ¶
func (uu *UserUpdate) SetNillableCredit1(f *float64) *UserUpdate
SetNillableCredit1 sets the "credit_1" field if the given value is not nil.
func (*UserUpdate) SetNillableCredit2 ¶
func (uu *UserUpdate) SetNillableCredit2(f *float64) *UserUpdate
SetNillableCredit2 sets the "credit_2" field if the given value is not nil.
func (*UserUpdate) SetNillableCredit3 ¶
func (uu *UserUpdate) SetNillableCredit3(f *float64) *UserUpdate
SetNillableCredit3 sets the "credit_3" field if the given value is not nil.
func (*UserUpdate) SetNillableCredit4 ¶
func (uu *UserUpdate) SetNillableCredit4(f *float64) *UserUpdate
SetNillableCredit4 sets the "credit_4" field if the given value is not nil.
func (*UserUpdate) SetNillableCredit5 ¶
func (uu *UserUpdate) SetNillableCredit5(f *float64) *UserUpdate
SetNillableCredit5 sets the "credit_5" field if the given value is not nil.
func (*UserUpdate) SetNillableDeletedAt ¶
func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdate) SetNillableEmail ¶
func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillableEmailVerifiedAt ¶
func (uu *UserUpdate) SetNillableEmailVerifiedAt(t *time.Time) *UserUpdate
SetNillableEmailVerifiedAt sets the "email_verified_at" field if the given value is not nil.
func (*UserUpdate) SetNillableFirstLogin ¶
func (uu *UserUpdate) SetNillableFirstLogin(b *bool) *UserUpdate
SetNillableFirstLogin sets the "first_login" field if the given value is not nil.
func (*UserUpdate) SetNillableFullContactNumber ¶
func (uu *UserUpdate) SetNillableFullContactNumber(s *string) *UserUpdate
SetNillableFullContactNumber sets the "full_contact_number" field if the given value is not nil.
func (*UserUpdate) SetNillableIntroducerID ¶
func (uu *UserUpdate) SetNillableIntroducerID(id *uint64) *UserUpdate
SetNillableIntroducerID sets the "introducer" edge to the User entity by ID if the given value is not nil.
func (*UserUpdate) SetNillableIntroducerUserID ¶
func (uu *UserUpdate) SetNillableIntroducerUserID(u *uint64) *UserUpdate
SetNillableIntroducerUserID sets the "introducer_user_id" field if the given value is not nil.
func (*UserUpdate) SetNillableLang ¶
func (uu *UserUpdate) SetNillableLang(s *string) *UserUpdate
SetNillableLang sets the "lang" field if the given value is not nil.
func (*UserUpdate) SetNillableLastLoginAt ¶
func (uu *UserUpdate) SetNillableLastLoginAt(t *time.Time) *UserUpdate
SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.
func (*UserUpdate) SetNillableName ¶
func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdate) SetNillableNationalID ¶
func (uu *UserUpdate) SetNillableNationalID(s *string) *UserUpdate
SetNillableNationalID sets the "national_id" field if the given value is not nil.
func (*UserUpdate) SetNillableNewLoginAt ¶
func (uu *UserUpdate) SetNillableNewLoginAt(t *time.Time) *UserUpdate
SetNillableNewLoginAt sets the "new_login_at" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword2 ¶
func (uu *UserUpdate) SetNillablePassword2(s *string) *UserUpdate
SetNillablePassword2 sets the "password2" field if the given value is not nil.
func (*UserUpdate) SetNillableUnilevel ¶
func (uu *UserUpdate) SetNillableUnilevel(u *uint64) *UserUpdate
SetNillableUnilevel sets the "unilevel" field if the given value is not nil.
func (*UserUpdate) SetNillableUsername ¶
func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetPassword2 ¶
func (uu *UserUpdate) SetPassword2(s string) *UserUpdate
SetPassword2 sets the "password2" field.
func (*UserUpdate) SetUnilevel ¶
func (uu *UserUpdate) SetUnilevel(u uint64) *UserUpdate
SetUnilevel sets the "unilevel" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddCredit1 ¶
func (uuo *UserUpdateOne) AddCredit1(f float64) *UserUpdateOne
AddCredit1 adds f to the "credit_1" field.
func (*UserUpdateOne) AddCredit2 ¶
func (uuo *UserUpdateOne) AddCredit2(f float64) *UserUpdateOne
AddCredit2 adds f to the "credit_2" field.
func (*UserUpdateOne) AddCredit3 ¶
func (uuo *UserUpdateOne) AddCredit3(f float64) *UserUpdateOne
AddCredit3 adds f to the "credit_3" field.
func (*UserUpdateOne) AddCredit4 ¶
func (uuo *UserUpdateOne) AddCredit4(f float64) *UserUpdateOne
AddCredit4 adds f to the "credit_4" field.
func (*UserUpdateOne) AddCredit5 ¶
func (uuo *UserUpdateOne) AddCredit5(f float64) *UserUpdateOne
AddCredit5 adds f to the "credit_5" field.
func (*UserUpdateOne) AddIntroducedUserIDs ¶
func (uuo *UserUpdateOne) AddIntroducedUserIDs(ids ...uint64) *UserUpdateOne
AddIntroducedUserIDs adds the "introduced_users" edge to the User entity by IDs.
func (*UserUpdateOne) AddIntroducedUsers ¶
func (uuo *UserUpdateOne) AddIntroducedUsers(u ...*User) *UserUpdateOne
AddIntroducedUsers adds the "introduced_users" edges to the User entity.
func (*UserUpdateOne) AddUnilevel ¶
func (uuo *UserUpdateOne) AddUnilevel(u int64) *UserUpdateOne
AddUnilevel adds u to the "unilevel" field.
func (*UserUpdateOne) ClearAvatar ¶
func (uuo *UserUpdateOne) ClearAvatar() *UserUpdateOne
ClearAvatar clears the value of the "avatar" field.
func (*UserUpdateOne) ClearBanUntil ¶
func (uuo *UserUpdateOne) ClearBanUntil() *UserUpdateOne
ClearBanUntil clears the value of the "ban_until" field.
func (*UserUpdateOne) ClearBank ¶
func (uuo *UserUpdateOne) ClearBank() *UserUpdateOne
ClearBank clears the "bank" edge to the Bank entity.
func (*UserUpdateOne) ClearBankAccountName ¶
func (uuo *UserUpdateOne) ClearBankAccountName() *UserUpdateOne
ClearBankAccountName clears the value of the "bank_account_name" field.
func (*UserUpdateOne) ClearBankAccountNumber ¶
func (uuo *UserUpdateOne) ClearBankAccountNumber() *UserUpdateOne
ClearBankAccountNumber clears the value of the "bank_account_number" field.
func (*UserUpdateOne) ClearBankID ¶
func (uuo *UserUpdateOne) ClearBankID() *UserUpdateOne
ClearBankID clears the value of the "bank_id" field.
func (*UserUpdateOne) ClearContactCountry ¶
func (uuo *UserUpdateOne) ClearContactCountry() *UserUpdateOne
ClearContactCountry clears the "contact_country" edge to the Country entity.
func (*UserUpdateOne) ClearContactCountryID ¶
func (uuo *UserUpdateOne) ClearContactCountryID() *UserUpdateOne
ClearContactCountryID clears the value of the "contact_country_id" field.
func (*UserUpdateOne) ClearContactNumber ¶
func (uuo *UserUpdateOne) ClearContactNumber() *UserUpdateOne
ClearContactNumber clears the value of the "contact_number" field.
func (*UserUpdateOne) ClearCountry ¶
func (uuo *UserUpdateOne) ClearCountry() *UserUpdateOne
ClearCountry clears the "country" edge to the Country entity.
func (*UserUpdateOne) ClearCountryID ¶
func (uuo *UserUpdateOne) ClearCountryID() *UserUpdateOne
ClearCountryID clears the value of the "country_id" field.
func (*UserUpdateOne) ClearDeletedAt ¶
func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdateOne) ClearEmail ¶
func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne
ClearEmail clears the value of the "email" field.
func (*UserUpdateOne) ClearEmailVerifiedAt ¶
func (uuo *UserUpdateOne) ClearEmailVerifiedAt() *UserUpdateOne
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*UserUpdateOne) ClearFullContactNumber ¶
func (uuo *UserUpdateOne) ClearFullContactNumber() *UserUpdateOne
ClearFullContactNumber clears the value of the "full_contact_number" field.
func (*UserUpdateOne) ClearIntroducedUsers ¶
func (uuo *UserUpdateOne) ClearIntroducedUsers() *UserUpdateOne
ClearIntroducedUsers clears all "introduced_users" edges to the User entity.
func (*UserUpdateOne) ClearIntroducer ¶
func (uuo *UserUpdateOne) ClearIntroducer() *UserUpdateOne
ClearIntroducer clears the "introducer" edge to the User entity.
func (*UserUpdateOne) ClearIntroducerUserID ¶
func (uuo *UserUpdateOne) ClearIntroducerUserID() *UserUpdateOne
ClearIntroducerUserID clears the value of the "introducer_user_id" field.
func (*UserUpdateOne) ClearLastLoginAt ¶
func (uuo *UserUpdateOne) ClearLastLoginAt() *UserUpdateOne
ClearLastLoginAt clears the value of the "last_login_at" field.
func (*UserUpdateOne) ClearName ¶
func (uuo *UserUpdateOne) ClearName() *UserUpdateOne
ClearName clears the value of the "name" field.
func (*UserUpdateOne) ClearNationalID ¶
func (uuo *UserUpdateOne) ClearNationalID() *UserUpdateOne
ClearNationalID clears the value of the "national_id" field.
func (*UserUpdateOne) ClearNewLoginAt ¶
func (uuo *UserUpdateOne) ClearNewLoginAt() *UserUpdateOne
ClearNewLoginAt clears the value of the "new_login_at" field.
func (*UserUpdateOne) ClearUnilevel ¶
func (uuo *UserUpdateOne) ClearUnilevel() *UserUpdateOne
ClearUnilevel clears the value of the "unilevel" field.
func (*UserUpdateOne) ClearUsername ¶
func (uuo *UserUpdateOne) ClearUsername() *UserUpdateOne
ClearUsername clears the value of the "username" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecContext ¶
func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) QueryContext ¶
func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserUpdateOne) RemoveIntroducedUserIDs ¶
func (uuo *UserUpdateOne) RemoveIntroducedUserIDs(ids ...uint64) *UserUpdateOne
RemoveIntroducedUserIDs removes the "introduced_users" edge to User entities by IDs.
func (*UserUpdateOne) RemoveIntroducedUsers ¶
func (uuo *UserUpdateOne) RemoveIntroducedUsers(u ...*User) *UserUpdateOne
RemoveIntroducedUsers removes "introduced_users" edges to User entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetAvatar ¶
func (uuo *UserUpdateOne) SetAvatar(s string) *UserUpdateOne
SetAvatar sets the "avatar" field.
func (*UserUpdateOne) SetBanUntil ¶
func (uuo *UserUpdateOne) SetBanUntil(t time.Time) *UserUpdateOne
SetBanUntil sets the "ban_until" field.
func (*UserUpdateOne) SetBank ¶
func (uuo *UserUpdateOne) SetBank(b *Bank) *UserUpdateOne
SetBank sets the "bank" edge to the Bank entity.
func (*UserUpdateOne) SetBankAccountName ¶
func (uuo *UserUpdateOne) SetBankAccountName(s string) *UserUpdateOne
SetBankAccountName sets the "bank_account_name" field.
func (*UserUpdateOne) SetBankAccountNumber ¶
func (uuo *UserUpdateOne) SetBankAccountNumber(s string) *UserUpdateOne
SetBankAccountNumber sets the "bank_account_number" field.
func (*UserUpdateOne) SetBankID ¶
func (uuo *UserUpdateOne) SetBankID(u uint64) *UserUpdateOne
SetBankID sets the "bank_id" field.
func (*UserUpdateOne) SetContactCountry ¶
func (uuo *UserUpdateOne) SetContactCountry(c *Country) *UserUpdateOne
SetContactCountry sets the "contact_country" edge to the Country entity.
func (*UserUpdateOne) SetContactCountryID ¶
func (uuo *UserUpdateOne) SetContactCountryID(u uint64) *UserUpdateOne
SetContactCountryID sets the "contact_country_id" field.
func (*UserUpdateOne) SetContactNumber ¶
func (uuo *UserUpdateOne) SetContactNumber(s string) *UserUpdateOne
SetContactNumber sets the "contact_number" field.
func (*UserUpdateOne) SetCountry ¶
func (uuo *UserUpdateOne) SetCountry(c *Country) *UserUpdateOne
SetCountry sets the "country" edge to the Country entity.
func (*UserUpdateOne) SetCountryID ¶
func (uuo *UserUpdateOne) SetCountryID(u uint64) *UserUpdateOne
SetCountryID sets the "country_id" field.
func (*UserUpdateOne) SetCreatedAt ¶
func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserUpdateOne) SetCredit1 ¶
func (uuo *UserUpdateOne) SetCredit1(f float64) *UserUpdateOne
SetCredit1 sets the "credit_1" field.
func (*UserUpdateOne) SetCredit2 ¶
func (uuo *UserUpdateOne) SetCredit2(f float64) *UserUpdateOne
SetCredit2 sets the "credit_2" field.
func (*UserUpdateOne) SetCredit3 ¶
func (uuo *UserUpdateOne) SetCredit3(f float64) *UserUpdateOne
SetCredit3 sets the "credit_3" field.
func (*UserUpdateOne) SetCredit4 ¶
func (uuo *UserUpdateOne) SetCredit4(f float64) *UserUpdateOne
SetCredit4 sets the "credit_4" field.
func (*UserUpdateOne) SetCredit5 ¶
func (uuo *UserUpdateOne) SetCredit5(f float64) *UserUpdateOne
SetCredit5 sets the "credit_5" field.
func (*UserUpdateOne) SetDeletedAt ¶
func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetEmailVerifiedAt ¶
func (uuo *UserUpdateOne) SetEmailVerifiedAt(t time.Time) *UserUpdateOne
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*UserUpdateOne) SetFirstLogin ¶
func (uuo *UserUpdateOne) SetFirstLogin(b bool) *UserUpdateOne
SetFirstLogin sets the "first_login" field.
func (*UserUpdateOne) SetFullContactNumber ¶
func (uuo *UserUpdateOne) SetFullContactNumber(s string) *UserUpdateOne
SetFullContactNumber sets the "full_contact_number" field.
func (*UserUpdateOne) SetIntroducer ¶
func (uuo *UserUpdateOne) SetIntroducer(u *User) *UserUpdateOne
SetIntroducer sets the "introducer" edge to the User entity.
func (*UserUpdateOne) SetIntroducerID ¶
func (uuo *UserUpdateOne) SetIntroducerID(id uint64) *UserUpdateOne
SetIntroducerID sets the "introducer" edge to the User entity by ID.
func (*UserUpdateOne) SetIntroducerUserID ¶
func (uuo *UserUpdateOne) SetIntroducerUserID(u uint64) *UserUpdateOne
SetIntroducerUserID sets the "introducer_user_id" field.
func (*UserUpdateOne) SetLang ¶
func (uuo *UserUpdateOne) SetLang(s string) *UserUpdateOne
SetLang sets the "lang" field.
func (*UserUpdateOne) SetLastLoginAt ¶
func (uuo *UserUpdateOne) SetLastLoginAt(t time.Time) *UserUpdateOne
SetLastLoginAt sets the "last_login_at" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNationalID ¶
func (uuo *UserUpdateOne) SetNationalID(s string) *UserUpdateOne
SetNationalID sets the "national_id" field.
func (*UserUpdateOne) SetNewLoginAt ¶
func (uuo *UserUpdateOne) SetNewLoginAt(t time.Time) *UserUpdateOne
SetNewLoginAt sets the "new_login_at" field.
func (*UserUpdateOne) SetNillableAvatar ¶
func (uuo *UserUpdateOne) SetNillableAvatar(s *string) *UserUpdateOne
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserUpdateOne) SetNillableBanUntil ¶
func (uuo *UserUpdateOne) SetNillableBanUntil(t *time.Time) *UserUpdateOne
SetNillableBanUntil sets the "ban_until" field if the given value is not nil.
func (*UserUpdateOne) SetNillableBankAccountName ¶
func (uuo *UserUpdateOne) SetNillableBankAccountName(s *string) *UserUpdateOne
SetNillableBankAccountName sets the "bank_account_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableBankAccountNumber ¶
func (uuo *UserUpdateOne) SetNillableBankAccountNumber(s *string) *UserUpdateOne
SetNillableBankAccountNumber sets the "bank_account_number" field if the given value is not nil.
func (*UserUpdateOne) SetNillableBankID ¶
func (uuo *UserUpdateOne) SetNillableBankID(u *uint64) *UserUpdateOne
SetNillableBankID sets the "bank_id" field if the given value is not nil.
func (*UserUpdateOne) SetNillableContactCountryID ¶
func (uuo *UserUpdateOne) SetNillableContactCountryID(u *uint64) *UserUpdateOne
SetNillableContactCountryID sets the "contact_country_id" field if the given value is not nil.
func (*UserUpdateOne) SetNillableContactNumber ¶
func (uuo *UserUpdateOne) SetNillableContactNumber(s *string) *UserUpdateOne
SetNillableContactNumber sets the "contact_number" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCountryID ¶
func (uuo *UserUpdateOne) SetNillableCountryID(u *uint64) *UserUpdateOne
SetNillableCountryID sets the "country_id" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCreatedAt ¶
func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCredit1 ¶
func (uuo *UserUpdateOne) SetNillableCredit1(f *float64) *UserUpdateOne
SetNillableCredit1 sets the "credit_1" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCredit2 ¶
func (uuo *UserUpdateOne) SetNillableCredit2(f *float64) *UserUpdateOne
SetNillableCredit2 sets the "credit_2" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCredit3 ¶
func (uuo *UserUpdateOne) SetNillableCredit3(f *float64) *UserUpdateOne
SetNillableCredit3 sets the "credit_3" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCredit4 ¶
func (uuo *UserUpdateOne) SetNillableCredit4(f *float64) *UserUpdateOne
SetNillableCredit4 sets the "credit_4" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCredit5 ¶
func (uuo *UserUpdateOne) SetNillableCredit5(f *float64) *UserUpdateOne
SetNillableCredit5 sets the "credit_5" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDeletedAt ¶
func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmail ¶
func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmailVerifiedAt ¶
func (uuo *UserUpdateOne) SetNillableEmailVerifiedAt(t *time.Time) *UserUpdateOne
SetNillableEmailVerifiedAt sets the "email_verified_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableFirstLogin ¶
func (uuo *UserUpdateOne) SetNillableFirstLogin(b *bool) *UserUpdateOne
SetNillableFirstLogin sets the "first_login" field if the given value is not nil.
func (*UserUpdateOne) SetNillableFullContactNumber ¶
func (uuo *UserUpdateOne) SetNillableFullContactNumber(s *string) *UserUpdateOne
SetNillableFullContactNumber sets the "full_contact_number" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIntroducerID ¶
func (uuo *UserUpdateOne) SetNillableIntroducerID(id *uint64) *UserUpdateOne
SetNillableIntroducerID sets the "introducer" edge to the User entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillableIntroducerUserID ¶
func (uuo *UserUpdateOne) SetNillableIntroducerUserID(u *uint64) *UserUpdateOne
SetNillableIntroducerUserID sets the "introducer_user_id" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLang ¶
func (uuo *UserUpdateOne) SetNillableLang(s *string) *UserUpdateOne
SetNillableLang sets the "lang" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastLoginAt ¶
func (uuo *UserUpdateOne) SetNillableLastLoginAt(t *time.Time) *UserUpdateOne
SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableName ¶
func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableNationalID ¶
func (uuo *UserUpdateOne) SetNillableNationalID(s *string) *UserUpdateOne
SetNillableNationalID sets the "national_id" field if the given value is not nil.
func (*UserUpdateOne) SetNillableNewLoginAt ¶
func (uuo *UserUpdateOne) SetNillableNewLoginAt(t *time.Time) *UserUpdateOne
SetNillableNewLoginAt sets the "new_login_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword2 ¶
func (uuo *UserUpdateOne) SetNillablePassword2(s *string) *UserUpdateOne
SetNillablePassword2 sets the "password2" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUnilevel ¶
func (uuo *UserUpdateOne) SetNillableUnilevel(u *uint64) *UserUpdateOne
SetNillableUnilevel sets the "unilevel" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUsername ¶
func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetPassword2 ¶
func (uuo *UserUpdateOne) SetPassword2(s string) *UserUpdateOne
SetPassword2 sets the "password2" field.
func (*UserUpdateOne) SetUnilevel ¶
func (uuo *UserUpdateOne) SetUnilevel(u uint64) *UserUpdateOne
SetUnilevel sets the "unilevel" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) AddCredit1 ¶
func (u *UserUpsert) AddCredit1(v float64) *UserUpsert
AddCredit1 adds v to the "credit_1" field.
func (*UserUpsert) AddCredit2 ¶
func (u *UserUpsert) AddCredit2(v float64) *UserUpsert
AddCredit2 adds v to the "credit_2" field.
func (*UserUpsert) AddCredit3 ¶
func (u *UserUpsert) AddCredit3(v float64) *UserUpsert
AddCredit3 adds v to the "credit_3" field.
func (*UserUpsert) AddCredit4 ¶
func (u *UserUpsert) AddCredit4(v float64) *UserUpsert
AddCredit4 adds v to the "credit_4" field.
func (*UserUpsert) AddCredit5 ¶
func (u *UserUpsert) AddCredit5(v float64) *UserUpsert
AddCredit5 adds v to the "credit_5" field.
func (*UserUpsert) AddUnilevel ¶
func (u *UserUpsert) AddUnilevel(v uint64) *UserUpsert
AddUnilevel adds v to the "unilevel" field.
func (*UserUpsert) ClearAvatar ¶
func (u *UserUpsert) ClearAvatar() *UserUpsert
ClearAvatar clears the value of the "avatar" field.
func (*UserUpsert) ClearBanUntil ¶
func (u *UserUpsert) ClearBanUntil() *UserUpsert
ClearBanUntil clears the value of the "ban_until" field.
func (*UserUpsert) ClearBankAccountName ¶
func (u *UserUpsert) ClearBankAccountName() *UserUpsert
ClearBankAccountName clears the value of the "bank_account_name" field.
func (*UserUpsert) ClearBankAccountNumber ¶
func (u *UserUpsert) ClearBankAccountNumber() *UserUpsert
ClearBankAccountNumber clears the value of the "bank_account_number" field.
func (*UserUpsert) ClearBankID ¶
func (u *UserUpsert) ClearBankID() *UserUpsert
ClearBankID clears the value of the "bank_id" field.
func (*UserUpsert) ClearContactCountryID ¶
func (u *UserUpsert) ClearContactCountryID() *UserUpsert
ClearContactCountryID clears the value of the "contact_country_id" field.
func (*UserUpsert) ClearContactNumber ¶
func (u *UserUpsert) ClearContactNumber() *UserUpsert
ClearContactNumber clears the value of the "contact_number" field.
func (*UserUpsert) ClearCountryID ¶
func (u *UserUpsert) ClearCountryID() *UserUpsert
ClearCountryID clears the value of the "country_id" field.
func (*UserUpsert) ClearDeletedAt ¶
func (u *UserUpsert) ClearDeletedAt() *UserUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpsert) ClearEmail ¶
func (u *UserUpsert) ClearEmail() *UserUpsert
ClearEmail clears the value of the "email" field.
func (*UserUpsert) ClearEmailVerifiedAt ¶
func (u *UserUpsert) ClearEmailVerifiedAt() *UserUpsert
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*UserUpsert) ClearFullContactNumber ¶
func (u *UserUpsert) ClearFullContactNumber() *UserUpsert
ClearFullContactNumber clears the value of the "full_contact_number" field.
func (*UserUpsert) ClearIntroducerUserID ¶
func (u *UserUpsert) ClearIntroducerUserID() *UserUpsert
ClearIntroducerUserID clears the value of the "introducer_user_id" field.
func (*UserUpsert) ClearLastLoginAt ¶
func (u *UserUpsert) ClearLastLoginAt() *UserUpsert
ClearLastLoginAt clears the value of the "last_login_at" field.
func (*UserUpsert) ClearName ¶
func (u *UserUpsert) ClearName() *UserUpsert
ClearName clears the value of the "name" field.
func (*UserUpsert) ClearNationalID ¶
func (u *UserUpsert) ClearNationalID() *UserUpsert
ClearNationalID clears the value of the "national_id" field.
func (*UserUpsert) ClearNewLoginAt ¶
func (u *UserUpsert) ClearNewLoginAt() *UserUpsert
ClearNewLoginAt clears the value of the "new_login_at" field.
func (*UserUpsert) ClearUnilevel ¶
func (u *UserUpsert) ClearUnilevel() *UserUpsert
ClearUnilevel clears the value of the "unilevel" field.
func (*UserUpsert) ClearUsername ¶
func (u *UserUpsert) ClearUsername() *UserUpsert
ClearUsername clears the value of the "username" field.
func (*UserUpsert) SetAvatar ¶
func (u *UserUpsert) SetAvatar(v string) *UserUpsert
SetAvatar sets the "avatar" field.
func (*UserUpsert) SetBanUntil ¶
func (u *UserUpsert) SetBanUntil(v time.Time) *UserUpsert
SetBanUntil sets the "ban_until" field.
func (*UserUpsert) SetBankAccountName ¶
func (u *UserUpsert) SetBankAccountName(v string) *UserUpsert
SetBankAccountName sets the "bank_account_name" field.
func (*UserUpsert) SetBankAccountNumber ¶
func (u *UserUpsert) SetBankAccountNumber(v string) *UserUpsert
SetBankAccountNumber sets the "bank_account_number" field.
func (*UserUpsert) SetBankID ¶
func (u *UserUpsert) SetBankID(v uint64) *UserUpsert
SetBankID sets the "bank_id" field.
func (*UserUpsert) SetContactCountryID ¶
func (u *UserUpsert) SetContactCountryID(v uint64) *UserUpsert
SetContactCountryID sets the "contact_country_id" field.
func (*UserUpsert) SetContactNumber ¶
func (u *UserUpsert) SetContactNumber(v string) *UserUpsert
SetContactNumber sets the "contact_number" field.
func (*UserUpsert) SetCountryID ¶
func (u *UserUpsert) SetCountryID(v uint64) *UserUpsert
SetCountryID sets the "country_id" field.
func (*UserUpsert) SetCreatedAt ¶
func (u *UserUpsert) SetCreatedAt(v time.Time) *UserUpsert
SetCreatedAt sets the "created_at" field.
func (*UserUpsert) SetCredit1 ¶
func (u *UserUpsert) SetCredit1(v float64) *UserUpsert
SetCredit1 sets the "credit_1" field.
func (*UserUpsert) SetCredit2 ¶
func (u *UserUpsert) SetCredit2(v float64) *UserUpsert
SetCredit2 sets the "credit_2" field.
func (*UserUpsert) SetCredit3 ¶
func (u *UserUpsert) SetCredit3(v float64) *UserUpsert
SetCredit3 sets the "credit_3" field.
func (*UserUpsert) SetCredit4 ¶
func (u *UserUpsert) SetCredit4(v float64) *UserUpsert
SetCredit4 sets the "credit_4" field.
func (*UserUpsert) SetCredit5 ¶
func (u *UserUpsert) SetCredit5(v float64) *UserUpsert
SetCredit5 sets the "credit_5" field.
func (*UserUpsert) SetDeletedAt ¶
func (u *UserUpsert) SetDeletedAt(v time.Time) *UserUpsert
SetDeletedAt sets the "deleted_at" field.
func (*UserUpsert) SetEmail ¶
func (u *UserUpsert) SetEmail(v string) *UserUpsert
SetEmail sets the "email" field.
func (*UserUpsert) SetEmailVerifiedAt ¶
func (u *UserUpsert) SetEmailVerifiedAt(v time.Time) *UserUpsert
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*UserUpsert) SetFirstLogin ¶
func (u *UserUpsert) SetFirstLogin(v bool) *UserUpsert
SetFirstLogin sets the "first_login" field.
func (*UserUpsert) SetFullContactNumber ¶
func (u *UserUpsert) SetFullContactNumber(v string) *UserUpsert
SetFullContactNumber sets the "full_contact_number" field.
func (*UserUpsert) SetIntroducerUserID ¶
func (u *UserUpsert) SetIntroducerUserID(v uint64) *UserUpsert
SetIntroducerUserID sets the "introducer_user_id" field.
func (*UserUpsert) SetLang ¶
func (u *UserUpsert) SetLang(v string) *UserUpsert
SetLang sets the "lang" field.
func (*UserUpsert) SetLastLoginAt ¶
func (u *UserUpsert) SetLastLoginAt(v time.Time) *UserUpsert
SetLastLoginAt sets the "last_login_at" field.
func (*UserUpsert) SetName ¶
func (u *UserUpsert) SetName(v string) *UserUpsert
SetName sets the "name" field.
func (*UserUpsert) SetNationalID ¶
func (u *UserUpsert) SetNationalID(v string) *UserUpsert
SetNationalID sets the "national_id" field.
func (*UserUpsert) SetNewLoginAt ¶
func (u *UserUpsert) SetNewLoginAt(v time.Time) *UserUpsert
SetNewLoginAt sets the "new_login_at" field.
func (*UserUpsert) SetPassword ¶
func (u *UserUpsert) SetPassword(v string) *UserUpsert
SetPassword sets the "password" field.
func (*UserUpsert) SetPassword2 ¶
func (u *UserUpsert) SetPassword2(v string) *UserUpsert
SetPassword2 sets the "password2" field.
func (*UserUpsert) SetUnilevel ¶
func (u *UserUpsert) SetUnilevel(v uint64) *UserUpsert
SetUnilevel sets the "unilevel" field.
func (*UserUpsert) SetUpdatedAt ¶
func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsert) SetUsername ¶
func (u *UserUpsert) SetUsername(v string) *UserUpsert
SetUsername sets the "username" field.
func (*UserUpsert) UpdateAvatar ¶
func (u *UserUpsert) UpdateAvatar() *UserUpsert
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*UserUpsert) UpdateBanUntil ¶
func (u *UserUpsert) UpdateBanUntil() *UserUpsert
UpdateBanUntil sets the "ban_until" field to the value that was provided on create.
func (*UserUpsert) UpdateBankAccountName ¶
func (u *UserUpsert) UpdateBankAccountName() *UserUpsert
UpdateBankAccountName sets the "bank_account_name" field to the value that was provided on create.
func (*UserUpsert) UpdateBankAccountNumber ¶
func (u *UserUpsert) UpdateBankAccountNumber() *UserUpsert
UpdateBankAccountNumber sets the "bank_account_number" field to the value that was provided on create.
func (*UserUpsert) UpdateBankID ¶
func (u *UserUpsert) UpdateBankID() *UserUpsert
UpdateBankID sets the "bank_id" field to the value that was provided on create.
func (*UserUpsert) UpdateContactCountryID ¶
func (u *UserUpsert) UpdateContactCountryID() *UserUpsert
UpdateContactCountryID sets the "contact_country_id" field to the value that was provided on create.
func (*UserUpsert) UpdateContactNumber ¶
func (u *UserUpsert) UpdateContactNumber() *UserUpsert
UpdateContactNumber sets the "contact_number" field to the value that was provided on create.
func (*UserUpsert) UpdateCountryID ¶
func (u *UserUpsert) UpdateCountryID() *UserUpsert
UpdateCountryID sets the "country_id" field to the value that was provided on create.
func (*UserUpsert) UpdateCreatedAt ¶
func (u *UserUpsert) UpdateCreatedAt() *UserUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsert) UpdateCredit1 ¶
func (u *UserUpsert) UpdateCredit1() *UserUpsert
UpdateCredit1 sets the "credit_1" field to the value that was provided on create.
func (*UserUpsert) UpdateCredit2 ¶
func (u *UserUpsert) UpdateCredit2() *UserUpsert
UpdateCredit2 sets the "credit_2" field to the value that was provided on create.
func (*UserUpsert) UpdateCredit3 ¶
func (u *UserUpsert) UpdateCredit3() *UserUpsert
UpdateCredit3 sets the "credit_3" field to the value that was provided on create.
func (*UserUpsert) UpdateCredit4 ¶
func (u *UserUpsert) UpdateCredit4() *UserUpsert
UpdateCredit4 sets the "credit_4" field to the value that was provided on create.
func (*UserUpsert) UpdateCredit5 ¶
func (u *UserUpsert) UpdateCredit5() *UserUpsert
UpdateCredit5 sets the "credit_5" field to the value that was provided on create.
func (*UserUpsert) UpdateDeletedAt ¶
func (u *UserUpsert) UpdateDeletedAt() *UserUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*UserUpsert) UpdateEmail ¶
func (u *UserUpsert) UpdateEmail() *UserUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsert) UpdateEmailVerifiedAt ¶
func (u *UserUpsert) UpdateEmailVerifiedAt() *UserUpsert
UpdateEmailVerifiedAt sets the "email_verified_at" field to the value that was provided on create.
func (*UserUpsert) UpdateFirstLogin ¶
func (u *UserUpsert) UpdateFirstLogin() *UserUpsert
UpdateFirstLogin sets the "first_login" field to the value that was provided on create.
func (*UserUpsert) UpdateFullContactNumber ¶
func (u *UserUpsert) UpdateFullContactNumber() *UserUpsert
UpdateFullContactNumber sets the "full_contact_number" field to the value that was provided on create.
func (*UserUpsert) UpdateIntroducerUserID ¶
func (u *UserUpsert) UpdateIntroducerUserID() *UserUpsert
UpdateIntroducerUserID sets the "introducer_user_id" field to the value that was provided on create.
func (*UserUpsert) UpdateLang ¶
func (u *UserUpsert) UpdateLang() *UserUpsert
UpdateLang sets the "lang" field to the value that was provided on create.
func (*UserUpsert) UpdateLastLoginAt ¶
func (u *UserUpsert) UpdateLastLoginAt() *UserUpsert
UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.
func (*UserUpsert) UpdateName ¶
func (u *UserUpsert) UpdateName() *UserUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsert) UpdateNationalID ¶
func (u *UserUpsert) UpdateNationalID() *UserUpsert
UpdateNationalID sets the "national_id" field to the value that was provided on create.
func (*UserUpsert) UpdateNewLoginAt ¶
func (u *UserUpsert) UpdateNewLoginAt() *UserUpsert
UpdateNewLoginAt sets the "new_login_at" field to the value that was provided on create.
func (*UserUpsert) UpdatePassword ¶
func (u *UserUpsert) UpdatePassword() *UserUpsert
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsert) UpdatePassword2 ¶
func (u *UserUpsert) UpdatePassword2() *UserUpsert
UpdatePassword2 sets the "password2" field to the value that was provided on create.
func (*UserUpsert) UpdateUnilevel ¶
func (u *UserUpsert) UpdateUnilevel() *UserUpsert
UpdateUnilevel sets the "unilevel" field to the value that was provided on create.
func (*UserUpsert) UpdateUpdatedAt ¶
func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*UserUpsert) UpdateUsername ¶
func (u *UserUpsert) UpdateUsername() *UserUpsert
UpdateUsername sets the "username" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) AddCredit1 ¶
func (u *UserUpsertBulk) AddCredit1(v float64) *UserUpsertBulk
AddCredit1 adds v to the "credit_1" field.
func (*UserUpsertBulk) AddCredit2 ¶
func (u *UserUpsertBulk) AddCredit2(v float64) *UserUpsertBulk
AddCredit2 adds v to the "credit_2" field.
func (*UserUpsertBulk) AddCredit3 ¶
func (u *UserUpsertBulk) AddCredit3(v float64) *UserUpsertBulk
AddCredit3 adds v to the "credit_3" field.
func (*UserUpsertBulk) AddCredit4 ¶
func (u *UserUpsertBulk) AddCredit4(v float64) *UserUpsertBulk
AddCredit4 adds v to the "credit_4" field.
func (*UserUpsertBulk) AddCredit5 ¶
func (u *UserUpsertBulk) AddCredit5(v float64) *UserUpsertBulk
AddCredit5 adds v to the "credit_5" field.
func (*UserUpsertBulk) AddUnilevel ¶
func (u *UserUpsertBulk) AddUnilevel(v uint64) *UserUpsertBulk
AddUnilevel adds v to the "unilevel" field.
func (*UserUpsertBulk) ClearAvatar ¶
func (u *UserUpsertBulk) ClearAvatar() *UserUpsertBulk
ClearAvatar clears the value of the "avatar" field.
func (*UserUpsertBulk) ClearBanUntil ¶
func (u *UserUpsertBulk) ClearBanUntil() *UserUpsertBulk
ClearBanUntil clears the value of the "ban_until" field.
func (*UserUpsertBulk) ClearBankAccountName ¶
func (u *UserUpsertBulk) ClearBankAccountName() *UserUpsertBulk
ClearBankAccountName clears the value of the "bank_account_name" field.
func (*UserUpsertBulk) ClearBankAccountNumber ¶
func (u *UserUpsertBulk) ClearBankAccountNumber() *UserUpsertBulk
ClearBankAccountNumber clears the value of the "bank_account_number" field.
func (*UserUpsertBulk) ClearBankID ¶
func (u *UserUpsertBulk) ClearBankID() *UserUpsertBulk
ClearBankID clears the value of the "bank_id" field.
func (*UserUpsertBulk) ClearContactCountryID ¶
func (u *UserUpsertBulk) ClearContactCountryID() *UserUpsertBulk
ClearContactCountryID clears the value of the "contact_country_id" field.
func (*UserUpsertBulk) ClearContactNumber ¶
func (u *UserUpsertBulk) ClearContactNumber() *UserUpsertBulk
ClearContactNumber clears the value of the "contact_number" field.
func (*UserUpsertBulk) ClearCountryID ¶
func (u *UserUpsertBulk) ClearCountryID() *UserUpsertBulk
ClearCountryID clears the value of the "country_id" field.
func (*UserUpsertBulk) ClearDeletedAt ¶
func (u *UserUpsertBulk) ClearDeletedAt() *UserUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpsertBulk) ClearEmail ¶
func (u *UserUpsertBulk) ClearEmail() *UserUpsertBulk
ClearEmail clears the value of the "email" field.
func (*UserUpsertBulk) ClearEmailVerifiedAt ¶
func (u *UserUpsertBulk) ClearEmailVerifiedAt() *UserUpsertBulk
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*UserUpsertBulk) ClearFullContactNumber ¶
func (u *UserUpsertBulk) ClearFullContactNumber() *UserUpsertBulk
ClearFullContactNumber clears the value of the "full_contact_number" field.
func (*UserUpsertBulk) ClearIntroducerUserID ¶
func (u *UserUpsertBulk) ClearIntroducerUserID() *UserUpsertBulk
ClearIntroducerUserID clears the value of the "introducer_user_id" field.
func (*UserUpsertBulk) ClearLastLoginAt ¶
func (u *UserUpsertBulk) ClearLastLoginAt() *UserUpsertBulk
ClearLastLoginAt clears the value of the "last_login_at" field.
func (*UserUpsertBulk) ClearName ¶
func (u *UserUpsertBulk) ClearName() *UserUpsertBulk
ClearName clears the value of the "name" field.
func (*UserUpsertBulk) ClearNationalID ¶
func (u *UserUpsertBulk) ClearNationalID() *UserUpsertBulk
ClearNationalID clears the value of the "national_id" field.
func (*UserUpsertBulk) ClearNewLoginAt ¶
func (u *UserUpsertBulk) ClearNewLoginAt() *UserUpsertBulk
ClearNewLoginAt clears the value of the "new_login_at" field.
func (*UserUpsertBulk) ClearUnilevel ¶
func (u *UserUpsertBulk) ClearUnilevel() *UserUpsertBulk
ClearUnilevel clears the value of the "unilevel" field.
func (*UserUpsertBulk) ClearUsername ¶
func (u *UserUpsertBulk) ClearUsername() *UserUpsertBulk
ClearUsername clears the value of the "username" field.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetAvatar ¶
func (u *UserUpsertBulk) SetAvatar(v string) *UserUpsertBulk
SetAvatar sets the "avatar" field.
func (*UserUpsertBulk) SetBanUntil ¶
func (u *UserUpsertBulk) SetBanUntil(v time.Time) *UserUpsertBulk
SetBanUntil sets the "ban_until" field.
func (*UserUpsertBulk) SetBankAccountName ¶
func (u *UserUpsertBulk) SetBankAccountName(v string) *UserUpsertBulk
SetBankAccountName sets the "bank_account_name" field.
func (*UserUpsertBulk) SetBankAccountNumber ¶
func (u *UserUpsertBulk) SetBankAccountNumber(v string) *UserUpsertBulk
SetBankAccountNumber sets the "bank_account_number" field.
func (*UserUpsertBulk) SetBankID ¶
func (u *UserUpsertBulk) SetBankID(v uint64) *UserUpsertBulk
SetBankID sets the "bank_id" field.
func (*UserUpsertBulk) SetContactCountryID ¶
func (u *UserUpsertBulk) SetContactCountryID(v uint64) *UserUpsertBulk
SetContactCountryID sets the "contact_country_id" field.
func (*UserUpsertBulk) SetContactNumber ¶
func (u *UserUpsertBulk) SetContactNumber(v string) *UserUpsertBulk
SetContactNumber sets the "contact_number" field.
func (*UserUpsertBulk) SetCountryID ¶
func (u *UserUpsertBulk) SetCountryID(v uint64) *UserUpsertBulk
SetCountryID sets the "country_id" field.
func (*UserUpsertBulk) SetCreatedAt ¶
func (u *UserUpsertBulk) SetCreatedAt(v time.Time) *UserUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*UserUpsertBulk) SetCredit1 ¶
func (u *UserUpsertBulk) SetCredit1(v float64) *UserUpsertBulk
SetCredit1 sets the "credit_1" field.
func (*UserUpsertBulk) SetCredit2 ¶
func (u *UserUpsertBulk) SetCredit2(v float64) *UserUpsertBulk
SetCredit2 sets the "credit_2" field.
func (*UserUpsertBulk) SetCredit3 ¶
func (u *UserUpsertBulk) SetCredit3(v float64) *UserUpsertBulk
SetCredit3 sets the "credit_3" field.
func (*UserUpsertBulk) SetCredit4 ¶
func (u *UserUpsertBulk) SetCredit4(v float64) *UserUpsertBulk
SetCredit4 sets the "credit_4" field.
func (*UserUpsertBulk) SetCredit5 ¶
func (u *UserUpsertBulk) SetCredit5(v float64) *UserUpsertBulk
SetCredit5 sets the "credit_5" field.
func (*UserUpsertBulk) SetDeletedAt ¶
func (u *UserUpsertBulk) SetDeletedAt(v time.Time) *UserUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*UserUpsertBulk) SetEmail ¶
func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
SetEmail sets the "email" field.
func (*UserUpsertBulk) SetEmailVerifiedAt ¶
func (u *UserUpsertBulk) SetEmailVerifiedAt(v time.Time) *UserUpsertBulk
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*UserUpsertBulk) SetFirstLogin ¶
func (u *UserUpsertBulk) SetFirstLogin(v bool) *UserUpsertBulk
SetFirstLogin sets the "first_login" field.
func (*UserUpsertBulk) SetFullContactNumber ¶
func (u *UserUpsertBulk) SetFullContactNumber(v string) *UserUpsertBulk
SetFullContactNumber sets the "full_contact_number" field.
func (*UserUpsertBulk) SetIntroducerUserID ¶
func (u *UserUpsertBulk) SetIntroducerUserID(v uint64) *UserUpsertBulk
SetIntroducerUserID sets the "introducer_user_id" field.
func (*UserUpsertBulk) SetLang ¶
func (u *UserUpsertBulk) SetLang(v string) *UserUpsertBulk
SetLang sets the "lang" field.
func (*UserUpsertBulk) SetLastLoginAt ¶
func (u *UserUpsertBulk) SetLastLoginAt(v time.Time) *UserUpsertBulk
SetLastLoginAt sets the "last_login_at" field.
func (*UserUpsertBulk) SetName ¶
func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk
SetName sets the "name" field.
func (*UserUpsertBulk) SetNationalID ¶
func (u *UserUpsertBulk) SetNationalID(v string) *UserUpsertBulk
SetNationalID sets the "national_id" field.
func (*UserUpsertBulk) SetNewLoginAt ¶
func (u *UserUpsertBulk) SetNewLoginAt(v time.Time) *UserUpsertBulk
SetNewLoginAt sets the "new_login_at" field.
func (*UserUpsertBulk) SetPassword ¶
func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk
SetPassword sets the "password" field.
func (*UserUpsertBulk) SetPassword2 ¶
func (u *UserUpsertBulk) SetPassword2(v string) *UserUpsertBulk
SetPassword2 sets the "password2" field.
func (*UserUpsertBulk) SetUnilevel ¶
func (u *UserUpsertBulk) SetUnilevel(v uint64) *UserUpsertBulk
SetUnilevel sets the "unilevel" field.
func (*UserUpsertBulk) SetUpdatedAt ¶
func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsertBulk) SetUsername ¶
func (u *UserUpsertBulk) SetUsername(v string) *UserUpsertBulk
SetUsername sets the "username" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateAvatar ¶
func (u *UserUpsertBulk) UpdateAvatar() *UserUpsertBulk
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateBanUntil ¶
func (u *UserUpsertBulk) UpdateBanUntil() *UserUpsertBulk
UpdateBanUntil sets the "ban_until" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateBankAccountName ¶
func (u *UserUpsertBulk) UpdateBankAccountName() *UserUpsertBulk
UpdateBankAccountName sets the "bank_account_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateBankAccountNumber ¶
func (u *UserUpsertBulk) UpdateBankAccountNumber() *UserUpsertBulk
UpdateBankAccountNumber sets the "bank_account_number" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateBankID ¶
func (u *UserUpsertBulk) UpdateBankID() *UserUpsertBulk
UpdateBankID sets the "bank_id" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateContactCountryID ¶
func (u *UserUpsertBulk) UpdateContactCountryID() *UserUpsertBulk
UpdateContactCountryID sets the "contact_country_id" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateContactNumber ¶
func (u *UserUpsertBulk) UpdateContactNumber() *UserUpsertBulk
UpdateContactNumber sets the "contact_number" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateCountryID ¶
func (u *UserUpsertBulk) UpdateCountryID() *UserUpsertBulk
UpdateCountryID sets the "country_id" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateCreatedAt ¶
func (u *UserUpsertBulk) UpdateCreatedAt() *UserUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateCredit1 ¶
func (u *UserUpsertBulk) UpdateCredit1() *UserUpsertBulk
UpdateCredit1 sets the "credit_1" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateCredit2 ¶
func (u *UserUpsertBulk) UpdateCredit2() *UserUpsertBulk
UpdateCredit2 sets the "credit_2" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateCredit3 ¶
func (u *UserUpsertBulk) UpdateCredit3() *UserUpsertBulk
UpdateCredit3 sets the "credit_3" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateCredit4 ¶
func (u *UserUpsertBulk) UpdateCredit4() *UserUpsertBulk
UpdateCredit4 sets the "credit_4" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateCredit5 ¶
func (u *UserUpsertBulk) UpdateCredit5() *UserUpsertBulk
UpdateCredit5 sets the "credit_5" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateDeletedAt ¶
func (u *UserUpsertBulk) UpdateDeletedAt() *UserUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateEmail ¶
func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateEmailVerifiedAt ¶
func (u *UserUpsertBulk) UpdateEmailVerifiedAt() *UserUpsertBulk
UpdateEmailVerifiedAt sets the "email_verified_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateFirstLogin ¶
func (u *UserUpsertBulk) UpdateFirstLogin() *UserUpsertBulk
UpdateFirstLogin sets the "first_login" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateFullContactNumber ¶
func (u *UserUpsertBulk) UpdateFullContactNumber() *UserUpsertBulk
UpdateFullContactNumber sets the "full_contact_number" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateIntroducerUserID ¶
func (u *UserUpsertBulk) UpdateIntroducerUserID() *UserUpsertBulk
UpdateIntroducerUserID sets the "introducer_user_id" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateLang ¶
func (u *UserUpsertBulk) UpdateLang() *UserUpsertBulk
UpdateLang sets the "lang" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateLastLoginAt ¶
func (u *UserUpsertBulk) UpdateLastLoginAt() *UserUpsertBulk
UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateName ¶
func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNationalID ¶
func (u *UserUpsertBulk) UpdateNationalID() *UserUpsertBulk
UpdateNationalID sets the "national_id" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewLoginAt ¶
func (u *UserUpsertBulk) UpdateNewLoginAt() *UserUpsertBulk
UpdateNewLoginAt sets the "new_login_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertBulk) UpdatePassword ¶
func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertBulk) UpdatePassword2 ¶
func (u *UserUpsertBulk) UpdatePassword2() *UserUpsertBulk
UpdatePassword2 sets the "password2" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUnilevel ¶
func (u *UserUpsertBulk) UpdateUnilevel() *UserUpsertBulk
UpdateUnilevel sets the "unilevel" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUpdatedAt ¶
func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUsername ¶
func (u *UserUpsertBulk) UpdateUsername() *UserUpsertBulk
UpdateUsername sets the "username" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) AddCredit1 ¶
func (u *UserUpsertOne) AddCredit1(v float64) *UserUpsertOne
AddCredit1 adds v to the "credit_1" field.
func (*UserUpsertOne) AddCredit2 ¶
func (u *UserUpsertOne) AddCredit2(v float64) *UserUpsertOne
AddCredit2 adds v to the "credit_2" field.
func (*UserUpsertOne) AddCredit3 ¶
func (u *UserUpsertOne) AddCredit3(v float64) *UserUpsertOne
AddCredit3 adds v to the "credit_3" field.
func (*UserUpsertOne) AddCredit4 ¶
func (u *UserUpsertOne) AddCredit4(v float64) *UserUpsertOne
AddCredit4 adds v to the "credit_4" field.
func (*UserUpsertOne) AddCredit5 ¶
func (u *UserUpsertOne) AddCredit5(v float64) *UserUpsertOne
AddCredit5 adds v to the "credit_5" field.
func (*UserUpsertOne) AddUnilevel ¶
func (u *UserUpsertOne) AddUnilevel(v uint64) *UserUpsertOne
AddUnilevel adds v to the "unilevel" field.
func (*UserUpsertOne) ClearAvatar ¶
func (u *UserUpsertOne) ClearAvatar() *UserUpsertOne
ClearAvatar clears the value of the "avatar" field.
func (*UserUpsertOne) ClearBanUntil ¶
func (u *UserUpsertOne) ClearBanUntil() *UserUpsertOne
ClearBanUntil clears the value of the "ban_until" field.
func (*UserUpsertOne) ClearBankAccountName ¶
func (u *UserUpsertOne) ClearBankAccountName() *UserUpsertOne
ClearBankAccountName clears the value of the "bank_account_name" field.
func (*UserUpsertOne) ClearBankAccountNumber ¶
func (u *UserUpsertOne) ClearBankAccountNumber() *UserUpsertOne
ClearBankAccountNumber clears the value of the "bank_account_number" field.
func (*UserUpsertOne) ClearBankID ¶
func (u *UserUpsertOne) ClearBankID() *UserUpsertOne
ClearBankID clears the value of the "bank_id" field.
func (*UserUpsertOne) ClearContactCountryID ¶
func (u *UserUpsertOne) ClearContactCountryID() *UserUpsertOne
ClearContactCountryID clears the value of the "contact_country_id" field.
func (*UserUpsertOne) ClearContactNumber ¶
func (u *UserUpsertOne) ClearContactNumber() *UserUpsertOne
ClearContactNumber clears the value of the "contact_number" field.
func (*UserUpsertOne) ClearCountryID ¶
func (u *UserUpsertOne) ClearCountryID() *UserUpsertOne
ClearCountryID clears the value of the "country_id" field.
func (*UserUpsertOne) ClearDeletedAt ¶
func (u *UserUpsertOne) ClearDeletedAt() *UserUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpsertOne) ClearEmail ¶
func (u *UserUpsertOne) ClearEmail() *UserUpsertOne
ClearEmail clears the value of the "email" field.
func (*UserUpsertOne) ClearEmailVerifiedAt ¶
func (u *UserUpsertOne) ClearEmailVerifiedAt() *UserUpsertOne
ClearEmailVerifiedAt clears the value of the "email_verified_at" field.
func (*UserUpsertOne) ClearFullContactNumber ¶
func (u *UserUpsertOne) ClearFullContactNumber() *UserUpsertOne
ClearFullContactNumber clears the value of the "full_contact_number" field.
func (*UserUpsertOne) ClearIntroducerUserID ¶
func (u *UserUpsertOne) ClearIntroducerUserID() *UserUpsertOne
ClearIntroducerUserID clears the value of the "introducer_user_id" field.
func (*UserUpsertOne) ClearLastLoginAt ¶
func (u *UserUpsertOne) ClearLastLoginAt() *UserUpsertOne
ClearLastLoginAt clears the value of the "last_login_at" field.
func (*UserUpsertOne) ClearName ¶
func (u *UserUpsertOne) ClearName() *UserUpsertOne
ClearName clears the value of the "name" field.
func (*UserUpsertOne) ClearNationalID ¶
func (u *UserUpsertOne) ClearNationalID() *UserUpsertOne
ClearNationalID clears the value of the "national_id" field.
func (*UserUpsertOne) ClearNewLoginAt ¶
func (u *UserUpsertOne) ClearNewLoginAt() *UserUpsertOne
ClearNewLoginAt clears the value of the "new_login_at" field.
func (*UserUpsertOne) ClearUnilevel ¶
func (u *UserUpsertOne) ClearUnilevel() *UserUpsertOne
ClearUnilevel clears the value of the "unilevel" field.
func (*UserUpsertOne) ClearUsername ¶
func (u *UserUpsertOne) ClearUsername() *UserUpsertOne
ClearUsername clears the value of the "username" field.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) ID ¶
func (u *UserUpsertOne) ID(ctx context.Context) (id uint64, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) uint64
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetAvatar ¶
func (u *UserUpsertOne) SetAvatar(v string) *UserUpsertOne
SetAvatar sets the "avatar" field.
func (*UserUpsertOne) SetBanUntil ¶
func (u *UserUpsertOne) SetBanUntil(v time.Time) *UserUpsertOne
SetBanUntil sets the "ban_until" field.
func (*UserUpsertOne) SetBankAccountName ¶
func (u *UserUpsertOne) SetBankAccountName(v string) *UserUpsertOne
SetBankAccountName sets the "bank_account_name" field.
func (*UserUpsertOne) SetBankAccountNumber ¶
func (u *UserUpsertOne) SetBankAccountNumber(v string) *UserUpsertOne
SetBankAccountNumber sets the "bank_account_number" field.
func (*UserUpsertOne) SetBankID ¶
func (u *UserUpsertOne) SetBankID(v uint64) *UserUpsertOne
SetBankID sets the "bank_id" field.
func (*UserUpsertOne) SetContactCountryID ¶
func (u *UserUpsertOne) SetContactCountryID(v uint64) *UserUpsertOne
SetContactCountryID sets the "contact_country_id" field.
func (*UserUpsertOne) SetContactNumber ¶
func (u *UserUpsertOne) SetContactNumber(v string) *UserUpsertOne
SetContactNumber sets the "contact_number" field.
func (*UserUpsertOne) SetCountryID ¶
func (u *UserUpsertOne) SetCountryID(v uint64) *UserUpsertOne
SetCountryID sets the "country_id" field.
func (*UserUpsertOne) SetCreatedAt ¶
func (u *UserUpsertOne) SetCreatedAt(v time.Time) *UserUpsertOne
SetCreatedAt sets the "created_at" field.
func (*UserUpsertOne) SetCredit1 ¶
func (u *UserUpsertOne) SetCredit1(v float64) *UserUpsertOne
SetCredit1 sets the "credit_1" field.
func (*UserUpsertOne) SetCredit2 ¶
func (u *UserUpsertOne) SetCredit2(v float64) *UserUpsertOne
SetCredit2 sets the "credit_2" field.
func (*UserUpsertOne) SetCredit3 ¶
func (u *UserUpsertOne) SetCredit3(v float64) *UserUpsertOne
SetCredit3 sets the "credit_3" field.
func (*UserUpsertOne) SetCredit4 ¶
func (u *UserUpsertOne) SetCredit4(v float64) *UserUpsertOne
SetCredit4 sets the "credit_4" field.
func (*UserUpsertOne) SetCredit5 ¶
func (u *UserUpsertOne) SetCredit5(v float64) *UserUpsertOne
SetCredit5 sets the "credit_5" field.
func (*UserUpsertOne) SetDeletedAt ¶
func (u *UserUpsertOne) SetDeletedAt(v time.Time) *UserUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*UserUpsertOne) SetEmail ¶
func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
SetEmail sets the "email" field.
func (*UserUpsertOne) SetEmailVerifiedAt ¶
func (u *UserUpsertOne) SetEmailVerifiedAt(v time.Time) *UserUpsertOne
SetEmailVerifiedAt sets the "email_verified_at" field.
func (*UserUpsertOne) SetFirstLogin ¶
func (u *UserUpsertOne) SetFirstLogin(v bool) *UserUpsertOne
SetFirstLogin sets the "first_login" field.
func (*UserUpsertOne) SetFullContactNumber ¶
func (u *UserUpsertOne) SetFullContactNumber(v string) *UserUpsertOne
SetFullContactNumber sets the "full_contact_number" field.
func (*UserUpsertOne) SetIntroducerUserID ¶
func (u *UserUpsertOne) SetIntroducerUserID(v uint64) *UserUpsertOne
SetIntroducerUserID sets the "introducer_user_id" field.
func (*UserUpsertOne) SetLang ¶
func (u *UserUpsertOne) SetLang(v string) *UserUpsertOne
SetLang sets the "lang" field.
func (*UserUpsertOne) SetLastLoginAt ¶
func (u *UserUpsertOne) SetLastLoginAt(v time.Time) *UserUpsertOne
SetLastLoginAt sets the "last_login_at" field.
func (*UserUpsertOne) SetName ¶
func (u *UserUpsertOne) SetName(v string) *UserUpsertOne
SetName sets the "name" field.
func (*UserUpsertOne) SetNationalID ¶
func (u *UserUpsertOne) SetNationalID(v string) *UserUpsertOne
SetNationalID sets the "national_id" field.
func (*UserUpsertOne) SetNewLoginAt ¶
func (u *UserUpsertOne) SetNewLoginAt(v time.Time) *UserUpsertOne
SetNewLoginAt sets the "new_login_at" field.
func (*UserUpsertOne) SetPassword ¶
func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne
SetPassword sets the "password" field.
func (*UserUpsertOne) SetPassword2 ¶
func (u *UserUpsertOne) SetPassword2(v string) *UserUpsertOne
SetPassword2 sets the "password2" field.
func (*UserUpsertOne) SetUnilevel ¶
func (u *UserUpsertOne) SetUnilevel(v uint64) *UserUpsertOne
SetUnilevel sets the "unilevel" field.
func (*UserUpsertOne) SetUpdatedAt ¶
func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsertOne) SetUsername ¶
func (u *UserUpsertOne) SetUsername(v string) *UserUpsertOne
SetUsername sets the "username" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateAvatar ¶
func (u *UserUpsertOne) UpdateAvatar() *UserUpsertOne
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*UserUpsertOne) UpdateBanUntil ¶
func (u *UserUpsertOne) UpdateBanUntil() *UserUpsertOne
UpdateBanUntil sets the "ban_until" field to the value that was provided on create.
func (*UserUpsertOne) UpdateBankAccountName ¶
func (u *UserUpsertOne) UpdateBankAccountName() *UserUpsertOne
UpdateBankAccountName sets the "bank_account_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateBankAccountNumber ¶
func (u *UserUpsertOne) UpdateBankAccountNumber() *UserUpsertOne
UpdateBankAccountNumber sets the "bank_account_number" field to the value that was provided on create.
func (*UserUpsertOne) UpdateBankID ¶
func (u *UserUpsertOne) UpdateBankID() *UserUpsertOne
UpdateBankID sets the "bank_id" field to the value that was provided on create.
func (*UserUpsertOne) UpdateContactCountryID ¶
func (u *UserUpsertOne) UpdateContactCountryID() *UserUpsertOne
UpdateContactCountryID sets the "contact_country_id" field to the value that was provided on create.
func (*UserUpsertOne) UpdateContactNumber ¶
func (u *UserUpsertOne) UpdateContactNumber() *UserUpsertOne
UpdateContactNumber sets the "contact_number" field to the value that was provided on create.
func (*UserUpsertOne) UpdateCountryID ¶
func (u *UserUpsertOne) UpdateCountryID() *UserUpsertOne
UpdateCountryID sets the "country_id" field to the value that was provided on create.
func (*UserUpsertOne) UpdateCreatedAt ¶
func (u *UserUpsertOne) UpdateCreatedAt() *UserUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateCredit1 ¶
func (u *UserUpsertOne) UpdateCredit1() *UserUpsertOne
UpdateCredit1 sets the "credit_1" field to the value that was provided on create.
func (*UserUpsertOne) UpdateCredit2 ¶
func (u *UserUpsertOne) UpdateCredit2() *UserUpsertOne
UpdateCredit2 sets the "credit_2" field to the value that was provided on create.
func (*UserUpsertOne) UpdateCredit3 ¶
func (u *UserUpsertOne) UpdateCredit3() *UserUpsertOne
UpdateCredit3 sets the "credit_3" field to the value that was provided on create.
func (*UserUpsertOne) UpdateCredit4 ¶
func (u *UserUpsertOne) UpdateCredit4() *UserUpsertOne
UpdateCredit4 sets the "credit_4" field to the value that was provided on create.
func (*UserUpsertOne) UpdateCredit5 ¶
func (u *UserUpsertOne) UpdateCredit5() *UserUpsertOne
UpdateCredit5 sets the "credit_5" field to the value that was provided on create.
func (*UserUpsertOne) UpdateDeletedAt ¶
func (u *UserUpsertOne) UpdateDeletedAt() *UserUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateEmail ¶
func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertOne) UpdateEmailVerifiedAt ¶
func (u *UserUpsertOne) UpdateEmailVerifiedAt() *UserUpsertOne
UpdateEmailVerifiedAt sets the "email_verified_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateFirstLogin ¶
func (u *UserUpsertOne) UpdateFirstLogin() *UserUpsertOne
UpdateFirstLogin sets the "first_login" field to the value that was provided on create.
func (*UserUpsertOne) UpdateFullContactNumber ¶
func (u *UserUpsertOne) UpdateFullContactNumber() *UserUpsertOne
UpdateFullContactNumber sets the "full_contact_number" field to the value that was provided on create.
func (*UserUpsertOne) UpdateIntroducerUserID ¶
func (u *UserUpsertOne) UpdateIntroducerUserID() *UserUpsertOne
UpdateIntroducerUserID sets the "introducer_user_id" field to the value that was provided on create.
func (*UserUpsertOne) UpdateLang ¶
func (u *UserUpsertOne) UpdateLang() *UserUpsertOne
UpdateLang sets the "lang" field to the value that was provided on create.
func (*UserUpsertOne) UpdateLastLoginAt ¶
func (u *UserUpsertOne) UpdateLastLoginAt() *UserUpsertOne
UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateName ¶
func (u *UserUpsertOne) UpdateName() *UserUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNationalID ¶
func (u *UserUpsertOne) UpdateNationalID() *UserUpsertOne
UpdateNationalID sets the "national_id" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewLoginAt ¶
func (u *UserUpsertOne) UpdateNewLoginAt() *UserUpsertOne
UpdateNewLoginAt sets the "new_login_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(user.FieldID) }), ). Exec(ctx)
func (*UserUpsertOne) UpdatePassword ¶
func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertOne) UpdatePassword2 ¶
func (u *UserUpsertOne) UpdatePassword2() *UserUpsertOne
UpdatePassword2 sets the "password2" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUnilevel ¶
func (u *UserUpsertOne) UpdateUnilevel() *UserUpsertOne
UpdateUnilevel sets the "unilevel" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUpdatedAt ¶
func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUsername ¶
func (u *UserUpsertOne) UpdateUsername() *UserUpsertOne
UpdateUsername sets the "username" field to the value that was provided on create.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- admin.go
- admin_create.go
- admin_delete.go
- admin_query.go
- admin_update.go
- bank.go
- bank_create.go
- bank_delete.go
- bank_query.go
- bank_update.go
- client.go
- country.go
- country_create.go
- country_delete.go
- country_query.go
- country_update.go
- countrylocation.go
- countrylocation_create.go
- countrylocation_delete.go
- countrylocation_query.go
- countrylocation_update.go
- ent.go
- generate.go
- mutation.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go