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 AggregateFunc
- 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) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Dept
- type DeptClient
- func (c *DeptClient) Create() *DeptCreate
- func (c *DeptClient) CreateBulk(builders ...*DeptCreate) *DeptCreateBulk
- func (c *DeptClient) Delete() *DeptDelete
- func (c *DeptClient) DeleteOne(d *Dept) *DeptDeleteOne
- func (c *DeptClient) DeleteOneID(id uint32) *DeptDeleteOne
- func (c *DeptClient) Get(ctx context.Context, id uint32) (*Dept, error)
- func (c *DeptClient) GetX(ctx context.Context, id uint32) *Dept
- func (c *DeptClient) Hooks() []Hook
- func (c *DeptClient) Intercept(interceptors ...Interceptor)
- func (c *DeptClient) Interceptors() []Interceptor
- func (c *DeptClient) MapCreateBulk(slice any, setFunc func(*DeptCreate, int)) *DeptCreateBulk
- func (c *DeptClient) Query() *DeptQuery
- func (c *DeptClient) QueryChildren(d *Dept) *DeptQuery
- func (c *DeptClient) QueryParent(d *Dept) *DeptQuery
- func (c *DeptClient) Update() *DeptUpdate
- func (c *DeptClient) UpdateOne(d *Dept) *DeptUpdateOne
- func (c *DeptClient) UpdateOneID(id uint32) *DeptUpdateOne
- func (c *DeptClient) Use(hooks ...Hook)
- type DeptCreate
- func (dc *DeptCreate) AddChildIDs(ids ...uint32) *DeptCreate
- func (dc *DeptCreate) AddChildren(d ...*Dept) *DeptCreate
- func (dc *DeptCreate) Exec(ctx context.Context) error
- func (dc *DeptCreate) ExecX(ctx context.Context)
- func (dc *DeptCreate) Mutation() *DeptMutation
- func (dc *DeptCreate) OnConflict(opts ...sql.ConflictOption) *DeptUpsertOne
- func (dc *DeptCreate) OnConflictColumns(columns ...string) *DeptUpsertOne
- func (dc *DeptCreate) Save(ctx context.Context) (*Dept, error)
- func (dc *DeptCreate) SaveX(ctx context.Context) *Dept
- func (dc *DeptCreate) SetAncestors(i []int) *DeptCreate
- func (dc *DeptCreate) SetCreatedAt(t time.Time) *DeptCreate
- func (dc *DeptCreate) SetDeletedAt(t time.Time) *DeptCreate
- func (dc *DeptCreate) SetID(u uint32) *DeptCreate
- func (dc *DeptCreate) SetName(s string) *DeptCreate
- func (dc *DeptCreate) SetNillableCreatedAt(t *time.Time) *DeptCreate
- func (dc *DeptCreate) SetNillableDeletedAt(t *time.Time) *DeptCreate
- func (dc *DeptCreate) SetNillableParentID(u *uint32) *DeptCreate
- func (dc *DeptCreate) SetNillableRemark(s *string) *DeptCreate
- func (dc *DeptCreate) SetNillableSort(i *int32) *DeptCreate
- func (dc *DeptCreate) SetNillableState(i *int32) *DeptCreate
- func (dc *DeptCreate) SetNillableUpdatedAt(t *time.Time) *DeptCreate
- func (dc *DeptCreate) SetParent(d *Dept) *DeptCreate
- func (dc *DeptCreate) SetParentID(u uint32) *DeptCreate
- func (dc *DeptCreate) SetRemark(s string) *DeptCreate
- func (dc *DeptCreate) SetSort(i int32) *DeptCreate
- func (dc *DeptCreate) SetState(i int32) *DeptCreate
- func (dc *DeptCreate) SetUpdatedAt(t time.Time) *DeptCreate
- type DeptCreateBulk
- func (dcb *DeptCreateBulk) Exec(ctx context.Context) error
- func (dcb *DeptCreateBulk) ExecX(ctx context.Context)
- func (dcb *DeptCreateBulk) OnConflict(opts ...sql.ConflictOption) *DeptUpsertBulk
- func (dcb *DeptCreateBulk) OnConflictColumns(columns ...string) *DeptUpsertBulk
- func (dcb *DeptCreateBulk) Save(ctx context.Context) ([]*Dept, error)
- func (dcb *DeptCreateBulk) SaveX(ctx context.Context) []*Dept
- type DeptDelete
- type DeptDeleteOne
- type DeptEdges
- type DeptFilter
- func (f *DeptFilter) Where(p entql.P)
- func (f *DeptFilter) WhereAncestors(p entql.BytesP)
- func (f *DeptFilter) WhereCreatedAt(p entql.TimeP)
- func (f *DeptFilter) WhereDeletedAt(p entql.TimeP)
- func (f *DeptFilter) WhereHasChildren()
- func (f *DeptFilter) WhereHasChildrenWith(preds ...predicate.Dept)
- func (f *DeptFilter) WhereHasParent()
- func (f *DeptFilter) WhereHasParentWith(preds ...predicate.Dept)
- func (f *DeptFilter) WhereID(p entql.Uint32P)
- func (f *DeptFilter) WhereName(p entql.StringP)
- func (f *DeptFilter) WhereParentID(p entql.Uint32P)
- func (f *DeptFilter) WhereRemark(p entql.StringP)
- func (f *DeptFilter) WhereSort(p entql.Int32P)
- func (f *DeptFilter) WhereState(p entql.Int32P)
- func (f *DeptFilter) WhereUpdatedAt(p entql.TimeP)
- type DeptGroupBy
- func (dgb *DeptGroupBy) Aggregate(fns ...AggregateFunc) *DeptGroupBy
- func (s *DeptGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DeptGroupBy) BoolX(ctx context.Context) bool
- func (s *DeptGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DeptGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DeptGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DeptGroupBy) Float64X(ctx context.Context) float64
- func (s *DeptGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DeptGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DeptGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DeptGroupBy) IntX(ctx context.Context) int
- func (s *DeptGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DeptGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DeptGroupBy) Scan(ctx context.Context, v any) error
- func (s *DeptGroupBy) ScanX(ctx context.Context, v any)
- func (s *DeptGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DeptGroupBy) StringX(ctx context.Context) string
- func (s *DeptGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DeptGroupBy) StringsX(ctx context.Context) []string
- type DeptMutation
- func (m *DeptMutation) AddChildIDs(ids ...uint32)
- func (m *DeptMutation) AddField(name string, value ent.Value) error
- func (m *DeptMutation) AddSort(i int32)
- func (m *DeptMutation) AddState(i int32)
- func (m *DeptMutation) AddedEdges() []string
- func (m *DeptMutation) AddedField(name string) (ent.Value, bool)
- func (m *DeptMutation) AddedFields() []string
- func (m *DeptMutation) AddedIDs(name string) []ent.Value
- func (m *DeptMutation) AddedSort() (r int32, exists bool)
- func (m *DeptMutation) AddedState() (r int32, exists bool)
- func (m *DeptMutation) Ancestors() (r []int, exists bool)
- func (m *DeptMutation) AncestorsCleared() bool
- func (m *DeptMutation) AppendAncestors(i []int)
- func (m *DeptMutation) AppendedAncestors() ([]int, bool)
- func (m *DeptMutation) ChildrenCleared() bool
- func (m *DeptMutation) ChildrenIDs() (ids []uint32)
- func (m *DeptMutation) ClearAncestors()
- func (m *DeptMutation) ClearChildren()
- func (m *DeptMutation) ClearCreatedAt()
- func (m *DeptMutation) ClearDeletedAt()
- func (m *DeptMutation) ClearEdge(name string) error
- func (m *DeptMutation) ClearField(name string) error
- func (m *DeptMutation) ClearParent()
- func (m *DeptMutation) ClearParentID()
- func (m *DeptMutation) ClearRemark()
- func (m *DeptMutation) ClearUpdatedAt()
- func (m *DeptMutation) ClearedEdges() []string
- func (m *DeptMutation) ClearedFields() []string
- func (m DeptMutation) Client() *Client
- func (m *DeptMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DeptMutation) CreatedAtCleared() bool
- func (m *DeptMutation) DeletedAt() (r time.Time, exists bool)
- func (m *DeptMutation) DeletedAtCleared() bool
- func (m *DeptMutation) EdgeCleared(name string) bool
- func (m *DeptMutation) Field(name string) (ent.Value, bool)
- func (m *DeptMutation) FieldCleared(name string) bool
- func (m *DeptMutation) Fields() []string
- func (m *DeptMutation) Filter() *DeptFilter
- func (m *DeptMutation) ID() (id uint32, exists bool)
- func (m *DeptMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *DeptMutation) Name() (r string, exists bool)
- func (m *DeptMutation) OldAncestors(ctx context.Context) (v []int, err error)
- func (m *DeptMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *DeptMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *DeptMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DeptMutation) OldName(ctx context.Context) (v *string, err error)
- func (m *DeptMutation) OldParentID(ctx context.Context) (v *uint32, err error)
- func (m *DeptMutation) OldRemark(ctx context.Context) (v *string, err error)
- func (m *DeptMutation) OldSort(ctx context.Context) (v *int32, err error)
- func (m *DeptMutation) OldState(ctx context.Context) (v *int32, err error)
- func (m *DeptMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *DeptMutation) Op() Op
- func (m *DeptMutation) ParentCleared() bool
- func (m *DeptMutation) ParentID() (r uint32, exists bool)
- func (m *DeptMutation) ParentIDCleared() bool
- func (m *DeptMutation) ParentIDs() (ids []uint32)
- func (m *DeptMutation) Remark() (r string, exists bool)
- func (m *DeptMutation) RemarkCleared() bool
- func (m *DeptMutation) RemoveChildIDs(ids ...uint32)
- func (m *DeptMutation) RemovedChildrenIDs() (ids []uint32)
- func (m *DeptMutation) RemovedEdges() []string
- func (m *DeptMutation) RemovedIDs(name string) []ent.Value
- func (m *DeptMutation) ResetAncestors()
- func (m *DeptMutation) ResetChildren()
- func (m *DeptMutation) ResetCreatedAt()
- func (m *DeptMutation) ResetDeletedAt()
- func (m *DeptMutation) ResetEdge(name string) error
- func (m *DeptMutation) ResetField(name string) error
- func (m *DeptMutation) ResetName()
- func (m *DeptMutation) ResetParent()
- func (m *DeptMutation) ResetParentID()
- func (m *DeptMutation) ResetRemark()
- func (m *DeptMutation) ResetSort()
- func (m *DeptMutation) ResetState()
- func (m *DeptMutation) ResetUpdatedAt()
- func (m *DeptMutation) SetAncestors(i []int)
- func (m *DeptMutation) SetCreatedAt(t time.Time)
- func (m *DeptMutation) SetDeletedAt(t time.Time)
- func (m *DeptMutation) SetField(name string, value ent.Value) error
- func (m *DeptMutation) SetID(id uint32)
- func (m *DeptMutation) SetName(s string)
- func (m *DeptMutation) SetOp(op Op)
- func (m *DeptMutation) SetParentID(u uint32)
- func (m *DeptMutation) SetRemark(s string)
- func (m *DeptMutation) SetSort(i int32)
- func (m *DeptMutation) SetState(i int32)
- func (m *DeptMutation) SetUpdatedAt(t time.Time)
- func (m *DeptMutation) Sort() (r int32, exists bool)
- func (m *DeptMutation) State() (r int32, exists bool)
- func (m DeptMutation) Tx() (*Tx, error)
- func (m *DeptMutation) Type() string
- func (m *DeptMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DeptMutation) UpdatedAtCleared() bool
- func (m *DeptMutation) Where(ps ...predicate.Dept)
- func (m *DeptMutation) WhereP(ps ...func(*sql.Selector))
- type DeptQuery
- func (dq *DeptQuery) Aggregate(fns ...AggregateFunc) *DeptSelect
- func (dq *DeptQuery) All(ctx context.Context) ([]*Dept, error)
- func (dq *DeptQuery) AllX(ctx context.Context) []*Dept
- func (dq *DeptQuery) Clone() *DeptQuery
- func (dq *DeptQuery) Count(ctx context.Context) (int, error)
- func (dq *DeptQuery) CountX(ctx context.Context) int
- func (dq *DeptQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DeptQuery) ExistX(ctx context.Context) bool
- func (dq *DeptQuery) Filter() *DeptFilter
- func (dq *DeptQuery) First(ctx context.Context) (*Dept, error)
- func (dq *DeptQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (dq *DeptQuery) FirstIDX(ctx context.Context) uint32
- func (dq *DeptQuery) FirstX(ctx context.Context) *Dept
- func (dq *DeptQuery) GroupBy(field string, fields ...string) *DeptGroupBy
- func (dq *DeptQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (dq *DeptQuery) IDsX(ctx context.Context) []uint32
- func (dq *DeptQuery) Limit(limit int) *DeptQuery
- func (dq *DeptQuery) Modify(modifiers ...func(s *sql.Selector)) *DeptSelect
- func (dq *DeptQuery) Offset(offset int) *DeptQuery
- func (dq *DeptQuery) Only(ctx context.Context) (*Dept, error)
- func (dq *DeptQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (dq *DeptQuery) OnlyIDX(ctx context.Context) uint32
- func (dq *DeptQuery) OnlyX(ctx context.Context) *Dept
- func (dq *DeptQuery) Order(o ...dept.OrderOption) *DeptQuery
- func (dq *DeptQuery) QueryChildren() *DeptQuery
- func (dq *DeptQuery) QueryParent() *DeptQuery
- func (dq *DeptQuery) Select(fields ...string) *DeptSelect
- func (dq *DeptQuery) Unique(unique bool) *DeptQuery
- func (dq *DeptQuery) Where(ps ...predicate.Dept) *DeptQuery
- func (dq *DeptQuery) WithChildren(opts ...func(*DeptQuery)) *DeptQuery
- func (dq *DeptQuery) WithParent(opts ...func(*DeptQuery)) *DeptQuery
- type DeptSelect
- func (ds *DeptSelect) Aggregate(fns ...AggregateFunc) *DeptSelect
- func (s *DeptSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DeptSelect) BoolX(ctx context.Context) bool
- func (s *DeptSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DeptSelect) BoolsX(ctx context.Context) []bool
- func (s *DeptSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DeptSelect) Float64X(ctx context.Context) float64
- func (s *DeptSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DeptSelect) Float64sX(ctx context.Context) []float64
- func (s *DeptSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DeptSelect) IntX(ctx context.Context) int
- func (s *DeptSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DeptSelect) IntsX(ctx context.Context) []int
- func (ds *DeptSelect) Modify(modifiers ...func(s *sql.Selector)) *DeptSelect
- func (ds *DeptSelect) Scan(ctx context.Context, v any) error
- func (s *DeptSelect) ScanX(ctx context.Context, v any)
- func (s *DeptSelect) String(ctx context.Context) (_ string, err error)
- func (s *DeptSelect) StringX(ctx context.Context) string
- func (s *DeptSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DeptSelect) StringsX(ctx context.Context) []string
- type DeptUpdate
- func (du *DeptUpdate) AddChildIDs(ids ...uint32) *DeptUpdate
- func (du *DeptUpdate) AddChildren(d ...*Dept) *DeptUpdate
- func (du *DeptUpdate) AddSort(i int32) *DeptUpdate
- func (du *DeptUpdate) AddState(i int32) *DeptUpdate
- func (du *DeptUpdate) AppendAncestors(i []int) *DeptUpdate
- func (du *DeptUpdate) ClearAncestors() *DeptUpdate
- func (du *DeptUpdate) ClearChildren() *DeptUpdate
- func (du *DeptUpdate) ClearDeletedAt() *DeptUpdate
- func (du *DeptUpdate) ClearParent() *DeptUpdate
- func (du *DeptUpdate) ClearParentID() *DeptUpdate
- func (du *DeptUpdate) ClearRemark() *DeptUpdate
- func (du *DeptUpdate) ClearUpdatedAt() *DeptUpdate
- func (du *DeptUpdate) Exec(ctx context.Context) error
- func (du *DeptUpdate) ExecX(ctx context.Context)
- func (du *DeptUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeptUpdate
- func (du *DeptUpdate) Mutation() *DeptMutation
- func (du *DeptUpdate) RemoveChildIDs(ids ...uint32) *DeptUpdate
- func (du *DeptUpdate) RemoveChildren(d ...*Dept) *DeptUpdate
- func (du *DeptUpdate) Save(ctx context.Context) (int, error)
- func (du *DeptUpdate) SaveX(ctx context.Context) int
- func (du *DeptUpdate) SetAncestors(i []int) *DeptUpdate
- func (du *DeptUpdate) SetDeletedAt(t time.Time) *DeptUpdate
- func (du *DeptUpdate) SetName(s string) *DeptUpdate
- func (du *DeptUpdate) SetNillableDeletedAt(t *time.Time) *DeptUpdate
- func (du *DeptUpdate) SetNillableName(s *string) *DeptUpdate
- func (du *DeptUpdate) SetNillableParentID(u *uint32) *DeptUpdate
- func (du *DeptUpdate) SetNillableRemark(s *string) *DeptUpdate
- func (du *DeptUpdate) SetNillableSort(i *int32) *DeptUpdate
- func (du *DeptUpdate) SetNillableState(i *int32) *DeptUpdate
- func (du *DeptUpdate) SetNillableUpdatedAt(t *time.Time) *DeptUpdate
- func (du *DeptUpdate) SetParent(d *Dept) *DeptUpdate
- func (du *DeptUpdate) SetParentID(u uint32) *DeptUpdate
- func (du *DeptUpdate) SetRemark(s string) *DeptUpdate
- func (du *DeptUpdate) SetSort(i int32) *DeptUpdate
- func (du *DeptUpdate) SetState(i int32) *DeptUpdate
- func (du *DeptUpdate) SetUpdatedAt(t time.Time) *DeptUpdate
- func (du *DeptUpdate) Where(ps ...predicate.Dept) *DeptUpdate
- type DeptUpdateOne
- func (duo *DeptUpdateOne) AddChildIDs(ids ...uint32) *DeptUpdateOne
- func (duo *DeptUpdateOne) AddChildren(d ...*Dept) *DeptUpdateOne
- func (duo *DeptUpdateOne) AddSort(i int32) *DeptUpdateOne
- func (duo *DeptUpdateOne) AddState(i int32) *DeptUpdateOne
- func (duo *DeptUpdateOne) AppendAncestors(i []int) *DeptUpdateOne
- func (duo *DeptUpdateOne) ClearAncestors() *DeptUpdateOne
- func (duo *DeptUpdateOne) ClearChildren() *DeptUpdateOne
- func (duo *DeptUpdateOne) ClearDeletedAt() *DeptUpdateOne
- func (duo *DeptUpdateOne) ClearParent() *DeptUpdateOne
- func (duo *DeptUpdateOne) ClearParentID() *DeptUpdateOne
- func (duo *DeptUpdateOne) ClearRemark() *DeptUpdateOne
- func (duo *DeptUpdateOne) ClearUpdatedAt() *DeptUpdateOne
- func (duo *DeptUpdateOne) Exec(ctx context.Context) error
- func (duo *DeptUpdateOne) ExecX(ctx context.Context)
- func (duo *DeptUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeptUpdateOne
- func (duo *DeptUpdateOne) Mutation() *DeptMutation
- func (duo *DeptUpdateOne) RemoveChildIDs(ids ...uint32) *DeptUpdateOne
- func (duo *DeptUpdateOne) RemoveChildren(d ...*Dept) *DeptUpdateOne
- func (duo *DeptUpdateOne) Save(ctx context.Context) (*Dept, error)
- func (duo *DeptUpdateOne) SaveX(ctx context.Context) *Dept
- func (duo *DeptUpdateOne) Select(field string, fields ...string) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetAncestors(i []int) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetDeletedAt(t time.Time) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetName(s string) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetNillableDeletedAt(t *time.Time) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetNillableName(s *string) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetNillableParentID(u *uint32) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetNillableRemark(s *string) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetNillableSort(i *int32) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetNillableState(i *int32) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetNillableUpdatedAt(t *time.Time) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetParent(d *Dept) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetParentID(u uint32) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetRemark(s string) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetSort(i int32) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetState(i int32) *DeptUpdateOne
- func (duo *DeptUpdateOne) SetUpdatedAt(t time.Time) *DeptUpdateOne
- func (duo *DeptUpdateOne) Where(ps ...predicate.Dept) *DeptUpdateOne
- type DeptUpsert
- func (u *DeptUpsert) AddSort(v int32) *DeptUpsert
- func (u *DeptUpsert) AddState(v int32) *DeptUpsert
- func (u *DeptUpsert) ClearAncestors() *DeptUpsert
- func (u *DeptUpsert) ClearDeletedAt() *DeptUpsert
- func (u *DeptUpsert) ClearParentID() *DeptUpsert
- func (u *DeptUpsert) ClearRemark() *DeptUpsert
- func (u *DeptUpsert) ClearUpdatedAt() *DeptUpsert
- func (u *DeptUpsert) SetAncestors(v []int) *DeptUpsert
- func (u *DeptUpsert) SetDeletedAt(v time.Time) *DeptUpsert
- func (u *DeptUpsert) SetName(v string) *DeptUpsert
- func (u *DeptUpsert) SetParentID(v uint32) *DeptUpsert
- func (u *DeptUpsert) SetRemark(v string) *DeptUpsert
- func (u *DeptUpsert) SetSort(v int32) *DeptUpsert
- func (u *DeptUpsert) SetState(v int32) *DeptUpsert
- func (u *DeptUpsert) SetUpdatedAt(v time.Time) *DeptUpsert
- func (u *DeptUpsert) UpdateAncestors() *DeptUpsert
- func (u *DeptUpsert) UpdateDeletedAt() *DeptUpsert
- func (u *DeptUpsert) UpdateName() *DeptUpsert
- func (u *DeptUpsert) UpdateParentID() *DeptUpsert
- func (u *DeptUpsert) UpdateRemark() *DeptUpsert
- func (u *DeptUpsert) UpdateSort() *DeptUpsert
- func (u *DeptUpsert) UpdateState() *DeptUpsert
- func (u *DeptUpsert) UpdateUpdatedAt() *DeptUpsert
- type DeptUpsertBulk
- func (u *DeptUpsertBulk) AddSort(v int32) *DeptUpsertBulk
- func (u *DeptUpsertBulk) AddState(v int32) *DeptUpsertBulk
- func (u *DeptUpsertBulk) ClearAncestors() *DeptUpsertBulk
- func (u *DeptUpsertBulk) ClearDeletedAt() *DeptUpsertBulk
- func (u *DeptUpsertBulk) ClearParentID() *DeptUpsertBulk
- func (u *DeptUpsertBulk) ClearRemark() *DeptUpsertBulk
- func (u *DeptUpsertBulk) ClearUpdatedAt() *DeptUpsertBulk
- func (u *DeptUpsertBulk) DoNothing() *DeptUpsertBulk
- func (u *DeptUpsertBulk) Exec(ctx context.Context) error
- func (u *DeptUpsertBulk) ExecX(ctx context.Context)
- func (u *DeptUpsertBulk) Ignore() *DeptUpsertBulk
- func (u *DeptUpsertBulk) SetAncestors(v []int) *DeptUpsertBulk
- func (u *DeptUpsertBulk) SetDeletedAt(v time.Time) *DeptUpsertBulk
- func (u *DeptUpsertBulk) SetName(v string) *DeptUpsertBulk
- func (u *DeptUpsertBulk) SetParentID(v uint32) *DeptUpsertBulk
- func (u *DeptUpsertBulk) SetRemark(v string) *DeptUpsertBulk
- func (u *DeptUpsertBulk) SetSort(v int32) *DeptUpsertBulk
- func (u *DeptUpsertBulk) SetState(v int32) *DeptUpsertBulk
- func (u *DeptUpsertBulk) SetUpdatedAt(v time.Time) *DeptUpsertBulk
- func (u *DeptUpsertBulk) Update(set func(*DeptUpsert)) *DeptUpsertBulk
- func (u *DeptUpsertBulk) UpdateAncestors() *DeptUpsertBulk
- func (u *DeptUpsertBulk) UpdateDeletedAt() *DeptUpsertBulk
- func (u *DeptUpsertBulk) UpdateName() *DeptUpsertBulk
- func (u *DeptUpsertBulk) UpdateNewValues() *DeptUpsertBulk
- func (u *DeptUpsertBulk) UpdateParentID() *DeptUpsertBulk
- func (u *DeptUpsertBulk) UpdateRemark() *DeptUpsertBulk
- func (u *DeptUpsertBulk) UpdateSort() *DeptUpsertBulk
- func (u *DeptUpsertBulk) UpdateState() *DeptUpsertBulk
- func (u *DeptUpsertBulk) UpdateUpdatedAt() *DeptUpsertBulk
- type DeptUpsertOne
- func (u *DeptUpsertOne) AddSort(v int32) *DeptUpsertOne
- func (u *DeptUpsertOne) AddState(v int32) *DeptUpsertOne
- func (u *DeptUpsertOne) ClearAncestors() *DeptUpsertOne
- func (u *DeptUpsertOne) ClearDeletedAt() *DeptUpsertOne
- func (u *DeptUpsertOne) ClearParentID() *DeptUpsertOne
- func (u *DeptUpsertOne) ClearRemark() *DeptUpsertOne
- func (u *DeptUpsertOne) ClearUpdatedAt() *DeptUpsertOne
- func (u *DeptUpsertOne) DoNothing() *DeptUpsertOne
- func (u *DeptUpsertOne) Exec(ctx context.Context) error
- func (u *DeptUpsertOne) ExecX(ctx context.Context)
- func (u *DeptUpsertOne) ID(ctx context.Context) (id uint32, err error)
- func (u *DeptUpsertOne) IDX(ctx context.Context) uint32
- func (u *DeptUpsertOne) Ignore() *DeptUpsertOne
- func (u *DeptUpsertOne) SetAncestors(v []int) *DeptUpsertOne
- func (u *DeptUpsertOne) SetDeletedAt(v time.Time) *DeptUpsertOne
- func (u *DeptUpsertOne) SetName(v string) *DeptUpsertOne
- func (u *DeptUpsertOne) SetParentID(v uint32) *DeptUpsertOne
- func (u *DeptUpsertOne) SetRemark(v string) *DeptUpsertOne
- func (u *DeptUpsertOne) SetSort(v int32) *DeptUpsertOne
- func (u *DeptUpsertOne) SetState(v int32) *DeptUpsertOne
- func (u *DeptUpsertOne) SetUpdatedAt(v time.Time) *DeptUpsertOne
- func (u *DeptUpsertOne) Update(set func(*DeptUpsert)) *DeptUpsertOne
- func (u *DeptUpsertOne) UpdateAncestors() *DeptUpsertOne
- func (u *DeptUpsertOne) UpdateDeletedAt() *DeptUpsertOne
- func (u *DeptUpsertOne) UpdateName() *DeptUpsertOne
- func (u *DeptUpsertOne) UpdateNewValues() *DeptUpsertOne
- func (u *DeptUpsertOne) UpdateParentID() *DeptUpsertOne
- func (u *DeptUpsertOne) UpdateRemark() *DeptUpsertOne
- func (u *DeptUpsertOne) UpdateSort() *DeptUpsertOne
- func (u *DeptUpsertOne) UpdateState() *DeptUpsertOne
- func (u *DeptUpsertOne) UpdateUpdatedAt() *DeptUpsertOne
- type Depts
- type Hook
- type InterceptFunc
- type Interceptor
- type Member
- type MemberClient
- func (c *MemberClient) Create() *MemberCreate
- func (c *MemberClient) CreateBulk(builders ...*MemberCreate) *MemberCreateBulk
- func (c *MemberClient) Delete() *MemberDelete
- func (c *MemberClient) DeleteOne(m *Member) *MemberDeleteOne
- func (c *MemberClient) DeleteOneID(id uint32) *MemberDeleteOne
- func (c *MemberClient) Get(ctx context.Context, id uint32) (*Member, error)
- func (c *MemberClient) GetX(ctx context.Context, id uint32) *Member
- func (c *MemberClient) Hooks() []Hook
- func (c *MemberClient) Intercept(interceptors ...Interceptor)
- func (c *MemberClient) Interceptors() []Interceptor
- func (c *MemberClient) MapCreateBulk(slice any, setFunc func(*MemberCreate, int)) *MemberCreateBulk
- func (c *MemberClient) Query() *MemberQuery
- func (c *MemberClient) Update() *MemberUpdate
- func (c *MemberClient) UpdateOne(m *Member) *MemberUpdateOne
- func (c *MemberClient) UpdateOneID(id uint32) *MemberUpdateOne
- func (c *MemberClient) Use(hooks ...Hook)
- type MemberCreate
- func (mc *MemberCreate) Exec(ctx context.Context) error
- func (mc *MemberCreate) ExecX(ctx context.Context)
- func (mc *MemberCreate) Mutation() *MemberMutation
- func (mc *MemberCreate) OnConflict(opts ...sql.ConflictOption) *MemberUpsertOne
- func (mc *MemberCreate) OnConflictColumns(columns ...string) *MemberUpsertOne
- func (mc *MemberCreate) Save(ctx context.Context) (*Member, error)
- func (mc *MemberCreate) SaveX(ctx context.Context) *Member
- func (mc *MemberCreate) SetAvatar(s string) *MemberCreate
- func (mc *MemberCreate) SetCreatedAt(t time.Time) *MemberCreate
- func (mc *MemberCreate) SetDeletedAt(t time.Time) *MemberCreate
- func (mc *MemberCreate) SetDescription(s string) *MemberCreate
- func (mc *MemberCreate) SetEmail(s string) *MemberCreate
- func (mc *MemberCreate) SetID(u uint32) *MemberCreate
- func (mc *MemberCreate) SetNickname(s string) *MemberCreate
- func (mc *MemberCreate) SetNillableAvatar(s *string) *MemberCreate
- func (mc *MemberCreate) SetNillableCreatedAt(t *time.Time) *MemberCreate
- func (mc *MemberCreate) SetNillableDeletedAt(t *time.Time) *MemberCreate
- func (mc *MemberCreate) SetNillableDescription(s *string) *MemberCreate
- func (mc *MemberCreate) SetNillableEmail(s *string) *MemberCreate
- func (mc *MemberCreate) SetNillableNickname(s *string) *MemberCreate
- func (mc *MemberCreate) SetNillablePassword(s *string) *MemberCreate
- func (mc *MemberCreate) SetNillableRemark(s *string) *MemberCreate
- func (mc *MemberCreate) SetNillableSort(i *int32) *MemberCreate
- func (mc *MemberCreate) SetNillableState(i *int32) *MemberCreate
- func (mc *MemberCreate) SetNillableUpdatedAt(t *time.Time) *MemberCreate
- func (mc *MemberCreate) SetPassword(s string) *MemberCreate
- func (mc *MemberCreate) SetPhone(s string) *MemberCreate
- func (mc *MemberCreate) SetRemark(s string) *MemberCreate
- func (mc *MemberCreate) SetSort(i int32) *MemberCreate
- func (mc *MemberCreate) SetState(i int32) *MemberCreate
- func (mc *MemberCreate) SetUpdatedAt(t time.Time) *MemberCreate
- func (mc *MemberCreate) SetUsername(s string) *MemberCreate
- type MemberCreateBulk
- func (mcb *MemberCreateBulk) Exec(ctx context.Context) error
- func (mcb *MemberCreateBulk) ExecX(ctx context.Context)
- func (mcb *MemberCreateBulk) OnConflict(opts ...sql.ConflictOption) *MemberUpsertBulk
- func (mcb *MemberCreateBulk) OnConflictColumns(columns ...string) *MemberUpsertBulk
- func (mcb *MemberCreateBulk) Save(ctx context.Context) ([]*Member, error)
- func (mcb *MemberCreateBulk) SaveX(ctx context.Context) []*Member
- type MemberDelete
- type MemberDeleteOne
- type MemberFilter
- func (f *MemberFilter) Where(p entql.P)
- func (f *MemberFilter) WhereAvatar(p entql.StringP)
- func (f *MemberFilter) WhereCreatedAt(p entql.TimeP)
- func (f *MemberFilter) WhereDeletedAt(p entql.TimeP)
- func (f *MemberFilter) WhereDescription(p entql.StringP)
- func (f *MemberFilter) WhereEmail(p entql.StringP)
- func (f *MemberFilter) WhereID(p entql.Uint32P)
- func (f *MemberFilter) WhereNickname(p entql.StringP)
- func (f *MemberFilter) WherePassword(p entql.StringP)
- func (f *MemberFilter) WherePhone(p entql.StringP)
- func (f *MemberFilter) WhereRemark(p entql.StringP)
- func (f *MemberFilter) WhereSort(p entql.Int32P)
- func (f *MemberFilter) WhereState(p entql.Int32P)
- func (f *MemberFilter) WhereUpdatedAt(p entql.TimeP)
- func (f *MemberFilter) WhereUsername(p entql.StringP)
- type MemberGroupBy
- func (mgb *MemberGroupBy) Aggregate(fns ...AggregateFunc) *MemberGroupBy
- func (s *MemberGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MemberGroupBy) BoolX(ctx context.Context) bool
- func (s *MemberGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MemberGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MemberGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MemberGroupBy) Float64X(ctx context.Context) float64
- func (s *MemberGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MemberGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MemberGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MemberGroupBy) IntX(ctx context.Context) int
- func (s *MemberGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MemberGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MemberGroupBy) Scan(ctx context.Context, v any) error
- func (s *MemberGroupBy) ScanX(ctx context.Context, v any)
- func (s *MemberGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MemberGroupBy) StringX(ctx context.Context) string
- func (s *MemberGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MemberGroupBy) StringsX(ctx context.Context) []string
- type MemberMutation
- func (m *MemberMutation) AddField(name string, value ent.Value) error
- func (m *MemberMutation) AddSort(i int32)
- func (m *MemberMutation) AddState(i int32)
- func (m *MemberMutation) AddedEdges() []string
- func (m *MemberMutation) AddedField(name string) (ent.Value, bool)
- func (m *MemberMutation) AddedFields() []string
- func (m *MemberMutation) AddedIDs(name string) []ent.Value
- func (m *MemberMutation) AddedSort() (r int32, exists bool)
- func (m *MemberMutation) AddedState() (r int32, exists bool)
- func (m *MemberMutation) Avatar() (r string, exists bool)
- func (m *MemberMutation) ClearCreatedAt()
- func (m *MemberMutation) ClearDeletedAt()
- func (m *MemberMutation) ClearEdge(name string) error
- func (m *MemberMutation) ClearField(name string) error
- func (m *MemberMutation) ClearRemark()
- func (m *MemberMutation) ClearUpdatedAt()
- func (m *MemberMutation) ClearedEdges() []string
- func (m *MemberMutation) ClearedFields() []string
- func (m MemberMutation) Client() *Client
- func (m *MemberMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MemberMutation) CreatedAtCleared() bool
- func (m *MemberMutation) DeletedAt() (r time.Time, exists bool)
- func (m *MemberMutation) DeletedAtCleared() bool
- func (m *MemberMutation) Description() (r string, exists bool)
- func (m *MemberMutation) EdgeCleared(name string) bool
- func (m *MemberMutation) Email() (r string, exists bool)
- func (m *MemberMutation) Field(name string) (ent.Value, bool)
- func (m *MemberMutation) FieldCleared(name string) bool
- func (m *MemberMutation) Fields() []string
- func (m *MemberMutation) Filter() *MemberFilter
- func (m *MemberMutation) ID() (id uint32, exists bool)
- func (m *MemberMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *MemberMutation) Nickname() (r string, exists bool)
- func (m *MemberMutation) OldAvatar(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MemberMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MemberMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MemberMutation) OldNickname(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldPhone(ctx context.Context) (v string, err error)
- func (m *MemberMutation) OldRemark(ctx context.Context) (v *string, err error)
- func (m *MemberMutation) OldSort(ctx context.Context) (v *int32, err error)
- func (m *MemberMutation) OldState(ctx context.Context) (v *int32, err error)
- func (m *MemberMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MemberMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *MemberMutation) Op() Op
- func (m *MemberMutation) Password() (r string, exists bool)
- func (m *MemberMutation) Phone() (r string, exists bool)
- func (m *MemberMutation) Remark() (r string, exists bool)
- func (m *MemberMutation) RemarkCleared() bool
- func (m *MemberMutation) RemovedEdges() []string
- func (m *MemberMutation) RemovedIDs(name string) []ent.Value
- func (m *MemberMutation) ResetAvatar()
- func (m *MemberMutation) ResetCreatedAt()
- func (m *MemberMutation) ResetDeletedAt()
- func (m *MemberMutation) ResetDescription()
- func (m *MemberMutation) ResetEdge(name string) error
- func (m *MemberMutation) ResetEmail()
- func (m *MemberMutation) ResetField(name string) error
- func (m *MemberMutation) ResetNickname()
- func (m *MemberMutation) ResetPassword()
- func (m *MemberMutation) ResetPhone()
- func (m *MemberMutation) ResetRemark()
- func (m *MemberMutation) ResetSort()
- func (m *MemberMutation) ResetState()
- func (m *MemberMutation) ResetUpdatedAt()
- func (m *MemberMutation) ResetUsername()
- func (m *MemberMutation) SetAvatar(s string)
- func (m *MemberMutation) SetCreatedAt(t time.Time)
- func (m *MemberMutation) SetDeletedAt(t time.Time)
- func (m *MemberMutation) SetDescription(s string)
- func (m *MemberMutation) SetEmail(s string)
- func (m *MemberMutation) SetField(name string, value ent.Value) error
- func (m *MemberMutation) SetID(id uint32)
- func (m *MemberMutation) SetNickname(s string)
- func (m *MemberMutation) SetOp(op Op)
- func (m *MemberMutation) SetPassword(s string)
- func (m *MemberMutation) SetPhone(s string)
- func (m *MemberMutation) SetRemark(s string)
- func (m *MemberMutation) SetSort(i int32)
- func (m *MemberMutation) SetState(i int32)
- func (m *MemberMutation) SetUpdatedAt(t time.Time)
- func (m *MemberMutation) SetUsername(s string)
- func (m *MemberMutation) Sort() (r int32, exists bool)
- func (m *MemberMutation) State() (r int32, exists bool)
- func (m MemberMutation) Tx() (*Tx, error)
- func (m *MemberMutation) Type() string
- func (m *MemberMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MemberMutation) UpdatedAtCleared() bool
- func (m *MemberMutation) Username() (r string, exists bool)
- func (m *MemberMutation) Where(ps ...predicate.Member)
- func (m *MemberMutation) WhereP(ps ...func(*sql.Selector))
- type MemberQuery
- func (mq *MemberQuery) Aggregate(fns ...AggregateFunc) *MemberSelect
- func (mq *MemberQuery) All(ctx context.Context) ([]*Member, error)
- func (mq *MemberQuery) AllX(ctx context.Context) []*Member
- func (mq *MemberQuery) Clone() *MemberQuery
- func (mq *MemberQuery) Count(ctx context.Context) (int, error)
- func (mq *MemberQuery) CountX(ctx context.Context) int
- func (mq *MemberQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MemberQuery) ExistX(ctx context.Context) bool
- func (mq *MemberQuery) Filter() *MemberFilter
- func (mq *MemberQuery) First(ctx context.Context) (*Member, error)
- func (mq *MemberQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (mq *MemberQuery) FirstIDX(ctx context.Context) uint32
- func (mq *MemberQuery) FirstX(ctx context.Context) *Member
- func (mq *MemberQuery) GroupBy(field string, fields ...string) *MemberGroupBy
- func (mq *MemberQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (mq *MemberQuery) IDsX(ctx context.Context) []uint32
- func (mq *MemberQuery) Limit(limit int) *MemberQuery
- func (mq *MemberQuery) Modify(modifiers ...func(s *sql.Selector)) *MemberSelect
- func (mq *MemberQuery) Offset(offset int) *MemberQuery
- func (mq *MemberQuery) Only(ctx context.Context) (*Member, error)
- func (mq *MemberQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (mq *MemberQuery) OnlyIDX(ctx context.Context) uint32
- func (mq *MemberQuery) OnlyX(ctx context.Context) *Member
- func (mq *MemberQuery) Order(o ...member.OrderOption) *MemberQuery
- func (mq *MemberQuery) Select(fields ...string) *MemberSelect
- func (mq *MemberQuery) Unique(unique bool) *MemberQuery
- func (mq *MemberQuery) Where(ps ...predicate.Member) *MemberQuery
- type MemberSelect
- func (ms *MemberSelect) Aggregate(fns ...AggregateFunc) *MemberSelect
- func (s *MemberSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MemberSelect) BoolX(ctx context.Context) bool
- func (s *MemberSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MemberSelect) BoolsX(ctx context.Context) []bool
- func (s *MemberSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MemberSelect) Float64X(ctx context.Context) float64
- func (s *MemberSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MemberSelect) Float64sX(ctx context.Context) []float64
- func (s *MemberSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MemberSelect) IntX(ctx context.Context) int
- func (s *MemberSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MemberSelect) IntsX(ctx context.Context) []int
- func (ms *MemberSelect) Modify(modifiers ...func(s *sql.Selector)) *MemberSelect
- func (ms *MemberSelect) Scan(ctx context.Context, v any) error
- func (s *MemberSelect) ScanX(ctx context.Context, v any)
- func (s *MemberSelect) String(ctx context.Context) (_ string, err error)
- func (s *MemberSelect) StringX(ctx context.Context) string
- func (s *MemberSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MemberSelect) StringsX(ctx context.Context) []string
- type MemberUpdate
- func (mu *MemberUpdate) AddSort(i int32) *MemberUpdate
- func (mu *MemberUpdate) AddState(i int32) *MemberUpdate
- func (mu *MemberUpdate) ClearDeletedAt() *MemberUpdate
- func (mu *MemberUpdate) ClearRemark() *MemberUpdate
- func (mu *MemberUpdate) ClearUpdatedAt() *MemberUpdate
- func (mu *MemberUpdate) Exec(ctx context.Context) error
- func (mu *MemberUpdate) ExecX(ctx context.Context)
- func (mu *MemberUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MemberUpdate
- func (mu *MemberUpdate) Mutation() *MemberMutation
- func (mu *MemberUpdate) Save(ctx context.Context) (int, error)
- func (mu *MemberUpdate) SaveX(ctx context.Context) int
- func (mu *MemberUpdate) SetAvatar(s string) *MemberUpdate
- func (mu *MemberUpdate) SetDeletedAt(t time.Time) *MemberUpdate
- func (mu *MemberUpdate) SetDescription(s string) *MemberUpdate
- func (mu *MemberUpdate) SetEmail(s string) *MemberUpdate
- func (mu *MemberUpdate) SetNickname(s string) *MemberUpdate
- func (mu *MemberUpdate) SetNillableAvatar(s *string) *MemberUpdate
- func (mu *MemberUpdate) SetNillableDeletedAt(t *time.Time) *MemberUpdate
- func (mu *MemberUpdate) SetNillableDescription(s *string) *MemberUpdate
- func (mu *MemberUpdate) SetNillableEmail(s *string) *MemberUpdate
- func (mu *MemberUpdate) SetNillableNickname(s *string) *MemberUpdate
- func (mu *MemberUpdate) SetNillablePassword(s *string) *MemberUpdate
- func (mu *MemberUpdate) SetNillablePhone(s *string) *MemberUpdate
- func (mu *MemberUpdate) SetNillableRemark(s *string) *MemberUpdate
- func (mu *MemberUpdate) SetNillableSort(i *int32) *MemberUpdate
- func (mu *MemberUpdate) SetNillableState(i *int32) *MemberUpdate
- func (mu *MemberUpdate) SetNillableUpdatedAt(t *time.Time) *MemberUpdate
- func (mu *MemberUpdate) SetPassword(s string) *MemberUpdate
- func (mu *MemberUpdate) SetPhone(s string) *MemberUpdate
- func (mu *MemberUpdate) SetRemark(s string) *MemberUpdate
- func (mu *MemberUpdate) SetSort(i int32) *MemberUpdate
- func (mu *MemberUpdate) SetState(i int32) *MemberUpdate
- func (mu *MemberUpdate) SetUpdatedAt(t time.Time) *MemberUpdate
- func (mu *MemberUpdate) Where(ps ...predicate.Member) *MemberUpdate
- type MemberUpdateOne
- func (muo *MemberUpdateOne) AddSort(i int32) *MemberUpdateOne
- func (muo *MemberUpdateOne) AddState(i int32) *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearDeletedAt() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearRemark() *MemberUpdateOne
- func (muo *MemberUpdateOne) ClearUpdatedAt() *MemberUpdateOne
- func (muo *MemberUpdateOne) Exec(ctx context.Context) error
- func (muo *MemberUpdateOne) ExecX(ctx context.Context)
- func (muo *MemberUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MemberUpdateOne
- func (muo *MemberUpdateOne) Mutation() *MemberMutation
- func (muo *MemberUpdateOne) Save(ctx context.Context) (*Member, error)
- func (muo *MemberUpdateOne) SaveX(ctx context.Context) *Member
- func (muo *MemberUpdateOne) Select(field string, fields ...string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetAvatar(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetDeletedAt(t time.Time) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetDescription(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetEmail(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNickname(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableAvatar(s *string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableDeletedAt(t *time.Time) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableDescription(s *string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableEmail(s *string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableNickname(s *string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillablePassword(s *string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillablePhone(s *string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableRemark(s *string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableSort(i *int32) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableState(i *int32) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetNillableUpdatedAt(t *time.Time) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetPassword(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetPhone(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetRemark(s string) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetSort(i int32) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetState(i int32) *MemberUpdateOne
- func (muo *MemberUpdateOne) SetUpdatedAt(t time.Time) *MemberUpdateOne
- func (muo *MemberUpdateOne) Where(ps ...predicate.Member) *MemberUpdateOne
- type MemberUpsert
- func (u *MemberUpsert) AddSort(v int32) *MemberUpsert
- func (u *MemberUpsert) AddState(v int32) *MemberUpsert
- func (u *MemberUpsert) ClearDeletedAt() *MemberUpsert
- func (u *MemberUpsert) ClearRemark() *MemberUpsert
- func (u *MemberUpsert) ClearUpdatedAt() *MemberUpsert
- func (u *MemberUpsert) SetAvatar(v string) *MemberUpsert
- func (u *MemberUpsert) SetDeletedAt(v time.Time) *MemberUpsert
- func (u *MemberUpsert) SetDescription(v string) *MemberUpsert
- func (u *MemberUpsert) SetEmail(v string) *MemberUpsert
- func (u *MemberUpsert) SetNickname(v string) *MemberUpsert
- func (u *MemberUpsert) SetPassword(v string) *MemberUpsert
- func (u *MemberUpsert) SetPhone(v string) *MemberUpsert
- func (u *MemberUpsert) SetRemark(v string) *MemberUpsert
- func (u *MemberUpsert) SetSort(v int32) *MemberUpsert
- func (u *MemberUpsert) SetState(v int32) *MemberUpsert
- func (u *MemberUpsert) SetUpdatedAt(v time.Time) *MemberUpsert
- func (u *MemberUpsert) UpdateAvatar() *MemberUpsert
- func (u *MemberUpsert) UpdateDeletedAt() *MemberUpsert
- func (u *MemberUpsert) UpdateDescription() *MemberUpsert
- func (u *MemberUpsert) UpdateEmail() *MemberUpsert
- func (u *MemberUpsert) UpdateNickname() *MemberUpsert
- func (u *MemberUpsert) UpdatePassword() *MemberUpsert
- func (u *MemberUpsert) UpdatePhone() *MemberUpsert
- func (u *MemberUpsert) UpdateRemark() *MemberUpsert
- func (u *MemberUpsert) UpdateSort() *MemberUpsert
- func (u *MemberUpsert) UpdateState() *MemberUpsert
- func (u *MemberUpsert) UpdateUpdatedAt() *MemberUpsert
- type MemberUpsertBulk
- func (u *MemberUpsertBulk) AddSort(v int32) *MemberUpsertBulk
- func (u *MemberUpsertBulk) AddState(v int32) *MemberUpsertBulk
- func (u *MemberUpsertBulk) ClearDeletedAt() *MemberUpsertBulk
- func (u *MemberUpsertBulk) ClearRemark() *MemberUpsertBulk
- func (u *MemberUpsertBulk) ClearUpdatedAt() *MemberUpsertBulk
- func (u *MemberUpsertBulk) DoNothing() *MemberUpsertBulk
- func (u *MemberUpsertBulk) Exec(ctx context.Context) error
- func (u *MemberUpsertBulk) ExecX(ctx context.Context)
- func (u *MemberUpsertBulk) Ignore() *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetAvatar(v string) *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetDeletedAt(v time.Time) *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetDescription(v string) *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetEmail(v string) *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetNickname(v string) *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetPassword(v string) *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetPhone(v string) *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetRemark(v string) *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetSort(v int32) *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetState(v int32) *MemberUpsertBulk
- func (u *MemberUpsertBulk) SetUpdatedAt(v time.Time) *MemberUpsertBulk
- func (u *MemberUpsertBulk) Update(set func(*MemberUpsert)) *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdateAvatar() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdateDeletedAt() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdateDescription() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdateEmail() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdateNewValues() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdateNickname() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdatePassword() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdatePhone() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdateRemark() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdateSort() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdateState() *MemberUpsertBulk
- func (u *MemberUpsertBulk) UpdateUpdatedAt() *MemberUpsertBulk
- type MemberUpsertOne
- func (u *MemberUpsertOne) AddSort(v int32) *MemberUpsertOne
- func (u *MemberUpsertOne) AddState(v int32) *MemberUpsertOne
- func (u *MemberUpsertOne) ClearDeletedAt() *MemberUpsertOne
- func (u *MemberUpsertOne) ClearRemark() *MemberUpsertOne
- func (u *MemberUpsertOne) ClearUpdatedAt() *MemberUpsertOne
- func (u *MemberUpsertOne) DoNothing() *MemberUpsertOne
- func (u *MemberUpsertOne) Exec(ctx context.Context) error
- func (u *MemberUpsertOne) ExecX(ctx context.Context)
- func (u *MemberUpsertOne) ID(ctx context.Context) (id uint32, err error)
- func (u *MemberUpsertOne) IDX(ctx context.Context) uint32
- func (u *MemberUpsertOne) Ignore() *MemberUpsertOne
- func (u *MemberUpsertOne) SetAvatar(v string) *MemberUpsertOne
- func (u *MemberUpsertOne) SetDeletedAt(v time.Time) *MemberUpsertOne
- func (u *MemberUpsertOne) SetDescription(v string) *MemberUpsertOne
- func (u *MemberUpsertOne) SetEmail(v string) *MemberUpsertOne
- func (u *MemberUpsertOne) SetNickname(v string) *MemberUpsertOne
- func (u *MemberUpsertOne) SetPassword(v string) *MemberUpsertOne
- func (u *MemberUpsertOne) SetPhone(v string) *MemberUpsertOne
- func (u *MemberUpsertOne) SetRemark(v string) *MemberUpsertOne
- func (u *MemberUpsertOne) SetSort(v int32) *MemberUpsertOne
- func (u *MemberUpsertOne) SetState(v int32) *MemberUpsertOne
- func (u *MemberUpsertOne) SetUpdatedAt(v time.Time) *MemberUpsertOne
- func (u *MemberUpsertOne) Update(set func(*MemberUpsert)) *MemberUpsertOne
- func (u *MemberUpsertOne) UpdateAvatar() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdateDeletedAt() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdateDescription() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdateEmail() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdateNewValues() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdateNickname() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdatePassword() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdatePhone() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdateRemark() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdateSort() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdateState() *MemberUpsertOne
- func (u *MemberUpsertOne) UpdateUpdatedAt() *MemberUpsertOne
- type Members
- type Menu
- type MenuClient
- func (c *MenuClient) Create() *MenuCreate
- func (c *MenuClient) CreateBulk(builders ...*MenuCreate) *MenuCreateBulk
- func (c *MenuClient) Delete() *MenuDelete
- func (c *MenuClient) DeleteOne(m *Menu) *MenuDeleteOne
- func (c *MenuClient) DeleteOneID(id uint32) *MenuDeleteOne
- func (c *MenuClient) Get(ctx context.Context, id uint32) (*Menu, error)
- func (c *MenuClient) GetX(ctx context.Context, id uint32) *Menu
- func (c *MenuClient) Hooks() []Hook
- func (c *MenuClient) Intercept(interceptors ...Interceptor)
- func (c *MenuClient) Interceptors() []Interceptor
- func (c *MenuClient) MapCreateBulk(slice any, setFunc func(*MenuCreate, int)) *MenuCreateBulk
- func (c *MenuClient) Query() *MenuQuery
- func (c *MenuClient) QueryChildren(m *Menu) *MenuQuery
- func (c *MenuClient) QueryParent(m *Menu) *MenuQuery
- func (c *MenuClient) Update() *MenuUpdate
- func (c *MenuClient) UpdateOne(m *Menu) *MenuUpdateOne
- func (c *MenuClient) UpdateOneID(id uint32) *MenuUpdateOne
- func (c *MenuClient) Use(hooks ...Hook)
- type MenuCreate
- func (mc *MenuCreate) AddChildIDs(ids ...uint32) *MenuCreate
- func (mc *MenuCreate) AddChildren(m ...*Menu) *MenuCreate
- func (mc *MenuCreate) Exec(ctx context.Context) error
- func (mc *MenuCreate) ExecX(ctx context.Context)
- func (mc *MenuCreate) Mutation() *MenuMutation
- func (mc *MenuCreate) OnConflict(opts ...sql.ConflictOption) *MenuUpsertOne
- func (mc *MenuCreate) OnConflictColumns(columns ...string) *MenuUpsertOne
- func (mc *MenuCreate) Save(ctx context.Context) (*Menu, error)
- func (mc *MenuCreate) SaveX(ctx context.Context) *Menu
- func (mc *MenuCreate) SetComponent(s string) *MenuCreate
- func (mc *MenuCreate) SetCreatedAt(t time.Time) *MenuCreate
- func (mc *MenuCreate) SetCurrentActiveMenu(s string) *MenuCreate
- func (mc *MenuCreate) SetDeletedAt(t time.Time) *MenuCreate
- func (mc *MenuCreate) SetExtURL(s string) *MenuCreate
- func (mc *MenuCreate) SetHideBreadcrumb(b bool) *MenuCreate
- func (mc *MenuCreate) SetHideMenu(b bool) *MenuCreate
- func (mc *MenuCreate) SetHideTab(b bool) *MenuCreate
- func (mc *MenuCreate) SetID(u uint32) *MenuCreate
- func (mc *MenuCreate) SetIcon(s string) *MenuCreate
- func (mc *MenuCreate) SetIsExt(b bool) *MenuCreate
- func (mc *MenuCreate) SetKeepAlive(b bool) *MenuCreate
- func (mc *MenuCreate) SetName(s string) *MenuCreate
- func (mc *MenuCreate) SetNillableComponent(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableCreatedAt(t *time.Time) *MenuCreate
- func (mc *MenuCreate) SetNillableCurrentActiveMenu(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableDeletedAt(t *time.Time) *MenuCreate
- func (mc *MenuCreate) SetNillableExtURL(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableHideBreadcrumb(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableHideMenu(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableHideTab(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableIcon(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableIsExt(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableKeepAlive(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableName(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableParentID(u *uint32) *MenuCreate
- func (mc *MenuCreate) SetNillablePath(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableRedirect(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableRemark(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableSort(i *int32) *MenuCreate
- func (mc *MenuCreate) SetNillableState(i *int32) *MenuCreate
- func (mc *MenuCreate) SetNillableTitle(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableType(i *int32) *MenuCreate
- func (mc *MenuCreate) SetNillableUpdatedAt(t *time.Time) *MenuCreate
- func (mc *MenuCreate) SetNillableVisible(b *bool) *MenuCreate
- func (mc *MenuCreate) SetParent(m *Menu) *MenuCreate
- func (mc *MenuCreate) SetParentID(u uint32) *MenuCreate
- func (mc *MenuCreate) SetPath(s string) *MenuCreate
- func (mc *MenuCreate) SetPermissions(s []string) *MenuCreate
- func (mc *MenuCreate) SetRedirect(s string) *MenuCreate
- func (mc *MenuCreate) SetRemark(s string) *MenuCreate
- func (mc *MenuCreate) SetSort(i int32) *MenuCreate
- func (mc *MenuCreate) SetState(i int32) *MenuCreate
- func (mc *MenuCreate) SetTitle(s string) *MenuCreate
- func (mc *MenuCreate) SetType(i int32) *MenuCreate
- func (mc *MenuCreate) SetUpdatedAt(t time.Time) *MenuCreate
- func (mc *MenuCreate) SetVisible(b bool) *MenuCreate
- type MenuCreateBulk
- func (mcb *MenuCreateBulk) Exec(ctx context.Context) error
- func (mcb *MenuCreateBulk) ExecX(ctx context.Context)
- func (mcb *MenuCreateBulk) OnConflict(opts ...sql.ConflictOption) *MenuUpsertBulk
- func (mcb *MenuCreateBulk) OnConflictColumns(columns ...string) *MenuUpsertBulk
- func (mcb *MenuCreateBulk) Save(ctx context.Context) ([]*Menu, error)
- func (mcb *MenuCreateBulk) SaveX(ctx context.Context) []*Menu
- type MenuDelete
- type MenuDeleteOne
- type MenuEdges
- type MenuFilter
- func (f *MenuFilter) Where(p entql.P)
- func (f *MenuFilter) WhereComponent(p entql.StringP)
- func (f *MenuFilter) WhereCreatedAt(p entql.TimeP)
- func (f *MenuFilter) WhereCurrentActiveMenu(p entql.StringP)
- func (f *MenuFilter) WhereDeletedAt(p entql.TimeP)
- func (f *MenuFilter) WhereExtURL(p entql.StringP)
- func (f *MenuFilter) WhereHasChildren()
- func (f *MenuFilter) WhereHasChildrenWith(preds ...predicate.Menu)
- func (f *MenuFilter) WhereHasParent()
- func (f *MenuFilter) WhereHasParentWith(preds ...predicate.Menu)
- func (f *MenuFilter) WhereHideBreadcrumb(p entql.BoolP)
- func (f *MenuFilter) WhereHideMenu(p entql.BoolP)
- func (f *MenuFilter) WhereHideTab(p entql.BoolP)
- func (f *MenuFilter) WhereID(p entql.Uint32P)
- func (f *MenuFilter) WhereIcon(p entql.StringP)
- func (f *MenuFilter) WhereIsExt(p entql.BoolP)
- func (f *MenuFilter) WhereKeepAlive(p entql.BoolP)
- func (f *MenuFilter) WhereName(p entql.StringP)
- func (f *MenuFilter) WhereParentID(p entql.Uint32P)
- func (f *MenuFilter) WherePath(p entql.StringP)
- func (f *MenuFilter) WherePermissions(p entql.BytesP)
- func (f *MenuFilter) WhereRedirect(p entql.StringP)
- func (f *MenuFilter) WhereRemark(p entql.StringP)
- func (f *MenuFilter) WhereSort(p entql.Int32P)
- func (f *MenuFilter) WhereState(p entql.Int32P)
- func (f *MenuFilter) WhereTitle(p entql.StringP)
- func (f *MenuFilter) WhereType(p entql.Int32P)
- func (f *MenuFilter) WhereUpdatedAt(p entql.TimeP)
- func (f *MenuFilter) WhereVisible(p entql.BoolP)
- type MenuGroupBy
- func (mgb *MenuGroupBy) Aggregate(fns ...AggregateFunc) *MenuGroupBy
- func (s *MenuGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MenuGroupBy) BoolX(ctx context.Context) bool
- func (s *MenuGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MenuGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MenuGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MenuGroupBy) Float64X(ctx context.Context) float64
- func (s *MenuGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MenuGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MenuGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MenuGroupBy) IntX(ctx context.Context) int
- func (s *MenuGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MenuGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MenuGroupBy) Scan(ctx context.Context, v any) error
- func (s *MenuGroupBy) ScanX(ctx context.Context, v any)
- func (s *MenuGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MenuGroupBy) StringX(ctx context.Context) string
- func (s *MenuGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MenuGroupBy) StringsX(ctx context.Context) []string
- type MenuMutation
- func (m *MenuMutation) AddChildIDs(ids ...uint32)
- func (m *MenuMutation) AddField(name string, value ent.Value) error
- func (m *MenuMutation) AddSort(i int32)
- func (m *MenuMutation) AddState(i int32)
- func (m *MenuMutation) AddType(i int32)
- func (m *MenuMutation) AddedEdges() []string
- func (m *MenuMutation) AddedField(name string) (ent.Value, bool)
- func (m *MenuMutation) AddedFields() []string
- func (m *MenuMutation) AddedIDs(name string) []ent.Value
- func (m *MenuMutation) AddedSort() (r int32, exists bool)
- func (m *MenuMutation) AddedState() (r int32, exists bool)
- func (m *MenuMutation) AddedType() (r int32, exists bool)
- func (m *MenuMutation) AppendPermissions(s []string)
- func (m *MenuMutation) AppendedPermissions() ([]string, bool)
- func (m *MenuMutation) ChildrenCleared() bool
- func (m *MenuMutation) ChildrenIDs() (ids []uint32)
- func (m *MenuMutation) ClearChildren()
- func (m *MenuMutation) ClearCreatedAt()
- func (m *MenuMutation) ClearDeletedAt()
- func (m *MenuMutation) ClearEdge(name string) error
- func (m *MenuMutation) ClearField(name string) error
- func (m *MenuMutation) ClearParent()
- func (m *MenuMutation) ClearParentID()
- func (m *MenuMutation) ClearPermissions()
- func (m *MenuMutation) ClearRemark()
- func (m *MenuMutation) ClearUpdatedAt()
- func (m *MenuMutation) ClearedEdges() []string
- func (m *MenuMutation) ClearedFields() []string
- func (m MenuMutation) Client() *Client
- func (m *MenuMutation) Component() (r string, exists bool)
- func (m *MenuMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MenuMutation) CreatedAtCleared() bool
- func (m *MenuMutation) CurrentActiveMenu() (r string, exists bool)
- func (m *MenuMutation) DeletedAt() (r time.Time, exists bool)
- func (m *MenuMutation) DeletedAtCleared() bool
- func (m *MenuMutation) EdgeCleared(name string) bool
- func (m *MenuMutation) ExtURL() (r string, exists bool)
- func (m *MenuMutation) Field(name string) (ent.Value, bool)
- func (m *MenuMutation) FieldCleared(name string) bool
- func (m *MenuMutation) Fields() []string
- func (m *MenuMutation) Filter() *MenuFilter
- func (m *MenuMutation) GetType() (r int32, exists bool)
- func (m *MenuMutation) HideBreadcrumb() (r bool, exists bool)
- func (m *MenuMutation) HideMenu() (r bool, exists bool)
- func (m *MenuMutation) HideTab() (r bool, exists bool)
- func (m *MenuMutation) ID() (id uint32, exists bool)
- func (m *MenuMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *MenuMutation) Icon() (r string, exists bool)
- func (m *MenuMutation) IsExt() (r bool, exists bool)
- func (m *MenuMutation) KeepAlive() (r bool, exists bool)
- func (m *MenuMutation) Name() (r string, exists bool)
- func (m *MenuMutation) OldComponent(ctx context.Context) (v *string, err error)
- func (m *MenuMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MenuMutation) OldCurrentActiveMenu(ctx context.Context) (v *string, err error)
- func (m *MenuMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MenuMutation) OldExtURL(ctx context.Context) (v *string, err error)
- func (m *MenuMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MenuMutation) OldHideBreadcrumb(ctx context.Context) (v *bool, err error)
- func (m *MenuMutation) OldHideMenu(ctx context.Context) (v *bool, err error)
- func (m *MenuMutation) OldHideTab(ctx context.Context) (v *bool, err error)
- func (m *MenuMutation) OldIcon(ctx context.Context) (v *string, err error)
- func (m *MenuMutation) OldIsExt(ctx context.Context) (v *bool, err error)
- func (m *MenuMutation) OldKeepAlive(ctx context.Context) (v *bool, err error)
- func (m *MenuMutation) OldName(ctx context.Context) (v *string, err error)
- func (m *MenuMutation) OldParentID(ctx context.Context) (v *uint32, err error)
- func (m *MenuMutation) OldPath(ctx context.Context) (v *string, err error)
- func (m *MenuMutation) OldPermissions(ctx context.Context) (v []string, err error)
- func (m *MenuMutation) OldRedirect(ctx context.Context) (v *string, err error)
- func (m *MenuMutation) OldRemark(ctx context.Context) (v *string, err error)
- func (m *MenuMutation) OldSort(ctx context.Context) (v *int32, err error)
- func (m *MenuMutation) OldState(ctx context.Context) (v *int32, err error)
- func (m *MenuMutation) OldTitle(ctx context.Context) (v *string, err error)
- func (m *MenuMutation) OldType(ctx context.Context) (v *int32, err error)
- func (m *MenuMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MenuMutation) OldVisible(ctx context.Context) (v *bool, err error)
- func (m *MenuMutation) Op() Op
- func (m *MenuMutation) ParentCleared() bool
- func (m *MenuMutation) ParentID() (r uint32, exists bool)
- func (m *MenuMutation) ParentIDCleared() bool
- func (m *MenuMutation) ParentIDs() (ids []uint32)
- func (m *MenuMutation) Path() (r string, exists bool)
- func (m *MenuMutation) Permissions() (r []string, exists bool)
- func (m *MenuMutation) PermissionsCleared() bool
- func (m *MenuMutation) Redirect() (r string, exists bool)
- func (m *MenuMutation) Remark() (r string, exists bool)
- func (m *MenuMutation) RemarkCleared() bool
- func (m *MenuMutation) RemoveChildIDs(ids ...uint32)
- func (m *MenuMutation) RemovedChildrenIDs() (ids []uint32)
- func (m *MenuMutation) RemovedEdges() []string
- func (m *MenuMutation) RemovedIDs(name string) []ent.Value
- func (m *MenuMutation) ResetChildren()
- func (m *MenuMutation) ResetComponent()
- func (m *MenuMutation) ResetCreatedAt()
- func (m *MenuMutation) ResetCurrentActiveMenu()
- func (m *MenuMutation) ResetDeletedAt()
- func (m *MenuMutation) ResetEdge(name string) error
- func (m *MenuMutation) ResetExtURL()
- func (m *MenuMutation) ResetField(name string) error
- func (m *MenuMutation) ResetHideBreadcrumb()
- func (m *MenuMutation) ResetHideMenu()
- func (m *MenuMutation) ResetHideTab()
- func (m *MenuMutation) ResetIcon()
- func (m *MenuMutation) ResetIsExt()
- func (m *MenuMutation) ResetKeepAlive()
- func (m *MenuMutation) ResetName()
- func (m *MenuMutation) ResetParent()
- func (m *MenuMutation) ResetParentID()
- func (m *MenuMutation) ResetPath()
- func (m *MenuMutation) ResetPermissions()
- func (m *MenuMutation) ResetRedirect()
- func (m *MenuMutation) ResetRemark()
- func (m *MenuMutation) ResetSort()
- func (m *MenuMutation) ResetState()
- func (m *MenuMutation) ResetTitle()
- func (m *MenuMutation) ResetType()
- func (m *MenuMutation) ResetUpdatedAt()
- func (m *MenuMutation) ResetVisible()
- func (m *MenuMutation) SetComponent(s string)
- func (m *MenuMutation) SetCreatedAt(t time.Time)
- func (m *MenuMutation) SetCurrentActiveMenu(s string)
- func (m *MenuMutation) SetDeletedAt(t time.Time)
- func (m *MenuMutation) SetExtURL(s string)
- func (m *MenuMutation) SetField(name string, value ent.Value) error
- func (m *MenuMutation) SetHideBreadcrumb(b bool)
- func (m *MenuMutation) SetHideMenu(b bool)
- func (m *MenuMutation) SetHideTab(b bool)
- func (m *MenuMutation) SetID(id uint32)
- func (m *MenuMutation) SetIcon(s string)
- func (m *MenuMutation) SetIsExt(b bool)
- func (m *MenuMutation) SetKeepAlive(b bool)
- func (m *MenuMutation) SetName(s string)
- func (m *MenuMutation) SetOp(op Op)
- func (m *MenuMutation) SetParentID(u uint32)
- func (m *MenuMutation) SetPath(s string)
- func (m *MenuMutation) SetPermissions(s []string)
- func (m *MenuMutation) SetRedirect(s string)
- func (m *MenuMutation) SetRemark(s string)
- func (m *MenuMutation) SetSort(i int32)
- func (m *MenuMutation) SetState(i int32)
- func (m *MenuMutation) SetTitle(s string)
- func (m *MenuMutation) SetType(i int32)
- func (m *MenuMutation) SetUpdatedAt(t time.Time)
- func (m *MenuMutation) SetVisible(b bool)
- func (m *MenuMutation) Sort() (r int32, exists bool)
- func (m *MenuMutation) State() (r int32, exists bool)
- func (m *MenuMutation) Title() (r string, exists bool)
- func (m MenuMutation) Tx() (*Tx, error)
- func (m *MenuMutation) Type() string
- func (m *MenuMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MenuMutation) UpdatedAtCleared() bool
- func (m *MenuMutation) Visible() (r bool, exists bool)
- func (m *MenuMutation) Where(ps ...predicate.Menu)
- func (m *MenuMutation) WhereP(ps ...func(*sql.Selector))
- type MenuQuery
- func (mq *MenuQuery) Aggregate(fns ...AggregateFunc) *MenuSelect
- func (mq *MenuQuery) All(ctx context.Context) ([]*Menu, error)
- func (mq *MenuQuery) AllX(ctx context.Context) []*Menu
- func (mq *MenuQuery) Clone() *MenuQuery
- func (mq *MenuQuery) Count(ctx context.Context) (int, error)
- func (mq *MenuQuery) CountX(ctx context.Context) int
- func (mq *MenuQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MenuQuery) ExistX(ctx context.Context) bool
- func (mq *MenuQuery) Filter() *MenuFilter
- func (mq *MenuQuery) First(ctx context.Context) (*Menu, error)
- func (mq *MenuQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (mq *MenuQuery) FirstIDX(ctx context.Context) uint32
- func (mq *MenuQuery) FirstX(ctx context.Context) *Menu
- func (mq *MenuQuery) GroupBy(field string, fields ...string) *MenuGroupBy
- func (mq *MenuQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (mq *MenuQuery) IDsX(ctx context.Context) []uint32
- func (mq *MenuQuery) Limit(limit int) *MenuQuery
- func (mq *MenuQuery) Modify(modifiers ...func(s *sql.Selector)) *MenuSelect
- func (mq *MenuQuery) Offset(offset int) *MenuQuery
- func (mq *MenuQuery) Only(ctx context.Context) (*Menu, error)
- func (mq *MenuQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (mq *MenuQuery) OnlyIDX(ctx context.Context) uint32
- func (mq *MenuQuery) OnlyX(ctx context.Context) *Menu
- func (mq *MenuQuery) Order(o ...menu.OrderOption) *MenuQuery
- func (mq *MenuQuery) QueryChildren() *MenuQuery
- func (mq *MenuQuery) QueryParent() *MenuQuery
- func (mq *MenuQuery) Select(fields ...string) *MenuSelect
- func (mq *MenuQuery) Unique(unique bool) *MenuQuery
- func (mq *MenuQuery) Where(ps ...predicate.Menu) *MenuQuery
- func (mq *MenuQuery) WithChildren(opts ...func(*MenuQuery)) *MenuQuery
- func (mq *MenuQuery) WithParent(opts ...func(*MenuQuery)) *MenuQuery
- type MenuSelect
- func (ms *MenuSelect) Aggregate(fns ...AggregateFunc) *MenuSelect
- func (s *MenuSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MenuSelect) BoolX(ctx context.Context) bool
- func (s *MenuSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MenuSelect) BoolsX(ctx context.Context) []bool
- func (s *MenuSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MenuSelect) Float64X(ctx context.Context) float64
- func (s *MenuSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MenuSelect) Float64sX(ctx context.Context) []float64
- func (s *MenuSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MenuSelect) IntX(ctx context.Context) int
- func (s *MenuSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MenuSelect) IntsX(ctx context.Context) []int
- func (ms *MenuSelect) Modify(modifiers ...func(s *sql.Selector)) *MenuSelect
- func (ms *MenuSelect) Scan(ctx context.Context, v any) error
- func (s *MenuSelect) ScanX(ctx context.Context, v any)
- func (s *MenuSelect) String(ctx context.Context) (_ string, err error)
- func (s *MenuSelect) StringX(ctx context.Context) string
- func (s *MenuSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MenuSelect) StringsX(ctx context.Context) []string
- type MenuUpdate
- func (mu *MenuUpdate) AddChildIDs(ids ...uint32) *MenuUpdate
- func (mu *MenuUpdate) AddChildren(m ...*Menu) *MenuUpdate
- func (mu *MenuUpdate) AddSort(i int32) *MenuUpdate
- func (mu *MenuUpdate) AddState(i int32) *MenuUpdate
- func (mu *MenuUpdate) AddType(i int32) *MenuUpdate
- func (mu *MenuUpdate) AppendPermissions(s []string) *MenuUpdate
- func (mu *MenuUpdate) ClearChildren() *MenuUpdate
- func (mu *MenuUpdate) ClearDeletedAt() *MenuUpdate
- func (mu *MenuUpdate) ClearParent() *MenuUpdate
- func (mu *MenuUpdate) ClearParentID() *MenuUpdate
- func (mu *MenuUpdate) ClearPermissions() *MenuUpdate
- func (mu *MenuUpdate) ClearRemark() *MenuUpdate
- func (mu *MenuUpdate) ClearUpdatedAt() *MenuUpdate
- func (mu *MenuUpdate) Exec(ctx context.Context) error
- func (mu *MenuUpdate) ExecX(ctx context.Context)
- func (mu *MenuUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MenuUpdate
- func (mu *MenuUpdate) Mutation() *MenuMutation
- func (mu *MenuUpdate) RemoveChildIDs(ids ...uint32) *MenuUpdate
- func (mu *MenuUpdate) RemoveChildren(m ...*Menu) *MenuUpdate
- func (mu *MenuUpdate) Save(ctx context.Context) (int, error)
- func (mu *MenuUpdate) SaveX(ctx context.Context) int
- func (mu *MenuUpdate) SetComponent(s string) *MenuUpdate
- func (mu *MenuUpdate) SetCurrentActiveMenu(s string) *MenuUpdate
- func (mu *MenuUpdate) SetDeletedAt(t time.Time) *MenuUpdate
- func (mu *MenuUpdate) SetExtURL(s string) *MenuUpdate
- func (mu *MenuUpdate) SetHideBreadcrumb(b bool) *MenuUpdate
- func (mu *MenuUpdate) SetHideMenu(b bool) *MenuUpdate
- func (mu *MenuUpdate) SetHideTab(b bool) *MenuUpdate
- func (mu *MenuUpdate) SetIcon(s string) *MenuUpdate
- func (mu *MenuUpdate) SetIsExt(b bool) *MenuUpdate
- func (mu *MenuUpdate) SetKeepAlive(b bool) *MenuUpdate
- func (mu *MenuUpdate) SetName(s string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableComponent(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableCurrentActiveMenu(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableDeletedAt(t *time.Time) *MenuUpdate
- func (mu *MenuUpdate) SetNillableExtURL(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableHideBreadcrumb(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableHideMenu(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableHideTab(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableIcon(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableIsExt(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableKeepAlive(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableName(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableParentID(u *uint32) *MenuUpdate
- func (mu *MenuUpdate) SetNillablePath(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableRedirect(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableRemark(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableSort(i *int32) *MenuUpdate
- func (mu *MenuUpdate) SetNillableState(i *int32) *MenuUpdate
- func (mu *MenuUpdate) SetNillableTitle(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableType(i *int32) *MenuUpdate
- func (mu *MenuUpdate) SetNillableUpdatedAt(t *time.Time) *MenuUpdate
- func (mu *MenuUpdate) SetNillableVisible(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetParent(m *Menu) *MenuUpdate
- func (mu *MenuUpdate) SetParentID(u uint32) *MenuUpdate
- func (mu *MenuUpdate) SetPath(s string) *MenuUpdate
- func (mu *MenuUpdate) SetPermissions(s []string) *MenuUpdate
- func (mu *MenuUpdate) SetRedirect(s string) *MenuUpdate
- func (mu *MenuUpdate) SetRemark(s string) *MenuUpdate
- func (mu *MenuUpdate) SetSort(i int32) *MenuUpdate
- func (mu *MenuUpdate) SetState(i int32) *MenuUpdate
- func (mu *MenuUpdate) SetTitle(s string) *MenuUpdate
- func (mu *MenuUpdate) SetType(i int32) *MenuUpdate
- func (mu *MenuUpdate) SetUpdatedAt(t time.Time) *MenuUpdate
- func (mu *MenuUpdate) SetVisible(b bool) *MenuUpdate
- func (mu *MenuUpdate) Where(ps ...predicate.Menu) *MenuUpdate
- type MenuUpdateOne
- func (muo *MenuUpdateOne) AddChildIDs(ids ...uint32) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddChildren(m ...*Menu) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddSort(i int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddState(i int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddType(i int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) AppendPermissions(s []string) *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearChildren() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearDeletedAt() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearParent() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearParentID() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearPermissions() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearRemark() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearUpdatedAt() *MenuUpdateOne
- func (muo *MenuUpdateOne) Exec(ctx context.Context) error
- func (muo *MenuUpdateOne) ExecX(ctx context.Context)
- func (muo *MenuUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MenuUpdateOne
- func (muo *MenuUpdateOne) Mutation() *MenuMutation
- func (muo *MenuUpdateOne) RemoveChildIDs(ids ...uint32) *MenuUpdateOne
- func (muo *MenuUpdateOne) RemoveChildren(m ...*Menu) *MenuUpdateOne
- func (muo *MenuUpdateOne) Save(ctx context.Context) (*Menu, error)
- func (muo *MenuUpdateOne) SaveX(ctx context.Context) *Menu
- func (muo *MenuUpdateOne) Select(field string, fields ...string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetComponent(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetCurrentActiveMenu(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetDeletedAt(t time.Time) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetExtURL(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetHideBreadcrumb(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetHideMenu(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetHideTab(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetIcon(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetIsExt(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetKeepAlive(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetName(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableComponent(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableCurrentActiveMenu(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableDeletedAt(t *time.Time) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableExtURL(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableHideBreadcrumb(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableHideMenu(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableHideTab(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableIcon(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableIsExt(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableKeepAlive(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableName(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableParentID(u *uint32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillablePath(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableRedirect(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableRemark(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableSort(i *int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableState(i *int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableTitle(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableType(i *int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableUpdatedAt(t *time.Time) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableVisible(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetParent(m *Menu) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetParentID(u uint32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetPath(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetPermissions(s []string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetRedirect(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetRemark(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetSort(i int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetState(i int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetTitle(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetType(i int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetUpdatedAt(t time.Time) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetVisible(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) Where(ps ...predicate.Menu) *MenuUpdateOne
- type MenuUpsert
- func (u *MenuUpsert) AddSort(v int32) *MenuUpsert
- func (u *MenuUpsert) AddState(v int32) *MenuUpsert
- func (u *MenuUpsert) AddType(v int32) *MenuUpsert
- func (u *MenuUpsert) ClearDeletedAt() *MenuUpsert
- func (u *MenuUpsert) ClearParentID() *MenuUpsert
- func (u *MenuUpsert) ClearPermissions() *MenuUpsert
- func (u *MenuUpsert) ClearRemark() *MenuUpsert
- func (u *MenuUpsert) ClearUpdatedAt() *MenuUpsert
- func (u *MenuUpsert) SetComponent(v string) *MenuUpsert
- func (u *MenuUpsert) SetCurrentActiveMenu(v string) *MenuUpsert
- func (u *MenuUpsert) SetDeletedAt(v time.Time) *MenuUpsert
- func (u *MenuUpsert) SetExtURL(v string) *MenuUpsert
- func (u *MenuUpsert) SetHideBreadcrumb(v bool) *MenuUpsert
- func (u *MenuUpsert) SetHideMenu(v bool) *MenuUpsert
- func (u *MenuUpsert) SetHideTab(v bool) *MenuUpsert
- func (u *MenuUpsert) SetIcon(v string) *MenuUpsert
- func (u *MenuUpsert) SetIsExt(v bool) *MenuUpsert
- func (u *MenuUpsert) SetKeepAlive(v bool) *MenuUpsert
- func (u *MenuUpsert) SetName(v string) *MenuUpsert
- func (u *MenuUpsert) SetParentID(v uint32) *MenuUpsert
- func (u *MenuUpsert) SetPath(v string) *MenuUpsert
- func (u *MenuUpsert) SetPermissions(v []string) *MenuUpsert
- func (u *MenuUpsert) SetRedirect(v string) *MenuUpsert
- func (u *MenuUpsert) SetRemark(v string) *MenuUpsert
- func (u *MenuUpsert) SetSort(v int32) *MenuUpsert
- func (u *MenuUpsert) SetState(v int32) *MenuUpsert
- func (u *MenuUpsert) SetTitle(v string) *MenuUpsert
- func (u *MenuUpsert) SetType(v int32) *MenuUpsert
- func (u *MenuUpsert) SetUpdatedAt(v time.Time) *MenuUpsert
- func (u *MenuUpsert) SetVisible(v bool) *MenuUpsert
- func (u *MenuUpsert) UpdateComponent() *MenuUpsert
- func (u *MenuUpsert) UpdateCurrentActiveMenu() *MenuUpsert
- func (u *MenuUpsert) UpdateDeletedAt() *MenuUpsert
- func (u *MenuUpsert) UpdateExtURL() *MenuUpsert
- func (u *MenuUpsert) UpdateHideBreadcrumb() *MenuUpsert
- func (u *MenuUpsert) UpdateHideMenu() *MenuUpsert
- func (u *MenuUpsert) UpdateHideTab() *MenuUpsert
- func (u *MenuUpsert) UpdateIcon() *MenuUpsert
- func (u *MenuUpsert) UpdateIsExt() *MenuUpsert
- func (u *MenuUpsert) UpdateKeepAlive() *MenuUpsert
- func (u *MenuUpsert) UpdateName() *MenuUpsert
- func (u *MenuUpsert) UpdateParentID() *MenuUpsert
- func (u *MenuUpsert) UpdatePath() *MenuUpsert
- func (u *MenuUpsert) UpdatePermissions() *MenuUpsert
- func (u *MenuUpsert) UpdateRedirect() *MenuUpsert
- func (u *MenuUpsert) UpdateRemark() *MenuUpsert
- func (u *MenuUpsert) UpdateSort() *MenuUpsert
- func (u *MenuUpsert) UpdateState() *MenuUpsert
- func (u *MenuUpsert) UpdateTitle() *MenuUpsert
- func (u *MenuUpsert) UpdateType() *MenuUpsert
- func (u *MenuUpsert) UpdateUpdatedAt() *MenuUpsert
- func (u *MenuUpsert) UpdateVisible() *MenuUpsert
- type MenuUpsertBulk
- func (u *MenuUpsertBulk) AddSort(v int32) *MenuUpsertBulk
- func (u *MenuUpsertBulk) AddState(v int32) *MenuUpsertBulk
- func (u *MenuUpsertBulk) AddType(v int32) *MenuUpsertBulk
- func (u *MenuUpsertBulk) ClearDeletedAt() *MenuUpsertBulk
- func (u *MenuUpsertBulk) ClearParentID() *MenuUpsertBulk
- func (u *MenuUpsertBulk) ClearPermissions() *MenuUpsertBulk
- func (u *MenuUpsertBulk) ClearRemark() *MenuUpsertBulk
- func (u *MenuUpsertBulk) ClearUpdatedAt() *MenuUpsertBulk
- func (u *MenuUpsertBulk) DoNothing() *MenuUpsertBulk
- func (u *MenuUpsertBulk) Exec(ctx context.Context) error
- func (u *MenuUpsertBulk) ExecX(ctx context.Context)
- func (u *MenuUpsertBulk) Ignore() *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetComponent(v string) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetCurrentActiveMenu(v string) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetDeletedAt(v time.Time) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetExtURL(v string) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetHideBreadcrumb(v bool) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetHideMenu(v bool) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetHideTab(v bool) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetIcon(v string) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetIsExt(v bool) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetKeepAlive(v bool) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetName(v string) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetParentID(v uint32) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetPath(v string) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetPermissions(v []string) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetRedirect(v string) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetRemark(v string) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetSort(v int32) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetState(v int32) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetTitle(v string) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetType(v int32) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetUpdatedAt(v time.Time) *MenuUpsertBulk
- func (u *MenuUpsertBulk) SetVisible(v bool) *MenuUpsertBulk
- func (u *MenuUpsertBulk) Update(set func(*MenuUpsert)) *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateComponent() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateCurrentActiveMenu() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateDeletedAt() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateExtURL() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateHideBreadcrumb() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateHideMenu() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateHideTab() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateIcon() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateIsExt() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateKeepAlive() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateName() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateNewValues() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateParentID() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdatePath() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdatePermissions() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateRedirect() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateRemark() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateSort() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateState() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateTitle() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateType() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateUpdatedAt() *MenuUpsertBulk
- func (u *MenuUpsertBulk) UpdateVisible() *MenuUpsertBulk
- type MenuUpsertOne
- func (u *MenuUpsertOne) AddSort(v int32) *MenuUpsertOne
- func (u *MenuUpsertOne) AddState(v int32) *MenuUpsertOne
- func (u *MenuUpsertOne) AddType(v int32) *MenuUpsertOne
- func (u *MenuUpsertOne) ClearDeletedAt() *MenuUpsertOne
- func (u *MenuUpsertOne) ClearParentID() *MenuUpsertOne
- func (u *MenuUpsertOne) ClearPermissions() *MenuUpsertOne
- func (u *MenuUpsertOne) ClearRemark() *MenuUpsertOne
- func (u *MenuUpsertOne) ClearUpdatedAt() *MenuUpsertOne
- func (u *MenuUpsertOne) DoNothing() *MenuUpsertOne
- func (u *MenuUpsertOne) Exec(ctx context.Context) error
- func (u *MenuUpsertOne) ExecX(ctx context.Context)
- func (u *MenuUpsertOne) ID(ctx context.Context) (id uint32, err error)
- func (u *MenuUpsertOne) IDX(ctx context.Context) uint32
- func (u *MenuUpsertOne) Ignore() *MenuUpsertOne
- func (u *MenuUpsertOne) SetComponent(v string) *MenuUpsertOne
- func (u *MenuUpsertOne) SetCurrentActiveMenu(v string) *MenuUpsertOne
- func (u *MenuUpsertOne) SetDeletedAt(v time.Time) *MenuUpsertOne
- func (u *MenuUpsertOne) SetExtURL(v string) *MenuUpsertOne
- func (u *MenuUpsertOne) SetHideBreadcrumb(v bool) *MenuUpsertOne
- func (u *MenuUpsertOne) SetHideMenu(v bool) *MenuUpsertOne
- func (u *MenuUpsertOne) SetHideTab(v bool) *MenuUpsertOne
- func (u *MenuUpsertOne) SetIcon(v string) *MenuUpsertOne
- func (u *MenuUpsertOne) SetIsExt(v bool) *MenuUpsertOne
- func (u *MenuUpsertOne) SetKeepAlive(v bool) *MenuUpsertOne
- func (u *MenuUpsertOne) SetName(v string) *MenuUpsertOne
- func (u *MenuUpsertOne) SetParentID(v uint32) *MenuUpsertOne
- func (u *MenuUpsertOne) SetPath(v string) *MenuUpsertOne
- func (u *MenuUpsertOne) SetPermissions(v []string) *MenuUpsertOne
- func (u *MenuUpsertOne) SetRedirect(v string) *MenuUpsertOne
- func (u *MenuUpsertOne) SetRemark(v string) *MenuUpsertOne
- func (u *MenuUpsertOne) SetSort(v int32) *MenuUpsertOne
- func (u *MenuUpsertOne) SetState(v int32) *MenuUpsertOne
- func (u *MenuUpsertOne) SetTitle(v string) *MenuUpsertOne
- func (u *MenuUpsertOne) SetType(v int32) *MenuUpsertOne
- func (u *MenuUpsertOne) SetUpdatedAt(v time.Time) *MenuUpsertOne
- func (u *MenuUpsertOne) SetVisible(v bool) *MenuUpsertOne
- func (u *MenuUpsertOne) Update(set func(*MenuUpsert)) *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateComponent() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateCurrentActiveMenu() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateDeletedAt() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateExtURL() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateHideBreadcrumb() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateHideMenu() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateHideTab() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateIcon() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateIsExt() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateKeepAlive() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateName() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateNewValues() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateParentID() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdatePath() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdatePermissions() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateRedirect() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateRemark() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateSort() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateState() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateTitle() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateType() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateUpdatedAt() *MenuUpsertOne
- func (u *MenuUpsertOne) UpdateVisible() *MenuUpsertOne
- type Menus
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Post
- type PostClient
- func (c *PostClient) Create() *PostCreate
- func (c *PostClient) CreateBulk(builders ...*PostCreate) *PostCreateBulk
- func (c *PostClient) Delete() *PostDelete
- func (c *PostClient) DeleteOne(po *Post) *PostDeleteOne
- func (c *PostClient) DeleteOneID(id uint32) *PostDeleteOne
- func (c *PostClient) Get(ctx context.Context, id uint32) (*Post, error)
- func (c *PostClient) GetX(ctx context.Context, id uint32) *Post
- func (c *PostClient) Hooks() []Hook
- func (c *PostClient) Intercept(interceptors ...Interceptor)
- func (c *PostClient) Interceptors() []Interceptor
- func (c *PostClient) MapCreateBulk(slice any, setFunc func(*PostCreate, int)) *PostCreateBulk
- func (c *PostClient) Query() *PostQuery
- func (c *PostClient) Update() *PostUpdate
- func (c *PostClient) UpdateOne(po *Post) *PostUpdateOne
- func (c *PostClient) UpdateOneID(id uint32) *PostUpdateOne
- func (c *PostClient) Use(hooks ...Hook)
- type PostCreate
- func (pc *PostCreate) Exec(ctx context.Context) error
- func (pc *PostCreate) ExecX(ctx context.Context)
- func (pc *PostCreate) Mutation() *PostMutation
- func (pc *PostCreate) OnConflict(opts ...sql.ConflictOption) *PostUpsertOne
- func (pc *PostCreate) OnConflictColumns(columns ...string) *PostUpsertOne
- func (pc *PostCreate) Save(ctx context.Context) (*Post, error)
- func (pc *PostCreate) SaveX(ctx context.Context) *Post
- func (pc *PostCreate) SetCreatedAt(t time.Time) *PostCreate
- func (pc *PostCreate) SetDeletedAt(t time.Time) *PostCreate
- func (pc *PostCreate) SetID(u uint32) *PostCreate
- func (pc *PostCreate) SetName(s string) *PostCreate
- func (pc *PostCreate) SetNillableCreatedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetNillableDeletedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetNillableName(s *string) *PostCreate
- func (pc *PostCreate) SetNillableRemark(s *string) *PostCreate
- func (pc *PostCreate) SetNillableSort(i *int32) *PostCreate
- func (pc *PostCreate) SetNillableState(i *int32) *PostCreate
- func (pc *PostCreate) SetNillableUpdatedAt(t *time.Time) *PostCreate
- func (pc *PostCreate) SetRemark(s string) *PostCreate
- func (pc *PostCreate) SetSort(i int32) *PostCreate
- func (pc *PostCreate) SetState(i int32) *PostCreate
- func (pc *PostCreate) SetUpdatedAt(t time.Time) *PostCreate
- type PostCreateBulk
- func (pcb *PostCreateBulk) Exec(ctx context.Context) error
- func (pcb *PostCreateBulk) ExecX(ctx context.Context)
- func (pcb *PostCreateBulk) OnConflict(opts ...sql.ConflictOption) *PostUpsertBulk
- func (pcb *PostCreateBulk) OnConflictColumns(columns ...string) *PostUpsertBulk
- func (pcb *PostCreateBulk) Save(ctx context.Context) ([]*Post, error)
- func (pcb *PostCreateBulk) SaveX(ctx context.Context) []*Post
- type PostDelete
- type PostDeleteOne
- type PostFilter
- func (f *PostFilter) Where(p entql.P)
- func (f *PostFilter) WhereCreatedAt(p entql.TimeP)
- func (f *PostFilter) WhereDeletedAt(p entql.TimeP)
- func (f *PostFilter) WhereID(p entql.Uint32P)
- func (f *PostFilter) WhereName(p entql.StringP)
- func (f *PostFilter) WhereRemark(p entql.StringP)
- func (f *PostFilter) WhereSort(p entql.Int32P)
- func (f *PostFilter) WhereState(p entql.Int32P)
- func (f *PostFilter) WhereUpdatedAt(p entql.TimeP)
- type PostGroupBy
- func (pgb *PostGroupBy) Aggregate(fns ...AggregateFunc) *PostGroupBy
- func (s *PostGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PostGroupBy) BoolX(ctx context.Context) bool
- func (s *PostGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PostGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PostGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PostGroupBy) Float64X(ctx context.Context) float64
- func (s *PostGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PostGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PostGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PostGroupBy) IntX(ctx context.Context) int
- func (s *PostGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PostGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PostGroupBy) Scan(ctx context.Context, v any) error
- func (s *PostGroupBy) ScanX(ctx context.Context, v any)
- func (s *PostGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PostGroupBy) StringX(ctx context.Context) string
- func (s *PostGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PostGroupBy) StringsX(ctx context.Context) []string
- type PostMutation
- func (m *PostMutation) AddField(name string, value ent.Value) error
- func (m *PostMutation) AddSort(i int32)
- func (m *PostMutation) AddState(i int32)
- func (m *PostMutation) AddedEdges() []string
- func (m *PostMutation) AddedField(name string) (ent.Value, bool)
- func (m *PostMutation) AddedFields() []string
- func (m *PostMutation) AddedIDs(name string) []ent.Value
- func (m *PostMutation) AddedSort() (r int32, exists bool)
- func (m *PostMutation) AddedState() (r int32, exists bool)
- func (m *PostMutation) ClearCreatedAt()
- func (m *PostMutation) ClearDeletedAt()
- func (m *PostMutation) ClearEdge(name string) error
- func (m *PostMutation) ClearField(name string) error
- func (m *PostMutation) ClearRemark()
- func (m *PostMutation) ClearUpdatedAt()
- func (m *PostMutation) ClearedEdges() []string
- func (m *PostMutation) ClearedFields() []string
- func (m PostMutation) Client() *Client
- func (m *PostMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PostMutation) CreatedAtCleared() bool
- func (m *PostMutation) DeletedAt() (r time.Time, exists bool)
- func (m *PostMutation) DeletedAtCleared() bool
- func (m *PostMutation) EdgeCleared(name string) bool
- func (m *PostMutation) Field(name string) (ent.Value, bool)
- func (m *PostMutation) FieldCleared(name string) bool
- func (m *PostMutation) Fields() []string
- func (m *PostMutation) Filter() *PostFilter
- func (m *PostMutation) ID() (id uint32, exists bool)
- func (m *PostMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *PostMutation) Name() (r string, exists bool)
- func (m *PostMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PostMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PostMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PostMutation) OldName(ctx context.Context) (v *string, err error)
- func (m *PostMutation) OldRemark(ctx context.Context) (v *string, err error)
- func (m *PostMutation) OldSort(ctx context.Context) (v *int32, err error)
- func (m *PostMutation) OldState(ctx context.Context) (v *int32, err error)
- func (m *PostMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *PostMutation) Op() Op
- func (m *PostMutation) Remark() (r string, exists bool)
- func (m *PostMutation) RemarkCleared() bool
- func (m *PostMutation) RemovedEdges() []string
- func (m *PostMutation) RemovedIDs(name string) []ent.Value
- func (m *PostMutation) ResetCreatedAt()
- func (m *PostMutation) ResetDeletedAt()
- func (m *PostMutation) ResetEdge(name string) error
- func (m *PostMutation) ResetField(name string) error
- func (m *PostMutation) ResetName()
- func (m *PostMutation) ResetRemark()
- func (m *PostMutation) ResetSort()
- func (m *PostMutation) ResetState()
- func (m *PostMutation) ResetUpdatedAt()
- func (m *PostMutation) SetCreatedAt(t time.Time)
- func (m *PostMutation) SetDeletedAt(t time.Time)
- func (m *PostMutation) SetField(name string, value ent.Value) error
- func (m *PostMutation) SetID(id uint32)
- func (m *PostMutation) SetName(s string)
- func (m *PostMutation) SetOp(op Op)
- func (m *PostMutation) SetRemark(s string)
- func (m *PostMutation) SetSort(i int32)
- func (m *PostMutation) SetState(i int32)
- func (m *PostMutation) SetUpdatedAt(t time.Time)
- func (m *PostMutation) Sort() (r int32, exists bool)
- func (m *PostMutation) State() (r int32, exists bool)
- func (m PostMutation) Tx() (*Tx, error)
- func (m *PostMutation) Type() string
- func (m *PostMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PostMutation) UpdatedAtCleared() bool
- func (m *PostMutation) Where(ps ...predicate.Post)
- func (m *PostMutation) WhereP(ps ...func(*sql.Selector))
- type PostQuery
- func (pq *PostQuery) Aggregate(fns ...AggregateFunc) *PostSelect
- func (pq *PostQuery) All(ctx context.Context) ([]*Post, error)
- func (pq *PostQuery) AllX(ctx context.Context) []*Post
- func (pq *PostQuery) Clone() *PostQuery
- func (pq *PostQuery) Count(ctx context.Context) (int, error)
- func (pq *PostQuery) CountX(ctx context.Context) int
- func (pq *PostQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PostQuery) ExistX(ctx context.Context) bool
- func (pq *PostQuery) Filter() *PostFilter
- func (pq *PostQuery) First(ctx context.Context) (*Post, error)
- func (pq *PostQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (pq *PostQuery) FirstIDX(ctx context.Context) uint32
- func (pq *PostQuery) FirstX(ctx context.Context) *Post
- func (pq *PostQuery) GroupBy(field string, fields ...string) *PostGroupBy
- func (pq *PostQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (pq *PostQuery) IDsX(ctx context.Context) []uint32
- func (pq *PostQuery) Limit(limit int) *PostQuery
- func (pq *PostQuery) Modify(modifiers ...func(s *sql.Selector)) *PostSelect
- func (pq *PostQuery) Offset(offset int) *PostQuery
- func (pq *PostQuery) Only(ctx context.Context) (*Post, error)
- func (pq *PostQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (pq *PostQuery) OnlyIDX(ctx context.Context) uint32
- func (pq *PostQuery) OnlyX(ctx context.Context) *Post
- func (pq *PostQuery) Order(o ...post.OrderOption) *PostQuery
- func (pq *PostQuery) Select(fields ...string) *PostSelect
- func (pq *PostQuery) Unique(unique bool) *PostQuery
- func (pq *PostQuery) Where(ps ...predicate.Post) *PostQuery
- type PostSelect
- func (ps *PostSelect) Aggregate(fns ...AggregateFunc) *PostSelect
- func (s *PostSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PostSelect) BoolX(ctx context.Context) bool
- func (s *PostSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PostSelect) BoolsX(ctx context.Context) []bool
- func (s *PostSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PostSelect) Float64X(ctx context.Context) float64
- func (s *PostSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PostSelect) Float64sX(ctx context.Context) []float64
- func (s *PostSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PostSelect) IntX(ctx context.Context) int
- func (s *PostSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PostSelect) IntsX(ctx context.Context) []int
- func (ps *PostSelect) Modify(modifiers ...func(s *sql.Selector)) *PostSelect
- func (ps *PostSelect) Scan(ctx context.Context, v any) error
- func (s *PostSelect) ScanX(ctx context.Context, v any)
- func (s *PostSelect) String(ctx context.Context) (_ string, err error)
- func (s *PostSelect) StringX(ctx context.Context) string
- func (s *PostSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PostSelect) StringsX(ctx context.Context) []string
- type PostUpdate
- func (pu *PostUpdate) AddSort(i int32) *PostUpdate
- func (pu *PostUpdate) AddState(i int32) *PostUpdate
- func (pu *PostUpdate) ClearDeletedAt() *PostUpdate
- func (pu *PostUpdate) ClearRemark() *PostUpdate
- func (pu *PostUpdate) ClearUpdatedAt() *PostUpdate
- func (pu *PostUpdate) Exec(ctx context.Context) error
- func (pu *PostUpdate) ExecX(ctx context.Context)
- func (pu *PostUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostUpdate
- func (pu *PostUpdate) Mutation() *PostMutation
- func (pu *PostUpdate) Save(ctx context.Context) (int, error)
- func (pu *PostUpdate) SaveX(ctx context.Context) int
- func (pu *PostUpdate) SetDeletedAt(t time.Time) *PostUpdate
- func (pu *PostUpdate) SetName(s string) *PostUpdate
- func (pu *PostUpdate) SetNillableDeletedAt(t *time.Time) *PostUpdate
- func (pu *PostUpdate) SetNillableName(s *string) *PostUpdate
- func (pu *PostUpdate) SetNillableRemark(s *string) *PostUpdate
- func (pu *PostUpdate) SetNillableSort(i *int32) *PostUpdate
- func (pu *PostUpdate) SetNillableState(i *int32) *PostUpdate
- func (pu *PostUpdate) SetNillableUpdatedAt(t *time.Time) *PostUpdate
- func (pu *PostUpdate) SetRemark(s string) *PostUpdate
- func (pu *PostUpdate) SetSort(i int32) *PostUpdate
- func (pu *PostUpdate) SetState(i int32) *PostUpdate
- func (pu *PostUpdate) SetUpdatedAt(t time.Time) *PostUpdate
- func (pu *PostUpdate) Where(ps ...predicate.Post) *PostUpdate
- type PostUpdateOne
- func (puo *PostUpdateOne) AddSort(i int32) *PostUpdateOne
- func (puo *PostUpdateOne) AddState(i int32) *PostUpdateOne
- func (puo *PostUpdateOne) ClearDeletedAt() *PostUpdateOne
- func (puo *PostUpdateOne) ClearRemark() *PostUpdateOne
- func (puo *PostUpdateOne) ClearUpdatedAt() *PostUpdateOne
- func (puo *PostUpdateOne) Exec(ctx context.Context) error
- func (puo *PostUpdateOne) ExecX(ctx context.Context)
- func (puo *PostUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostUpdateOne
- func (puo *PostUpdateOne) Mutation() *PostMutation
- func (puo *PostUpdateOne) Save(ctx context.Context) (*Post, error)
- func (puo *PostUpdateOne) SaveX(ctx context.Context) *Post
- func (puo *PostUpdateOne) Select(field string, fields ...string) *PostUpdateOne
- func (puo *PostUpdateOne) SetDeletedAt(t time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetName(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableDeletedAt(t *time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableName(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableRemark(s *string) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableSort(i *int32) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableState(i *int32) *PostUpdateOne
- func (puo *PostUpdateOne) SetNillableUpdatedAt(t *time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) SetRemark(s string) *PostUpdateOne
- func (puo *PostUpdateOne) SetSort(i int32) *PostUpdateOne
- func (puo *PostUpdateOne) SetState(i int32) *PostUpdateOne
- func (puo *PostUpdateOne) SetUpdatedAt(t time.Time) *PostUpdateOne
- func (puo *PostUpdateOne) Where(ps ...predicate.Post) *PostUpdateOne
- type PostUpsert
- func (u *PostUpsert) AddSort(v int32) *PostUpsert
- func (u *PostUpsert) AddState(v int32) *PostUpsert
- func (u *PostUpsert) ClearDeletedAt() *PostUpsert
- func (u *PostUpsert) ClearRemark() *PostUpsert
- func (u *PostUpsert) ClearUpdatedAt() *PostUpsert
- func (u *PostUpsert) SetDeletedAt(v time.Time) *PostUpsert
- func (u *PostUpsert) SetName(v string) *PostUpsert
- func (u *PostUpsert) SetRemark(v string) *PostUpsert
- func (u *PostUpsert) SetSort(v int32) *PostUpsert
- func (u *PostUpsert) SetState(v int32) *PostUpsert
- func (u *PostUpsert) SetUpdatedAt(v time.Time) *PostUpsert
- func (u *PostUpsert) UpdateDeletedAt() *PostUpsert
- func (u *PostUpsert) UpdateName() *PostUpsert
- func (u *PostUpsert) UpdateRemark() *PostUpsert
- func (u *PostUpsert) UpdateSort() *PostUpsert
- func (u *PostUpsert) UpdateState() *PostUpsert
- func (u *PostUpsert) UpdateUpdatedAt() *PostUpsert
- type PostUpsertBulk
- func (u *PostUpsertBulk) AddSort(v int32) *PostUpsertBulk
- func (u *PostUpsertBulk) AddState(v int32) *PostUpsertBulk
- func (u *PostUpsertBulk) ClearDeletedAt() *PostUpsertBulk
- func (u *PostUpsertBulk) ClearRemark() *PostUpsertBulk
- func (u *PostUpsertBulk) ClearUpdatedAt() *PostUpsertBulk
- func (u *PostUpsertBulk) DoNothing() *PostUpsertBulk
- func (u *PostUpsertBulk) Exec(ctx context.Context) error
- func (u *PostUpsertBulk) ExecX(ctx context.Context)
- func (u *PostUpsertBulk) Ignore() *PostUpsertBulk
- func (u *PostUpsertBulk) SetDeletedAt(v time.Time) *PostUpsertBulk
- func (u *PostUpsertBulk) SetName(v string) *PostUpsertBulk
- func (u *PostUpsertBulk) SetRemark(v string) *PostUpsertBulk
- func (u *PostUpsertBulk) SetSort(v int32) *PostUpsertBulk
- func (u *PostUpsertBulk) SetState(v int32) *PostUpsertBulk
- func (u *PostUpsertBulk) SetUpdatedAt(v time.Time) *PostUpsertBulk
- func (u *PostUpsertBulk) Update(set func(*PostUpsert)) *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateDeletedAt() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateName() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateNewValues() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateRemark() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateSort() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateState() *PostUpsertBulk
- func (u *PostUpsertBulk) UpdateUpdatedAt() *PostUpsertBulk
- type PostUpsertOne
- func (u *PostUpsertOne) AddSort(v int32) *PostUpsertOne
- func (u *PostUpsertOne) AddState(v int32) *PostUpsertOne
- func (u *PostUpsertOne) ClearDeletedAt() *PostUpsertOne
- func (u *PostUpsertOne) ClearRemark() *PostUpsertOne
- func (u *PostUpsertOne) ClearUpdatedAt() *PostUpsertOne
- func (u *PostUpsertOne) DoNothing() *PostUpsertOne
- func (u *PostUpsertOne) Exec(ctx context.Context) error
- func (u *PostUpsertOne) ExecX(ctx context.Context)
- func (u *PostUpsertOne) ID(ctx context.Context) (id uint32, err error)
- func (u *PostUpsertOne) IDX(ctx context.Context) uint32
- func (u *PostUpsertOne) Ignore() *PostUpsertOne
- func (u *PostUpsertOne) SetDeletedAt(v time.Time) *PostUpsertOne
- func (u *PostUpsertOne) SetName(v string) *PostUpsertOne
- func (u *PostUpsertOne) SetRemark(v string) *PostUpsertOne
- func (u *PostUpsertOne) SetSort(v int32) *PostUpsertOne
- func (u *PostUpsertOne) SetState(v int32) *PostUpsertOne
- func (u *PostUpsertOne) SetUpdatedAt(v time.Time) *PostUpsertOne
- func (u *PostUpsertOne) Update(set func(*PostUpsert)) *PostUpsertOne
- func (u *PostUpsertOne) UpdateDeletedAt() *PostUpsertOne
- func (u *PostUpsertOne) UpdateName() *PostUpsertOne
- func (u *PostUpsertOne) UpdateNewValues() *PostUpsertOne
- func (u *PostUpsertOne) UpdateRemark() *PostUpsertOne
- func (u *PostUpsertOne) UpdateSort() *PostUpsertOne
- func (u *PostUpsertOne) UpdateState() *PostUpsertOne
- func (u *PostUpsertOne) UpdateUpdatedAt() *PostUpsertOne
- type Posts
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Role
- type RoleClient
- func (c *RoleClient) Create() *RoleCreate
- func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk
- func (c *RoleClient) Delete() *RoleDelete
- func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne
- func (c *RoleClient) DeleteOneID(id uint32) *RoleDeleteOne
- func (c *RoleClient) Get(ctx context.Context, id uint32) (*Role, error)
- func (c *RoleClient) GetX(ctx context.Context, id uint32) *Role
- func (c *RoleClient) Hooks() []Hook
- func (c *RoleClient) Intercept(interceptors ...Interceptor)
- func (c *RoleClient) Interceptors() []Interceptor
- func (c *RoleClient) MapCreateBulk(slice any, setFunc func(*RoleCreate, int)) *RoleCreateBulk
- func (c *RoleClient) Query() *RoleQuery
- func (c *RoleClient) QueryUsers(r *Role) *UserQuery
- func (c *RoleClient) Update() *RoleUpdate
- func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
- func (c *RoleClient) UpdateOneID(id uint32) *RoleUpdateOne
- func (c *RoleClient) Use(hooks ...Hook)
- type RoleCreate
- func (rc *RoleCreate) AddUserIDs(ids ...uint32) *RoleCreate
- func (rc *RoleCreate) AddUsers(u ...*User) *RoleCreate
- func (rc *RoleCreate) Exec(ctx context.Context) error
- func (rc *RoleCreate) ExecX(ctx context.Context)
- func (rc *RoleCreate) Mutation() *RoleMutation
- func (rc *RoleCreate) OnConflict(opts ...sql.ConflictOption) *RoleUpsertOne
- func (rc *RoleCreate) OnConflictColumns(columns ...string) *RoleUpsertOne
- func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)
- func (rc *RoleCreate) SaveX(ctx context.Context) *Role
- func (rc *RoleCreate) SetCreatedAt(t time.Time) *RoleCreate
- func (rc *RoleCreate) SetDataScope(i int32) *RoleCreate
- func (rc *RoleCreate) SetDefaultRouter(s string) *RoleCreate
- func (rc *RoleCreate) SetDeletedAt(t time.Time) *RoleCreate
- func (rc *RoleCreate) SetDeptCheckStrictly(i int32) *RoleCreate
- func (rc *RoleCreate) SetID(u uint32) *RoleCreate
- func (rc *RoleCreate) SetMenuCheckStrictly(i int32) *RoleCreate
- func (rc *RoleCreate) SetName(s string) *RoleCreate
- func (rc *RoleCreate) SetNillableCreatedAt(t *time.Time) *RoleCreate
- func (rc *RoleCreate) SetNillableDataScope(i *int32) *RoleCreate
- func (rc *RoleCreate) SetNillableDefaultRouter(s *string) *RoleCreate
- func (rc *RoleCreate) SetNillableDeletedAt(t *time.Time) *RoleCreate
- func (rc *RoleCreate) SetNillableDeptCheckStrictly(i *int32) *RoleCreate
- func (rc *RoleCreate) SetNillableMenuCheckStrictly(i *int32) *RoleCreate
- func (rc *RoleCreate) SetNillableName(s *string) *RoleCreate
- func (rc *RoleCreate) SetNillableRemark(s *string) *RoleCreate
- func (rc *RoleCreate) SetNillableSort(i *int32) *RoleCreate
- func (rc *RoleCreate) SetNillableState(i *int32) *RoleCreate
- func (rc *RoleCreate) SetNillableUpdatedAt(t *time.Time) *RoleCreate
- func (rc *RoleCreate) SetRemark(s string) *RoleCreate
- func (rc *RoleCreate) SetSort(i int32) *RoleCreate
- func (rc *RoleCreate) SetState(i int32) *RoleCreate
- func (rc *RoleCreate) SetUpdatedAt(t time.Time) *RoleCreate
- type RoleCreateBulk
- func (rcb *RoleCreateBulk) Exec(ctx context.Context) error
- func (rcb *RoleCreateBulk) ExecX(ctx context.Context)
- func (rcb *RoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *RoleUpsertBulk
- func (rcb *RoleCreateBulk) OnConflictColumns(columns ...string) *RoleUpsertBulk
- func (rcb *RoleCreateBulk) Save(ctx context.Context) ([]*Role, error)
- func (rcb *RoleCreateBulk) SaveX(ctx context.Context) []*Role
- type RoleDelete
- type RoleDeleteOne
- type RoleEdges
- type RoleFilter
- func (f *RoleFilter) Where(p entql.P)
- func (f *RoleFilter) WhereCreatedAt(p entql.TimeP)
- func (f *RoleFilter) WhereDataScope(p entql.Int32P)
- func (f *RoleFilter) WhereDefaultRouter(p entql.StringP)
- func (f *RoleFilter) WhereDeletedAt(p entql.TimeP)
- func (f *RoleFilter) WhereDeptCheckStrictly(p entql.Int32P)
- func (f *RoleFilter) WhereHasUsers()
- func (f *RoleFilter) WhereHasUsersWith(preds ...predicate.User)
- func (f *RoleFilter) WhereID(p entql.Uint32P)
- func (f *RoleFilter) WhereMenuCheckStrictly(p entql.Int32P)
- func (f *RoleFilter) WhereName(p entql.StringP)
- func (f *RoleFilter) WhereRemark(p entql.StringP)
- func (f *RoleFilter) WhereSort(p entql.Int32P)
- func (f *RoleFilter) WhereState(p entql.Int32P)
- func (f *RoleFilter) WhereUpdatedAt(p entql.TimeP)
- type RoleGroupBy
- func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy
- func (s *RoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleGroupBy) BoolX(ctx context.Context) bool
- func (s *RoleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleGroupBy) Float64X(ctx context.Context) float64
- func (s *RoleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RoleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RoleGroupBy) IntX(ctx context.Context) int
- func (s *RoleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RoleGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RoleGroupBy) Scan(ctx context.Context, v any) error
- func (s *RoleGroupBy) ScanX(ctx context.Context, v any)
- func (s *RoleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RoleGroupBy) StringX(ctx context.Context) string
- func (s *RoleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RoleGroupBy) StringsX(ctx context.Context) []string
- type RoleMutation
- func (m *RoleMutation) AddDataScope(i int32)
- func (m *RoleMutation) AddDeptCheckStrictly(i int32)
- func (m *RoleMutation) AddField(name string, value ent.Value) error
- func (m *RoleMutation) AddMenuCheckStrictly(i int32)
- func (m *RoleMutation) AddSort(i int32)
- func (m *RoleMutation) AddState(i int32)
- func (m *RoleMutation) AddUserIDs(ids ...uint32)
- func (m *RoleMutation) AddedDataScope() (r int32, exists bool)
- func (m *RoleMutation) AddedDeptCheckStrictly() (r int32, exists bool)
- func (m *RoleMutation) AddedEdges() []string
- func (m *RoleMutation) AddedField(name string) (ent.Value, bool)
- func (m *RoleMutation) AddedFields() []string
- func (m *RoleMutation) AddedIDs(name string) []ent.Value
- func (m *RoleMutation) AddedMenuCheckStrictly() (r int32, exists bool)
- func (m *RoleMutation) AddedSort() (r int32, exists bool)
- func (m *RoleMutation) AddedState() (r int32, exists bool)
- func (m *RoleMutation) ClearCreatedAt()
- func (m *RoleMutation) ClearDeletedAt()
- func (m *RoleMutation) ClearEdge(name string) error
- func (m *RoleMutation) ClearField(name string) error
- func (m *RoleMutation) ClearRemark()
- func (m *RoleMutation) ClearUpdatedAt()
- func (m *RoleMutation) ClearUsers()
- func (m *RoleMutation) ClearedEdges() []string
- func (m *RoleMutation) ClearedFields() []string
- func (m RoleMutation) Client() *Client
- func (m *RoleMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RoleMutation) CreatedAtCleared() bool
- func (m *RoleMutation) DataScope() (r int32, exists bool)
- func (m *RoleMutation) DefaultRouter() (r string, exists bool)
- func (m *RoleMutation) DeletedAt() (r time.Time, exists bool)
- func (m *RoleMutation) DeletedAtCleared() bool
- func (m *RoleMutation) DeptCheckStrictly() (r int32, exists bool)
- func (m *RoleMutation) EdgeCleared(name string) bool
- func (m *RoleMutation) Field(name string) (ent.Value, bool)
- func (m *RoleMutation) FieldCleared(name string) bool
- func (m *RoleMutation) Fields() []string
- func (m *RoleMutation) Filter() *RoleFilter
- func (m *RoleMutation) ID() (id uint32, exists bool)
- func (m *RoleMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *RoleMutation) MenuCheckStrictly() (r int32, exists bool)
- func (m *RoleMutation) Name() (r string, exists bool)
- func (m *RoleMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *RoleMutation) OldDataScope(ctx context.Context) (v *int32, err error)
- func (m *RoleMutation) OldDefaultRouter(ctx context.Context) (v *string, err error)
- func (m *RoleMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *RoleMutation) OldDeptCheckStrictly(ctx context.Context) (v *int32, err error)
- func (m *RoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RoleMutation) OldMenuCheckStrictly(ctx context.Context) (v *int32, err error)
- func (m *RoleMutation) OldName(ctx context.Context) (v *string, err error)
- func (m *RoleMutation) OldRemark(ctx context.Context) (v *string, err error)
- func (m *RoleMutation) OldSort(ctx context.Context) (v *int32, err error)
- func (m *RoleMutation) OldState(ctx context.Context) (v *int32, err error)
- func (m *RoleMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *RoleMutation) Op() Op
- func (m *RoleMutation) Remark() (r string, exists bool)
- func (m *RoleMutation) RemarkCleared() bool
- func (m *RoleMutation) RemoveUserIDs(ids ...uint32)
- func (m *RoleMutation) RemovedEdges() []string
- func (m *RoleMutation) RemovedIDs(name string) []ent.Value
- func (m *RoleMutation) RemovedUsersIDs() (ids []uint32)
- func (m *RoleMutation) ResetCreatedAt()
- func (m *RoleMutation) ResetDataScope()
- func (m *RoleMutation) ResetDefaultRouter()
- func (m *RoleMutation) ResetDeletedAt()
- func (m *RoleMutation) ResetDeptCheckStrictly()
- func (m *RoleMutation) ResetEdge(name string) error
- func (m *RoleMutation) ResetField(name string) error
- func (m *RoleMutation) ResetMenuCheckStrictly()
- func (m *RoleMutation) ResetName()
- func (m *RoleMutation) ResetRemark()
- func (m *RoleMutation) ResetSort()
- func (m *RoleMutation) ResetState()
- func (m *RoleMutation) ResetUpdatedAt()
- func (m *RoleMutation) ResetUsers()
- func (m *RoleMutation) SetCreatedAt(t time.Time)
- func (m *RoleMutation) SetDataScope(i int32)
- func (m *RoleMutation) SetDefaultRouter(s string)
- func (m *RoleMutation) SetDeletedAt(t time.Time)
- func (m *RoleMutation) SetDeptCheckStrictly(i int32)
- func (m *RoleMutation) SetField(name string, value ent.Value) error
- func (m *RoleMutation) SetID(id uint32)
- func (m *RoleMutation) SetMenuCheckStrictly(i int32)
- func (m *RoleMutation) SetName(s string)
- func (m *RoleMutation) SetOp(op Op)
- func (m *RoleMutation) SetRemark(s string)
- func (m *RoleMutation) SetSort(i int32)
- func (m *RoleMutation) SetState(i int32)
- func (m *RoleMutation) SetUpdatedAt(t time.Time)
- func (m *RoleMutation) Sort() (r int32, exists bool)
- func (m *RoleMutation) State() (r int32, exists bool)
- func (m RoleMutation) Tx() (*Tx, error)
- func (m *RoleMutation) Type() string
- func (m *RoleMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *RoleMutation) UpdatedAtCleared() bool
- func (m *RoleMutation) UsersCleared() bool
- func (m *RoleMutation) UsersIDs() (ids []uint32)
- func (m *RoleMutation) Where(ps ...predicate.Role)
- func (m *RoleMutation) WhereP(ps ...func(*sql.Selector))
- type RoleQuery
- func (rq *RoleQuery) Aggregate(fns ...AggregateFunc) *RoleSelect
- func (rq *RoleQuery) All(ctx context.Context) ([]*Role, error)
- func (rq *RoleQuery) AllX(ctx context.Context) []*Role
- func (rq *RoleQuery) Clone() *RoleQuery
- func (rq *RoleQuery) Count(ctx context.Context) (int, error)
- func (rq *RoleQuery) CountX(ctx context.Context) int
- func (rq *RoleQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RoleQuery) ExistX(ctx context.Context) bool
- func (rq *RoleQuery) Filter() *RoleFilter
- func (rq *RoleQuery) First(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (rq *RoleQuery) FirstIDX(ctx context.Context) uint32
- func (rq *RoleQuery) FirstX(ctx context.Context) *Role
- func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy
- func (rq *RoleQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (rq *RoleQuery) IDsX(ctx context.Context) []uint32
- func (rq *RoleQuery) Limit(limit int) *RoleQuery
- func (rq *RoleQuery) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect
- func (rq *RoleQuery) Offset(offset int) *RoleQuery
- func (rq *RoleQuery) Only(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (rq *RoleQuery) OnlyIDX(ctx context.Context) uint32
- func (rq *RoleQuery) OnlyX(ctx context.Context) *Role
- func (rq *RoleQuery) Order(o ...role.OrderOption) *RoleQuery
- func (rq *RoleQuery) QueryUsers() *UserQuery
- func (rq *RoleQuery) Select(fields ...string) *RoleSelect
- func (rq *RoleQuery) Unique(unique bool) *RoleQuery
- func (rq *RoleQuery) Where(ps ...predicate.Role) *RoleQuery
- func (rq *RoleQuery) WithUsers(opts ...func(*UserQuery)) *RoleQuery
- type RoleSelect
- func (rs *RoleSelect) Aggregate(fns ...AggregateFunc) *RoleSelect
- func (s *RoleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleSelect) BoolX(ctx context.Context) bool
- func (s *RoleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleSelect) BoolsX(ctx context.Context) []bool
- func (s *RoleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleSelect) Float64X(ctx context.Context) float64
- func (s *RoleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleSelect) Float64sX(ctx context.Context) []float64
- func (s *RoleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RoleSelect) IntX(ctx context.Context) int
- func (s *RoleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RoleSelect) IntsX(ctx context.Context) []int
- func (rs *RoleSelect) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect
- func (rs *RoleSelect) Scan(ctx context.Context, v any) error
- func (s *RoleSelect) ScanX(ctx context.Context, v any)
- func (s *RoleSelect) String(ctx context.Context) (_ string, err error)
- func (s *RoleSelect) StringX(ctx context.Context) string
- func (s *RoleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RoleSelect) StringsX(ctx context.Context) []string
- type RoleUpdate
- func (ru *RoleUpdate) AddDataScope(i int32) *RoleUpdate
- func (ru *RoleUpdate) AddDeptCheckStrictly(i int32) *RoleUpdate
- func (ru *RoleUpdate) AddMenuCheckStrictly(i int32) *RoleUpdate
- func (ru *RoleUpdate) AddSort(i int32) *RoleUpdate
- func (ru *RoleUpdate) AddState(i int32) *RoleUpdate
- func (ru *RoleUpdate) AddUserIDs(ids ...uint32) *RoleUpdate
- func (ru *RoleUpdate) AddUsers(u ...*User) *RoleUpdate
- func (ru *RoleUpdate) ClearDeletedAt() *RoleUpdate
- func (ru *RoleUpdate) ClearRemark() *RoleUpdate
- func (ru *RoleUpdate) ClearUpdatedAt() *RoleUpdate
- func (ru *RoleUpdate) ClearUsers() *RoleUpdate
- func (ru *RoleUpdate) Exec(ctx context.Context) error
- func (ru *RoleUpdate) ExecX(ctx context.Context)
- func (ru *RoleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdate
- func (ru *RoleUpdate) Mutation() *RoleMutation
- func (ru *RoleUpdate) RemoveUserIDs(ids ...uint32) *RoleUpdate
- func (ru *RoleUpdate) RemoveUsers(u ...*User) *RoleUpdate
- func (ru *RoleUpdate) Save(ctx context.Context) (int, error)
- func (ru *RoleUpdate) SaveX(ctx context.Context) int
- func (ru *RoleUpdate) SetDataScope(i int32) *RoleUpdate
- func (ru *RoleUpdate) SetDefaultRouter(s string) *RoleUpdate
- func (ru *RoleUpdate) SetDeletedAt(t time.Time) *RoleUpdate
- func (ru *RoleUpdate) SetDeptCheckStrictly(i int32) *RoleUpdate
- func (ru *RoleUpdate) SetMenuCheckStrictly(i int32) *RoleUpdate
- func (ru *RoleUpdate) SetName(s string) *RoleUpdate
- func (ru *RoleUpdate) SetNillableDataScope(i *int32) *RoleUpdate
- func (ru *RoleUpdate) SetNillableDefaultRouter(s *string) *RoleUpdate
- func (ru *RoleUpdate) SetNillableDeletedAt(t *time.Time) *RoleUpdate
- func (ru *RoleUpdate) SetNillableDeptCheckStrictly(i *int32) *RoleUpdate
- func (ru *RoleUpdate) SetNillableMenuCheckStrictly(i *int32) *RoleUpdate
- func (ru *RoleUpdate) SetNillableName(s *string) *RoleUpdate
- func (ru *RoleUpdate) SetNillableRemark(s *string) *RoleUpdate
- func (ru *RoleUpdate) SetNillableSort(i *int32) *RoleUpdate
- func (ru *RoleUpdate) SetNillableState(i *int32) *RoleUpdate
- func (ru *RoleUpdate) SetNillableUpdatedAt(t *time.Time) *RoleUpdate
- func (ru *RoleUpdate) SetRemark(s string) *RoleUpdate
- func (ru *RoleUpdate) SetSort(i int32) *RoleUpdate
- func (ru *RoleUpdate) SetState(i int32) *RoleUpdate
- func (ru *RoleUpdate) SetUpdatedAt(t time.Time) *RoleUpdate
- func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
- type RoleUpdateOne
- func (ruo *RoleUpdateOne) AddDataScope(i int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddDeptCheckStrictly(i int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddMenuCheckStrictly(i int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddSort(i int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddState(i int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddUserIDs(ids ...uint32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddUsers(u ...*User) *RoleUpdateOne
- func (ruo *RoleUpdateOne) ClearDeletedAt() *RoleUpdateOne
- func (ruo *RoleUpdateOne) ClearRemark() *RoleUpdateOne
- func (ruo *RoleUpdateOne) ClearUpdatedAt() *RoleUpdateOne
- func (ruo *RoleUpdateOne) ClearUsers() *RoleUpdateOne
- func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
- func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
- func (ruo *RoleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdateOne
- func (ruo *RoleUpdateOne) Mutation() *RoleMutation
- func (ruo *RoleUpdateOne) RemoveUserIDs(ids ...uint32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) RemoveUsers(u ...*User) *RoleUpdateOne
- func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)
- func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role
- func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetDataScope(i int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetDefaultRouter(s string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetDeletedAt(t time.Time) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetDeptCheckStrictly(i int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetMenuCheckStrictly(i int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetName(s string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableDataScope(i *int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableDefaultRouter(s *string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableDeletedAt(t *time.Time) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableDeptCheckStrictly(i *int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableMenuCheckStrictly(i *int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableName(s *string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableRemark(s *string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableSort(i *int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableState(i *int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableUpdatedAt(t *time.Time) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetRemark(s string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetSort(i int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetState(i int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetUpdatedAt(t time.Time) *RoleUpdateOne
- func (ruo *RoleUpdateOne) Where(ps ...predicate.Role) *RoleUpdateOne
- type RoleUpsert
- func (u *RoleUpsert) AddDataScope(v int32) *RoleUpsert
- func (u *RoleUpsert) AddDeptCheckStrictly(v int32) *RoleUpsert
- func (u *RoleUpsert) AddMenuCheckStrictly(v int32) *RoleUpsert
- func (u *RoleUpsert) AddSort(v int32) *RoleUpsert
- func (u *RoleUpsert) AddState(v int32) *RoleUpsert
- func (u *RoleUpsert) ClearDeletedAt() *RoleUpsert
- func (u *RoleUpsert) ClearRemark() *RoleUpsert
- func (u *RoleUpsert) ClearUpdatedAt() *RoleUpsert
- func (u *RoleUpsert) SetDataScope(v int32) *RoleUpsert
- func (u *RoleUpsert) SetDefaultRouter(v string) *RoleUpsert
- func (u *RoleUpsert) SetDeletedAt(v time.Time) *RoleUpsert
- func (u *RoleUpsert) SetDeptCheckStrictly(v int32) *RoleUpsert
- func (u *RoleUpsert) SetMenuCheckStrictly(v int32) *RoleUpsert
- func (u *RoleUpsert) SetName(v string) *RoleUpsert
- func (u *RoleUpsert) SetRemark(v string) *RoleUpsert
- func (u *RoleUpsert) SetSort(v int32) *RoleUpsert
- func (u *RoleUpsert) SetState(v int32) *RoleUpsert
- func (u *RoleUpsert) SetUpdatedAt(v time.Time) *RoleUpsert
- func (u *RoleUpsert) UpdateDataScope() *RoleUpsert
- func (u *RoleUpsert) UpdateDefaultRouter() *RoleUpsert
- func (u *RoleUpsert) UpdateDeletedAt() *RoleUpsert
- func (u *RoleUpsert) UpdateDeptCheckStrictly() *RoleUpsert
- func (u *RoleUpsert) UpdateMenuCheckStrictly() *RoleUpsert
- func (u *RoleUpsert) UpdateName() *RoleUpsert
- func (u *RoleUpsert) UpdateRemark() *RoleUpsert
- func (u *RoleUpsert) UpdateSort() *RoleUpsert
- func (u *RoleUpsert) UpdateState() *RoleUpsert
- func (u *RoleUpsert) UpdateUpdatedAt() *RoleUpsert
- type RoleUpsertBulk
- func (u *RoleUpsertBulk) AddDataScope(v int32) *RoleUpsertBulk
- func (u *RoleUpsertBulk) AddDeptCheckStrictly(v int32) *RoleUpsertBulk
- func (u *RoleUpsertBulk) AddMenuCheckStrictly(v int32) *RoleUpsertBulk
- func (u *RoleUpsertBulk) AddSort(v int32) *RoleUpsertBulk
- func (u *RoleUpsertBulk) AddState(v int32) *RoleUpsertBulk
- func (u *RoleUpsertBulk) ClearDeletedAt() *RoleUpsertBulk
- func (u *RoleUpsertBulk) ClearRemark() *RoleUpsertBulk
- func (u *RoleUpsertBulk) ClearUpdatedAt() *RoleUpsertBulk
- func (u *RoleUpsertBulk) DoNothing() *RoleUpsertBulk
- func (u *RoleUpsertBulk) Exec(ctx context.Context) error
- func (u *RoleUpsertBulk) ExecX(ctx context.Context)
- func (u *RoleUpsertBulk) Ignore() *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetDataScope(v int32) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetDefaultRouter(v string) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetDeletedAt(v time.Time) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetDeptCheckStrictly(v int32) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetMenuCheckStrictly(v int32) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetName(v string) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetRemark(v string) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetSort(v int32) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetState(v int32) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetUpdatedAt(v time.Time) *RoleUpsertBulk
- func (u *RoleUpsertBulk) Update(set func(*RoleUpsert)) *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateDataScope() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateDefaultRouter() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateDeletedAt() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateDeptCheckStrictly() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateMenuCheckStrictly() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateName() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateNewValues() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateRemark() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateSort() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateState() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateUpdatedAt() *RoleUpsertBulk
- type RoleUpsertOne
- func (u *RoleUpsertOne) AddDataScope(v int32) *RoleUpsertOne
- func (u *RoleUpsertOne) AddDeptCheckStrictly(v int32) *RoleUpsertOne
- func (u *RoleUpsertOne) AddMenuCheckStrictly(v int32) *RoleUpsertOne
- func (u *RoleUpsertOne) AddSort(v int32) *RoleUpsertOne
- func (u *RoleUpsertOne) AddState(v int32) *RoleUpsertOne
- func (u *RoleUpsertOne) ClearDeletedAt() *RoleUpsertOne
- func (u *RoleUpsertOne) ClearRemark() *RoleUpsertOne
- func (u *RoleUpsertOne) ClearUpdatedAt() *RoleUpsertOne
- func (u *RoleUpsertOne) DoNothing() *RoleUpsertOne
- func (u *RoleUpsertOne) Exec(ctx context.Context) error
- func (u *RoleUpsertOne) ExecX(ctx context.Context)
- func (u *RoleUpsertOne) ID(ctx context.Context) (id uint32, err error)
- func (u *RoleUpsertOne) IDX(ctx context.Context) uint32
- func (u *RoleUpsertOne) Ignore() *RoleUpsertOne
- func (u *RoleUpsertOne) SetDataScope(v int32) *RoleUpsertOne
- func (u *RoleUpsertOne) SetDefaultRouter(v string) *RoleUpsertOne
- func (u *RoleUpsertOne) SetDeletedAt(v time.Time) *RoleUpsertOne
- func (u *RoleUpsertOne) SetDeptCheckStrictly(v int32) *RoleUpsertOne
- func (u *RoleUpsertOne) SetMenuCheckStrictly(v int32) *RoleUpsertOne
- func (u *RoleUpsertOne) SetName(v string) *RoleUpsertOne
- func (u *RoleUpsertOne) SetRemark(v string) *RoleUpsertOne
- func (u *RoleUpsertOne) SetSort(v int32) *RoleUpsertOne
- func (u *RoleUpsertOne) SetState(v int32) *RoleUpsertOne
- func (u *RoleUpsertOne) SetUpdatedAt(v time.Time) *RoleUpsertOne
- func (u *RoleUpsertOne) Update(set func(*RoleUpsert)) *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateDataScope() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateDefaultRouter() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateDeletedAt() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateDeptCheckStrictly() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateMenuCheckStrictly() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateName() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateNewValues() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateRemark() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateSort() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateState() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateUpdatedAt() *RoleUpsertOne
- type Roles
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tenant
- type TenantClient
- func (c *TenantClient) Create() *TenantCreate
- func (c *TenantClient) CreateBulk(builders ...*TenantCreate) *TenantCreateBulk
- func (c *TenantClient) Delete() *TenantDelete
- func (c *TenantClient) DeleteOne(t *Tenant) *TenantDeleteOne
- func (c *TenantClient) DeleteOneID(id uint32) *TenantDeleteOne
- func (c *TenantClient) Get(ctx context.Context, id uint32) (*Tenant, error)
- func (c *TenantClient) GetX(ctx context.Context, id uint32) *Tenant
- func (c *TenantClient) Hooks() []Hook
- func (c *TenantClient) Intercept(interceptors ...Interceptor)
- func (c *TenantClient) Interceptors() []Interceptor
- func (c *TenantClient) MapCreateBulk(slice any, setFunc func(*TenantCreate, int)) *TenantCreateBulk
- func (c *TenantClient) Query() *TenantQuery
- func (c *TenantClient) Update() *TenantUpdate
- func (c *TenantClient) UpdateOne(t *Tenant) *TenantUpdateOne
- func (c *TenantClient) UpdateOneID(id uint32) *TenantUpdateOne
- func (c *TenantClient) Use(hooks ...Hook)
- type TenantCreate
- func (tc *TenantCreate) Exec(ctx context.Context) error
- func (tc *TenantCreate) ExecX(ctx context.Context)
- func (tc *TenantCreate) Mutation() *TenantMutation
- func (tc *TenantCreate) OnConflict(opts ...sql.ConflictOption) *TenantUpsertOne
- func (tc *TenantCreate) OnConflictColumns(columns ...string) *TenantUpsertOne
- func (tc *TenantCreate) Save(ctx context.Context) (*Tenant, error)
- func (tc *TenantCreate) SaveX(ctx context.Context) *Tenant
- func (tc *TenantCreate) SetCreatedAt(t time.Time) *TenantCreate
- func (tc *TenantCreate) SetDeletedAt(t time.Time) *TenantCreate
- func (tc *TenantCreate) SetID(u uint32) *TenantCreate
- func (tc *TenantCreate) SetName(s string) *TenantCreate
- func (tc *TenantCreate) SetNillableCreatedAt(t *time.Time) *TenantCreate
- func (tc *TenantCreate) SetNillableDeletedAt(t *time.Time) *TenantCreate
- func (tc *TenantCreate) SetNillableRemark(s *string) *TenantCreate
- func (tc *TenantCreate) SetNillableSort(i *int32) *TenantCreate
- func (tc *TenantCreate) SetNillableState(i *int32) *TenantCreate
- func (tc *TenantCreate) SetNillableUpdatedAt(t *time.Time) *TenantCreate
- func (tc *TenantCreate) SetRemark(s string) *TenantCreate
- func (tc *TenantCreate) SetSort(i int32) *TenantCreate
- func (tc *TenantCreate) SetState(i int32) *TenantCreate
- func (tc *TenantCreate) SetUpdatedAt(t time.Time) *TenantCreate
- type TenantCreateBulk
- func (tcb *TenantCreateBulk) Exec(ctx context.Context) error
- func (tcb *TenantCreateBulk) ExecX(ctx context.Context)
- func (tcb *TenantCreateBulk) OnConflict(opts ...sql.ConflictOption) *TenantUpsertBulk
- func (tcb *TenantCreateBulk) OnConflictColumns(columns ...string) *TenantUpsertBulk
- func (tcb *TenantCreateBulk) Save(ctx context.Context) ([]*Tenant, error)
- func (tcb *TenantCreateBulk) SaveX(ctx context.Context) []*Tenant
- type TenantDelete
- type TenantDeleteOne
- type TenantFilter
- func (f *TenantFilter) Where(p entql.P)
- func (f *TenantFilter) WhereCreatedAt(p entql.TimeP)
- func (f *TenantFilter) WhereDeletedAt(p entql.TimeP)
- func (f *TenantFilter) WhereID(p entql.Uint32P)
- func (f *TenantFilter) WhereName(p entql.StringP)
- func (f *TenantFilter) WhereRemark(p entql.StringP)
- func (f *TenantFilter) WhereSort(p entql.Int32P)
- func (f *TenantFilter) WhereState(p entql.Int32P)
- func (f *TenantFilter) WhereUpdatedAt(p entql.TimeP)
- type TenantGroupBy
- func (tgb *TenantGroupBy) Aggregate(fns ...AggregateFunc) *TenantGroupBy
- func (s *TenantGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TenantGroupBy) BoolX(ctx context.Context) bool
- func (s *TenantGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TenantGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TenantGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TenantGroupBy) Float64X(ctx context.Context) float64
- func (s *TenantGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TenantGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TenantGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TenantGroupBy) IntX(ctx context.Context) int
- func (s *TenantGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TenantGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TenantGroupBy) Scan(ctx context.Context, v any) error
- func (s *TenantGroupBy) ScanX(ctx context.Context, v any)
- func (s *TenantGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TenantGroupBy) StringX(ctx context.Context) string
- func (s *TenantGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TenantGroupBy) StringsX(ctx context.Context) []string
- type TenantMutation
- func (m *TenantMutation) AddField(name string, value ent.Value) error
- func (m *TenantMutation) AddSort(i int32)
- func (m *TenantMutation) AddState(i int32)
- func (m *TenantMutation) AddedEdges() []string
- func (m *TenantMutation) AddedField(name string) (ent.Value, bool)
- func (m *TenantMutation) AddedFields() []string
- func (m *TenantMutation) AddedIDs(name string) []ent.Value
- func (m *TenantMutation) AddedSort() (r int32, exists bool)
- func (m *TenantMutation) AddedState() (r int32, exists bool)
- func (m *TenantMutation) ClearCreatedAt()
- func (m *TenantMutation) ClearDeletedAt()
- func (m *TenantMutation) ClearEdge(name string) error
- func (m *TenantMutation) ClearField(name string) error
- func (m *TenantMutation) ClearRemark()
- func (m *TenantMutation) ClearUpdatedAt()
- func (m *TenantMutation) ClearedEdges() []string
- func (m *TenantMutation) ClearedFields() []string
- func (m TenantMutation) Client() *Client
- func (m *TenantMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TenantMutation) CreatedAtCleared() bool
- func (m *TenantMutation) DeletedAt() (r time.Time, exists bool)
- func (m *TenantMutation) DeletedAtCleared() bool
- func (m *TenantMutation) EdgeCleared(name string) bool
- func (m *TenantMutation) Field(name string) (ent.Value, bool)
- func (m *TenantMutation) FieldCleared(name string) bool
- func (m *TenantMutation) Fields() []string
- func (m *TenantMutation) Filter() *TenantFilter
- func (m *TenantMutation) ID() (id uint32, exists bool)
- func (m *TenantMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *TenantMutation) Name() (r string, exists bool)
- func (m *TenantMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *TenantMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *TenantMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TenantMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TenantMutation) OldRemark(ctx context.Context) (v *string, err error)
- func (m *TenantMutation) OldSort(ctx context.Context) (v *int32, err error)
- func (m *TenantMutation) OldState(ctx context.Context) (v *int32, err error)
- func (m *TenantMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *TenantMutation) Op() Op
- func (m *TenantMutation) Remark() (r string, exists bool)
- func (m *TenantMutation) RemarkCleared() bool
- func (m *TenantMutation) RemovedEdges() []string
- func (m *TenantMutation) RemovedIDs(name string) []ent.Value
- func (m *TenantMutation) ResetCreatedAt()
- func (m *TenantMutation) ResetDeletedAt()
- func (m *TenantMutation) ResetEdge(name string) error
- func (m *TenantMutation) ResetField(name string) error
- func (m *TenantMutation) ResetName()
- func (m *TenantMutation) ResetRemark()
- func (m *TenantMutation) ResetSort()
- func (m *TenantMutation) ResetState()
- func (m *TenantMutation) ResetUpdatedAt()
- func (m *TenantMutation) SetCreatedAt(t time.Time)
- func (m *TenantMutation) SetDeletedAt(t time.Time)
- func (m *TenantMutation) SetField(name string, value ent.Value) error
- func (m *TenantMutation) SetID(id uint32)
- func (m *TenantMutation) SetName(s string)
- func (m *TenantMutation) SetOp(op Op)
- func (m *TenantMutation) SetRemark(s string)
- func (m *TenantMutation) SetSort(i int32)
- func (m *TenantMutation) SetState(i int32)
- func (m *TenantMutation) SetUpdatedAt(t time.Time)
- func (m *TenantMutation) Sort() (r int32, exists bool)
- func (m *TenantMutation) State() (r int32, exists bool)
- func (m TenantMutation) Tx() (*Tx, error)
- func (m *TenantMutation) Type() string
- func (m *TenantMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *TenantMutation) UpdatedAtCleared() bool
- func (m *TenantMutation) Where(ps ...predicate.Tenant)
- func (m *TenantMutation) WhereP(ps ...func(*sql.Selector))
- type TenantQuery
- func (tq *TenantQuery) Aggregate(fns ...AggregateFunc) *TenantSelect
- func (tq *TenantQuery) All(ctx context.Context) ([]*Tenant, error)
- func (tq *TenantQuery) AllX(ctx context.Context) []*Tenant
- func (tq *TenantQuery) Clone() *TenantQuery
- func (tq *TenantQuery) Count(ctx context.Context) (int, error)
- func (tq *TenantQuery) CountX(ctx context.Context) int
- func (tq *TenantQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TenantQuery) ExistX(ctx context.Context) bool
- func (tq *TenantQuery) Filter() *TenantFilter
- func (tq *TenantQuery) First(ctx context.Context) (*Tenant, error)
- func (tq *TenantQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (tq *TenantQuery) FirstIDX(ctx context.Context) uint32
- func (tq *TenantQuery) FirstX(ctx context.Context) *Tenant
- func (tq *TenantQuery) GroupBy(field string, fields ...string) *TenantGroupBy
- func (tq *TenantQuery) IDs(ctx context.Context) (ids []uint32, err error)
- func (tq *TenantQuery) IDsX(ctx context.Context) []uint32
- func (tq *TenantQuery) Limit(limit int) *TenantQuery
- func (tq *TenantQuery) Modify(modifiers ...func(s *sql.Selector)) *TenantSelect
- func (tq *TenantQuery) Offset(offset int) *TenantQuery
- func (tq *TenantQuery) Only(ctx context.Context) (*Tenant, error)
- func (tq *TenantQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (tq *TenantQuery) OnlyIDX(ctx context.Context) uint32
- func (tq *TenantQuery) OnlyX(ctx context.Context) *Tenant
- func (tq *TenantQuery) Order(o ...tenant.OrderOption) *TenantQuery
- func (tq *TenantQuery) Select(fields ...string) *TenantSelect
- func (tq *TenantQuery) Unique(unique bool) *TenantQuery
- func (tq *TenantQuery) Where(ps ...predicate.Tenant) *TenantQuery
- type TenantSelect
- func (ts *TenantSelect) Aggregate(fns ...AggregateFunc) *TenantSelect
- func (s *TenantSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TenantSelect) BoolX(ctx context.Context) bool
- func (s *TenantSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TenantSelect) BoolsX(ctx context.Context) []bool
- func (s *TenantSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TenantSelect) Float64X(ctx context.Context) float64
- func (s *TenantSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TenantSelect) Float64sX(ctx context.Context) []float64
- func (s *TenantSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TenantSelect) IntX(ctx context.Context) int
- func (s *TenantSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TenantSelect) IntsX(ctx context.Context) []int
- func (ts *TenantSelect) Modify(modifiers ...func(s *sql.Selector)) *TenantSelect
- func (ts *TenantSelect) Scan(ctx context.Context, v any) error
- func (s *TenantSelect) ScanX(ctx context.Context, v any)
- func (s *TenantSelect) String(ctx context.Context) (_ string, err error)
- func (s *TenantSelect) StringX(ctx context.Context) string
- func (s *TenantSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TenantSelect) StringsX(ctx context.Context) []string
- type TenantUpdate
- func (tu *TenantUpdate) AddSort(i int32) *TenantUpdate
- func (tu *TenantUpdate) AddState(i int32) *TenantUpdate
- func (tu *TenantUpdate) ClearDeletedAt() *TenantUpdate
- func (tu *TenantUpdate) ClearRemark() *TenantUpdate
- func (tu *TenantUpdate) ClearUpdatedAt() *TenantUpdate
- func (tu *TenantUpdate) Exec(ctx context.Context) error
- func (tu *TenantUpdate) ExecX(ctx context.Context)
- func (tu *TenantUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TenantUpdate
- func (tu *TenantUpdate) Mutation() *TenantMutation
- func (tu *TenantUpdate) Save(ctx context.Context) (int, error)
- func (tu *TenantUpdate) SaveX(ctx context.Context) int
- func (tu *TenantUpdate) SetDeletedAt(t time.Time) *TenantUpdate
- func (tu *TenantUpdate) SetName(s string) *TenantUpdate
- func (tu *TenantUpdate) SetNillableDeletedAt(t *time.Time) *TenantUpdate
- func (tu *TenantUpdate) SetNillableName(s *string) *TenantUpdate
- func (tu *TenantUpdate) SetNillableRemark(s *string) *TenantUpdate
- func (tu *TenantUpdate) SetNillableSort(i *int32) *TenantUpdate
- func (tu *TenantUpdate) SetNillableState(i *int32) *TenantUpdate
- func (tu *TenantUpdate) SetNillableUpdatedAt(t *time.Time) *TenantUpdate
- func (tu *TenantUpdate) SetRemark(s string) *TenantUpdate
- func (tu *TenantUpdate) SetSort(i int32) *TenantUpdate
- func (tu *TenantUpdate) SetState(i int32) *TenantUpdate
- func (tu *TenantUpdate) SetUpdatedAt(t time.Time) *TenantUpdate
- func (tu *TenantUpdate) Where(ps ...predicate.Tenant) *TenantUpdate
- type TenantUpdateOne
- func (tuo *TenantUpdateOne) AddSort(i int32) *TenantUpdateOne
- func (tuo *TenantUpdateOne) AddState(i int32) *TenantUpdateOne
- func (tuo *TenantUpdateOne) ClearDeletedAt() *TenantUpdateOne
- func (tuo *TenantUpdateOne) ClearRemark() *TenantUpdateOne
- func (tuo *TenantUpdateOne) ClearUpdatedAt() *TenantUpdateOne
- func (tuo *TenantUpdateOne) Exec(ctx context.Context) error
- func (tuo *TenantUpdateOne) ExecX(ctx context.Context)
- func (tuo *TenantUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TenantUpdateOne
- func (tuo *TenantUpdateOne) Mutation() *TenantMutation
- func (tuo *TenantUpdateOne) Save(ctx context.Context) (*Tenant, error)
- func (tuo *TenantUpdateOne) SaveX(ctx context.Context) *Tenant
- func (tuo *TenantUpdateOne) Select(field string, fields ...string) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetDeletedAt(t time.Time) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetName(s string) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetNillableDeletedAt(t *time.Time) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetNillableName(s *string) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetNillableRemark(s *string) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetNillableSort(i *int32) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetNillableState(i *int32) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetNillableUpdatedAt(t *time.Time) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetRemark(s string) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetSort(i int32) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetState(i int32) *TenantUpdateOne
- func (tuo *TenantUpdateOne) SetUpdatedAt(t time.Time) *TenantUpdateOne
- func (tuo *TenantUpdateOne) Where(ps ...predicate.Tenant) *TenantUpdateOne
- type TenantUpsert
- func (u *TenantUpsert) AddSort(v int32) *TenantUpsert
- func (u *TenantUpsert) AddState(v int32) *TenantUpsert
- func (u *TenantUpsert) ClearDeletedAt() *TenantUpsert
- func (u *TenantUpsert) ClearRemark() *TenantUpsert
- func (u *TenantUpsert) ClearUpdatedAt() *TenantUpsert
- func (u *TenantUpsert) SetDeletedAt(v time.Time) *TenantUpsert
- func (u *TenantUpsert) SetName(v string) *TenantUpsert
- func (u *TenantUpsert) SetRemark(v string) *TenantUpsert
- func (u *TenantUpsert) SetSort(v int32) *TenantUpsert
- func (u *TenantUpsert) SetState(v int32) *TenantUpsert
- func (u *TenantUpsert) SetUpdatedAt(v time.Time) *TenantUpsert
- func (u *TenantUpsert) UpdateDeletedAt() *TenantUpsert
- func (u *TenantUpsert) UpdateName() *TenantUpsert
- func (u *TenantUpsert) UpdateRemark() *TenantUpsert
- func (u *TenantUpsert) UpdateSort() *TenantUpsert
- func (u *TenantUpsert) UpdateState() *TenantUpsert
- func (u *TenantUpsert) UpdateUpdatedAt() *TenantUpsert
- type TenantUpsertBulk
- func (u *TenantUpsertBulk) AddSort(v int32) *TenantUpsertBulk
- func (u *TenantUpsertBulk) AddState(v int32) *TenantUpsertBulk
- func (u *TenantUpsertBulk) ClearDeletedAt() *TenantUpsertBulk
- func (u *TenantUpsertBulk) ClearRemark() *TenantUpsertBulk
- func (u *TenantUpsertBulk) ClearUpdatedAt() *TenantUpsertBulk
- func (u *TenantUpsertBulk) DoNothing() *TenantUpsertBulk
- func (u *TenantUpsertBulk) Exec(ctx context.Context) error
- func (u *TenantUpsertBulk) ExecX(ctx context.Context)
- func (u *TenantUpsertBulk) Ignore() *TenantUpsertBulk
- func (u *TenantUpsertBulk) SetDeletedAt(v time.Time) *TenantUpsertBulk
- func (u *TenantUpsertBulk) SetName(v string) *TenantUpsertBulk
- func (u *TenantUpsertBulk) SetRemark(v string) *TenantUpsertBulk
- func (u *TenantUpsertBulk) SetSort(v int32) *TenantUpsertBulk
- func (u *TenantUpsertBulk) SetState(v int32) *TenantUpsertBulk
- func (u *TenantUpsertBulk) SetUpdatedAt(v time.Time) *TenantUpsertBulk
- func (u *TenantUpsertBulk) Update(set func(*TenantUpsert)) *TenantUpsertBulk
- func (u *TenantUpsertBulk) UpdateDeletedAt() *TenantUpsertBulk
- func (u *TenantUpsertBulk) UpdateName() *TenantUpsertBulk
- func (u *TenantUpsertBulk) UpdateNewValues() *TenantUpsertBulk
- func (u *TenantUpsertBulk) UpdateRemark() *TenantUpsertBulk
- func (u *TenantUpsertBulk) UpdateSort() *TenantUpsertBulk
- func (u *TenantUpsertBulk) UpdateState() *TenantUpsertBulk
- func (u *TenantUpsertBulk) UpdateUpdatedAt() *TenantUpsertBulk
- type TenantUpsertOne
- func (u *TenantUpsertOne) AddSort(v int32) *TenantUpsertOne
- func (u *TenantUpsertOne) AddState(v int32) *TenantUpsertOne
- func (u *TenantUpsertOne) ClearDeletedAt() *TenantUpsertOne
- func (u *TenantUpsertOne) ClearRemark() *TenantUpsertOne
- func (u *TenantUpsertOne) ClearUpdatedAt() *TenantUpsertOne
- func (u *TenantUpsertOne) DoNothing() *TenantUpsertOne
- func (u *TenantUpsertOne) Exec(ctx context.Context) error
- func (u *TenantUpsertOne) ExecX(ctx context.Context)
- func (u *TenantUpsertOne) ID(ctx context.Context) (id uint32, err error)
- func (u *TenantUpsertOne) IDX(ctx context.Context) uint32
- func (u *TenantUpsertOne) Ignore() *TenantUpsertOne
- func (u *TenantUpsertOne) SetDeletedAt(v time.Time) *TenantUpsertOne
- func (u *TenantUpsertOne) SetName(v string) *TenantUpsertOne
- func (u *TenantUpsertOne) SetRemark(v string) *TenantUpsertOne
- func (u *TenantUpsertOne) SetSort(v int32) *TenantUpsertOne
- func (u *TenantUpsertOne) SetState(v int32) *TenantUpsertOne
- func (u *TenantUpsertOne) SetUpdatedAt(v time.Time) *TenantUpsertOne
- func (u *TenantUpsertOne) Update(set func(*TenantUpsert)) *TenantUpsertOne
- func (u *TenantUpsertOne) UpdateDeletedAt() *TenantUpsertOne
- func (u *TenantUpsertOne) UpdateName() *TenantUpsertOne
- func (u *TenantUpsertOne) UpdateNewValues() *TenantUpsertOne
- func (u *TenantUpsertOne) UpdateRemark() *TenantUpsertOne
- func (u *TenantUpsertOne) UpdateSort() *TenantUpsertOne
- func (u *TenantUpsertOne) UpdateState() *TenantUpsertOne
- func (u *TenantUpsertOne) UpdateUpdatedAt() *TenantUpsertOne
- type Tenants
- type TraverseFunc
- type Traverser
- type Tx
- type User
- 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 uint32) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uint32) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uint32) *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) QueryPosts(u *User) *PostQuery
- func (c *UserClient) QueryRoles(u *User) *RoleQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uint32) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddPostIDs(ids ...uint32) *UserCreate
- func (uc *UserCreate) AddPosts(p ...*Post) *UserCreate
- func (uc *UserCreate) AddRoleIDs(ids ...uint32) *UserCreate
- func (uc *UserCreate) AddRoles(r ...*Role) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) 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 (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAuthority(i int32) *UserCreate
- func (uc *UserCreate) SetAvatar(s string) *UserCreate
- func (uc *UserCreate) SetBirthday(t time.Time) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDescription(s string) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetGender(i int32) *UserCreate
- func (uc *UserCreate) SetID(u uint32) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNickName(s string) *UserCreate
- func (uc *UserCreate) SetNillableAuthority(i *int32) *UserCreate
- func (uc *UserCreate) SetNillableAvatar(s *string) *UserCreate
- func (uc *UserCreate) SetNillableBirthday(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDescription(s *string) *UserCreate
- func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate
- func (uc *UserCreate) SetNillableGender(i *int32) *UserCreate
- func (uc *UserCreate) SetNillableNickName(s *string) *UserCreate
- func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
- func (uc *UserCreate) SetNillableRealName(s *string) *UserCreate
- func (uc *UserCreate) SetNillableRemark(s *string) *UserCreate
- func (uc *UserCreate) SetNillableSort(i *int32) *UserCreate
- func (uc *UserCreate) SetNillableState(i *int32) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetPhone(s string) *UserCreate
- func (uc *UserCreate) SetRealName(s string) *UserCreate
- func (uc *UserCreate) SetRemark(s string) *UserCreate
- func (uc *UserCreate) SetSort(i int32) *UserCreate
- func (uc *UserCreate) SetState(i int32) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- type UserDeleteOne
- type UserEdges
- type UserFilter
- func (f *UserFilter) Where(p entql.P)
- func (f *UserFilter) WhereAuthority(p entql.Int32P)
- func (f *UserFilter) WhereAvatar(p entql.StringP)
- func (f *UserFilter) WhereBirthday(p entql.TimeP)
- func (f *UserFilter) WhereCreatedAt(p entql.TimeP)
- func (f *UserFilter) WhereDeletedAt(p entql.TimeP)
- func (f *UserFilter) WhereDescription(p entql.StringP)
- func (f *UserFilter) WhereEmail(p entql.StringP)
- func (f *UserFilter) WhereGender(p entql.Int32P)
- func (f *UserFilter) WhereHasPosts()
- func (f *UserFilter) WhereHasPostsWith(preds ...predicate.Post)
- func (f *UserFilter) WhereHasRoles()
- func (f *UserFilter) WhereHasRolesWith(preds ...predicate.Role)
- func (f *UserFilter) WhereID(p entql.Uint32P)
- func (f *UserFilter) WhereName(p entql.StringP)
- func (f *UserFilter) WhereNickName(p entql.StringP)
- func (f *UserFilter) WherePassword(p entql.StringP)
- func (f *UserFilter) WherePhone(p entql.StringP)
- func (f *UserFilter) WhereRealName(p entql.StringP)
- func (f *UserFilter) WhereRemark(p entql.StringP)
- func (f *UserFilter) WhereSort(p entql.Int32P)
- func (f *UserFilter) WhereState(p entql.Int32P)
- func (f *UserFilter) WhereUpdatedAt(p entql.TimeP)
- 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) AddAuthority(i int32)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddGender(i int32)
- func (m *UserMutation) AddPostIDs(ids ...uint32)
- func (m *UserMutation) AddRoleIDs(ids ...uint32)
- func (m *UserMutation) AddSort(i int32)
- func (m *UserMutation) AddState(i int32)
- func (m *UserMutation) AddedAuthority() (r int32, exists bool)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedGender() (r int32, exists bool)
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedSort() (r int32, exists bool)
- func (m *UserMutation) AddedState() (r int32, exists bool)
- func (m *UserMutation) Authority() (r int32, exists bool)
- func (m *UserMutation) Avatar() (r string, exists bool)
- func (m *UserMutation) Birthday() (r time.Time, exists bool)
- func (m *UserMutation) ClearCreatedAt()
- func (m *UserMutation) ClearDeletedAt()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearPosts()
- func (m *UserMutation) ClearRemark()
- func (m *UserMutation) ClearRoles()
- func (m *UserMutation) ClearUpdatedAt()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) CreatedAtCleared() bool
- func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
- func (m *UserMutation) DeletedAtCleared() bool
- func (m *UserMutation) Description() (r string, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) Filter() *UserFilter
- func (m *UserMutation) Gender() (r int32, exists bool)
- func (m *UserMutation) ID() (id uint32, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uint32, error)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) NickName() (r string, exists bool)
- func (m *UserMutation) OldAuthority(ctx context.Context) (v *int32, err error)
- func (m *UserMutation) OldAvatar(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldBirthday(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldDescription(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldGender(ctx context.Context) (v *int32, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldNickName(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldPhone(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldRealName(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldRemark(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldSort(ctx context.Context) (v *int32, err error)
- func (m *UserMutation) OldState(ctx context.Context) (v *int32, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) Phone() (r string, exists bool)
- func (m *UserMutation) PostsCleared() bool
- func (m *UserMutation) PostsIDs() (ids []uint32)
- func (m *UserMutation) RealName() (r string, exists bool)
- func (m *UserMutation) Remark() (r string, exists bool)
- func (m *UserMutation) RemarkCleared() bool
- func (m *UserMutation) RemovePostIDs(ids ...uint32)
- func (m *UserMutation) RemoveRoleIDs(ids ...uint32)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedPostsIDs() (ids []uint32)
- func (m *UserMutation) RemovedRolesIDs() (ids []uint32)
- func (m *UserMutation) ResetAuthority()
- func (m *UserMutation) ResetAvatar()
- func (m *UserMutation) ResetBirthday()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDeletedAt()
- func (m *UserMutation) ResetDescription()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetGender()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetNickName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetPhone()
- func (m *UserMutation) ResetPosts()
- func (m *UserMutation) ResetRealName()
- func (m *UserMutation) ResetRemark()
- func (m *UserMutation) ResetRoles()
- func (m *UserMutation) ResetSort()
- func (m *UserMutation) ResetState()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) RolesCleared() bool
- func (m *UserMutation) RolesIDs() (ids []uint32)
- func (m *UserMutation) SetAuthority(i int32)
- func (m *UserMutation) SetAvatar(s string)
- func (m *UserMutation) SetBirthday(t time.Time)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetDeletedAt(t time.Time)
- func (m *UserMutation) SetDescription(s string)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetGender(i int32)
- func (m *UserMutation) SetID(id uint32)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetNickName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetPhone(s string)
- func (m *UserMutation) SetRealName(s string)
- func (m *UserMutation) SetRemark(s string)
- func (m *UserMutation) SetSort(i int32)
- func (m *UserMutation) SetState(i int32)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) Sort() (r int32, exists bool)
- func (m *UserMutation) State() (r int32, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) UpdatedAtCleared() 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 (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) Filter() *UserFilter
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uint32, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uint32
- 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 []uint32, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uint32
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uint32, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uint32
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryPosts() *PostQuery
- func (uq *UserQuery) QueryRoles() *RoleQuery
- 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) WithPosts(opts ...func(*PostQuery)) *UserQuery
- func (uq *UserQuery) WithRoles(opts ...func(*RoleQuery)) *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 (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 (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
- 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) AddAuthority(i int32) *UserUpdate
- func (uu *UserUpdate) AddGender(i int32) *UserUpdate
- func (uu *UserUpdate) AddPostIDs(ids ...uint32) *UserUpdate
- func (uu *UserUpdate) AddPosts(p ...*Post) *UserUpdate
- func (uu *UserUpdate) AddRoleIDs(ids ...uint32) *UserUpdate
- func (uu *UserUpdate) AddRoles(r ...*Role) *UserUpdate
- func (uu *UserUpdate) AddSort(i int32) *UserUpdate
- func (uu *UserUpdate) AddState(i int32) *UserUpdate
- func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
- func (uu *UserUpdate) ClearPosts() *UserUpdate
- func (uu *UserUpdate) ClearRemark() *UserUpdate
- func (uu *UserUpdate) ClearRoles() *UserUpdate
- func (uu *UserUpdate) ClearUpdatedAt() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemovePostIDs(ids ...uint32) *UserUpdate
- func (uu *UserUpdate) RemovePosts(p ...*Post) *UserUpdate
- func (uu *UserUpdate) RemoveRoleIDs(ids ...uint32) *UserUpdate
- func (uu *UserUpdate) RemoveRoles(r ...*Role) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAuthority(i int32) *UserUpdate
- func (uu *UserUpdate) SetAvatar(s string) *UserUpdate
- func (uu *UserUpdate) SetBirthday(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetDescription(s string) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetGender(i int32) *UserUpdate
- func (uu *UserUpdate) SetNickName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableAuthority(i *int32) *UserUpdate
- func (uu *UserUpdate) SetNillableAvatar(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableBirthday(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableDescription(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableGender(i *int32) *UserUpdate
- func (uu *UserUpdate) SetNillableNickName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePhone(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableRealName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableRemark(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableSort(i *int32) *UserUpdate
- func (uu *UserUpdate) SetNillableState(i *int32) *UserUpdate
- func (uu *UserUpdate) SetNillableUpdatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetPhone(s string) *UserUpdate
- func (uu *UserUpdate) SetRealName(s string) *UserUpdate
- func (uu *UserUpdate) SetRemark(s string) *UserUpdate
- func (uu *UserUpdate) SetSort(i int32) *UserUpdate
- func (uu *UserUpdate) SetState(i int32) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddAuthority(i int32) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGender(i int32) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPostIDs(ids ...uint32) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPosts(p ...*Post) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRoleIDs(ids ...uint32) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRoles(r ...*Role) *UserUpdateOne
- func (uuo *UserUpdateOne) AddSort(i int32) *UserUpdateOne
- func (uuo *UserUpdateOne) AddState(i int32) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPosts() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRemark() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUpdatedAt() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemovePostIDs(ids ...uint32) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePosts(p ...*Post) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRoleIDs(ids ...uint32) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRoles(r ...*Role) *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) SetAuthority(i int32) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAvatar(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetBirthday(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDescription(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGender(i int32) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNickName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAuthority(i *int32) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAvatar(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableBirthday(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDescription(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableGender(i *int32) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableNickName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePhone(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRealName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRemark(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableSort(i *int32) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableState(i *int32) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPhone(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRealName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRemark(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSort(i int32) *UserUpdateOne
- func (uuo *UserUpdateOne) SetState(i int32) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) AddAuthority(v int32) *UserUpsert
- func (u *UserUpsert) AddGender(v int32) *UserUpsert
- func (u *UserUpsert) AddSort(v int32) *UserUpsert
- func (u *UserUpsert) AddState(v int32) *UserUpsert
- func (u *UserUpsert) ClearDeletedAt() *UserUpsert
- func (u *UserUpsert) ClearRemark() *UserUpsert
- func (u *UserUpsert) ClearUpdatedAt() *UserUpsert
- func (u *UserUpsert) SetAuthority(v int32) *UserUpsert
- func (u *UserUpsert) SetAvatar(v string) *UserUpsert
- func (u *UserUpsert) SetBirthday(v time.Time) *UserUpsert
- func (u *UserUpsert) SetDeletedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetDescription(v string) *UserUpsert
- func (u *UserUpsert) SetEmail(v string) *UserUpsert
- func (u *UserUpsert) SetGender(v int32) *UserUpsert
- func (u *UserUpsert) SetNickName(v string) *UserUpsert
- func (u *UserUpsert) SetPassword(v string) *UserUpsert
- func (u *UserUpsert) SetPhone(v string) *UserUpsert
- func (u *UserUpsert) SetRealName(v string) *UserUpsert
- func (u *UserUpsert) SetRemark(v string) *UserUpsert
- func (u *UserUpsert) SetSort(v int32) *UserUpsert
- func (u *UserUpsert) SetState(v int32) *UserUpsert
- func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) UpdateAuthority() *UserUpsert
- func (u *UserUpsert) UpdateAvatar() *UserUpsert
- func (u *UserUpsert) UpdateBirthday() *UserUpsert
- func (u *UserUpsert) UpdateDeletedAt() *UserUpsert
- func (u *UserUpsert) UpdateDescription() *UserUpsert
- func (u *UserUpsert) UpdateEmail() *UserUpsert
- func (u *UserUpsert) UpdateGender() *UserUpsert
- func (u *UserUpsert) UpdateNickName() *UserUpsert
- func (u *UserUpsert) UpdatePassword() *UserUpsert
- func (u *UserUpsert) UpdatePhone() *UserUpsert
- func (u *UserUpsert) UpdateRealName() *UserUpsert
- func (u *UserUpsert) UpdateRemark() *UserUpsert
- func (u *UserUpsert) UpdateSort() *UserUpsert
- func (u *UserUpsert) UpdateState() *UserUpsert
- func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) AddAuthority(v int32) *UserUpsertBulk
- func (u *UserUpsertBulk) AddGender(v int32) *UserUpsertBulk
- func (u *UserUpsertBulk) AddSort(v int32) *UserUpsertBulk
- func (u *UserUpsertBulk) AddState(v int32) *UserUpsertBulk
- func (u *UserUpsertBulk) ClearDeletedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearRemark() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearUpdatedAt() *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) SetAuthority(v int32) *UserUpsertBulk
- func (u *UserUpsertBulk) SetAvatar(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetBirthday(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetDeletedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetDescription(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetGender(v int32) *UserUpsertBulk
- func (u *UserUpsertBulk) SetNickName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPhone(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetRealName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetRemark(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetSort(v int32) *UserUpsertBulk
- func (u *UserUpsertBulk) SetState(v int32) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateAuthority() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateAvatar() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateBirthday() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateDeletedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateDescription() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateGender() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNickName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePhone() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateRealName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateRemark() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateSort() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateState() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) AddAuthority(v int32) *UserUpsertOne
- func (u *UserUpsertOne) AddGender(v int32) *UserUpsertOne
- func (u *UserUpsertOne) AddSort(v int32) *UserUpsertOne
- func (u *UserUpsertOne) AddState(v int32) *UserUpsertOne
- func (u *UserUpsertOne) ClearDeletedAt() *UserUpsertOne
- func (u *UserUpsertOne) ClearRemark() *UserUpsertOne
- func (u *UserUpsertOne) ClearUpdatedAt() *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 uint32, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) uint32
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetAuthority(v int32) *UserUpsertOne
- func (u *UserUpsertOne) SetAvatar(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetBirthday(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetDeletedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetDescription(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetGender(v int32) *UserUpsertOne
- func (u *UserUpsertOne) SetNickName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetPhone(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetRealName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetRemark(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetSort(v int32) *UserUpsertOne
- func (u *UserUpsertOne) SetState(v int32) *UserUpsertOne
- func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateAuthority() *UserUpsertOne
- func (u *UserUpsertOne) UpdateAvatar() *UserUpsertOne
- func (u *UserUpsertOne) UpdateBirthday() *UserUpsertOne
- func (u *UserUpsertOne) UpdateDeletedAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateDescription() *UserUpsertOne
- func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
- func (u *UserUpsertOne) UpdateGender() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNickName() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePhone() *UserUpsertOne
- func (u *UserUpsertOne) UpdateRealName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateRemark() *UserUpsertOne
- func (u *UserUpsertOne) UpdateSort() *UserUpsertOne
- func (u *UserUpsertOne) UpdateState() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUpdatedAt() *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. TypeDept = "Dept" TypeMember = "Member" TypeMenu = "Menu" TypePost = "Post" TypeRole = "Role" TypeTenant = "Tenant" 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 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 Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Dept is the client for interacting with the Dept builders. Dept *DeptClient // Member is the client for interacting with the Member builders. Member *MemberClient // Menu is the client for interacting with the Menu builders. Menu *MenuClient // Post is the client for interacting with the Post builders. Post *PostClient // Role is the client for interacting with the Role builders. Role *RoleClient // Tenant is the client for interacting with the Tenant builders. Tenant *TenantClient // 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(). Dept. Query(). Count(ctx)
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(...)`.
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 Dept ¶
type Dept struct { // ID of the ent. // id ID uint32 `json:"id,omitempty"` // 创建时间 CreatedAt *time.Time `json:"created_at,omitempty"` // 更新时间 UpdatedAt *time.Time `json:"updated_at,omitempty"` // 删除时间 DeletedAt *time.Time `json:"deleted_at,omitempty"` // 备注 Remark *string `json:"remark,omitempty"` // 排序 Sort *int32 `json:"sort,omitempty"` // 状态 0 UNSPECIFIED 开启 1 -> ACTIVE 关闭 2 -> INACTIVE, 禁用 3 -> BANNED State *int32 `json:"state,omitempty"` // 名称 Name *string `json:"name,omitempty"` // 父级ID ParentID *uint32 `json:"parent_id,omitempty"` // 祖级列表 Ancestors []int `json:"ancestors,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DeptQuery when eager-loading is set. Edges DeptEdges `json:"edges"` // contains filtered or unexported fields }
部门表
func (*Dept) QueryChildren ¶
QueryChildren queries the "children" edge of the Dept entity.
func (*Dept) QueryParent ¶
QueryParent queries the "parent" edge of the Dept entity.
func (*Dept) Unwrap ¶
Unwrap unwraps the Dept 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 (*Dept) Update ¶
func (d *Dept) Update() *DeptUpdateOne
Update returns a builder for updating this Dept. Note that you need to call Dept.Unwrap() before calling this method if this Dept was returned from a transaction, and the transaction was committed or rolled back.
type DeptClient ¶
type DeptClient struct {
// contains filtered or unexported fields
}
DeptClient is a client for the Dept schema.
func NewDeptClient ¶
func NewDeptClient(c config) *DeptClient
NewDeptClient returns a client for the Dept from the given config.
func (*DeptClient) Create ¶
func (c *DeptClient) Create() *DeptCreate
Create returns a builder for creating a Dept entity.
func (*DeptClient) CreateBulk ¶
func (c *DeptClient) CreateBulk(builders ...*DeptCreate) *DeptCreateBulk
CreateBulk returns a builder for creating a bulk of Dept entities.
func (*DeptClient) Delete ¶
func (c *DeptClient) Delete() *DeptDelete
Delete returns a delete builder for Dept.
func (*DeptClient) DeleteOne ¶
func (c *DeptClient) DeleteOne(d *Dept) *DeptDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DeptClient) DeleteOneID ¶
func (c *DeptClient) DeleteOneID(id uint32) *DeptDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DeptClient) GetX ¶
func (c *DeptClient) GetX(ctx context.Context, id uint32) *Dept
GetX is like Get, but panics if an error occurs.
func (*DeptClient) Intercept ¶
func (c *DeptClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `dept.Intercept(f(g(h())))`.
func (*DeptClient) Interceptors ¶
func (c *DeptClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DeptClient) MapCreateBulk ¶
func (c *DeptClient) MapCreateBulk(slice any, setFunc func(*DeptCreate, int)) *DeptCreateBulk
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 (*DeptClient) Query ¶
func (c *DeptClient) Query() *DeptQuery
Query returns a query builder for Dept.
func (*DeptClient) QueryChildren ¶
func (c *DeptClient) QueryChildren(d *Dept) *DeptQuery
QueryChildren queries the children edge of a Dept.
func (*DeptClient) QueryParent ¶
func (c *DeptClient) QueryParent(d *Dept) *DeptQuery
QueryParent queries the parent edge of a Dept.
func (*DeptClient) Update ¶
func (c *DeptClient) Update() *DeptUpdate
Update returns an update builder for Dept.
func (*DeptClient) UpdateOne ¶
func (c *DeptClient) UpdateOne(d *Dept) *DeptUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DeptClient) UpdateOneID ¶
func (c *DeptClient) UpdateOneID(id uint32) *DeptUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DeptClient) Use ¶
func (c *DeptClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dept.Hooks(f(g(h())))`.
type DeptCreate ¶
type DeptCreate struct {
// contains filtered or unexported fields
}
DeptCreate is the builder for creating a Dept entity.
func (*DeptCreate) AddChildIDs ¶
func (dc *DeptCreate) AddChildIDs(ids ...uint32) *DeptCreate
AddChildIDs adds the "children" edge to the Dept entity by IDs.
func (*DeptCreate) AddChildren ¶
func (dc *DeptCreate) AddChildren(d ...*Dept) *DeptCreate
AddChildren adds the "children" edges to the Dept entity.
func (*DeptCreate) Exec ¶
func (dc *DeptCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DeptCreate) ExecX ¶
func (dc *DeptCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeptCreate) Mutation ¶
func (dc *DeptCreate) Mutation() *DeptMutation
Mutation returns the DeptMutation object of the builder.
func (*DeptCreate) OnConflict ¶
func (dc *DeptCreate) OnConflict(opts ...sql.ConflictOption) *DeptUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Dept.Create(). SetCreatedAt(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.DeptUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*DeptCreate) OnConflictColumns ¶
func (dc *DeptCreate) OnConflictColumns(columns ...string) *DeptUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Dept.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DeptCreate) Save ¶
func (dc *DeptCreate) Save(ctx context.Context) (*Dept, error)
Save creates the Dept in the database.
func (*DeptCreate) SaveX ¶
func (dc *DeptCreate) SaveX(ctx context.Context) *Dept
SaveX calls Save and panics if Save returns an error.
func (*DeptCreate) SetAncestors ¶
func (dc *DeptCreate) SetAncestors(i []int) *DeptCreate
SetAncestors sets the "ancestors" field.
func (*DeptCreate) SetCreatedAt ¶
func (dc *DeptCreate) SetCreatedAt(t time.Time) *DeptCreate
SetCreatedAt sets the "created_at" field.
func (*DeptCreate) SetDeletedAt ¶
func (dc *DeptCreate) SetDeletedAt(t time.Time) *DeptCreate
SetDeletedAt sets the "deleted_at" field.
func (*DeptCreate) SetID ¶
func (dc *DeptCreate) SetID(u uint32) *DeptCreate
SetID sets the "id" field.
func (*DeptCreate) SetName ¶
func (dc *DeptCreate) SetName(s string) *DeptCreate
SetName sets the "name" field.
func (*DeptCreate) SetNillableCreatedAt ¶
func (dc *DeptCreate) SetNillableCreatedAt(t *time.Time) *DeptCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DeptCreate) SetNillableDeletedAt ¶
func (dc *DeptCreate) SetNillableDeletedAt(t *time.Time) *DeptCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DeptCreate) SetNillableParentID ¶
func (dc *DeptCreate) SetNillableParentID(u *uint32) *DeptCreate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*DeptCreate) SetNillableRemark ¶
func (dc *DeptCreate) SetNillableRemark(s *string) *DeptCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*DeptCreate) SetNillableSort ¶
func (dc *DeptCreate) SetNillableSort(i *int32) *DeptCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*DeptCreate) SetNillableState ¶
func (dc *DeptCreate) SetNillableState(i *int32) *DeptCreate
SetNillableState sets the "state" field if the given value is not nil.
func (*DeptCreate) SetNillableUpdatedAt ¶
func (dc *DeptCreate) SetNillableUpdatedAt(t *time.Time) *DeptCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DeptCreate) SetParent ¶
func (dc *DeptCreate) SetParent(d *Dept) *DeptCreate
SetParent sets the "parent" edge to the Dept entity.
func (*DeptCreate) SetParentID ¶
func (dc *DeptCreate) SetParentID(u uint32) *DeptCreate
SetParentID sets the "parent_id" field.
func (*DeptCreate) SetRemark ¶
func (dc *DeptCreate) SetRemark(s string) *DeptCreate
SetRemark sets the "remark" field.
func (*DeptCreate) SetSort ¶
func (dc *DeptCreate) SetSort(i int32) *DeptCreate
SetSort sets the "sort" field.
func (*DeptCreate) SetState ¶
func (dc *DeptCreate) SetState(i int32) *DeptCreate
SetState sets the "state" field.
func (*DeptCreate) SetUpdatedAt ¶
func (dc *DeptCreate) SetUpdatedAt(t time.Time) *DeptCreate
SetUpdatedAt sets the "updated_at" field.
type DeptCreateBulk ¶
type DeptCreateBulk struct {
// contains filtered or unexported fields
}
DeptCreateBulk is the builder for creating many Dept entities in bulk.
func (*DeptCreateBulk) Exec ¶
func (dcb *DeptCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DeptCreateBulk) ExecX ¶
func (dcb *DeptCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeptCreateBulk) OnConflict ¶
func (dcb *DeptCreateBulk) OnConflict(opts ...sql.ConflictOption) *DeptUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Dept.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.DeptUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*DeptCreateBulk) OnConflictColumns ¶
func (dcb *DeptCreateBulk) OnConflictColumns(columns ...string) *DeptUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Dept.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type DeptDelete ¶
type DeptDelete struct {
// contains filtered or unexported fields
}
DeptDelete is the builder for deleting a Dept entity.
func (*DeptDelete) Exec ¶
func (dd *DeptDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DeptDelete) ExecX ¶
func (dd *DeptDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DeptDelete) Where ¶
func (dd *DeptDelete) Where(ps ...predicate.Dept) *DeptDelete
Where appends a list predicates to the DeptDelete builder.
type DeptDeleteOne ¶
type DeptDeleteOne struct {
// contains filtered or unexported fields
}
DeptDeleteOne is the builder for deleting a single Dept entity.
func (*DeptDeleteOne) Exec ¶
func (ddo *DeptDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DeptDeleteOne) ExecX ¶
func (ddo *DeptDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeptDeleteOne) Where ¶
func (ddo *DeptDeleteOne) Where(ps ...predicate.Dept) *DeptDeleteOne
Where appends a list predicates to the DeptDelete builder.
type DeptEdges ¶
type DeptEdges struct { // Parent holds the value of the parent edge. Parent *Dept `json:"parent,omitempty"` // Children holds the value of the children edge. Children []*Dept `json:"children,omitempty"` // contains filtered or unexported fields }
DeptEdges holds the relations/edges for other nodes in the graph.
func (DeptEdges) ChildrenOrErr ¶
ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.
func (DeptEdges) ParentOrErr ¶
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DeptFilter ¶
type DeptFilter struct {
// contains filtered or unexported fields
}
DeptFilter provides a generic filtering capability at runtime for DeptQuery.
func (*DeptFilter) Where ¶
func (f *DeptFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*DeptFilter) WhereAncestors ¶
func (f *DeptFilter) WhereAncestors(p entql.BytesP)
WhereAncestors applies the entql json.RawMessage predicate on the ancestors field.
func (*DeptFilter) WhereCreatedAt ¶
func (f *DeptFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*DeptFilter) WhereDeletedAt ¶
func (f *DeptFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*DeptFilter) WhereHasChildren ¶
func (f *DeptFilter) WhereHasChildren()
WhereHasChildren applies a predicate to check if query has an edge children.
func (*DeptFilter) WhereHasChildrenWith ¶
func (f *DeptFilter) WhereHasChildrenWith(preds ...predicate.Dept)
WhereHasChildrenWith applies a predicate to check if query has an edge children with a given conditions (other predicates).
func (*DeptFilter) WhereHasParent ¶
func (f *DeptFilter) WhereHasParent()
WhereHasParent applies a predicate to check if query has an edge parent.
func (*DeptFilter) WhereHasParentWith ¶
func (f *DeptFilter) WhereHasParentWith(preds ...predicate.Dept)
WhereHasParentWith applies a predicate to check if query has an edge parent with a given conditions (other predicates).
func (*DeptFilter) WhereID ¶
func (f *DeptFilter) WhereID(p entql.Uint32P)
WhereID applies the entql uint32 predicate on the id field.
func (*DeptFilter) WhereName ¶
func (f *DeptFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (*DeptFilter) WhereParentID ¶
func (f *DeptFilter) WhereParentID(p entql.Uint32P)
WhereParentID applies the entql uint32 predicate on the parent_id field.
func (*DeptFilter) WhereRemark ¶
func (f *DeptFilter) WhereRemark(p entql.StringP)
WhereRemark applies the entql string predicate on the remark field.
func (*DeptFilter) WhereSort ¶
func (f *DeptFilter) WhereSort(p entql.Int32P)
WhereSort applies the entql int32 predicate on the sort field.
func (*DeptFilter) WhereState ¶
func (f *DeptFilter) WhereState(p entql.Int32P)
WhereState applies the entql int32 predicate on the state field.
func (*DeptFilter) WhereUpdatedAt ¶
func (f *DeptFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type DeptGroupBy ¶
type DeptGroupBy struct {
// contains filtered or unexported fields
}
DeptGroupBy is the group-by builder for Dept entities.
func (*DeptGroupBy) Aggregate ¶
func (dgb *DeptGroupBy) Aggregate(fns ...AggregateFunc) *DeptGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DeptGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DeptGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DeptGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DeptGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DeptGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DeptGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DeptGroupBy) Scan ¶
func (dgb *DeptGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DeptGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DeptMutation ¶
type DeptMutation struct {
// contains filtered or unexported fields
}
DeptMutation represents an operation that mutates the Dept nodes in the graph.
func (*DeptMutation) AddChildIDs ¶
func (m *DeptMutation) AddChildIDs(ids ...uint32)
AddChildIDs adds the "children" edge to the Dept entity by ids.
func (*DeptMutation) AddField ¶
func (m *DeptMutation) 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 (*DeptMutation) AddSort ¶
func (m *DeptMutation) AddSort(i int32)
AddSort adds i to the "sort" field.
func (*DeptMutation) AddState ¶
func (m *DeptMutation) AddState(i int32)
AddState adds i to the "state" field.
func (*DeptMutation) AddedEdges ¶
func (m *DeptMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DeptMutation) AddedField ¶
func (m *DeptMutation) 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 (*DeptMutation) AddedFields ¶
func (m *DeptMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DeptMutation) AddedIDs ¶
func (m *DeptMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DeptMutation) AddedSort ¶
func (m *DeptMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*DeptMutation) AddedState ¶
func (m *DeptMutation) AddedState() (r int32, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*DeptMutation) Ancestors ¶
func (m *DeptMutation) Ancestors() (r []int, exists bool)
Ancestors returns the value of the "ancestors" field in the mutation.
func (*DeptMutation) AncestorsCleared ¶
func (m *DeptMutation) AncestorsCleared() bool
AncestorsCleared returns if the "ancestors" field was cleared in this mutation.
func (*DeptMutation) AppendAncestors ¶
func (m *DeptMutation) AppendAncestors(i []int)
AppendAncestors adds i to the "ancestors" field.
func (*DeptMutation) AppendedAncestors ¶
func (m *DeptMutation) AppendedAncestors() ([]int, bool)
AppendedAncestors returns the list of values that were appended to the "ancestors" field in this mutation.
func (*DeptMutation) ChildrenCleared ¶
func (m *DeptMutation) ChildrenCleared() bool
ChildrenCleared reports if the "children" edge to the Dept entity was cleared.
func (*DeptMutation) ChildrenIDs ¶
func (m *DeptMutation) ChildrenIDs() (ids []uint32)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*DeptMutation) ClearAncestors ¶
func (m *DeptMutation) ClearAncestors()
ClearAncestors clears the value of the "ancestors" field.
func (*DeptMutation) ClearChildren ¶
func (m *DeptMutation) ClearChildren()
ClearChildren clears the "children" edge to the Dept entity.
func (*DeptMutation) ClearCreatedAt ¶
func (m *DeptMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*DeptMutation) ClearDeletedAt ¶
func (m *DeptMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DeptMutation) ClearEdge ¶
func (m *DeptMutation) 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 (*DeptMutation) ClearField ¶
func (m *DeptMutation) 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 (*DeptMutation) ClearParent ¶
func (m *DeptMutation) ClearParent()
ClearParent clears the "parent" edge to the Dept entity.
func (*DeptMutation) ClearParentID ¶
func (m *DeptMutation) ClearParentID()
ClearParentID clears the value of the "parent_id" field.
func (*DeptMutation) ClearRemark ¶
func (m *DeptMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*DeptMutation) ClearUpdatedAt ¶
func (m *DeptMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DeptMutation) ClearedEdges ¶
func (m *DeptMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DeptMutation) ClearedFields ¶
func (m *DeptMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DeptMutation) Client ¶
func (m DeptMutation) 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 (*DeptMutation) CreatedAt ¶
func (m *DeptMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DeptMutation) CreatedAtCleared ¶
func (m *DeptMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*DeptMutation) DeletedAt ¶
func (m *DeptMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*DeptMutation) DeletedAtCleared ¶
func (m *DeptMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*DeptMutation) EdgeCleared ¶
func (m *DeptMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DeptMutation) Field ¶
func (m *DeptMutation) 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 (*DeptMutation) FieldCleared ¶
func (m *DeptMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DeptMutation) Fields ¶
func (m *DeptMutation) 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 (*DeptMutation) Filter ¶
func (m *DeptMutation) Filter() *DeptFilter
Filter returns an entql.Where implementation to apply filters on the DeptMutation builder.
func (*DeptMutation) ID ¶
func (m *DeptMutation) ID() (id uint32, 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 (*DeptMutation) IDs ¶
func (m *DeptMutation) IDs(ctx context.Context) ([]uint32, 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 (*DeptMutation) Name ¶
func (m *DeptMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*DeptMutation) OldAncestors ¶
func (m *DeptMutation) OldAncestors(ctx context.Context) (v []int, err error)
OldAncestors returns the old "ancestors" field's value of the Dept entity. If the Dept 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 (*DeptMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Dept entity. If the Dept 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 (*DeptMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Dept entity. If the Dept 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 (*DeptMutation) 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 (*DeptMutation) OldName ¶
func (m *DeptMutation) OldName(ctx context.Context) (v *string, err error)
OldName returns the old "name" field's value of the Dept entity. If the Dept 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 (*DeptMutation) OldParentID ¶
func (m *DeptMutation) OldParentID(ctx context.Context) (v *uint32, err error)
OldParentID returns the old "parent_id" field's value of the Dept entity. If the Dept 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 (*DeptMutation) OldRemark ¶
func (m *DeptMutation) OldRemark(ctx context.Context) (v *string, err error)
OldRemark returns the old "remark" field's value of the Dept entity. If the Dept 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 (*DeptMutation) OldSort ¶
func (m *DeptMutation) OldSort(ctx context.Context) (v *int32, err error)
OldSort returns the old "sort" field's value of the Dept entity. If the Dept 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 (*DeptMutation) OldState ¶
func (m *DeptMutation) OldState(ctx context.Context) (v *int32, err error)
OldState returns the old "state" field's value of the Dept entity. If the Dept 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 (*DeptMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Dept entity. If the Dept 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 (*DeptMutation) ParentCleared ¶
func (m *DeptMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the Dept entity was cleared.
func (*DeptMutation) ParentID ¶
func (m *DeptMutation) ParentID() (r uint32, exists bool)
ParentID returns the value of the "parent_id" field in the mutation.
func (*DeptMutation) ParentIDCleared ¶
func (m *DeptMutation) ParentIDCleared() bool
ParentIDCleared returns if the "parent_id" field was cleared in this mutation.
func (*DeptMutation) ParentIDs ¶
func (m *DeptMutation) ParentIDs() (ids []uint32)
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 (*DeptMutation) Remark ¶
func (m *DeptMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*DeptMutation) RemarkCleared ¶
func (m *DeptMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*DeptMutation) RemoveChildIDs ¶
func (m *DeptMutation) RemoveChildIDs(ids ...uint32)
RemoveChildIDs removes the "children" edge to the Dept entity by IDs.
func (*DeptMutation) RemovedChildrenIDs ¶
func (m *DeptMutation) RemovedChildrenIDs() (ids []uint32)
RemovedChildren returns the removed IDs of the "children" edge to the Dept entity.
func (*DeptMutation) RemovedEdges ¶
func (m *DeptMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DeptMutation) RemovedIDs ¶
func (m *DeptMutation) 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 (*DeptMutation) ResetAncestors ¶
func (m *DeptMutation) ResetAncestors()
ResetAncestors resets all changes to the "ancestors" field.
func (*DeptMutation) ResetChildren ¶
func (m *DeptMutation) ResetChildren()
ResetChildren resets all changes to the "children" edge.
func (*DeptMutation) ResetCreatedAt ¶
func (m *DeptMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DeptMutation) ResetDeletedAt ¶
func (m *DeptMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*DeptMutation) ResetEdge ¶
func (m *DeptMutation) 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 (*DeptMutation) ResetField ¶
func (m *DeptMutation) 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 (*DeptMutation) ResetName ¶
func (m *DeptMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*DeptMutation) ResetParent ¶
func (m *DeptMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*DeptMutation) ResetParentID ¶
func (m *DeptMutation) ResetParentID()
ResetParentID resets all changes to the "parent_id" field.
func (*DeptMutation) ResetRemark ¶
func (m *DeptMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*DeptMutation) ResetSort ¶
func (m *DeptMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*DeptMutation) ResetState ¶
func (m *DeptMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*DeptMutation) ResetUpdatedAt ¶
func (m *DeptMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DeptMutation) SetAncestors ¶
func (m *DeptMutation) SetAncestors(i []int)
SetAncestors sets the "ancestors" field.
func (*DeptMutation) SetCreatedAt ¶
func (m *DeptMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DeptMutation) SetDeletedAt ¶
func (m *DeptMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*DeptMutation) SetField ¶
func (m *DeptMutation) 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 (*DeptMutation) SetID ¶
func (m *DeptMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Dept entities.
func (*DeptMutation) SetName ¶
func (m *DeptMutation) SetName(s string)
SetName sets the "name" field.
func (*DeptMutation) SetOp ¶
func (m *DeptMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DeptMutation) SetParentID ¶
func (m *DeptMutation) SetParentID(u uint32)
SetParentID sets the "parent_id" field.
func (*DeptMutation) SetRemark ¶
func (m *DeptMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*DeptMutation) SetSort ¶
func (m *DeptMutation) SetSort(i int32)
SetSort sets the "sort" field.
func (*DeptMutation) SetState ¶
func (m *DeptMutation) SetState(i int32)
SetState sets the "state" field.
func (*DeptMutation) SetUpdatedAt ¶
func (m *DeptMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DeptMutation) Sort ¶
func (m *DeptMutation) Sort() (r int32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*DeptMutation) State ¶
func (m *DeptMutation) State() (r int32, exists bool)
State returns the value of the "state" field in the mutation.
func (DeptMutation) Tx ¶
func (m DeptMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DeptMutation) Type ¶
func (m *DeptMutation) Type() string
Type returns the node type of this mutation (Dept).
func (*DeptMutation) UpdatedAt ¶
func (m *DeptMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DeptMutation) UpdatedAtCleared ¶
func (m *DeptMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*DeptMutation) Where ¶
func (m *DeptMutation) Where(ps ...predicate.Dept)
Where appends a list predicates to the DeptMutation builder.
func (*DeptMutation) WhereP ¶
func (m *DeptMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DeptMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DeptQuery ¶
type DeptQuery struct {
// contains filtered or unexported fields
}
DeptQuery is the builder for querying Dept entities.
func (*DeptQuery) Aggregate ¶
func (dq *DeptQuery) Aggregate(fns ...AggregateFunc) *DeptSelect
Aggregate returns a DeptSelect configured with the given aggregations.
func (*DeptQuery) Clone ¶
Clone returns a duplicate of the DeptQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DeptQuery) Filter ¶
func (dq *DeptQuery) Filter() *DeptFilter
Filter returns a Filter implementation to apply filters on the DeptQuery builder.
func (*DeptQuery) First ¶
First returns the first Dept entity from the query. Returns a *NotFoundError when no Dept was found.
func (*DeptQuery) FirstID ¶
FirstID returns the first Dept ID from the query. Returns a *NotFoundError when no Dept ID was found.
func (*DeptQuery) GroupBy ¶
func (dq *DeptQuery) GroupBy(field string, fields ...string) *DeptGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Dept.Query(). GroupBy(dept.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DeptQuery) Modify ¶
func (dq *DeptQuery) Modify(modifiers ...func(s *sql.Selector)) *DeptSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*DeptQuery) Only ¶
Only returns a single Dept entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Dept entity is found. Returns a *NotFoundError when no Dept entities are found.
func (*DeptQuery) OnlyID ¶
OnlyID is like Only, but returns the only Dept ID in the query. Returns a *NotSingularError when more than one Dept ID is found. Returns a *NotFoundError when no entities are found.
func (*DeptQuery) Order ¶
func (dq *DeptQuery) Order(o ...dept.OrderOption) *DeptQuery
Order specifies how the records should be ordered.
func (*DeptQuery) QueryChildren ¶
QueryChildren chains the current query on the "children" edge.
func (*DeptQuery) QueryParent ¶
QueryParent chains the current query on the "parent" edge.
func (*DeptQuery) Select ¶
func (dq *DeptQuery) Select(fields ...string) *DeptSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Dept.Query(). Select(dept.FieldCreatedAt). Scan(ctx, &v)
func (*DeptQuery) 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 (*DeptQuery) WithChildren ¶
WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeptQuery) WithParent ¶
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 DeptSelect ¶
type DeptSelect struct { *DeptQuery // contains filtered or unexported fields }
DeptSelect is the builder for selecting fields of Dept entities.
func (*DeptSelect) Aggregate ¶
func (ds *DeptSelect) Aggregate(fns ...AggregateFunc) *DeptSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DeptSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DeptSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DeptSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DeptSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DeptSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DeptSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DeptSelect) Modify ¶
func (ds *DeptSelect) Modify(modifiers ...func(s *sql.Selector)) *DeptSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*DeptSelect) Scan ¶
func (ds *DeptSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DeptSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DeptUpdate ¶
type DeptUpdate struct {
// contains filtered or unexported fields
}
DeptUpdate is the builder for updating Dept entities.
func (*DeptUpdate) AddChildIDs ¶
func (du *DeptUpdate) AddChildIDs(ids ...uint32) *DeptUpdate
AddChildIDs adds the "children" edge to the Dept entity by IDs.
func (*DeptUpdate) AddChildren ¶
func (du *DeptUpdate) AddChildren(d ...*Dept) *DeptUpdate
AddChildren adds the "children" edges to the Dept entity.
func (*DeptUpdate) AddSort ¶
func (du *DeptUpdate) AddSort(i int32) *DeptUpdate
AddSort adds i to the "sort" field.
func (*DeptUpdate) AddState ¶
func (du *DeptUpdate) AddState(i int32) *DeptUpdate
AddState adds i to the "state" field.
func (*DeptUpdate) AppendAncestors ¶
func (du *DeptUpdate) AppendAncestors(i []int) *DeptUpdate
AppendAncestors appends i to the "ancestors" field.
func (*DeptUpdate) ClearAncestors ¶
func (du *DeptUpdate) ClearAncestors() *DeptUpdate
ClearAncestors clears the value of the "ancestors" field.
func (*DeptUpdate) ClearChildren ¶
func (du *DeptUpdate) ClearChildren() *DeptUpdate
ClearChildren clears all "children" edges to the Dept entity.
func (*DeptUpdate) ClearDeletedAt ¶
func (du *DeptUpdate) ClearDeletedAt() *DeptUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DeptUpdate) ClearParent ¶
func (du *DeptUpdate) ClearParent() *DeptUpdate
ClearParent clears the "parent" edge to the Dept entity.
func (*DeptUpdate) ClearParentID ¶
func (du *DeptUpdate) ClearParentID() *DeptUpdate
ClearParentID clears the value of the "parent_id" field.
func (*DeptUpdate) ClearRemark ¶
func (du *DeptUpdate) ClearRemark() *DeptUpdate
ClearRemark clears the value of the "remark" field.
func (*DeptUpdate) ClearUpdatedAt ¶
func (du *DeptUpdate) ClearUpdatedAt() *DeptUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DeptUpdate) Exec ¶
func (du *DeptUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DeptUpdate) ExecX ¶
func (du *DeptUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeptUpdate) Modify ¶
func (du *DeptUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeptUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*DeptUpdate) Mutation ¶
func (du *DeptUpdate) Mutation() *DeptMutation
Mutation returns the DeptMutation object of the builder.
func (*DeptUpdate) RemoveChildIDs ¶
func (du *DeptUpdate) RemoveChildIDs(ids ...uint32) *DeptUpdate
RemoveChildIDs removes the "children" edge to Dept entities by IDs.
func (*DeptUpdate) RemoveChildren ¶
func (du *DeptUpdate) RemoveChildren(d ...*Dept) *DeptUpdate
RemoveChildren removes "children" edges to Dept entities.
func (*DeptUpdate) Save ¶
func (du *DeptUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DeptUpdate) SaveX ¶
func (du *DeptUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DeptUpdate) SetAncestors ¶
func (du *DeptUpdate) SetAncestors(i []int) *DeptUpdate
SetAncestors sets the "ancestors" field.
func (*DeptUpdate) SetDeletedAt ¶
func (du *DeptUpdate) SetDeletedAt(t time.Time) *DeptUpdate
SetDeletedAt sets the "deleted_at" field.
func (*DeptUpdate) SetName ¶
func (du *DeptUpdate) SetName(s string) *DeptUpdate
SetName sets the "name" field.
func (*DeptUpdate) SetNillableDeletedAt ¶
func (du *DeptUpdate) SetNillableDeletedAt(t *time.Time) *DeptUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DeptUpdate) SetNillableName ¶
func (du *DeptUpdate) SetNillableName(s *string) *DeptUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*DeptUpdate) SetNillableParentID ¶
func (du *DeptUpdate) SetNillableParentID(u *uint32) *DeptUpdate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*DeptUpdate) SetNillableRemark ¶
func (du *DeptUpdate) SetNillableRemark(s *string) *DeptUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*DeptUpdate) SetNillableSort ¶
func (du *DeptUpdate) SetNillableSort(i *int32) *DeptUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*DeptUpdate) SetNillableState ¶
func (du *DeptUpdate) SetNillableState(i *int32) *DeptUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*DeptUpdate) SetNillableUpdatedAt ¶
func (du *DeptUpdate) SetNillableUpdatedAt(t *time.Time) *DeptUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DeptUpdate) SetParent ¶
func (du *DeptUpdate) SetParent(d *Dept) *DeptUpdate
SetParent sets the "parent" edge to the Dept entity.
func (*DeptUpdate) SetParentID ¶
func (du *DeptUpdate) SetParentID(u uint32) *DeptUpdate
SetParentID sets the "parent_id" field.
func (*DeptUpdate) SetRemark ¶
func (du *DeptUpdate) SetRemark(s string) *DeptUpdate
SetRemark sets the "remark" field.
func (*DeptUpdate) SetSort ¶
func (du *DeptUpdate) SetSort(i int32) *DeptUpdate
SetSort sets the "sort" field.
func (*DeptUpdate) SetState ¶
func (du *DeptUpdate) SetState(i int32) *DeptUpdate
SetState sets the "state" field.
func (*DeptUpdate) SetUpdatedAt ¶
func (du *DeptUpdate) SetUpdatedAt(t time.Time) *DeptUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DeptUpdate) Where ¶
func (du *DeptUpdate) Where(ps ...predicate.Dept) *DeptUpdate
Where appends a list predicates to the DeptUpdate builder.
type DeptUpdateOne ¶
type DeptUpdateOne struct {
// contains filtered or unexported fields
}
DeptUpdateOne is the builder for updating a single Dept entity.
func (*DeptUpdateOne) AddChildIDs ¶
func (duo *DeptUpdateOne) AddChildIDs(ids ...uint32) *DeptUpdateOne
AddChildIDs adds the "children" edge to the Dept entity by IDs.
func (*DeptUpdateOne) AddChildren ¶
func (duo *DeptUpdateOne) AddChildren(d ...*Dept) *DeptUpdateOne
AddChildren adds the "children" edges to the Dept entity.
func (*DeptUpdateOne) AddSort ¶
func (duo *DeptUpdateOne) AddSort(i int32) *DeptUpdateOne
AddSort adds i to the "sort" field.
func (*DeptUpdateOne) AddState ¶
func (duo *DeptUpdateOne) AddState(i int32) *DeptUpdateOne
AddState adds i to the "state" field.
func (*DeptUpdateOne) AppendAncestors ¶
func (duo *DeptUpdateOne) AppendAncestors(i []int) *DeptUpdateOne
AppendAncestors appends i to the "ancestors" field.
func (*DeptUpdateOne) ClearAncestors ¶
func (duo *DeptUpdateOne) ClearAncestors() *DeptUpdateOne
ClearAncestors clears the value of the "ancestors" field.
func (*DeptUpdateOne) ClearChildren ¶
func (duo *DeptUpdateOne) ClearChildren() *DeptUpdateOne
ClearChildren clears all "children" edges to the Dept entity.
func (*DeptUpdateOne) ClearDeletedAt ¶
func (duo *DeptUpdateOne) ClearDeletedAt() *DeptUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DeptUpdateOne) ClearParent ¶
func (duo *DeptUpdateOne) ClearParent() *DeptUpdateOne
ClearParent clears the "parent" edge to the Dept entity.
func (*DeptUpdateOne) ClearParentID ¶
func (duo *DeptUpdateOne) ClearParentID() *DeptUpdateOne
ClearParentID clears the value of the "parent_id" field.
func (*DeptUpdateOne) ClearRemark ¶
func (duo *DeptUpdateOne) ClearRemark() *DeptUpdateOne
ClearRemark clears the value of the "remark" field.
func (*DeptUpdateOne) ClearUpdatedAt ¶
func (duo *DeptUpdateOne) ClearUpdatedAt() *DeptUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DeptUpdateOne) Exec ¶
func (duo *DeptUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DeptUpdateOne) ExecX ¶
func (duo *DeptUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeptUpdateOne) Modify ¶
func (duo *DeptUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *DeptUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*DeptUpdateOne) Mutation ¶
func (duo *DeptUpdateOne) Mutation() *DeptMutation
Mutation returns the DeptMutation object of the builder.
func (*DeptUpdateOne) RemoveChildIDs ¶
func (duo *DeptUpdateOne) RemoveChildIDs(ids ...uint32) *DeptUpdateOne
RemoveChildIDs removes the "children" edge to Dept entities by IDs.
func (*DeptUpdateOne) RemoveChildren ¶
func (duo *DeptUpdateOne) RemoveChildren(d ...*Dept) *DeptUpdateOne
RemoveChildren removes "children" edges to Dept entities.
func (*DeptUpdateOne) Save ¶
func (duo *DeptUpdateOne) Save(ctx context.Context) (*Dept, error)
Save executes the query and returns the updated Dept entity.
func (*DeptUpdateOne) SaveX ¶
func (duo *DeptUpdateOne) SaveX(ctx context.Context) *Dept
SaveX is like Save, but panics if an error occurs.
func (*DeptUpdateOne) Select ¶
func (duo *DeptUpdateOne) Select(field string, fields ...string) *DeptUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DeptUpdateOne) SetAncestors ¶
func (duo *DeptUpdateOne) SetAncestors(i []int) *DeptUpdateOne
SetAncestors sets the "ancestors" field.
func (*DeptUpdateOne) SetDeletedAt ¶
func (duo *DeptUpdateOne) SetDeletedAt(t time.Time) *DeptUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*DeptUpdateOne) SetName ¶
func (duo *DeptUpdateOne) SetName(s string) *DeptUpdateOne
SetName sets the "name" field.
func (*DeptUpdateOne) SetNillableDeletedAt ¶
func (duo *DeptUpdateOne) SetNillableDeletedAt(t *time.Time) *DeptUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*DeptUpdateOne) SetNillableName ¶
func (duo *DeptUpdateOne) SetNillableName(s *string) *DeptUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*DeptUpdateOne) SetNillableParentID ¶
func (duo *DeptUpdateOne) SetNillableParentID(u *uint32) *DeptUpdateOne
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*DeptUpdateOne) SetNillableRemark ¶
func (duo *DeptUpdateOne) SetNillableRemark(s *string) *DeptUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*DeptUpdateOne) SetNillableSort ¶
func (duo *DeptUpdateOne) SetNillableSort(i *int32) *DeptUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*DeptUpdateOne) SetNillableState ¶
func (duo *DeptUpdateOne) SetNillableState(i *int32) *DeptUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*DeptUpdateOne) SetNillableUpdatedAt ¶
func (duo *DeptUpdateOne) SetNillableUpdatedAt(t *time.Time) *DeptUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DeptUpdateOne) SetParent ¶
func (duo *DeptUpdateOne) SetParent(d *Dept) *DeptUpdateOne
SetParent sets the "parent" edge to the Dept entity.
func (*DeptUpdateOne) SetParentID ¶
func (duo *DeptUpdateOne) SetParentID(u uint32) *DeptUpdateOne
SetParentID sets the "parent_id" field.
func (*DeptUpdateOne) SetRemark ¶
func (duo *DeptUpdateOne) SetRemark(s string) *DeptUpdateOne
SetRemark sets the "remark" field.
func (*DeptUpdateOne) SetSort ¶
func (duo *DeptUpdateOne) SetSort(i int32) *DeptUpdateOne
SetSort sets the "sort" field.
func (*DeptUpdateOne) SetState ¶
func (duo *DeptUpdateOne) SetState(i int32) *DeptUpdateOne
SetState sets the "state" field.
func (*DeptUpdateOne) SetUpdatedAt ¶
func (duo *DeptUpdateOne) SetUpdatedAt(t time.Time) *DeptUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DeptUpdateOne) Where ¶
func (duo *DeptUpdateOne) Where(ps ...predicate.Dept) *DeptUpdateOne
Where appends a list predicates to the DeptUpdate builder.
type DeptUpsert ¶
DeptUpsert is the "OnConflict" setter.
func (*DeptUpsert) AddSort ¶
func (u *DeptUpsert) AddSort(v int32) *DeptUpsert
AddSort adds v to the "sort" field.
func (*DeptUpsert) AddState ¶
func (u *DeptUpsert) AddState(v int32) *DeptUpsert
AddState adds v to the "state" field.
func (*DeptUpsert) ClearAncestors ¶
func (u *DeptUpsert) ClearAncestors() *DeptUpsert
ClearAncestors clears the value of the "ancestors" field.
func (*DeptUpsert) ClearDeletedAt ¶
func (u *DeptUpsert) ClearDeletedAt() *DeptUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DeptUpsert) ClearParentID ¶
func (u *DeptUpsert) ClearParentID() *DeptUpsert
ClearParentID clears the value of the "parent_id" field.
func (*DeptUpsert) ClearRemark ¶
func (u *DeptUpsert) ClearRemark() *DeptUpsert
ClearRemark clears the value of the "remark" field.
func (*DeptUpsert) ClearUpdatedAt ¶
func (u *DeptUpsert) ClearUpdatedAt() *DeptUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DeptUpsert) SetAncestors ¶
func (u *DeptUpsert) SetAncestors(v []int) *DeptUpsert
SetAncestors sets the "ancestors" field.
func (*DeptUpsert) SetDeletedAt ¶
func (u *DeptUpsert) SetDeletedAt(v time.Time) *DeptUpsert
SetDeletedAt sets the "deleted_at" field.
func (*DeptUpsert) SetName ¶
func (u *DeptUpsert) SetName(v string) *DeptUpsert
SetName sets the "name" field.
func (*DeptUpsert) SetParentID ¶
func (u *DeptUpsert) SetParentID(v uint32) *DeptUpsert
SetParentID sets the "parent_id" field.
func (*DeptUpsert) SetRemark ¶
func (u *DeptUpsert) SetRemark(v string) *DeptUpsert
SetRemark sets the "remark" field.
func (*DeptUpsert) SetSort ¶
func (u *DeptUpsert) SetSort(v int32) *DeptUpsert
SetSort sets the "sort" field.
func (*DeptUpsert) SetState ¶
func (u *DeptUpsert) SetState(v int32) *DeptUpsert
SetState sets the "state" field.
func (*DeptUpsert) SetUpdatedAt ¶
func (u *DeptUpsert) SetUpdatedAt(v time.Time) *DeptUpsert
SetUpdatedAt sets the "updated_at" field.
func (*DeptUpsert) UpdateAncestors ¶
func (u *DeptUpsert) UpdateAncestors() *DeptUpsert
UpdateAncestors sets the "ancestors" field to the value that was provided on create.
func (*DeptUpsert) UpdateDeletedAt ¶
func (u *DeptUpsert) UpdateDeletedAt() *DeptUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*DeptUpsert) UpdateName ¶
func (u *DeptUpsert) UpdateName() *DeptUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*DeptUpsert) UpdateParentID ¶
func (u *DeptUpsert) UpdateParentID() *DeptUpsert
UpdateParentID sets the "parent_id" field to the value that was provided on create.
func (*DeptUpsert) UpdateRemark ¶
func (u *DeptUpsert) UpdateRemark() *DeptUpsert
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*DeptUpsert) UpdateSort ¶
func (u *DeptUpsert) UpdateSort() *DeptUpsert
UpdateSort sets the "sort" field to the value that was provided on create.
func (*DeptUpsert) UpdateState ¶
func (u *DeptUpsert) UpdateState() *DeptUpsert
UpdateState sets the "state" field to the value that was provided on create.
func (*DeptUpsert) UpdateUpdatedAt ¶
func (u *DeptUpsert) UpdateUpdatedAt() *DeptUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type DeptUpsertBulk ¶
type DeptUpsertBulk struct {
// contains filtered or unexported fields
}
DeptUpsertBulk is the builder for "upsert"-ing a bulk of Dept nodes.
func (*DeptUpsertBulk) AddSort ¶
func (u *DeptUpsertBulk) AddSort(v int32) *DeptUpsertBulk
AddSort adds v to the "sort" field.
func (*DeptUpsertBulk) AddState ¶
func (u *DeptUpsertBulk) AddState(v int32) *DeptUpsertBulk
AddState adds v to the "state" field.
func (*DeptUpsertBulk) ClearAncestors ¶
func (u *DeptUpsertBulk) ClearAncestors() *DeptUpsertBulk
ClearAncestors clears the value of the "ancestors" field.
func (*DeptUpsertBulk) ClearDeletedAt ¶
func (u *DeptUpsertBulk) ClearDeletedAt() *DeptUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DeptUpsertBulk) ClearParentID ¶
func (u *DeptUpsertBulk) ClearParentID() *DeptUpsertBulk
ClearParentID clears the value of the "parent_id" field.
func (*DeptUpsertBulk) ClearRemark ¶
func (u *DeptUpsertBulk) ClearRemark() *DeptUpsertBulk
ClearRemark clears the value of the "remark" field.
func (*DeptUpsertBulk) ClearUpdatedAt ¶
func (u *DeptUpsertBulk) ClearUpdatedAt() *DeptUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DeptUpsertBulk) DoNothing ¶
func (u *DeptUpsertBulk) DoNothing() *DeptUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DeptUpsertBulk) Exec ¶
func (u *DeptUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DeptUpsertBulk) ExecX ¶
func (u *DeptUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeptUpsertBulk) Ignore ¶
func (u *DeptUpsertBulk) Ignore() *DeptUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Dept.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DeptUpsertBulk) SetAncestors ¶
func (u *DeptUpsertBulk) SetAncestors(v []int) *DeptUpsertBulk
SetAncestors sets the "ancestors" field.
func (*DeptUpsertBulk) SetDeletedAt ¶
func (u *DeptUpsertBulk) SetDeletedAt(v time.Time) *DeptUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*DeptUpsertBulk) SetName ¶
func (u *DeptUpsertBulk) SetName(v string) *DeptUpsertBulk
SetName sets the "name" field.
func (*DeptUpsertBulk) SetParentID ¶
func (u *DeptUpsertBulk) SetParentID(v uint32) *DeptUpsertBulk
SetParentID sets the "parent_id" field.
func (*DeptUpsertBulk) SetRemark ¶
func (u *DeptUpsertBulk) SetRemark(v string) *DeptUpsertBulk
SetRemark sets the "remark" field.
func (*DeptUpsertBulk) SetSort ¶
func (u *DeptUpsertBulk) SetSort(v int32) *DeptUpsertBulk
SetSort sets the "sort" field.
func (*DeptUpsertBulk) SetState ¶
func (u *DeptUpsertBulk) SetState(v int32) *DeptUpsertBulk
SetState sets the "state" field.
func (*DeptUpsertBulk) SetUpdatedAt ¶
func (u *DeptUpsertBulk) SetUpdatedAt(v time.Time) *DeptUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*DeptUpsertBulk) Update ¶
func (u *DeptUpsertBulk) Update(set func(*DeptUpsert)) *DeptUpsertBulk
Update allows overriding fields `UPDATE` values. See the DeptCreateBulk.OnConflict documentation for more info.
func (*DeptUpsertBulk) UpdateAncestors ¶
func (u *DeptUpsertBulk) UpdateAncestors() *DeptUpsertBulk
UpdateAncestors sets the "ancestors" field to the value that was provided on create.
func (*DeptUpsertBulk) UpdateDeletedAt ¶
func (u *DeptUpsertBulk) UpdateDeletedAt() *DeptUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*DeptUpsertBulk) UpdateName ¶
func (u *DeptUpsertBulk) UpdateName() *DeptUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*DeptUpsertBulk) UpdateNewValues ¶
func (u *DeptUpsertBulk) UpdateNewValues() *DeptUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Dept.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(dept.FieldID) }), ). Exec(ctx)
func (*DeptUpsertBulk) UpdateParentID ¶
func (u *DeptUpsertBulk) UpdateParentID() *DeptUpsertBulk
UpdateParentID sets the "parent_id" field to the value that was provided on create.
func (*DeptUpsertBulk) UpdateRemark ¶
func (u *DeptUpsertBulk) UpdateRemark() *DeptUpsertBulk
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*DeptUpsertBulk) UpdateSort ¶
func (u *DeptUpsertBulk) UpdateSort() *DeptUpsertBulk
UpdateSort sets the "sort" field to the value that was provided on create.
func (*DeptUpsertBulk) UpdateState ¶
func (u *DeptUpsertBulk) UpdateState() *DeptUpsertBulk
UpdateState sets the "state" field to the value that was provided on create.
func (*DeptUpsertBulk) UpdateUpdatedAt ¶
func (u *DeptUpsertBulk) UpdateUpdatedAt() *DeptUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type DeptUpsertOne ¶
type DeptUpsertOne struct {
// contains filtered or unexported fields
}
DeptUpsertOne is the builder for "upsert"-ing
one Dept node.
func (*DeptUpsertOne) AddSort ¶
func (u *DeptUpsertOne) AddSort(v int32) *DeptUpsertOne
AddSort adds v to the "sort" field.
func (*DeptUpsertOne) AddState ¶
func (u *DeptUpsertOne) AddState(v int32) *DeptUpsertOne
AddState adds v to the "state" field.
func (*DeptUpsertOne) ClearAncestors ¶
func (u *DeptUpsertOne) ClearAncestors() *DeptUpsertOne
ClearAncestors clears the value of the "ancestors" field.
func (*DeptUpsertOne) ClearDeletedAt ¶
func (u *DeptUpsertOne) ClearDeletedAt() *DeptUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*DeptUpsertOne) ClearParentID ¶
func (u *DeptUpsertOne) ClearParentID() *DeptUpsertOne
ClearParentID clears the value of the "parent_id" field.
func (*DeptUpsertOne) ClearRemark ¶
func (u *DeptUpsertOne) ClearRemark() *DeptUpsertOne
ClearRemark clears the value of the "remark" field.
func (*DeptUpsertOne) ClearUpdatedAt ¶
func (u *DeptUpsertOne) ClearUpdatedAt() *DeptUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DeptUpsertOne) DoNothing ¶
func (u *DeptUpsertOne) DoNothing() *DeptUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DeptUpsertOne) Exec ¶
func (u *DeptUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*DeptUpsertOne) ExecX ¶
func (u *DeptUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeptUpsertOne) ID ¶
func (u *DeptUpsertOne) ID(ctx context.Context) (id uint32, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*DeptUpsertOne) IDX ¶
func (u *DeptUpsertOne) IDX(ctx context.Context) uint32
IDX is like ID, but panics if an error occurs.
func (*DeptUpsertOne) Ignore ¶
func (u *DeptUpsertOne) Ignore() *DeptUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Dept.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DeptUpsertOne) SetAncestors ¶
func (u *DeptUpsertOne) SetAncestors(v []int) *DeptUpsertOne
SetAncestors sets the "ancestors" field.
func (*DeptUpsertOne) SetDeletedAt ¶
func (u *DeptUpsertOne) SetDeletedAt(v time.Time) *DeptUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*DeptUpsertOne) SetName ¶
func (u *DeptUpsertOne) SetName(v string) *DeptUpsertOne
SetName sets the "name" field.
func (*DeptUpsertOne) SetParentID ¶
func (u *DeptUpsertOne) SetParentID(v uint32) *DeptUpsertOne
SetParentID sets the "parent_id" field.
func (*DeptUpsertOne) SetRemark ¶
func (u *DeptUpsertOne) SetRemark(v string) *DeptUpsertOne
SetRemark sets the "remark" field.
func (*DeptUpsertOne) SetSort ¶
func (u *DeptUpsertOne) SetSort(v int32) *DeptUpsertOne
SetSort sets the "sort" field.
func (*DeptUpsertOne) SetState ¶
func (u *DeptUpsertOne) SetState(v int32) *DeptUpsertOne
SetState sets the "state" field.
func (*DeptUpsertOne) SetUpdatedAt ¶
func (u *DeptUpsertOne) SetUpdatedAt(v time.Time) *DeptUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*DeptUpsertOne) Update ¶
func (u *DeptUpsertOne) Update(set func(*DeptUpsert)) *DeptUpsertOne
Update allows overriding fields `UPDATE` values. See the DeptCreate.OnConflict documentation for more info.
func (*DeptUpsertOne) UpdateAncestors ¶
func (u *DeptUpsertOne) UpdateAncestors() *DeptUpsertOne
UpdateAncestors sets the "ancestors" field to the value that was provided on create.
func (*DeptUpsertOne) UpdateDeletedAt ¶
func (u *DeptUpsertOne) UpdateDeletedAt() *DeptUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*DeptUpsertOne) UpdateName ¶
func (u *DeptUpsertOne) UpdateName() *DeptUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*DeptUpsertOne) UpdateNewValues ¶
func (u *DeptUpsertOne) UpdateNewValues() *DeptUpsertOne
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.Dept.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(dept.FieldID) }), ). Exec(ctx)
func (*DeptUpsertOne) UpdateParentID ¶
func (u *DeptUpsertOne) UpdateParentID() *DeptUpsertOne
UpdateParentID sets the "parent_id" field to the value that was provided on create.
func (*DeptUpsertOne) UpdateRemark ¶
func (u *DeptUpsertOne) UpdateRemark() *DeptUpsertOne
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*DeptUpsertOne) UpdateSort ¶
func (u *DeptUpsertOne) UpdateSort() *DeptUpsertOne
UpdateSort sets the "sort" field to the value that was provided on create.
func (*DeptUpsertOne) UpdateState ¶
func (u *DeptUpsertOne) UpdateState() *DeptUpsertOne
UpdateState sets the "state" field to the value that was provided on create.
func (*DeptUpsertOne) UpdateUpdatedAt ¶
func (u *DeptUpsertOne) UpdateUpdatedAt() *DeptUpsertOne
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 Member ¶
type Member struct { // ID of the ent. // id ID uint32 `json:"id,omitempty"` // 创建时间 CreatedAt *time.Time `json:"created_at,omitempty"` // 更新时间 UpdatedAt *time.Time `json:"updated_at,omitempty"` // 删除时间 DeletedAt *time.Time `json:"deleted_at,omitempty"` // 备注 Remark *string `json:"remark,omitempty"` // 排序 Sort *int32 `json:"sort,omitempty"` // 状态 0 UNSPECIFIED 开启 1 -> ACTIVE 关闭 2 -> INACTIVE, 禁用 3 -> BANNED State *int32 `json:"state,omitempty"` // 会员名 Username string `json:"username,omitempty"` // 密码 Password string `json:"password,omitempty"` // 昵称 Nickname string `json:"nickname,omitempty"` // 手机号 Phone string `json:"phone,omitempty"` // 电子邮箱 Email string `json:"email,omitempty"` // 头像 Avatar string `json:"avatar,omitempty"` // 个人说明 Description string `json:"description,omitempty"` // contains filtered or unexported fields }
会员表
func (*Member) Unwrap ¶
Unwrap unwraps the Member 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 (*Member) Update ¶
func (m *Member) Update() *MemberUpdateOne
Update returns a builder for updating this Member. Note that you need to call Member.Unwrap() before calling this method if this Member was returned from a transaction, and the transaction was committed or rolled back.
type MemberClient ¶
type MemberClient struct {
// contains filtered or unexported fields
}
MemberClient is a client for the Member schema.
func NewMemberClient ¶
func NewMemberClient(c config) *MemberClient
NewMemberClient returns a client for the Member from the given config.
func (*MemberClient) Create ¶
func (c *MemberClient) Create() *MemberCreate
Create returns a builder for creating a Member entity.
func (*MemberClient) CreateBulk ¶
func (c *MemberClient) CreateBulk(builders ...*MemberCreate) *MemberCreateBulk
CreateBulk returns a builder for creating a bulk of Member entities.
func (*MemberClient) Delete ¶
func (c *MemberClient) Delete() *MemberDelete
Delete returns a delete builder for Member.
func (*MemberClient) DeleteOne ¶
func (c *MemberClient) DeleteOne(m *Member) *MemberDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MemberClient) DeleteOneID ¶
func (c *MemberClient) DeleteOneID(id uint32) *MemberDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MemberClient) GetX ¶
func (c *MemberClient) GetX(ctx context.Context, id uint32) *Member
GetX is like Get, but panics if an error occurs.
func (*MemberClient) Intercept ¶
func (c *MemberClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `member.Intercept(f(g(h())))`.
func (*MemberClient) Interceptors ¶
func (c *MemberClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MemberClient) MapCreateBulk ¶
func (c *MemberClient) MapCreateBulk(slice any, setFunc func(*MemberCreate, int)) *MemberCreateBulk
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 (*MemberClient) Query ¶
func (c *MemberClient) Query() *MemberQuery
Query returns a query builder for Member.
func (*MemberClient) Update ¶
func (c *MemberClient) Update() *MemberUpdate
Update returns an update builder for Member.
func (*MemberClient) UpdateOne ¶
func (c *MemberClient) UpdateOne(m *Member) *MemberUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MemberClient) UpdateOneID ¶
func (c *MemberClient) UpdateOneID(id uint32) *MemberUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MemberClient) Use ¶
func (c *MemberClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `member.Hooks(f(g(h())))`.
type MemberCreate ¶
type MemberCreate struct {
// contains filtered or unexported fields
}
MemberCreate is the builder for creating a Member entity.
func (*MemberCreate) Exec ¶
func (mc *MemberCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MemberCreate) ExecX ¶
func (mc *MemberCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberCreate) Mutation ¶
func (mc *MemberCreate) Mutation() *MemberMutation
Mutation returns the MemberMutation object of the builder.
func (*MemberCreate) OnConflict ¶
func (mc *MemberCreate) OnConflict(opts ...sql.ConflictOption) *MemberUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Member.Create(). SetCreatedAt(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.MemberUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*MemberCreate) OnConflictColumns ¶
func (mc *MemberCreate) OnConflictColumns(columns ...string) *MemberUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Member.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MemberCreate) Save ¶
func (mc *MemberCreate) Save(ctx context.Context) (*Member, error)
Save creates the Member in the database.
func (*MemberCreate) SaveX ¶
func (mc *MemberCreate) SaveX(ctx context.Context) *Member
SaveX calls Save and panics if Save returns an error.
func (*MemberCreate) SetAvatar ¶
func (mc *MemberCreate) SetAvatar(s string) *MemberCreate
SetAvatar sets the "avatar" field.
func (*MemberCreate) SetCreatedAt ¶
func (mc *MemberCreate) SetCreatedAt(t time.Time) *MemberCreate
SetCreatedAt sets the "created_at" field.
func (*MemberCreate) SetDeletedAt ¶
func (mc *MemberCreate) SetDeletedAt(t time.Time) *MemberCreate
SetDeletedAt sets the "deleted_at" field.
func (*MemberCreate) SetDescription ¶
func (mc *MemberCreate) SetDescription(s string) *MemberCreate
SetDescription sets the "description" field.
func (*MemberCreate) SetEmail ¶
func (mc *MemberCreate) SetEmail(s string) *MemberCreate
SetEmail sets the "email" field.
func (*MemberCreate) SetID ¶
func (mc *MemberCreate) SetID(u uint32) *MemberCreate
SetID sets the "id" field.
func (*MemberCreate) SetNickname ¶
func (mc *MemberCreate) SetNickname(s string) *MemberCreate
SetNickname sets the "nickname" field.
func (*MemberCreate) SetNillableAvatar ¶
func (mc *MemberCreate) SetNillableAvatar(s *string) *MemberCreate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*MemberCreate) SetNillableCreatedAt ¶
func (mc *MemberCreate) SetNillableCreatedAt(t *time.Time) *MemberCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MemberCreate) SetNillableDeletedAt ¶
func (mc *MemberCreate) SetNillableDeletedAt(t *time.Time) *MemberCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MemberCreate) SetNillableDescription ¶
func (mc *MemberCreate) SetNillableDescription(s *string) *MemberCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MemberCreate) SetNillableEmail ¶
func (mc *MemberCreate) SetNillableEmail(s *string) *MemberCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*MemberCreate) SetNillableNickname ¶
func (mc *MemberCreate) SetNillableNickname(s *string) *MemberCreate
SetNillableNickname sets the "nickname" field if the given value is not nil.
func (*MemberCreate) SetNillablePassword ¶
func (mc *MemberCreate) SetNillablePassword(s *string) *MemberCreate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*MemberCreate) SetNillableRemark ¶
func (mc *MemberCreate) SetNillableRemark(s *string) *MemberCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*MemberCreate) SetNillableSort ¶
func (mc *MemberCreate) SetNillableSort(i *int32) *MemberCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*MemberCreate) SetNillableState ¶
func (mc *MemberCreate) SetNillableState(i *int32) *MemberCreate
SetNillableState sets the "state" field if the given value is not nil.
func (*MemberCreate) SetNillableUpdatedAt ¶
func (mc *MemberCreate) SetNillableUpdatedAt(t *time.Time) *MemberCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MemberCreate) SetPassword ¶
func (mc *MemberCreate) SetPassword(s string) *MemberCreate
SetPassword sets the "password" field.
func (*MemberCreate) SetPhone ¶
func (mc *MemberCreate) SetPhone(s string) *MemberCreate
SetPhone sets the "phone" field.
func (*MemberCreate) SetRemark ¶
func (mc *MemberCreate) SetRemark(s string) *MemberCreate
SetRemark sets the "remark" field.
func (*MemberCreate) SetSort ¶
func (mc *MemberCreate) SetSort(i int32) *MemberCreate
SetSort sets the "sort" field.
func (*MemberCreate) SetState ¶
func (mc *MemberCreate) SetState(i int32) *MemberCreate
SetState sets the "state" field.
func (*MemberCreate) SetUpdatedAt ¶
func (mc *MemberCreate) SetUpdatedAt(t time.Time) *MemberCreate
SetUpdatedAt sets the "updated_at" field.
func (*MemberCreate) SetUsername ¶
func (mc *MemberCreate) SetUsername(s string) *MemberCreate
SetUsername sets the "username" field.
type MemberCreateBulk ¶
type MemberCreateBulk struct {
// contains filtered or unexported fields
}
MemberCreateBulk is the builder for creating many Member entities in bulk.
func (*MemberCreateBulk) Exec ¶
func (mcb *MemberCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MemberCreateBulk) ExecX ¶
func (mcb *MemberCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberCreateBulk) OnConflict ¶
func (mcb *MemberCreateBulk) OnConflict(opts ...sql.ConflictOption) *MemberUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Member.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.MemberUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*MemberCreateBulk) OnConflictColumns ¶
func (mcb *MemberCreateBulk) OnConflictColumns(columns ...string) *MemberUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Member.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type MemberDelete ¶
type MemberDelete struct {
// contains filtered or unexported fields
}
MemberDelete is the builder for deleting a Member entity.
func (*MemberDelete) Exec ¶
func (md *MemberDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MemberDelete) ExecX ¶
func (md *MemberDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MemberDelete) Where ¶
func (md *MemberDelete) Where(ps ...predicate.Member) *MemberDelete
Where appends a list predicates to the MemberDelete builder.
type MemberDeleteOne ¶
type MemberDeleteOne struct {
// contains filtered or unexported fields
}
MemberDeleteOne is the builder for deleting a single Member entity.
func (*MemberDeleteOne) Exec ¶
func (mdo *MemberDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MemberDeleteOne) ExecX ¶
func (mdo *MemberDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberDeleteOne) Where ¶
func (mdo *MemberDeleteOne) Where(ps ...predicate.Member) *MemberDeleteOne
Where appends a list predicates to the MemberDelete builder.
type MemberFilter ¶
type MemberFilter struct {
// contains filtered or unexported fields
}
MemberFilter provides a generic filtering capability at runtime for MemberQuery.
func (*MemberFilter) Where ¶
func (f *MemberFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*MemberFilter) WhereAvatar ¶
func (f *MemberFilter) WhereAvatar(p entql.StringP)
WhereAvatar applies the entql string predicate on the avatar field.
func (*MemberFilter) WhereCreatedAt ¶
func (f *MemberFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*MemberFilter) WhereDeletedAt ¶
func (f *MemberFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*MemberFilter) WhereDescription ¶
func (f *MemberFilter) WhereDescription(p entql.StringP)
WhereDescription applies the entql string predicate on the description field.
func (*MemberFilter) WhereEmail ¶
func (f *MemberFilter) WhereEmail(p entql.StringP)
WhereEmail applies the entql string predicate on the email field.
func (*MemberFilter) WhereID ¶
func (f *MemberFilter) WhereID(p entql.Uint32P)
WhereID applies the entql uint32 predicate on the id field.
func (*MemberFilter) WhereNickname ¶
func (f *MemberFilter) WhereNickname(p entql.StringP)
WhereNickname applies the entql string predicate on the nickname field.
func (*MemberFilter) WherePassword ¶
func (f *MemberFilter) WherePassword(p entql.StringP)
WherePassword applies the entql string predicate on the password field.
func (*MemberFilter) WherePhone ¶
func (f *MemberFilter) WherePhone(p entql.StringP)
WherePhone applies the entql string predicate on the phone field.
func (*MemberFilter) WhereRemark ¶
func (f *MemberFilter) WhereRemark(p entql.StringP)
WhereRemark applies the entql string predicate on the remark field.
func (*MemberFilter) WhereSort ¶
func (f *MemberFilter) WhereSort(p entql.Int32P)
WhereSort applies the entql int32 predicate on the sort field.
func (*MemberFilter) WhereState ¶
func (f *MemberFilter) WhereState(p entql.Int32P)
WhereState applies the entql int32 predicate on the state field.
func (*MemberFilter) WhereUpdatedAt ¶
func (f *MemberFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
func (*MemberFilter) WhereUsername ¶
func (f *MemberFilter) WhereUsername(p entql.StringP)
WhereUsername applies the entql string predicate on the username field.
type MemberGroupBy ¶
type MemberGroupBy struct {
// contains filtered or unexported fields
}
MemberGroupBy is the group-by builder for Member entities.
func (*MemberGroupBy) Aggregate ¶
func (mgb *MemberGroupBy) Aggregate(fns ...AggregateFunc) *MemberGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MemberGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MemberGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MemberGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MemberGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MemberGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MemberGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MemberGroupBy) Scan ¶
func (mgb *MemberGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MemberGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MemberMutation ¶
type MemberMutation struct {
// contains filtered or unexported fields
}
MemberMutation represents an operation that mutates the Member nodes in the graph.
func (*MemberMutation) AddField ¶
func (m *MemberMutation) 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 (*MemberMutation) AddSort ¶
func (m *MemberMutation) AddSort(i int32)
AddSort adds i to the "sort" field.
func (*MemberMutation) AddState ¶
func (m *MemberMutation) AddState(i int32)
AddState adds i to the "state" field.
func (*MemberMutation) AddedEdges ¶
func (m *MemberMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MemberMutation) AddedField ¶
func (m *MemberMutation) 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 (*MemberMutation) AddedFields ¶
func (m *MemberMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MemberMutation) AddedIDs ¶
func (m *MemberMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MemberMutation) AddedSort ¶
func (m *MemberMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*MemberMutation) AddedState ¶
func (m *MemberMutation) AddedState() (r int32, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*MemberMutation) Avatar ¶
func (m *MemberMutation) Avatar() (r string, exists bool)
Avatar returns the value of the "avatar" field in the mutation.
func (*MemberMutation) ClearCreatedAt ¶
func (m *MemberMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*MemberMutation) ClearDeletedAt ¶
func (m *MemberMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MemberMutation) ClearEdge ¶
func (m *MemberMutation) 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 (*MemberMutation) ClearField ¶
func (m *MemberMutation) 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 (*MemberMutation) ClearRemark ¶
func (m *MemberMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*MemberMutation) ClearUpdatedAt ¶
func (m *MemberMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MemberMutation) ClearedEdges ¶
func (m *MemberMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MemberMutation) ClearedFields ¶
func (m *MemberMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MemberMutation) Client ¶
func (m MemberMutation) 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 (*MemberMutation) CreatedAt ¶
func (m *MemberMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MemberMutation) CreatedAtCleared ¶
func (m *MemberMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*MemberMutation) DeletedAt ¶
func (m *MemberMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*MemberMutation) DeletedAtCleared ¶
func (m *MemberMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*MemberMutation) Description ¶
func (m *MemberMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*MemberMutation) EdgeCleared ¶
func (m *MemberMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MemberMutation) Email ¶
func (m *MemberMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*MemberMutation) Field ¶
func (m *MemberMutation) 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 (*MemberMutation) FieldCleared ¶
func (m *MemberMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MemberMutation) Fields ¶
func (m *MemberMutation) 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 (*MemberMutation) Filter ¶
func (m *MemberMutation) Filter() *MemberFilter
Filter returns an entql.Where implementation to apply filters on the MemberMutation builder.
func (*MemberMutation) ID ¶
func (m *MemberMutation) ID() (id uint32, 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 (*MemberMutation) IDs ¶
func (m *MemberMutation) IDs(ctx context.Context) ([]uint32, 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 (*MemberMutation) Nickname ¶
func (m *MemberMutation) Nickname() (r string, exists bool)
Nickname returns the value of the "nickname" field in the mutation.
func (*MemberMutation) OldAvatar ¶
func (m *MemberMutation) OldAvatar(ctx context.Context) (v string, err error)
OldAvatar returns the old "avatar" field's value of the Member entity. If the Member 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 (*MemberMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Member entity. If the Member 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 (*MemberMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Member entity. If the Member 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 (*MemberMutation) OldDescription ¶
func (m *MemberMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Member entity. If the Member 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 (*MemberMutation) OldEmail ¶
func (m *MemberMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Member entity. If the Member 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 (*MemberMutation) 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 (*MemberMutation) OldNickname ¶
func (m *MemberMutation) OldNickname(ctx context.Context) (v string, err error)
OldNickname returns the old "nickname" field's value of the Member entity. If the Member 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 (*MemberMutation) OldPassword ¶
func (m *MemberMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the Member entity. If the Member 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 (*MemberMutation) OldPhone ¶
func (m *MemberMutation) OldPhone(ctx context.Context) (v string, err error)
OldPhone returns the old "phone" field's value of the Member entity. If the Member 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 (*MemberMutation) OldRemark ¶
func (m *MemberMutation) OldRemark(ctx context.Context) (v *string, err error)
OldRemark returns the old "remark" field's value of the Member entity. If the Member 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 (*MemberMutation) OldSort ¶
func (m *MemberMutation) OldSort(ctx context.Context) (v *int32, err error)
OldSort returns the old "sort" field's value of the Member entity. If the Member 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 (*MemberMutation) OldState ¶
func (m *MemberMutation) OldState(ctx context.Context) (v *int32, err error)
OldState returns the old "state" field's value of the Member entity. If the Member 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 (*MemberMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Member entity. If the Member 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 (*MemberMutation) OldUsername ¶
func (m *MemberMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the Member entity. If the Member 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 (*MemberMutation) Password ¶
func (m *MemberMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*MemberMutation) Phone ¶
func (m *MemberMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*MemberMutation) Remark ¶
func (m *MemberMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*MemberMutation) RemarkCleared ¶
func (m *MemberMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*MemberMutation) RemovedEdges ¶
func (m *MemberMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MemberMutation) RemovedIDs ¶
func (m *MemberMutation) 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 (*MemberMutation) ResetAvatar ¶
func (m *MemberMutation) ResetAvatar()
ResetAvatar resets all changes to the "avatar" field.
func (*MemberMutation) ResetCreatedAt ¶
func (m *MemberMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MemberMutation) ResetDeletedAt ¶
func (m *MemberMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*MemberMutation) ResetDescription ¶
func (m *MemberMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*MemberMutation) ResetEdge ¶
func (m *MemberMutation) 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 (*MemberMutation) ResetEmail ¶
func (m *MemberMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*MemberMutation) ResetField ¶
func (m *MemberMutation) 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 (*MemberMutation) ResetNickname ¶
func (m *MemberMutation) ResetNickname()
ResetNickname resets all changes to the "nickname" field.
func (*MemberMutation) ResetPassword ¶
func (m *MemberMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*MemberMutation) ResetPhone ¶
func (m *MemberMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*MemberMutation) ResetRemark ¶
func (m *MemberMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*MemberMutation) ResetSort ¶
func (m *MemberMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*MemberMutation) ResetState ¶
func (m *MemberMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*MemberMutation) ResetUpdatedAt ¶
func (m *MemberMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MemberMutation) ResetUsername ¶
func (m *MemberMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*MemberMutation) SetAvatar ¶
func (m *MemberMutation) SetAvatar(s string)
SetAvatar sets the "avatar" field.
func (*MemberMutation) SetCreatedAt ¶
func (m *MemberMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MemberMutation) SetDeletedAt ¶
func (m *MemberMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*MemberMutation) SetDescription ¶
func (m *MemberMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*MemberMutation) SetEmail ¶
func (m *MemberMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*MemberMutation) SetField ¶
func (m *MemberMutation) 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 (*MemberMutation) SetID ¶
func (m *MemberMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Member entities.
func (*MemberMutation) SetNickname ¶
func (m *MemberMutation) SetNickname(s string)
SetNickname sets the "nickname" field.
func (*MemberMutation) SetOp ¶
func (m *MemberMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MemberMutation) SetPassword ¶
func (m *MemberMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*MemberMutation) SetPhone ¶
func (m *MemberMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*MemberMutation) SetRemark ¶
func (m *MemberMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*MemberMutation) SetSort ¶
func (m *MemberMutation) SetSort(i int32)
SetSort sets the "sort" field.
func (*MemberMutation) SetState ¶
func (m *MemberMutation) SetState(i int32)
SetState sets the "state" field.
func (*MemberMutation) SetUpdatedAt ¶
func (m *MemberMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MemberMutation) SetUsername ¶
func (m *MemberMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*MemberMutation) Sort ¶
func (m *MemberMutation) Sort() (r int32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*MemberMutation) State ¶
func (m *MemberMutation) State() (r int32, exists bool)
State returns the value of the "state" field in the mutation.
func (MemberMutation) Tx ¶
func (m MemberMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MemberMutation) Type ¶
func (m *MemberMutation) Type() string
Type returns the node type of this mutation (Member).
func (*MemberMutation) UpdatedAt ¶
func (m *MemberMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MemberMutation) UpdatedAtCleared ¶
func (m *MemberMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*MemberMutation) Username ¶
func (m *MemberMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*MemberMutation) Where ¶
func (m *MemberMutation) Where(ps ...predicate.Member)
Where appends a list predicates to the MemberMutation builder.
func (*MemberMutation) WhereP ¶
func (m *MemberMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MemberMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MemberQuery ¶
type MemberQuery struct {
// contains filtered or unexported fields
}
MemberQuery is the builder for querying Member entities.
func (*MemberQuery) Aggregate ¶
func (mq *MemberQuery) Aggregate(fns ...AggregateFunc) *MemberSelect
Aggregate returns a MemberSelect configured with the given aggregations.
func (*MemberQuery) All ¶
func (mq *MemberQuery) All(ctx context.Context) ([]*Member, error)
All executes the query and returns a list of Members.
func (*MemberQuery) AllX ¶
func (mq *MemberQuery) AllX(ctx context.Context) []*Member
AllX is like All, but panics if an error occurs.
func (*MemberQuery) Clone ¶
func (mq *MemberQuery) Clone() *MemberQuery
Clone returns a duplicate of the MemberQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MemberQuery) Count ¶
func (mq *MemberQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MemberQuery) CountX ¶
func (mq *MemberQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MemberQuery) Exist ¶
func (mq *MemberQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MemberQuery) ExistX ¶
func (mq *MemberQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MemberQuery) Filter ¶
func (mq *MemberQuery) Filter() *MemberFilter
Filter returns a Filter implementation to apply filters on the MemberQuery builder.
func (*MemberQuery) First ¶
func (mq *MemberQuery) First(ctx context.Context) (*Member, error)
First returns the first Member entity from the query. Returns a *NotFoundError when no Member was found.
func (*MemberQuery) FirstID ¶
func (mq *MemberQuery) FirstID(ctx context.Context) (id uint32, err error)
FirstID returns the first Member ID from the query. Returns a *NotFoundError when no Member ID was found.
func (*MemberQuery) FirstIDX ¶
func (mq *MemberQuery) FirstIDX(ctx context.Context) uint32
FirstIDX is like FirstID, but panics if an error occurs.
func (*MemberQuery) FirstX ¶
func (mq *MemberQuery) FirstX(ctx context.Context) *Member
FirstX is like First, but panics if an error occurs.
func (*MemberQuery) GroupBy ¶
func (mq *MemberQuery) GroupBy(field string, fields ...string) *MemberGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Member.Query(). GroupBy(member.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MemberQuery) IDs ¶
func (mq *MemberQuery) IDs(ctx context.Context) (ids []uint32, err error)
IDs executes the query and returns a list of Member IDs.
func (*MemberQuery) IDsX ¶
func (mq *MemberQuery) IDsX(ctx context.Context) []uint32
IDsX is like IDs, but panics if an error occurs.
func (*MemberQuery) Limit ¶
func (mq *MemberQuery) Limit(limit int) *MemberQuery
Limit the number of records to be returned by this query.
func (*MemberQuery) Modify ¶
func (mq *MemberQuery) Modify(modifiers ...func(s *sql.Selector)) *MemberSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*MemberQuery) Offset ¶
func (mq *MemberQuery) Offset(offset int) *MemberQuery
Offset to start from.
func (*MemberQuery) Only ¶
func (mq *MemberQuery) Only(ctx context.Context) (*Member, error)
Only returns a single Member entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Member entity is found. Returns a *NotFoundError when no Member entities are found.
func (*MemberQuery) OnlyID ¶
func (mq *MemberQuery) OnlyID(ctx context.Context) (id uint32, err error)
OnlyID is like Only, but returns the only Member ID in the query. Returns a *NotSingularError when more than one Member ID is found. Returns a *NotFoundError when no entities are found.
func (*MemberQuery) OnlyIDX ¶
func (mq *MemberQuery) OnlyIDX(ctx context.Context) uint32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MemberQuery) OnlyX ¶
func (mq *MemberQuery) OnlyX(ctx context.Context) *Member
OnlyX is like Only, but panics if an error occurs.
func (*MemberQuery) Order ¶
func (mq *MemberQuery) Order(o ...member.OrderOption) *MemberQuery
Order specifies how the records should be ordered.
func (*MemberQuery) Select ¶
func (mq *MemberQuery) Select(fields ...string) *MemberSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Member.Query(). Select(member.FieldCreatedAt). Scan(ctx, &v)
func (*MemberQuery) Unique ¶
func (mq *MemberQuery) Unique(unique bool) *MemberQuery
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 (*MemberQuery) Where ¶
func (mq *MemberQuery) Where(ps ...predicate.Member) *MemberQuery
Where adds a new predicate for the MemberQuery builder.
type MemberSelect ¶
type MemberSelect struct { *MemberQuery // contains filtered or unexported fields }
MemberSelect is the builder for selecting fields of Member entities.
func (*MemberSelect) Aggregate ¶
func (ms *MemberSelect) Aggregate(fns ...AggregateFunc) *MemberSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MemberSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MemberSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MemberSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MemberSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MemberSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MemberSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MemberSelect) Modify ¶
func (ms *MemberSelect) Modify(modifiers ...func(s *sql.Selector)) *MemberSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*MemberSelect) Scan ¶
func (ms *MemberSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MemberSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MemberUpdate ¶
type MemberUpdate struct {
// contains filtered or unexported fields
}
MemberUpdate is the builder for updating Member entities.
func (*MemberUpdate) AddSort ¶
func (mu *MemberUpdate) AddSort(i int32) *MemberUpdate
AddSort adds i to the "sort" field.
func (*MemberUpdate) AddState ¶
func (mu *MemberUpdate) AddState(i int32) *MemberUpdate
AddState adds i to the "state" field.
func (*MemberUpdate) ClearDeletedAt ¶
func (mu *MemberUpdate) ClearDeletedAt() *MemberUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MemberUpdate) ClearRemark ¶
func (mu *MemberUpdate) ClearRemark() *MemberUpdate
ClearRemark clears the value of the "remark" field.
func (*MemberUpdate) ClearUpdatedAt ¶
func (mu *MemberUpdate) ClearUpdatedAt() *MemberUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MemberUpdate) Exec ¶
func (mu *MemberUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MemberUpdate) ExecX ¶
func (mu *MemberUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberUpdate) Modify ¶
func (mu *MemberUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MemberUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*MemberUpdate) Mutation ¶
func (mu *MemberUpdate) Mutation() *MemberMutation
Mutation returns the MemberMutation object of the builder.
func (*MemberUpdate) Save ¶
func (mu *MemberUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MemberUpdate) SaveX ¶
func (mu *MemberUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MemberUpdate) SetAvatar ¶
func (mu *MemberUpdate) SetAvatar(s string) *MemberUpdate
SetAvatar sets the "avatar" field.
func (*MemberUpdate) SetDeletedAt ¶
func (mu *MemberUpdate) SetDeletedAt(t time.Time) *MemberUpdate
SetDeletedAt sets the "deleted_at" field.
func (*MemberUpdate) SetDescription ¶
func (mu *MemberUpdate) SetDescription(s string) *MemberUpdate
SetDescription sets the "description" field.
func (*MemberUpdate) SetEmail ¶
func (mu *MemberUpdate) SetEmail(s string) *MemberUpdate
SetEmail sets the "email" field.
func (*MemberUpdate) SetNickname ¶
func (mu *MemberUpdate) SetNickname(s string) *MemberUpdate
SetNickname sets the "nickname" field.
func (*MemberUpdate) SetNillableAvatar ¶
func (mu *MemberUpdate) SetNillableAvatar(s *string) *MemberUpdate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*MemberUpdate) SetNillableDeletedAt ¶
func (mu *MemberUpdate) SetNillableDeletedAt(t *time.Time) *MemberUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MemberUpdate) SetNillableDescription ¶
func (mu *MemberUpdate) SetNillableDescription(s *string) *MemberUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MemberUpdate) SetNillableEmail ¶
func (mu *MemberUpdate) SetNillableEmail(s *string) *MemberUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*MemberUpdate) SetNillableNickname ¶
func (mu *MemberUpdate) SetNillableNickname(s *string) *MemberUpdate
SetNillableNickname sets the "nickname" field if the given value is not nil.
func (*MemberUpdate) SetNillablePassword ¶
func (mu *MemberUpdate) SetNillablePassword(s *string) *MemberUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*MemberUpdate) SetNillablePhone ¶
func (mu *MemberUpdate) SetNillablePhone(s *string) *MemberUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*MemberUpdate) SetNillableRemark ¶
func (mu *MemberUpdate) SetNillableRemark(s *string) *MemberUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*MemberUpdate) SetNillableSort ¶
func (mu *MemberUpdate) SetNillableSort(i *int32) *MemberUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*MemberUpdate) SetNillableState ¶
func (mu *MemberUpdate) SetNillableState(i *int32) *MemberUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*MemberUpdate) SetNillableUpdatedAt ¶
func (mu *MemberUpdate) SetNillableUpdatedAt(t *time.Time) *MemberUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MemberUpdate) SetPassword ¶
func (mu *MemberUpdate) SetPassword(s string) *MemberUpdate
SetPassword sets the "password" field.
func (*MemberUpdate) SetPhone ¶
func (mu *MemberUpdate) SetPhone(s string) *MemberUpdate
SetPhone sets the "phone" field.
func (*MemberUpdate) SetRemark ¶
func (mu *MemberUpdate) SetRemark(s string) *MemberUpdate
SetRemark sets the "remark" field.
func (*MemberUpdate) SetSort ¶
func (mu *MemberUpdate) SetSort(i int32) *MemberUpdate
SetSort sets the "sort" field.
func (*MemberUpdate) SetState ¶
func (mu *MemberUpdate) SetState(i int32) *MemberUpdate
SetState sets the "state" field.
func (*MemberUpdate) SetUpdatedAt ¶
func (mu *MemberUpdate) SetUpdatedAt(t time.Time) *MemberUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MemberUpdate) Where ¶
func (mu *MemberUpdate) Where(ps ...predicate.Member) *MemberUpdate
Where appends a list predicates to the MemberUpdate builder.
type MemberUpdateOne ¶
type MemberUpdateOne struct {
// contains filtered or unexported fields
}
MemberUpdateOne is the builder for updating a single Member entity.
func (*MemberUpdateOne) AddSort ¶
func (muo *MemberUpdateOne) AddSort(i int32) *MemberUpdateOne
AddSort adds i to the "sort" field.
func (*MemberUpdateOne) AddState ¶
func (muo *MemberUpdateOne) AddState(i int32) *MemberUpdateOne
AddState adds i to the "state" field.
func (*MemberUpdateOne) ClearDeletedAt ¶
func (muo *MemberUpdateOne) ClearDeletedAt() *MemberUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MemberUpdateOne) ClearRemark ¶
func (muo *MemberUpdateOne) ClearRemark() *MemberUpdateOne
ClearRemark clears the value of the "remark" field.
func (*MemberUpdateOne) ClearUpdatedAt ¶
func (muo *MemberUpdateOne) ClearUpdatedAt() *MemberUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MemberUpdateOne) Exec ¶
func (muo *MemberUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MemberUpdateOne) ExecX ¶
func (muo *MemberUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberUpdateOne) Modify ¶
func (muo *MemberUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MemberUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*MemberUpdateOne) Mutation ¶
func (muo *MemberUpdateOne) Mutation() *MemberMutation
Mutation returns the MemberMutation object of the builder.
func (*MemberUpdateOne) Save ¶
func (muo *MemberUpdateOne) Save(ctx context.Context) (*Member, error)
Save executes the query and returns the updated Member entity.
func (*MemberUpdateOne) SaveX ¶
func (muo *MemberUpdateOne) SaveX(ctx context.Context) *Member
SaveX is like Save, but panics if an error occurs.
func (*MemberUpdateOne) Select ¶
func (muo *MemberUpdateOne) Select(field string, fields ...string) *MemberUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MemberUpdateOne) SetAvatar ¶
func (muo *MemberUpdateOne) SetAvatar(s string) *MemberUpdateOne
SetAvatar sets the "avatar" field.
func (*MemberUpdateOne) SetDeletedAt ¶
func (muo *MemberUpdateOne) SetDeletedAt(t time.Time) *MemberUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*MemberUpdateOne) SetDescription ¶
func (muo *MemberUpdateOne) SetDescription(s string) *MemberUpdateOne
SetDescription sets the "description" field.
func (*MemberUpdateOne) SetEmail ¶
func (muo *MemberUpdateOne) SetEmail(s string) *MemberUpdateOne
SetEmail sets the "email" field.
func (*MemberUpdateOne) SetNickname ¶
func (muo *MemberUpdateOne) SetNickname(s string) *MemberUpdateOne
SetNickname sets the "nickname" field.
func (*MemberUpdateOne) SetNillableAvatar ¶
func (muo *MemberUpdateOne) SetNillableAvatar(s *string) *MemberUpdateOne
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableDeletedAt ¶
func (muo *MemberUpdateOne) SetNillableDeletedAt(t *time.Time) *MemberUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableDescription ¶
func (muo *MemberUpdateOne) SetNillableDescription(s *string) *MemberUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableEmail ¶
func (muo *MemberUpdateOne) SetNillableEmail(s *string) *MemberUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableNickname ¶
func (muo *MemberUpdateOne) SetNillableNickname(s *string) *MemberUpdateOne
SetNillableNickname sets the "nickname" field if the given value is not nil.
func (*MemberUpdateOne) SetNillablePassword ¶
func (muo *MemberUpdateOne) SetNillablePassword(s *string) *MemberUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*MemberUpdateOne) SetNillablePhone ¶
func (muo *MemberUpdateOne) SetNillablePhone(s *string) *MemberUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableRemark ¶
func (muo *MemberUpdateOne) SetNillableRemark(s *string) *MemberUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableSort ¶
func (muo *MemberUpdateOne) SetNillableSort(i *int32) *MemberUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableState ¶
func (muo *MemberUpdateOne) SetNillableState(i *int32) *MemberUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*MemberUpdateOne) SetNillableUpdatedAt ¶
func (muo *MemberUpdateOne) SetNillableUpdatedAt(t *time.Time) *MemberUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MemberUpdateOne) SetPassword ¶
func (muo *MemberUpdateOne) SetPassword(s string) *MemberUpdateOne
SetPassword sets the "password" field.
func (*MemberUpdateOne) SetPhone ¶
func (muo *MemberUpdateOne) SetPhone(s string) *MemberUpdateOne
SetPhone sets the "phone" field.
func (*MemberUpdateOne) SetRemark ¶
func (muo *MemberUpdateOne) SetRemark(s string) *MemberUpdateOne
SetRemark sets the "remark" field.
func (*MemberUpdateOne) SetSort ¶
func (muo *MemberUpdateOne) SetSort(i int32) *MemberUpdateOne
SetSort sets the "sort" field.
func (*MemberUpdateOne) SetState ¶
func (muo *MemberUpdateOne) SetState(i int32) *MemberUpdateOne
SetState sets the "state" field.
func (*MemberUpdateOne) SetUpdatedAt ¶
func (muo *MemberUpdateOne) SetUpdatedAt(t time.Time) *MemberUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MemberUpdateOne) Where ¶
func (muo *MemberUpdateOne) Where(ps ...predicate.Member) *MemberUpdateOne
Where appends a list predicates to the MemberUpdate builder.
type MemberUpsert ¶
MemberUpsert is the "OnConflict" setter.
func (*MemberUpsert) AddSort ¶
func (u *MemberUpsert) AddSort(v int32) *MemberUpsert
AddSort adds v to the "sort" field.
func (*MemberUpsert) AddState ¶
func (u *MemberUpsert) AddState(v int32) *MemberUpsert
AddState adds v to the "state" field.
func (*MemberUpsert) ClearDeletedAt ¶
func (u *MemberUpsert) ClearDeletedAt() *MemberUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MemberUpsert) ClearRemark ¶
func (u *MemberUpsert) ClearRemark() *MemberUpsert
ClearRemark clears the value of the "remark" field.
func (*MemberUpsert) ClearUpdatedAt ¶
func (u *MemberUpsert) ClearUpdatedAt() *MemberUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MemberUpsert) SetAvatar ¶
func (u *MemberUpsert) SetAvatar(v string) *MemberUpsert
SetAvatar sets the "avatar" field.
func (*MemberUpsert) SetDeletedAt ¶
func (u *MemberUpsert) SetDeletedAt(v time.Time) *MemberUpsert
SetDeletedAt sets the "deleted_at" field.
func (*MemberUpsert) SetDescription ¶
func (u *MemberUpsert) SetDescription(v string) *MemberUpsert
SetDescription sets the "description" field.
func (*MemberUpsert) SetEmail ¶
func (u *MemberUpsert) SetEmail(v string) *MemberUpsert
SetEmail sets the "email" field.
func (*MemberUpsert) SetNickname ¶
func (u *MemberUpsert) SetNickname(v string) *MemberUpsert
SetNickname sets the "nickname" field.
func (*MemberUpsert) SetPassword ¶
func (u *MemberUpsert) SetPassword(v string) *MemberUpsert
SetPassword sets the "password" field.
func (*MemberUpsert) SetPhone ¶
func (u *MemberUpsert) SetPhone(v string) *MemberUpsert
SetPhone sets the "phone" field.
func (*MemberUpsert) SetRemark ¶
func (u *MemberUpsert) SetRemark(v string) *MemberUpsert
SetRemark sets the "remark" field.
func (*MemberUpsert) SetSort ¶
func (u *MemberUpsert) SetSort(v int32) *MemberUpsert
SetSort sets the "sort" field.
func (*MemberUpsert) SetState ¶
func (u *MemberUpsert) SetState(v int32) *MemberUpsert
SetState sets the "state" field.
func (*MemberUpsert) SetUpdatedAt ¶
func (u *MemberUpsert) SetUpdatedAt(v time.Time) *MemberUpsert
SetUpdatedAt sets the "updated_at" field.
func (*MemberUpsert) UpdateAvatar ¶
func (u *MemberUpsert) UpdateAvatar() *MemberUpsert
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*MemberUpsert) UpdateDeletedAt ¶
func (u *MemberUpsert) UpdateDeletedAt() *MemberUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*MemberUpsert) UpdateDescription ¶
func (u *MemberUpsert) UpdateDescription() *MemberUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*MemberUpsert) UpdateEmail ¶
func (u *MemberUpsert) UpdateEmail() *MemberUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*MemberUpsert) UpdateNickname ¶
func (u *MemberUpsert) UpdateNickname() *MemberUpsert
UpdateNickname sets the "nickname" field to the value that was provided on create.
func (*MemberUpsert) UpdatePassword ¶
func (u *MemberUpsert) UpdatePassword() *MemberUpsert
UpdatePassword sets the "password" field to the value that was provided on create.
func (*MemberUpsert) UpdatePhone ¶
func (u *MemberUpsert) UpdatePhone() *MemberUpsert
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*MemberUpsert) UpdateRemark ¶
func (u *MemberUpsert) UpdateRemark() *MemberUpsert
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*MemberUpsert) UpdateSort ¶
func (u *MemberUpsert) UpdateSort() *MemberUpsert
UpdateSort sets the "sort" field to the value that was provided on create.
func (*MemberUpsert) UpdateState ¶
func (u *MemberUpsert) UpdateState() *MemberUpsert
UpdateState sets the "state" field to the value that was provided on create.
func (*MemberUpsert) UpdateUpdatedAt ¶
func (u *MemberUpsert) UpdateUpdatedAt() *MemberUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type MemberUpsertBulk ¶
type MemberUpsertBulk struct {
// contains filtered or unexported fields
}
MemberUpsertBulk is the builder for "upsert"-ing a bulk of Member nodes.
func (*MemberUpsertBulk) AddSort ¶
func (u *MemberUpsertBulk) AddSort(v int32) *MemberUpsertBulk
AddSort adds v to the "sort" field.
func (*MemberUpsertBulk) AddState ¶
func (u *MemberUpsertBulk) AddState(v int32) *MemberUpsertBulk
AddState adds v to the "state" field.
func (*MemberUpsertBulk) ClearDeletedAt ¶
func (u *MemberUpsertBulk) ClearDeletedAt() *MemberUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MemberUpsertBulk) ClearRemark ¶
func (u *MemberUpsertBulk) ClearRemark() *MemberUpsertBulk
ClearRemark clears the value of the "remark" field.
func (*MemberUpsertBulk) ClearUpdatedAt ¶
func (u *MemberUpsertBulk) ClearUpdatedAt() *MemberUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MemberUpsertBulk) DoNothing ¶
func (u *MemberUpsertBulk) DoNothing() *MemberUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MemberUpsertBulk) Exec ¶
func (u *MemberUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MemberUpsertBulk) ExecX ¶
func (u *MemberUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberUpsertBulk) Ignore ¶
func (u *MemberUpsertBulk) Ignore() *MemberUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Member.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MemberUpsertBulk) SetAvatar ¶
func (u *MemberUpsertBulk) SetAvatar(v string) *MemberUpsertBulk
SetAvatar sets the "avatar" field.
func (*MemberUpsertBulk) SetDeletedAt ¶
func (u *MemberUpsertBulk) SetDeletedAt(v time.Time) *MemberUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*MemberUpsertBulk) SetDescription ¶
func (u *MemberUpsertBulk) SetDescription(v string) *MemberUpsertBulk
SetDescription sets the "description" field.
func (*MemberUpsertBulk) SetEmail ¶
func (u *MemberUpsertBulk) SetEmail(v string) *MemberUpsertBulk
SetEmail sets the "email" field.
func (*MemberUpsertBulk) SetNickname ¶
func (u *MemberUpsertBulk) SetNickname(v string) *MemberUpsertBulk
SetNickname sets the "nickname" field.
func (*MemberUpsertBulk) SetPassword ¶
func (u *MemberUpsertBulk) SetPassword(v string) *MemberUpsertBulk
SetPassword sets the "password" field.
func (*MemberUpsertBulk) SetPhone ¶
func (u *MemberUpsertBulk) SetPhone(v string) *MemberUpsertBulk
SetPhone sets the "phone" field.
func (*MemberUpsertBulk) SetRemark ¶
func (u *MemberUpsertBulk) SetRemark(v string) *MemberUpsertBulk
SetRemark sets the "remark" field.
func (*MemberUpsertBulk) SetSort ¶
func (u *MemberUpsertBulk) SetSort(v int32) *MemberUpsertBulk
SetSort sets the "sort" field.
func (*MemberUpsertBulk) SetState ¶
func (u *MemberUpsertBulk) SetState(v int32) *MemberUpsertBulk
SetState sets the "state" field.
func (*MemberUpsertBulk) SetUpdatedAt ¶
func (u *MemberUpsertBulk) SetUpdatedAt(v time.Time) *MemberUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*MemberUpsertBulk) Update ¶
func (u *MemberUpsertBulk) Update(set func(*MemberUpsert)) *MemberUpsertBulk
Update allows overriding fields `UPDATE` values. See the MemberCreateBulk.OnConflict documentation for more info.
func (*MemberUpsertBulk) UpdateAvatar ¶
func (u *MemberUpsertBulk) UpdateAvatar() *MemberUpsertBulk
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*MemberUpsertBulk) UpdateDeletedAt ¶
func (u *MemberUpsertBulk) UpdateDeletedAt() *MemberUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*MemberUpsertBulk) UpdateDescription ¶
func (u *MemberUpsertBulk) UpdateDescription() *MemberUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*MemberUpsertBulk) UpdateEmail ¶
func (u *MemberUpsertBulk) UpdateEmail() *MemberUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*MemberUpsertBulk) UpdateNewValues ¶
func (u *MemberUpsertBulk) UpdateNewValues() *MemberUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Member.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(member.FieldID) }), ). Exec(ctx)
func (*MemberUpsertBulk) UpdateNickname ¶
func (u *MemberUpsertBulk) UpdateNickname() *MemberUpsertBulk
UpdateNickname sets the "nickname" field to the value that was provided on create.
func (*MemberUpsertBulk) UpdatePassword ¶
func (u *MemberUpsertBulk) UpdatePassword() *MemberUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*MemberUpsertBulk) UpdatePhone ¶
func (u *MemberUpsertBulk) UpdatePhone() *MemberUpsertBulk
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*MemberUpsertBulk) UpdateRemark ¶
func (u *MemberUpsertBulk) UpdateRemark() *MemberUpsertBulk
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*MemberUpsertBulk) UpdateSort ¶
func (u *MemberUpsertBulk) UpdateSort() *MemberUpsertBulk
UpdateSort sets the "sort" field to the value that was provided on create.
func (*MemberUpsertBulk) UpdateState ¶
func (u *MemberUpsertBulk) UpdateState() *MemberUpsertBulk
UpdateState sets the "state" field to the value that was provided on create.
func (*MemberUpsertBulk) UpdateUpdatedAt ¶
func (u *MemberUpsertBulk) UpdateUpdatedAt() *MemberUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type MemberUpsertOne ¶
type MemberUpsertOne struct {
// contains filtered or unexported fields
}
MemberUpsertOne is the builder for "upsert"-ing
one Member node.
func (*MemberUpsertOne) AddSort ¶
func (u *MemberUpsertOne) AddSort(v int32) *MemberUpsertOne
AddSort adds v to the "sort" field.
func (*MemberUpsertOne) AddState ¶
func (u *MemberUpsertOne) AddState(v int32) *MemberUpsertOne
AddState adds v to the "state" field.
func (*MemberUpsertOne) ClearDeletedAt ¶
func (u *MemberUpsertOne) ClearDeletedAt() *MemberUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MemberUpsertOne) ClearRemark ¶
func (u *MemberUpsertOne) ClearRemark() *MemberUpsertOne
ClearRemark clears the value of the "remark" field.
func (*MemberUpsertOne) ClearUpdatedAt ¶
func (u *MemberUpsertOne) ClearUpdatedAt() *MemberUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MemberUpsertOne) DoNothing ¶
func (u *MemberUpsertOne) DoNothing() *MemberUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MemberUpsertOne) Exec ¶
func (u *MemberUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*MemberUpsertOne) ExecX ¶
func (u *MemberUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MemberUpsertOne) ID ¶
func (u *MemberUpsertOne) ID(ctx context.Context) (id uint32, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*MemberUpsertOne) IDX ¶
func (u *MemberUpsertOne) IDX(ctx context.Context) uint32
IDX is like ID, but panics if an error occurs.
func (*MemberUpsertOne) Ignore ¶
func (u *MemberUpsertOne) Ignore() *MemberUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Member.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MemberUpsertOne) SetAvatar ¶
func (u *MemberUpsertOne) SetAvatar(v string) *MemberUpsertOne
SetAvatar sets the "avatar" field.
func (*MemberUpsertOne) SetDeletedAt ¶
func (u *MemberUpsertOne) SetDeletedAt(v time.Time) *MemberUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*MemberUpsertOne) SetDescription ¶
func (u *MemberUpsertOne) SetDescription(v string) *MemberUpsertOne
SetDescription sets the "description" field.
func (*MemberUpsertOne) SetEmail ¶
func (u *MemberUpsertOne) SetEmail(v string) *MemberUpsertOne
SetEmail sets the "email" field.
func (*MemberUpsertOne) SetNickname ¶
func (u *MemberUpsertOne) SetNickname(v string) *MemberUpsertOne
SetNickname sets the "nickname" field.
func (*MemberUpsertOne) SetPassword ¶
func (u *MemberUpsertOne) SetPassword(v string) *MemberUpsertOne
SetPassword sets the "password" field.
func (*MemberUpsertOne) SetPhone ¶
func (u *MemberUpsertOne) SetPhone(v string) *MemberUpsertOne
SetPhone sets the "phone" field.
func (*MemberUpsertOne) SetRemark ¶
func (u *MemberUpsertOne) SetRemark(v string) *MemberUpsertOne
SetRemark sets the "remark" field.
func (*MemberUpsertOne) SetSort ¶
func (u *MemberUpsertOne) SetSort(v int32) *MemberUpsertOne
SetSort sets the "sort" field.
func (*MemberUpsertOne) SetState ¶
func (u *MemberUpsertOne) SetState(v int32) *MemberUpsertOne
SetState sets the "state" field.
func (*MemberUpsertOne) SetUpdatedAt ¶
func (u *MemberUpsertOne) SetUpdatedAt(v time.Time) *MemberUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*MemberUpsertOne) Update ¶
func (u *MemberUpsertOne) Update(set func(*MemberUpsert)) *MemberUpsertOne
Update allows overriding fields `UPDATE` values. See the MemberCreate.OnConflict documentation for more info.
func (*MemberUpsertOne) UpdateAvatar ¶
func (u *MemberUpsertOne) UpdateAvatar() *MemberUpsertOne
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*MemberUpsertOne) UpdateDeletedAt ¶
func (u *MemberUpsertOne) UpdateDeletedAt() *MemberUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*MemberUpsertOne) UpdateDescription ¶
func (u *MemberUpsertOne) UpdateDescription() *MemberUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*MemberUpsertOne) UpdateEmail ¶
func (u *MemberUpsertOne) UpdateEmail() *MemberUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*MemberUpsertOne) UpdateNewValues ¶
func (u *MemberUpsertOne) UpdateNewValues() *MemberUpsertOne
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.Member.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(member.FieldID) }), ). Exec(ctx)
func (*MemberUpsertOne) UpdateNickname ¶
func (u *MemberUpsertOne) UpdateNickname() *MemberUpsertOne
UpdateNickname sets the "nickname" field to the value that was provided on create.
func (*MemberUpsertOne) UpdatePassword ¶
func (u *MemberUpsertOne) UpdatePassword() *MemberUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*MemberUpsertOne) UpdatePhone ¶
func (u *MemberUpsertOne) UpdatePhone() *MemberUpsertOne
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*MemberUpsertOne) UpdateRemark ¶
func (u *MemberUpsertOne) UpdateRemark() *MemberUpsertOne
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*MemberUpsertOne) UpdateSort ¶
func (u *MemberUpsertOne) UpdateSort() *MemberUpsertOne
UpdateSort sets the "sort" field to the value that was provided on create.
func (*MemberUpsertOne) UpdateState ¶
func (u *MemberUpsertOne) UpdateState() *MemberUpsertOne
UpdateState sets the "state" field to the value that was provided on create.
func (*MemberUpsertOne) UpdateUpdatedAt ¶
func (u *MemberUpsertOne) UpdateUpdatedAt() *MemberUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type Menu ¶
type Menu struct { // ID of the ent. // id ID uint32 `json:"id,omitempty"` // 创建时间 CreatedAt *time.Time `json:"created_at,omitempty"` // 更新时间 UpdatedAt *time.Time `json:"updated_at,omitempty"` // 删除时间 DeletedAt *time.Time `json:"deleted_at,omitempty"` // 备注 Remark *string `json:"remark,omitempty"` // 排序 Sort *int32 `json:"sort,omitempty"` // 状态 0 UNSPECIFIED 开启 1 -> ACTIVE 关闭 2 -> INACTIVE, 禁用 3 -> BANNED State *int32 `json:"state,omitempty"` // 名称 Name *string `json:"name,omitempty"` // 菜单标题 Title *string `json:"title,omitempty"` // 父级ID ParentID *uint32 `json:"parent_id,omitempty"` // 菜单类型 0 UNSPECIFIED, 目录 1 -> FOLDER, 菜单 2 -> MENU, 按钮 3 -> BUTTON Type *int32 `json:"type,omitempty"` // 路径,当其类型为'按钮'的时候对应的数据操作名,例如:/user.service.v1.UserService/Login Path *string `json:"path,omitempty"` // 前端页面组件 Component *string `json:"component,omitempty"` // 图标 Icon *string `json:"icon,omitempty"` // 是否外链 IsExt *bool `json:"is_ext,omitempty"` // 外链地址 ExtURL *string `json:"ext_url,omitempty"` // 权限代码 例如:sys:menu Permissions []string `json:"permissions,omitempty"` // 跳转路径 Redirect *string `json:"redirect,omitempty"` // 当前激活菜单 CurrentActiveMenu *string `json:"current_active_menu,omitempty"` // 是否缓存 KeepAlive *bool `json:"keep_alive,omitempty"` // 是否显示 Visible *bool `json:"visible,omitempty"` // 是否显示在标签页导航 HideTab *bool `json:"hide_tab,omitempty"` // 是否显示在菜单导航 HideMenu *bool `json:"hide_menu,omitempty"` // 是否显示在面包屑导航 HideBreadcrumb *bool `json:"hide_breadcrumb,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MenuQuery when eager-loading is set. Edges MenuEdges `json:"edges"` // contains filtered or unexported fields }
菜单表
func (*Menu) QueryChildren ¶
QueryChildren queries the "children" edge of the Menu entity.
func (*Menu) QueryParent ¶
QueryParent queries the "parent" edge of the Menu entity.
func (*Menu) Unwrap ¶
Unwrap unwraps the Menu 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 (*Menu) Update ¶
func (m *Menu) Update() *MenuUpdateOne
Update returns a builder for updating this Menu. Note that you need to call Menu.Unwrap() before calling this method if this Menu was returned from a transaction, and the transaction was committed or rolled back.
type MenuClient ¶
type MenuClient struct {
// contains filtered or unexported fields
}
MenuClient is a client for the Menu schema.
func NewMenuClient ¶
func NewMenuClient(c config) *MenuClient
NewMenuClient returns a client for the Menu from the given config.
func (*MenuClient) Create ¶
func (c *MenuClient) Create() *MenuCreate
Create returns a builder for creating a Menu entity.
func (*MenuClient) CreateBulk ¶
func (c *MenuClient) CreateBulk(builders ...*MenuCreate) *MenuCreateBulk
CreateBulk returns a builder for creating a bulk of Menu entities.
func (*MenuClient) Delete ¶
func (c *MenuClient) Delete() *MenuDelete
Delete returns a delete builder for Menu.
func (*MenuClient) DeleteOne ¶
func (c *MenuClient) DeleteOne(m *Menu) *MenuDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MenuClient) DeleteOneID ¶
func (c *MenuClient) DeleteOneID(id uint32) *MenuDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MenuClient) GetX ¶
func (c *MenuClient) GetX(ctx context.Context, id uint32) *Menu
GetX is like Get, but panics if an error occurs.
func (*MenuClient) Intercept ¶
func (c *MenuClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `menu.Intercept(f(g(h())))`.
func (*MenuClient) Interceptors ¶
func (c *MenuClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MenuClient) MapCreateBulk ¶
func (c *MenuClient) MapCreateBulk(slice any, setFunc func(*MenuCreate, int)) *MenuCreateBulk
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 (*MenuClient) Query ¶
func (c *MenuClient) Query() *MenuQuery
Query returns a query builder for Menu.
func (*MenuClient) QueryChildren ¶
func (c *MenuClient) QueryChildren(m *Menu) *MenuQuery
QueryChildren queries the children edge of a Menu.
func (*MenuClient) QueryParent ¶
func (c *MenuClient) QueryParent(m *Menu) *MenuQuery
QueryParent queries the parent edge of a Menu.
func (*MenuClient) Update ¶
func (c *MenuClient) Update() *MenuUpdate
Update returns an update builder for Menu.
func (*MenuClient) UpdateOne ¶
func (c *MenuClient) UpdateOne(m *Menu) *MenuUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MenuClient) UpdateOneID ¶
func (c *MenuClient) UpdateOneID(id uint32) *MenuUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MenuClient) Use ¶
func (c *MenuClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `menu.Hooks(f(g(h())))`.
type MenuCreate ¶
type MenuCreate struct {
// contains filtered or unexported fields
}
MenuCreate is the builder for creating a Menu entity.
func (*MenuCreate) AddChildIDs ¶
func (mc *MenuCreate) AddChildIDs(ids ...uint32) *MenuCreate
AddChildIDs adds the "children" edge to the Menu entity by IDs.
func (*MenuCreate) AddChildren ¶
func (mc *MenuCreate) AddChildren(m ...*Menu) *MenuCreate
AddChildren adds the "children" edges to the Menu entity.
func (*MenuCreate) Exec ¶
func (mc *MenuCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MenuCreate) ExecX ¶
func (mc *MenuCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuCreate) Mutation ¶
func (mc *MenuCreate) Mutation() *MenuMutation
Mutation returns the MenuMutation object of the builder.
func (*MenuCreate) OnConflict ¶
func (mc *MenuCreate) OnConflict(opts ...sql.ConflictOption) *MenuUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Menu.Create(). SetCreatedAt(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.MenuUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*MenuCreate) OnConflictColumns ¶
func (mc *MenuCreate) OnConflictColumns(columns ...string) *MenuUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Menu.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MenuCreate) Save ¶
func (mc *MenuCreate) Save(ctx context.Context) (*Menu, error)
Save creates the Menu in the database.
func (*MenuCreate) SaveX ¶
func (mc *MenuCreate) SaveX(ctx context.Context) *Menu
SaveX calls Save and panics if Save returns an error.
func (*MenuCreate) SetComponent ¶
func (mc *MenuCreate) SetComponent(s string) *MenuCreate
SetComponent sets the "component" field.
func (*MenuCreate) SetCreatedAt ¶
func (mc *MenuCreate) SetCreatedAt(t time.Time) *MenuCreate
SetCreatedAt sets the "created_at" field.
func (*MenuCreate) SetCurrentActiveMenu ¶
func (mc *MenuCreate) SetCurrentActiveMenu(s string) *MenuCreate
SetCurrentActiveMenu sets the "current_active_menu" field.
func (*MenuCreate) SetDeletedAt ¶
func (mc *MenuCreate) SetDeletedAt(t time.Time) *MenuCreate
SetDeletedAt sets the "deleted_at" field.
func (*MenuCreate) SetExtURL ¶
func (mc *MenuCreate) SetExtURL(s string) *MenuCreate
SetExtURL sets the "ext_url" field.
func (*MenuCreate) SetHideBreadcrumb ¶
func (mc *MenuCreate) SetHideBreadcrumb(b bool) *MenuCreate
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuCreate) SetHideMenu ¶
func (mc *MenuCreate) SetHideMenu(b bool) *MenuCreate
SetHideMenu sets the "hide_menu" field.
func (*MenuCreate) SetHideTab ¶
func (mc *MenuCreate) SetHideTab(b bool) *MenuCreate
SetHideTab sets the "hide_tab" field.
func (*MenuCreate) SetID ¶
func (mc *MenuCreate) SetID(u uint32) *MenuCreate
SetID sets the "id" field.
func (*MenuCreate) SetIcon ¶
func (mc *MenuCreate) SetIcon(s string) *MenuCreate
SetIcon sets the "icon" field.
func (*MenuCreate) SetIsExt ¶
func (mc *MenuCreate) SetIsExt(b bool) *MenuCreate
SetIsExt sets the "is_ext" field.
func (*MenuCreate) SetKeepAlive ¶
func (mc *MenuCreate) SetKeepAlive(b bool) *MenuCreate
SetKeepAlive sets the "keep_alive" field.
func (*MenuCreate) SetName ¶
func (mc *MenuCreate) SetName(s string) *MenuCreate
SetName sets the "name" field.
func (*MenuCreate) SetNillableComponent ¶
func (mc *MenuCreate) SetNillableComponent(s *string) *MenuCreate
SetNillableComponent sets the "component" field if the given value is not nil.
func (*MenuCreate) SetNillableCreatedAt ¶
func (mc *MenuCreate) SetNillableCreatedAt(t *time.Time) *MenuCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MenuCreate) SetNillableCurrentActiveMenu ¶
func (mc *MenuCreate) SetNillableCurrentActiveMenu(s *string) *MenuCreate
SetNillableCurrentActiveMenu sets the "current_active_menu" field if the given value is not nil.
func (*MenuCreate) SetNillableDeletedAt ¶
func (mc *MenuCreate) SetNillableDeletedAt(t *time.Time) *MenuCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MenuCreate) SetNillableExtURL ¶
func (mc *MenuCreate) SetNillableExtURL(s *string) *MenuCreate
SetNillableExtURL sets the "ext_url" field if the given value is not nil.
func (*MenuCreate) SetNillableHideBreadcrumb ¶
func (mc *MenuCreate) SetNillableHideBreadcrumb(b *bool) *MenuCreate
SetNillableHideBreadcrumb sets the "hide_breadcrumb" field if the given value is not nil.
func (*MenuCreate) SetNillableHideMenu ¶
func (mc *MenuCreate) SetNillableHideMenu(b *bool) *MenuCreate
SetNillableHideMenu sets the "hide_menu" field if the given value is not nil.
func (*MenuCreate) SetNillableHideTab ¶
func (mc *MenuCreate) SetNillableHideTab(b *bool) *MenuCreate
SetNillableHideTab sets the "hide_tab" field if the given value is not nil.
func (*MenuCreate) SetNillableIcon ¶
func (mc *MenuCreate) SetNillableIcon(s *string) *MenuCreate
SetNillableIcon sets the "icon" field if the given value is not nil.
func (*MenuCreate) SetNillableIsExt ¶
func (mc *MenuCreate) SetNillableIsExt(b *bool) *MenuCreate
SetNillableIsExt sets the "is_ext" field if the given value is not nil.
func (*MenuCreate) SetNillableKeepAlive ¶
func (mc *MenuCreate) SetNillableKeepAlive(b *bool) *MenuCreate
SetNillableKeepAlive sets the "keep_alive" field if the given value is not nil.
func (*MenuCreate) SetNillableName ¶
func (mc *MenuCreate) SetNillableName(s *string) *MenuCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*MenuCreate) SetNillableParentID ¶
func (mc *MenuCreate) SetNillableParentID(u *uint32) *MenuCreate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*MenuCreate) SetNillablePath ¶
func (mc *MenuCreate) SetNillablePath(s *string) *MenuCreate
SetNillablePath sets the "path" field if the given value is not nil.
func (*MenuCreate) SetNillableRedirect ¶
func (mc *MenuCreate) SetNillableRedirect(s *string) *MenuCreate
SetNillableRedirect sets the "redirect" field if the given value is not nil.
func (*MenuCreate) SetNillableRemark ¶
func (mc *MenuCreate) SetNillableRemark(s *string) *MenuCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*MenuCreate) SetNillableSort ¶
func (mc *MenuCreate) SetNillableSort(i *int32) *MenuCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*MenuCreate) SetNillableState ¶
func (mc *MenuCreate) SetNillableState(i *int32) *MenuCreate
SetNillableState sets the "state" field if the given value is not nil.
func (*MenuCreate) SetNillableTitle ¶
func (mc *MenuCreate) SetNillableTitle(s *string) *MenuCreate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*MenuCreate) SetNillableType ¶
func (mc *MenuCreate) SetNillableType(i *int32) *MenuCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*MenuCreate) SetNillableUpdatedAt ¶
func (mc *MenuCreate) SetNillableUpdatedAt(t *time.Time) *MenuCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MenuCreate) SetNillableVisible ¶
func (mc *MenuCreate) SetNillableVisible(b *bool) *MenuCreate
SetNillableVisible sets the "visible" field if the given value is not nil.
func (*MenuCreate) SetParent ¶
func (mc *MenuCreate) SetParent(m *Menu) *MenuCreate
SetParent sets the "parent" edge to the Menu entity.
func (*MenuCreate) SetParentID ¶
func (mc *MenuCreate) SetParentID(u uint32) *MenuCreate
SetParentID sets the "parent_id" field.
func (*MenuCreate) SetPath ¶
func (mc *MenuCreate) SetPath(s string) *MenuCreate
SetPath sets the "path" field.
func (*MenuCreate) SetPermissions ¶
func (mc *MenuCreate) SetPermissions(s []string) *MenuCreate
SetPermissions sets the "permissions" field.
func (*MenuCreate) SetRedirect ¶
func (mc *MenuCreate) SetRedirect(s string) *MenuCreate
SetRedirect sets the "redirect" field.
func (*MenuCreate) SetRemark ¶
func (mc *MenuCreate) SetRemark(s string) *MenuCreate
SetRemark sets the "remark" field.
func (*MenuCreate) SetSort ¶
func (mc *MenuCreate) SetSort(i int32) *MenuCreate
SetSort sets the "sort" field.
func (*MenuCreate) SetState ¶
func (mc *MenuCreate) SetState(i int32) *MenuCreate
SetState sets the "state" field.
func (*MenuCreate) SetTitle ¶
func (mc *MenuCreate) SetTitle(s string) *MenuCreate
SetTitle sets the "title" field.
func (*MenuCreate) SetType ¶
func (mc *MenuCreate) SetType(i int32) *MenuCreate
SetType sets the "type" field.
func (*MenuCreate) SetUpdatedAt ¶
func (mc *MenuCreate) SetUpdatedAt(t time.Time) *MenuCreate
SetUpdatedAt sets the "updated_at" field.
func (*MenuCreate) SetVisible ¶
func (mc *MenuCreate) SetVisible(b bool) *MenuCreate
SetVisible sets the "visible" field.
type MenuCreateBulk ¶
type MenuCreateBulk struct {
// contains filtered or unexported fields
}
MenuCreateBulk is the builder for creating many Menu entities in bulk.
func (*MenuCreateBulk) Exec ¶
func (mcb *MenuCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MenuCreateBulk) ExecX ¶
func (mcb *MenuCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuCreateBulk) OnConflict ¶
func (mcb *MenuCreateBulk) OnConflict(opts ...sql.ConflictOption) *MenuUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Menu.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.MenuUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*MenuCreateBulk) OnConflictColumns ¶
func (mcb *MenuCreateBulk) OnConflictColumns(columns ...string) *MenuUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Menu.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type MenuDelete ¶
type MenuDelete struct {
// contains filtered or unexported fields
}
MenuDelete is the builder for deleting a Menu entity.
func (*MenuDelete) Exec ¶
func (md *MenuDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MenuDelete) ExecX ¶
func (md *MenuDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MenuDelete) Where ¶
func (md *MenuDelete) Where(ps ...predicate.Menu) *MenuDelete
Where appends a list predicates to the MenuDelete builder.
type MenuDeleteOne ¶
type MenuDeleteOne struct {
// contains filtered or unexported fields
}
MenuDeleteOne is the builder for deleting a single Menu entity.
func (*MenuDeleteOne) Exec ¶
func (mdo *MenuDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MenuDeleteOne) ExecX ¶
func (mdo *MenuDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuDeleteOne) Where ¶
func (mdo *MenuDeleteOne) Where(ps ...predicate.Menu) *MenuDeleteOne
Where appends a list predicates to the MenuDelete builder.
type MenuEdges ¶
type MenuEdges struct { // Parent holds the value of the parent edge. Parent *Menu `json:"parent,omitempty"` // Children holds the value of the children edge. Children []*Menu `json:"children,omitempty"` // contains filtered or unexported fields }
MenuEdges holds the relations/edges for other nodes in the graph.
func (MenuEdges) ChildrenOrErr ¶
ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.
func (MenuEdges) ParentOrErr ¶
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MenuFilter ¶
type MenuFilter struct {
// contains filtered or unexported fields
}
MenuFilter provides a generic filtering capability at runtime for MenuQuery.
func (*MenuFilter) Where ¶
func (f *MenuFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*MenuFilter) WhereComponent ¶
func (f *MenuFilter) WhereComponent(p entql.StringP)
WhereComponent applies the entql string predicate on the component field.
func (*MenuFilter) WhereCreatedAt ¶
func (f *MenuFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*MenuFilter) WhereCurrentActiveMenu ¶
func (f *MenuFilter) WhereCurrentActiveMenu(p entql.StringP)
WhereCurrentActiveMenu applies the entql string predicate on the current_active_menu field.
func (*MenuFilter) WhereDeletedAt ¶
func (f *MenuFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*MenuFilter) WhereExtURL ¶
func (f *MenuFilter) WhereExtURL(p entql.StringP)
WhereExtURL applies the entql string predicate on the ext_url field.
func (*MenuFilter) WhereHasChildren ¶
func (f *MenuFilter) WhereHasChildren()
WhereHasChildren applies a predicate to check if query has an edge children.
func (*MenuFilter) WhereHasChildrenWith ¶
func (f *MenuFilter) WhereHasChildrenWith(preds ...predicate.Menu)
WhereHasChildrenWith applies a predicate to check if query has an edge children with a given conditions (other predicates).
func (*MenuFilter) WhereHasParent ¶
func (f *MenuFilter) WhereHasParent()
WhereHasParent applies a predicate to check if query has an edge parent.
func (*MenuFilter) WhereHasParentWith ¶
func (f *MenuFilter) WhereHasParentWith(preds ...predicate.Menu)
WhereHasParentWith applies a predicate to check if query has an edge parent with a given conditions (other predicates).
func (*MenuFilter) WhereHideBreadcrumb ¶
func (f *MenuFilter) WhereHideBreadcrumb(p entql.BoolP)
WhereHideBreadcrumb applies the entql bool predicate on the hide_breadcrumb field.
func (*MenuFilter) WhereHideMenu ¶
func (f *MenuFilter) WhereHideMenu(p entql.BoolP)
WhereHideMenu applies the entql bool predicate on the hide_menu field.
func (*MenuFilter) WhereHideTab ¶
func (f *MenuFilter) WhereHideTab(p entql.BoolP)
WhereHideTab applies the entql bool predicate on the hide_tab field.
func (*MenuFilter) WhereID ¶
func (f *MenuFilter) WhereID(p entql.Uint32P)
WhereID applies the entql uint32 predicate on the id field.
func (*MenuFilter) WhereIcon ¶
func (f *MenuFilter) WhereIcon(p entql.StringP)
WhereIcon applies the entql string predicate on the icon field.
func (*MenuFilter) WhereIsExt ¶
func (f *MenuFilter) WhereIsExt(p entql.BoolP)
WhereIsExt applies the entql bool predicate on the is_ext field.
func (*MenuFilter) WhereKeepAlive ¶
func (f *MenuFilter) WhereKeepAlive(p entql.BoolP)
WhereKeepAlive applies the entql bool predicate on the keep_alive field.
func (*MenuFilter) WhereName ¶
func (f *MenuFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (*MenuFilter) WhereParentID ¶
func (f *MenuFilter) WhereParentID(p entql.Uint32P)
WhereParentID applies the entql uint32 predicate on the parent_id field.
func (*MenuFilter) WherePath ¶
func (f *MenuFilter) WherePath(p entql.StringP)
WherePath applies the entql string predicate on the path field.
func (*MenuFilter) WherePermissions ¶
func (f *MenuFilter) WherePermissions(p entql.BytesP)
WherePermissions applies the entql json.RawMessage predicate on the permissions field.
func (*MenuFilter) WhereRedirect ¶
func (f *MenuFilter) WhereRedirect(p entql.StringP)
WhereRedirect applies the entql string predicate on the redirect field.
func (*MenuFilter) WhereRemark ¶
func (f *MenuFilter) WhereRemark(p entql.StringP)
WhereRemark applies the entql string predicate on the remark field.
func (*MenuFilter) WhereSort ¶
func (f *MenuFilter) WhereSort(p entql.Int32P)
WhereSort applies the entql int32 predicate on the sort field.
func (*MenuFilter) WhereState ¶
func (f *MenuFilter) WhereState(p entql.Int32P)
WhereState applies the entql int32 predicate on the state field.
func (*MenuFilter) WhereTitle ¶
func (f *MenuFilter) WhereTitle(p entql.StringP)
WhereTitle applies the entql string predicate on the title field.
func (*MenuFilter) WhereType ¶
func (f *MenuFilter) WhereType(p entql.Int32P)
WhereType applies the entql int32 predicate on the type field.
func (*MenuFilter) WhereUpdatedAt ¶
func (f *MenuFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
func (*MenuFilter) WhereVisible ¶
func (f *MenuFilter) WhereVisible(p entql.BoolP)
WhereVisible applies the entql bool predicate on the visible field.
type MenuGroupBy ¶
type MenuGroupBy struct {
// contains filtered or unexported fields
}
MenuGroupBy is the group-by builder for Menu entities.
func (*MenuGroupBy) Aggregate ¶
func (mgb *MenuGroupBy) Aggregate(fns ...AggregateFunc) *MenuGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MenuGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MenuGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MenuGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MenuGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MenuGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MenuGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MenuGroupBy) Scan ¶
func (mgb *MenuGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MenuGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MenuMutation ¶
type MenuMutation struct {
// contains filtered or unexported fields
}
MenuMutation represents an operation that mutates the Menu nodes in the graph.
func (*MenuMutation) AddChildIDs ¶
func (m *MenuMutation) AddChildIDs(ids ...uint32)
AddChildIDs adds the "children" edge to the Menu entity by ids.
func (*MenuMutation) AddField ¶
func (m *MenuMutation) 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 (*MenuMutation) AddSort ¶
func (m *MenuMutation) AddSort(i int32)
AddSort adds i to the "sort" field.
func (*MenuMutation) AddState ¶
func (m *MenuMutation) AddState(i int32)
AddState adds i to the "state" field.
func (*MenuMutation) AddType ¶
func (m *MenuMutation) AddType(i int32)
AddType adds i to the "type" field.
func (*MenuMutation) AddedEdges ¶
func (m *MenuMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MenuMutation) AddedField ¶
func (m *MenuMutation) 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 (*MenuMutation) AddedFields ¶
func (m *MenuMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MenuMutation) AddedIDs ¶
func (m *MenuMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MenuMutation) AddedSort ¶
func (m *MenuMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*MenuMutation) AddedState ¶
func (m *MenuMutation) AddedState() (r int32, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*MenuMutation) AddedType ¶
func (m *MenuMutation) AddedType() (r int32, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*MenuMutation) AppendPermissions ¶
func (m *MenuMutation) AppendPermissions(s []string)
AppendPermissions adds s to the "permissions" field.
func (*MenuMutation) AppendedPermissions ¶
func (m *MenuMutation) AppendedPermissions() ([]string, bool)
AppendedPermissions returns the list of values that were appended to the "permissions" field in this mutation.
func (*MenuMutation) ChildrenCleared ¶
func (m *MenuMutation) ChildrenCleared() bool
ChildrenCleared reports if the "children" edge to the Menu entity was cleared.
func (*MenuMutation) ChildrenIDs ¶
func (m *MenuMutation) ChildrenIDs() (ids []uint32)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*MenuMutation) ClearChildren ¶
func (m *MenuMutation) ClearChildren()
ClearChildren clears the "children" edge to the Menu entity.
func (*MenuMutation) ClearCreatedAt ¶
func (m *MenuMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*MenuMutation) ClearDeletedAt ¶
func (m *MenuMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MenuMutation) ClearEdge ¶
func (m *MenuMutation) 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 (*MenuMutation) ClearField ¶
func (m *MenuMutation) 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 (*MenuMutation) ClearParent ¶
func (m *MenuMutation) ClearParent()
ClearParent clears the "parent" edge to the Menu entity.
func (*MenuMutation) ClearParentID ¶
func (m *MenuMutation) ClearParentID()
ClearParentID clears the value of the "parent_id" field.
func (*MenuMutation) ClearPermissions ¶
func (m *MenuMutation) ClearPermissions()
ClearPermissions clears the value of the "permissions" field.
func (*MenuMutation) ClearRemark ¶
func (m *MenuMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*MenuMutation) ClearUpdatedAt ¶
func (m *MenuMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MenuMutation) ClearedEdges ¶
func (m *MenuMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MenuMutation) ClearedFields ¶
func (m *MenuMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MenuMutation) Client ¶
func (m MenuMutation) 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 (*MenuMutation) Component ¶
func (m *MenuMutation) Component() (r string, exists bool)
Component returns the value of the "component" field in the mutation.
func (*MenuMutation) CreatedAt ¶
func (m *MenuMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MenuMutation) CreatedAtCleared ¶
func (m *MenuMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*MenuMutation) CurrentActiveMenu ¶
func (m *MenuMutation) CurrentActiveMenu() (r string, exists bool)
CurrentActiveMenu returns the value of the "current_active_menu" field in the mutation.
func (*MenuMutation) DeletedAt ¶
func (m *MenuMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*MenuMutation) DeletedAtCleared ¶
func (m *MenuMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*MenuMutation) EdgeCleared ¶
func (m *MenuMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MenuMutation) ExtURL ¶
func (m *MenuMutation) ExtURL() (r string, exists bool)
ExtURL returns the value of the "ext_url" field in the mutation.
func (*MenuMutation) Field ¶
func (m *MenuMutation) 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 (*MenuMutation) FieldCleared ¶
func (m *MenuMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MenuMutation) Fields ¶
func (m *MenuMutation) 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 (*MenuMutation) Filter ¶
func (m *MenuMutation) Filter() *MenuFilter
Filter returns an entql.Where implementation to apply filters on the MenuMutation builder.
func (*MenuMutation) GetType ¶
func (m *MenuMutation) GetType() (r int32, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*MenuMutation) HideBreadcrumb ¶
func (m *MenuMutation) HideBreadcrumb() (r bool, exists bool)
HideBreadcrumb returns the value of the "hide_breadcrumb" field in the mutation.
func (*MenuMutation) HideMenu ¶
func (m *MenuMutation) HideMenu() (r bool, exists bool)
HideMenu returns the value of the "hide_menu" field in the mutation.
func (*MenuMutation) HideTab ¶
func (m *MenuMutation) HideTab() (r bool, exists bool)
HideTab returns the value of the "hide_tab" field in the mutation.
func (*MenuMutation) ID ¶
func (m *MenuMutation) ID() (id uint32, 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 (*MenuMutation) IDs ¶
func (m *MenuMutation) IDs(ctx context.Context) ([]uint32, 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 (*MenuMutation) Icon ¶
func (m *MenuMutation) Icon() (r string, exists bool)
Icon returns the value of the "icon" field in the mutation.
func (*MenuMutation) IsExt ¶
func (m *MenuMutation) IsExt() (r bool, exists bool)
IsExt returns the value of the "is_ext" field in the mutation.
func (*MenuMutation) KeepAlive ¶
func (m *MenuMutation) KeepAlive() (r bool, exists bool)
KeepAlive returns the value of the "keep_alive" field in the mutation.
func (*MenuMutation) Name ¶
func (m *MenuMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*MenuMutation) OldComponent ¶
func (m *MenuMutation) OldComponent(ctx context.Context) (v *string, err error)
OldComponent returns the old "component" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldCurrentActiveMenu ¶
func (m *MenuMutation) OldCurrentActiveMenu(ctx context.Context) (v *string, err error)
OldCurrentActiveMenu returns the old "current_active_menu" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldExtURL ¶
func (m *MenuMutation) OldExtURL(ctx context.Context) (v *string, err error)
OldExtURL returns the old "ext_url" field's value of the Menu entity. If the Menu 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 (*MenuMutation) 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 (*MenuMutation) OldHideBreadcrumb ¶
func (m *MenuMutation) OldHideBreadcrumb(ctx context.Context) (v *bool, err error)
OldHideBreadcrumb returns the old "hide_breadcrumb" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldHideMenu ¶
func (m *MenuMutation) OldHideMenu(ctx context.Context) (v *bool, err error)
OldHideMenu returns the old "hide_menu" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldHideTab ¶
func (m *MenuMutation) OldHideTab(ctx context.Context) (v *bool, err error)
OldHideTab returns the old "hide_tab" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldIcon ¶
func (m *MenuMutation) OldIcon(ctx context.Context) (v *string, err error)
OldIcon returns the old "icon" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldIsExt ¶
func (m *MenuMutation) OldIsExt(ctx context.Context) (v *bool, err error)
OldIsExt returns the old "is_ext" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldKeepAlive ¶
func (m *MenuMutation) OldKeepAlive(ctx context.Context) (v *bool, err error)
OldKeepAlive returns the old "keep_alive" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldName ¶
func (m *MenuMutation) OldName(ctx context.Context) (v *string, err error)
OldName returns the old "name" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldParentID ¶
func (m *MenuMutation) OldParentID(ctx context.Context) (v *uint32, err error)
OldParentID returns the old "parent_id" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldPath ¶
func (m *MenuMutation) OldPath(ctx context.Context) (v *string, err error)
OldPath returns the old "path" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldPermissions ¶
func (m *MenuMutation) OldPermissions(ctx context.Context) (v []string, err error)
OldPermissions returns the old "permissions" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldRedirect ¶
func (m *MenuMutation) OldRedirect(ctx context.Context) (v *string, err error)
OldRedirect returns the old "redirect" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldRemark ¶
func (m *MenuMutation) OldRemark(ctx context.Context) (v *string, err error)
OldRemark returns the old "remark" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldSort ¶
func (m *MenuMutation) OldSort(ctx context.Context) (v *int32, err error)
OldSort returns the old "sort" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldState ¶
func (m *MenuMutation) OldState(ctx context.Context) (v *int32, err error)
OldState returns the old "state" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldTitle ¶
func (m *MenuMutation) OldTitle(ctx context.Context) (v *string, err error)
OldTitle returns the old "title" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldType ¶
func (m *MenuMutation) OldType(ctx context.Context) (v *int32, err error)
OldType returns the old "type" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Menu entity. If the Menu 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 (*MenuMutation) OldVisible ¶
func (m *MenuMutation) OldVisible(ctx context.Context) (v *bool, err error)
OldVisible returns the old "visible" field's value of the Menu entity. If the Menu 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 (*MenuMutation) ParentCleared ¶
func (m *MenuMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the Menu entity was cleared.
func (*MenuMutation) ParentID ¶
func (m *MenuMutation) ParentID() (r uint32, exists bool)
ParentID returns the value of the "parent_id" field in the mutation.
func (*MenuMutation) ParentIDCleared ¶
func (m *MenuMutation) ParentIDCleared() bool
ParentIDCleared returns if the "parent_id" field was cleared in this mutation.
func (*MenuMutation) ParentIDs ¶
func (m *MenuMutation) ParentIDs() (ids []uint32)
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 (*MenuMutation) Path ¶
func (m *MenuMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*MenuMutation) Permissions ¶
func (m *MenuMutation) Permissions() (r []string, exists bool)
Permissions returns the value of the "permissions" field in the mutation.
func (*MenuMutation) PermissionsCleared ¶
func (m *MenuMutation) PermissionsCleared() bool
PermissionsCleared returns if the "permissions" field was cleared in this mutation.
func (*MenuMutation) Redirect ¶
func (m *MenuMutation) Redirect() (r string, exists bool)
Redirect returns the value of the "redirect" field in the mutation.
func (*MenuMutation) Remark ¶
func (m *MenuMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*MenuMutation) RemarkCleared ¶
func (m *MenuMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*MenuMutation) RemoveChildIDs ¶
func (m *MenuMutation) RemoveChildIDs(ids ...uint32)
RemoveChildIDs removes the "children" edge to the Menu entity by IDs.
func (*MenuMutation) RemovedChildrenIDs ¶
func (m *MenuMutation) RemovedChildrenIDs() (ids []uint32)
RemovedChildren returns the removed IDs of the "children" edge to the Menu entity.
func (*MenuMutation) RemovedEdges ¶
func (m *MenuMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MenuMutation) RemovedIDs ¶
func (m *MenuMutation) 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 (*MenuMutation) ResetChildren ¶
func (m *MenuMutation) ResetChildren()
ResetChildren resets all changes to the "children" edge.
func (*MenuMutation) ResetComponent ¶
func (m *MenuMutation) ResetComponent()
ResetComponent resets all changes to the "component" field.
func (*MenuMutation) ResetCreatedAt ¶
func (m *MenuMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MenuMutation) ResetCurrentActiveMenu ¶
func (m *MenuMutation) ResetCurrentActiveMenu()
ResetCurrentActiveMenu resets all changes to the "current_active_menu" field.
func (*MenuMutation) ResetDeletedAt ¶
func (m *MenuMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*MenuMutation) ResetEdge ¶
func (m *MenuMutation) 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 (*MenuMutation) ResetExtURL ¶
func (m *MenuMutation) ResetExtURL()
ResetExtURL resets all changes to the "ext_url" field.
func (*MenuMutation) ResetField ¶
func (m *MenuMutation) 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 (*MenuMutation) ResetHideBreadcrumb ¶
func (m *MenuMutation) ResetHideBreadcrumb()
ResetHideBreadcrumb resets all changes to the "hide_breadcrumb" field.
func (*MenuMutation) ResetHideMenu ¶
func (m *MenuMutation) ResetHideMenu()
ResetHideMenu resets all changes to the "hide_menu" field.
func (*MenuMutation) ResetHideTab ¶
func (m *MenuMutation) ResetHideTab()
ResetHideTab resets all changes to the "hide_tab" field.
func (*MenuMutation) ResetIcon ¶
func (m *MenuMutation) ResetIcon()
ResetIcon resets all changes to the "icon" field.
func (*MenuMutation) ResetIsExt ¶
func (m *MenuMutation) ResetIsExt()
ResetIsExt resets all changes to the "is_ext" field.
func (*MenuMutation) ResetKeepAlive ¶
func (m *MenuMutation) ResetKeepAlive()
ResetKeepAlive resets all changes to the "keep_alive" field.
func (*MenuMutation) ResetName ¶
func (m *MenuMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*MenuMutation) ResetParent ¶
func (m *MenuMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*MenuMutation) ResetParentID ¶
func (m *MenuMutation) ResetParentID()
ResetParentID resets all changes to the "parent_id" field.
func (*MenuMutation) ResetPath ¶
func (m *MenuMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*MenuMutation) ResetPermissions ¶
func (m *MenuMutation) ResetPermissions()
ResetPermissions resets all changes to the "permissions" field.
func (*MenuMutation) ResetRedirect ¶
func (m *MenuMutation) ResetRedirect()
ResetRedirect resets all changes to the "redirect" field.
func (*MenuMutation) ResetRemark ¶
func (m *MenuMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*MenuMutation) ResetSort ¶
func (m *MenuMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*MenuMutation) ResetState ¶
func (m *MenuMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*MenuMutation) ResetTitle ¶
func (m *MenuMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*MenuMutation) ResetType ¶
func (m *MenuMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*MenuMutation) ResetUpdatedAt ¶
func (m *MenuMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MenuMutation) ResetVisible ¶
func (m *MenuMutation) ResetVisible()
ResetVisible resets all changes to the "visible" field.
func (*MenuMutation) SetComponent ¶
func (m *MenuMutation) SetComponent(s string)
SetComponent sets the "component" field.
func (*MenuMutation) SetCreatedAt ¶
func (m *MenuMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MenuMutation) SetCurrentActiveMenu ¶
func (m *MenuMutation) SetCurrentActiveMenu(s string)
SetCurrentActiveMenu sets the "current_active_menu" field.
func (*MenuMutation) SetDeletedAt ¶
func (m *MenuMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*MenuMutation) SetExtURL ¶
func (m *MenuMutation) SetExtURL(s string)
SetExtURL sets the "ext_url" field.
func (*MenuMutation) SetField ¶
func (m *MenuMutation) 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 (*MenuMutation) SetHideBreadcrumb ¶
func (m *MenuMutation) SetHideBreadcrumb(b bool)
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuMutation) SetHideMenu ¶
func (m *MenuMutation) SetHideMenu(b bool)
SetHideMenu sets the "hide_menu" field.
func (*MenuMutation) SetHideTab ¶
func (m *MenuMutation) SetHideTab(b bool)
SetHideTab sets the "hide_tab" field.
func (*MenuMutation) SetID ¶
func (m *MenuMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Menu entities.
func (*MenuMutation) SetIcon ¶
func (m *MenuMutation) SetIcon(s string)
SetIcon sets the "icon" field.
func (*MenuMutation) SetIsExt ¶
func (m *MenuMutation) SetIsExt(b bool)
SetIsExt sets the "is_ext" field.
func (*MenuMutation) SetKeepAlive ¶
func (m *MenuMutation) SetKeepAlive(b bool)
SetKeepAlive sets the "keep_alive" field.
func (*MenuMutation) SetName ¶
func (m *MenuMutation) SetName(s string)
SetName sets the "name" field.
func (*MenuMutation) SetOp ¶
func (m *MenuMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MenuMutation) SetParentID ¶
func (m *MenuMutation) SetParentID(u uint32)
SetParentID sets the "parent_id" field.
func (*MenuMutation) SetPath ¶
func (m *MenuMutation) SetPath(s string)
SetPath sets the "path" field.
func (*MenuMutation) SetPermissions ¶
func (m *MenuMutation) SetPermissions(s []string)
SetPermissions sets the "permissions" field.
func (*MenuMutation) SetRedirect ¶
func (m *MenuMutation) SetRedirect(s string)
SetRedirect sets the "redirect" field.
func (*MenuMutation) SetRemark ¶
func (m *MenuMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*MenuMutation) SetSort ¶
func (m *MenuMutation) SetSort(i int32)
SetSort sets the "sort" field.
func (*MenuMutation) SetState ¶
func (m *MenuMutation) SetState(i int32)
SetState sets the "state" field.
func (*MenuMutation) SetTitle ¶
func (m *MenuMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*MenuMutation) SetType ¶
func (m *MenuMutation) SetType(i int32)
SetType sets the "type" field.
func (*MenuMutation) SetUpdatedAt ¶
func (m *MenuMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MenuMutation) SetVisible ¶
func (m *MenuMutation) SetVisible(b bool)
SetVisible sets the "visible" field.
func (*MenuMutation) Sort ¶
func (m *MenuMutation) Sort() (r int32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*MenuMutation) State ¶
func (m *MenuMutation) State() (r int32, exists bool)
State returns the value of the "state" field in the mutation.
func (*MenuMutation) Title ¶
func (m *MenuMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (MenuMutation) Tx ¶
func (m MenuMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MenuMutation) Type ¶
func (m *MenuMutation) Type() string
Type returns the node type of this mutation (Menu).
func (*MenuMutation) UpdatedAt ¶
func (m *MenuMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MenuMutation) UpdatedAtCleared ¶
func (m *MenuMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*MenuMutation) Visible ¶
func (m *MenuMutation) Visible() (r bool, exists bool)
Visible returns the value of the "visible" field in the mutation.
func (*MenuMutation) Where ¶
func (m *MenuMutation) Where(ps ...predicate.Menu)
Where appends a list predicates to the MenuMutation builder.
func (*MenuMutation) WhereP ¶
func (m *MenuMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MenuMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MenuQuery ¶
type MenuQuery struct {
// contains filtered or unexported fields
}
MenuQuery is the builder for querying Menu entities.
func (*MenuQuery) Aggregate ¶
func (mq *MenuQuery) Aggregate(fns ...AggregateFunc) *MenuSelect
Aggregate returns a MenuSelect configured with the given aggregations.
func (*MenuQuery) Clone ¶
Clone returns a duplicate of the MenuQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MenuQuery) Filter ¶
func (mq *MenuQuery) Filter() *MenuFilter
Filter returns a Filter implementation to apply filters on the MenuQuery builder.
func (*MenuQuery) First ¶
First returns the first Menu entity from the query. Returns a *NotFoundError when no Menu was found.
func (*MenuQuery) FirstID ¶
FirstID returns the first Menu ID from the query. Returns a *NotFoundError when no Menu ID was found.
func (*MenuQuery) GroupBy ¶
func (mq *MenuQuery) GroupBy(field string, fields ...string) *MenuGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Menu.Query(). GroupBy(menu.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MenuQuery) Modify ¶
func (mq *MenuQuery) Modify(modifiers ...func(s *sql.Selector)) *MenuSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*MenuQuery) Only ¶
Only returns a single Menu entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Menu entity is found. Returns a *NotFoundError when no Menu entities are found.
func (*MenuQuery) OnlyID ¶
OnlyID is like Only, but returns the only Menu ID in the query. Returns a *NotSingularError when more than one Menu ID is found. Returns a *NotFoundError when no entities are found.
func (*MenuQuery) Order ¶
func (mq *MenuQuery) Order(o ...menu.OrderOption) *MenuQuery
Order specifies how the records should be ordered.
func (*MenuQuery) QueryChildren ¶
QueryChildren chains the current query on the "children" edge.
func (*MenuQuery) QueryParent ¶
QueryParent chains the current query on the "parent" edge.
func (*MenuQuery) Select ¶
func (mq *MenuQuery) Select(fields ...string) *MenuSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Menu.Query(). Select(menu.FieldCreatedAt). Scan(ctx, &v)
func (*MenuQuery) 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 (*MenuQuery) WithChildren ¶
WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.
func (*MenuQuery) WithParent ¶
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 MenuSelect ¶
type MenuSelect struct { *MenuQuery // contains filtered or unexported fields }
MenuSelect is the builder for selecting fields of Menu entities.
func (*MenuSelect) Aggregate ¶
func (ms *MenuSelect) Aggregate(fns ...AggregateFunc) *MenuSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MenuSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MenuSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MenuSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MenuSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MenuSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MenuSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MenuSelect) Modify ¶
func (ms *MenuSelect) Modify(modifiers ...func(s *sql.Selector)) *MenuSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*MenuSelect) Scan ¶
func (ms *MenuSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MenuSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MenuUpdate ¶
type MenuUpdate struct {
// contains filtered or unexported fields
}
MenuUpdate is the builder for updating Menu entities.
func (*MenuUpdate) AddChildIDs ¶
func (mu *MenuUpdate) AddChildIDs(ids ...uint32) *MenuUpdate
AddChildIDs adds the "children" edge to the Menu entity by IDs.
func (*MenuUpdate) AddChildren ¶
func (mu *MenuUpdate) AddChildren(m ...*Menu) *MenuUpdate
AddChildren adds the "children" edges to the Menu entity.
func (*MenuUpdate) AddSort ¶
func (mu *MenuUpdate) AddSort(i int32) *MenuUpdate
AddSort adds i to the "sort" field.
func (*MenuUpdate) AddState ¶
func (mu *MenuUpdate) AddState(i int32) *MenuUpdate
AddState adds i to the "state" field.
func (*MenuUpdate) AddType ¶
func (mu *MenuUpdate) AddType(i int32) *MenuUpdate
AddType adds i to the "type" field.
func (*MenuUpdate) AppendPermissions ¶
func (mu *MenuUpdate) AppendPermissions(s []string) *MenuUpdate
AppendPermissions appends s to the "permissions" field.
func (*MenuUpdate) ClearChildren ¶
func (mu *MenuUpdate) ClearChildren() *MenuUpdate
ClearChildren clears all "children" edges to the Menu entity.
func (*MenuUpdate) ClearDeletedAt ¶
func (mu *MenuUpdate) ClearDeletedAt() *MenuUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MenuUpdate) ClearParent ¶
func (mu *MenuUpdate) ClearParent() *MenuUpdate
ClearParent clears the "parent" edge to the Menu entity.
func (*MenuUpdate) ClearParentID ¶
func (mu *MenuUpdate) ClearParentID() *MenuUpdate
ClearParentID clears the value of the "parent_id" field.
func (*MenuUpdate) ClearPermissions ¶
func (mu *MenuUpdate) ClearPermissions() *MenuUpdate
ClearPermissions clears the value of the "permissions" field.
func (*MenuUpdate) ClearRemark ¶
func (mu *MenuUpdate) ClearRemark() *MenuUpdate
ClearRemark clears the value of the "remark" field.
func (*MenuUpdate) ClearUpdatedAt ¶
func (mu *MenuUpdate) ClearUpdatedAt() *MenuUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MenuUpdate) Exec ¶
func (mu *MenuUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MenuUpdate) ExecX ¶
func (mu *MenuUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuUpdate) Modify ¶
func (mu *MenuUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MenuUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*MenuUpdate) Mutation ¶
func (mu *MenuUpdate) Mutation() *MenuMutation
Mutation returns the MenuMutation object of the builder.
func (*MenuUpdate) RemoveChildIDs ¶
func (mu *MenuUpdate) RemoveChildIDs(ids ...uint32) *MenuUpdate
RemoveChildIDs removes the "children" edge to Menu entities by IDs.
func (*MenuUpdate) RemoveChildren ¶
func (mu *MenuUpdate) RemoveChildren(m ...*Menu) *MenuUpdate
RemoveChildren removes "children" edges to Menu entities.
func (*MenuUpdate) Save ¶
func (mu *MenuUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MenuUpdate) SaveX ¶
func (mu *MenuUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MenuUpdate) SetComponent ¶
func (mu *MenuUpdate) SetComponent(s string) *MenuUpdate
SetComponent sets the "component" field.
func (*MenuUpdate) SetCurrentActiveMenu ¶
func (mu *MenuUpdate) SetCurrentActiveMenu(s string) *MenuUpdate
SetCurrentActiveMenu sets the "current_active_menu" field.
func (*MenuUpdate) SetDeletedAt ¶
func (mu *MenuUpdate) SetDeletedAt(t time.Time) *MenuUpdate
SetDeletedAt sets the "deleted_at" field.
func (*MenuUpdate) SetExtURL ¶
func (mu *MenuUpdate) SetExtURL(s string) *MenuUpdate
SetExtURL sets the "ext_url" field.
func (*MenuUpdate) SetHideBreadcrumb ¶
func (mu *MenuUpdate) SetHideBreadcrumb(b bool) *MenuUpdate
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuUpdate) SetHideMenu ¶
func (mu *MenuUpdate) SetHideMenu(b bool) *MenuUpdate
SetHideMenu sets the "hide_menu" field.
func (*MenuUpdate) SetHideTab ¶
func (mu *MenuUpdate) SetHideTab(b bool) *MenuUpdate
SetHideTab sets the "hide_tab" field.
func (*MenuUpdate) SetIcon ¶
func (mu *MenuUpdate) SetIcon(s string) *MenuUpdate
SetIcon sets the "icon" field.
func (*MenuUpdate) SetIsExt ¶
func (mu *MenuUpdate) SetIsExt(b bool) *MenuUpdate
SetIsExt sets the "is_ext" field.
func (*MenuUpdate) SetKeepAlive ¶
func (mu *MenuUpdate) SetKeepAlive(b bool) *MenuUpdate
SetKeepAlive sets the "keep_alive" field.
func (*MenuUpdate) SetName ¶
func (mu *MenuUpdate) SetName(s string) *MenuUpdate
SetName sets the "name" field.
func (*MenuUpdate) SetNillableComponent ¶
func (mu *MenuUpdate) SetNillableComponent(s *string) *MenuUpdate
SetNillableComponent sets the "component" field if the given value is not nil.
func (*MenuUpdate) SetNillableCurrentActiveMenu ¶
func (mu *MenuUpdate) SetNillableCurrentActiveMenu(s *string) *MenuUpdate
SetNillableCurrentActiveMenu sets the "current_active_menu" field if the given value is not nil.
func (*MenuUpdate) SetNillableDeletedAt ¶
func (mu *MenuUpdate) SetNillableDeletedAt(t *time.Time) *MenuUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MenuUpdate) SetNillableExtURL ¶
func (mu *MenuUpdate) SetNillableExtURL(s *string) *MenuUpdate
SetNillableExtURL sets the "ext_url" field if the given value is not nil.
func (*MenuUpdate) SetNillableHideBreadcrumb ¶
func (mu *MenuUpdate) SetNillableHideBreadcrumb(b *bool) *MenuUpdate
SetNillableHideBreadcrumb sets the "hide_breadcrumb" field if the given value is not nil.
func (*MenuUpdate) SetNillableHideMenu ¶
func (mu *MenuUpdate) SetNillableHideMenu(b *bool) *MenuUpdate
SetNillableHideMenu sets the "hide_menu" field if the given value is not nil.
func (*MenuUpdate) SetNillableHideTab ¶
func (mu *MenuUpdate) SetNillableHideTab(b *bool) *MenuUpdate
SetNillableHideTab sets the "hide_tab" field if the given value is not nil.
func (*MenuUpdate) SetNillableIcon ¶
func (mu *MenuUpdate) SetNillableIcon(s *string) *MenuUpdate
SetNillableIcon sets the "icon" field if the given value is not nil.
func (*MenuUpdate) SetNillableIsExt ¶
func (mu *MenuUpdate) SetNillableIsExt(b *bool) *MenuUpdate
SetNillableIsExt sets the "is_ext" field if the given value is not nil.
func (*MenuUpdate) SetNillableKeepAlive ¶
func (mu *MenuUpdate) SetNillableKeepAlive(b *bool) *MenuUpdate
SetNillableKeepAlive sets the "keep_alive" field if the given value is not nil.
func (*MenuUpdate) SetNillableName ¶
func (mu *MenuUpdate) SetNillableName(s *string) *MenuUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*MenuUpdate) SetNillableParentID ¶
func (mu *MenuUpdate) SetNillableParentID(u *uint32) *MenuUpdate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*MenuUpdate) SetNillablePath ¶
func (mu *MenuUpdate) SetNillablePath(s *string) *MenuUpdate
SetNillablePath sets the "path" field if the given value is not nil.
func (*MenuUpdate) SetNillableRedirect ¶
func (mu *MenuUpdate) SetNillableRedirect(s *string) *MenuUpdate
SetNillableRedirect sets the "redirect" field if the given value is not nil.
func (*MenuUpdate) SetNillableRemark ¶
func (mu *MenuUpdate) SetNillableRemark(s *string) *MenuUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*MenuUpdate) SetNillableSort ¶
func (mu *MenuUpdate) SetNillableSort(i *int32) *MenuUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*MenuUpdate) SetNillableState ¶
func (mu *MenuUpdate) SetNillableState(i *int32) *MenuUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*MenuUpdate) SetNillableTitle ¶
func (mu *MenuUpdate) SetNillableTitle(s *string) *MenuUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*MenuUpdate) SetNillableType ¶
func (mu *MenuUpdate) SetNillableType(i *int32) *MenuUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*MenuUpdate) SetNillableUpdatedAt ¶
func (mu *MenuUpdate) SetNillableUpdatedAt(t *time.Time) *MenuUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MenuUpdate) SetNillableVisible ¶
func (mu *MenuUpdate) SetNillableVisible(b *bool) *MenuUpdate
SetNillableVisible sets the "visible" field if the given value is not nil.
func (*MenuUpdate) SetParent ¶
func (mu *MenuUpdate) SetParent(m *Menu) *MenuUpdate
SetParent sets the "parent" edge to the Menu entity.
func (*MenuUpdate) SetParentID ¶
func (mu *MenuUpdate) SetParentID(u uint32) *MenuUpdate
SetParentID sets the "parent_id" field.
func (*MenuUpdate) SetPath ¶
func (mu *MenuUpdate) SetPath(s string) *MenuUpdate
SetPath sets the "path" field.
func (*MenuUpdate) SetPermissions ¶
func (mu *MenuUpdate) SetPermissions(s []string) *MenuUpdate
SetPermissions sets the "permissions" field.
func (*MenuUpdate) SetRedirect ¶
func (mu *MenuUpdate) SetRedirect(s string) *MenuUpdate
SetRedirect sets the "redirect" field.
func (*MenuUpdate) SetRemark ¶
func (mu *MenuUpdate) SetRemark(s string) *MenuUpdate
SetRemark sets the "remark" field.
func (*MenuUpdate) SetSort ¶
func (mu *MenuUpdate) SetSort(i int32) *MenuUpdate
SetSort sets the "sort" field.
func (*MenuUpdate) SetState ¶
func (mu *MenuUpdate) SetState(i int32) *MenuUpdate
SetState sets the "state" field.
func (*MenuUpdate) SetTitle ¶
func (mu *MenuUpdate) SetTitle(s string) *MenuUpdate
SetTitle sets the "title" field.
func (*MenuUpdate) SetType ¶
func (mu *MenuUpdate) SetType(i int32) *MenuUpdate
SetType sets the "type" field.
func (*MenuUpdate) SetUpdatedAt ¶
func (mu *MenuUpdate) SetUpdatedAt(t time.Time) *MenuUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MenuUpdate) SetVisible ¶
func (mu *MenuUpdate) SetVisible(b bool) *MenuUpdate
SetVisible sets the "visible" field.
func (*MenuUpdate) Where ¶
func (mu *MenuUpdate) Where(ps ...predicate.Menu) *MenuUpdate
Where appends a list predicates to the MenuUpdate builder.
type MenuUpdateOne ¶
type MenuUpdateOne struct {
// contains filtered or unexported fields
}
MenuUpdateOne is the builder for updating a single Menu entity.
func (*MenuUpdateOne) AddChildIDs ¶
func (muo *MenuUpdateOne) AddChildIDs(ids ...uint32) *MenuUpdateOne
AddChildIDs adds the "children" edge to the Menu entity by IDs.
func (*MenuUpdateOne) AddChildren ¶
func (muo *MenuUpdateOne) AddChildren(m ...*Menu) *MenuUpdateOne
AddChildren adds the "children" edges to the Menu entity.
func (*MenuUpdateOne) AddSort ¶
func (muo *MenuUpdateOne) AddSort(i int32) *MenuUpdateOne
AddSort adds i to the "sort" field.
func (*MenuUpdateOne) AddState ¶
func (muo *MenuUpdateOne) AddState(i int32) *MenuUpdateOne
AddState adds i to the "state" field.
func (*MenuUpdateOne) AddType ¶
func (muo *MenuUpdateOne) AddType(i int32) *MenuUpdateOne
AddType adds i to the "type" field.
func (*MenuUpdateOne) AppendPermissions ¶
func (muo *MenuUpdateOne) AppendPermissions(s []string) *MenuUpdateOne
AppendPermissions appends s to the "permissions" field.
func (*MenuUpdateOne) ClearChildren ¶
func (muo *MenuUpdateOne) ClearChildren() *MenuUpdateOne
ClearChildren clears all "children" edges to the Menu entity.
func (*MenuUpdateOne) ClearDeletedAt ¶
func (muo *MenuUpdateOne) ClearDeletedAt() *MenuUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MenuUpdateOne) ClearParent ¶
func (muo *MenuUpdateOne) ClearParent() *MenuUpdateOne
ClearParent clears the "parent" edge to the Menu entity.
func (*MenuUpdateOne) ClearParentID ¶
func (muo *MenuUpdateOne) ClearParentID() *MenuUpdateOne
ClearParentID clears the value of the "parent_id" field.
func (*MenuUpdateOne) ClearPermissions ¶
func (muo *MenuUpdateOne) ClearPermissions() *MenuUpdateOne
ClearPermissions clears the value of the "permissions" field.
func (*MenuUpdateOne) ClearRemark ¶
func (muo *MenuUpdateOne) ClearRemark() *MenuUpdateOne
ClearRemark clears the value of the "remark" field.
func (*MenuUpdateOne) ClearUpdatedAt ¶
func (muo *MenuUpdateOne) ClearUpdatedAt() *MenuUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MenuUpdateOne) Exec ¶
func (muo *MenuUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MenuUpdateOne) ExecX ¶
func (muo *MenuUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuUpdateOne) Modify ¶
func (muo *MenuUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *MenuUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*MenuUpdateOne) Mutation ¶
func (muo *MenuUpdateOne) Mutation() *MenuMutation
Mutation returns the MenuMutation object of the builder.
func (*MenuUpdateOne) RemoveChildIDs ¶
func (muo *MenuUpdateOne) RemoveChildIDs(ids ...uint32) *MenuUpdateOne
RemoveChildIDs removes the "children" edge to Menu entities by IDs.
func (*MenuUpdateOne) RemoveChildren ¶
func (muo *MenuUpdateOne) RemoveChildren(m ...*Menu) *MenuUpdateOne
RemoveChildren removes "children" edges to Menu entities.
func (*MenuUpdateOne) Save ¶
func (muo *MenuUpdateOne) Save(ctx context.Context) (*Menu, error)
Save executes the query and returns the updated Menu entity.
func (*MenuUpdateOne) SaveX ¶
func (muo *MenuUpdateOne) SaveX(ctx context.Context) *Menu
SaveX is like Save, but panics if an error occurs.
func (*MenuUpdateOne) Select ¶
func (muo *MenuUpdateOne) Select(field string, fields ...string) *MenuUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MenuUpdateOne) SetComponent ¶
func (muo *MenuUpdateOne) SetComponent(s string) *MenuUpdateOne
SetComponent sets the "component" field.
func (*MenuUpdateOne) SetCurrentActiveMenu ¶
func (muo *MenuUpdateOne) SetCurrentActiveMenu(s string) *MenuUpdateOne
SetCurrentActiveMenu sets the "current_active_menu" field.
func (*MenuUpdateOne) SetDeletedAt ¶
func (muo *MenuUpdateOne) SetDeletedAt(t time.Time) *MenuUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*MenuUpdateOne) SetExtURL ¶
func (muo *MenuUpdateOne) SetExtURL(s string) *MenuUpdateOne
SetExtURL sets the "ext_url" field.
func (*MenuUpdateOne) SetHideBreadcrumb ¶
func (muo *MenuUpdateOne) SetHideBreadcrumb(b bool) *MenuUpdateOne
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuUpdateOne) SetHideMenu ¶
func (muo *MenuUpdateOne) SetHideMenu(b bool) *MenuUpdateOne
SetHideMenu sets the "hide_menu" field.
func (*MenuUpdateOne) SetHideTab ¶
func (muo *MenuUpdateOne) SetHideTab(b bool) *MenuUpdateOne
SetHideTab sets the "hide_tab" field.
func (*MenuUpdateOne) SetIcon ¶
func (muo *MenuUpdateOne) SetIcon(s string) *MenuUpdateOne
SetIcon sets the "icon" field.
func (*MenuUpdateOne) SetIsExt ¶
func (muo *MenuUpdateOne) SetIsExt(b bool) *MenuUpdateOne
SetIsExt sets the "is_ext" field.
func (*MenuUpdateOne) SetKeepAlive ¶
func (muo *MenuUpdateOne) SetKeepAlive(b bool) *MenuUpdateOne
SetKeepAlive sets the "keep_alive" field.
func (*MenuUpdateOne) SetName ¶
func (muo *MenuUpdateOne) SetName(s string) *MenuUpdateOne
SetName sets the "name" field.
func (*MenuUpdateOne) SetNillableComponent ¶
func (muo *MenuUpdateOne) SetNillableComponent(s *string) *MenuUpdateOne
SetNillableComponent sets the "component" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableCurrentActiveMenu ¶
func (muo *MenuUpdateOne) SetNillableCurrentActiveMenu(s *string) *MenuUpdateOne
SetNillableCurrentActiveMenu sets the "current_active_menu" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableDeletedAt ¶
func (muo *MenuUpdateOne) SetNillableDeletedAt(t *time.Time) *MenuUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableExtURL ¶
func (muo *MenuUpdateOne) SetNillableExtURL(s *string) *MenuUpdateOne
SetNillableExtURL sets the "ext_url" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableHideBreadcrumb ¶
func (muo *MenuUpdateOne) SetNillableHideBreadcrumb(b *bool) *MenuUpdateOne
SetNillableHideBreadcrumb sets the "hide_breadcrumb" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableHideMenu ¶
func (muo *MenuUpdateOne) SetNillableHideMenu(b *bool) *MenuUpdateOne
SetNillableHideMenu sets the "hide_menu" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableHideTab ¶
func (muo *MenuUpdateOne) SetNillableHideTab(b *bool) *MenuUpdateOne
SetNillableHideTab sets the "hide_tab" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableIcon ¶
func (muo *MenuUpdateOne) SetNillableIcon(s *string) *MenuUpdateOne
SetNillableIcon sets the "icon" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableIsExt ¶
func (muo *MenuUpdateOne) SetNillableIsExt(b *bool) *MenuUpdateOne
SetNillableIsExt sets the "is_ext" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableKeepAlive ¶
func (muo *MenuUpdateOne) SetNillableKeepAlive(b *bool) *MenuUpdateOne
SetNillableKeepAlive sets the "keep_alive" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableName ¶
func (muo *MenuUpdateOne) SetNillableName(s *string) *MenuUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableParentID ¶
func (muo *MenuUpdateOne) SetNillableParentID(u *uint32) *MenuUpdateOne
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*MenuUpdateOne) SetNillablePath ¶
func (muo *MenuUpdateOne) SetNillablePath(s *string) *MenuUpdateOne
SetNillablePath sets the "path" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableRedirect ¶
func (muo *MenuUpdateOne) SetNillableRedirect(s *string) *MenuUpdateOne
SetNillableRedirect sets the "redirect" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableRemark ¶
func (muo *MenuUpdateOne) SetNillableRemark(s *string) *MenuUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableSort ¶
func (muo *MenuUpdateOne) SetNillableSort(i *int32) *MenuUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableState ¶
func (muo *MenuUpdateOne) SetNillableState(i *int32) *MenuUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableTitle ¶
func (muo *MenuUpdateOne) SetNillableTitle(s *string) *MenuUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableType ¶
func (muo *MenuUpdateOne) SetNillableType(i *int32) *MenuUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableUpdatedAt ¶
func (muo *MenuUpdateOne) SetNillableUpdatedAt(t *time.Time) *MenuUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableVisible ¶
func (muo *MenuUpdateOne) SetNillableVisible(b *bool) *MenuUpdateOne
SetNillableVisible sets the "visible" field if the given value is not nil.
func (*MenuUpdateOne) SetParent ¶
func (muo *MenuUpdateOne) SetParent(m *Menu) *MenuUpdateOne
SetParent sets the "parent" edge to the Menu entity.
func (*MenuUpdateOne) SetParentID ¶
func (muo *MenuUpdateOne) SetParentID(u uint32) *MenuUpdateOne
SetParentID sets the "parent_id" field.
func (*MenuUpdateOne) SetPath ¶
func (muo *MenuUpdateOne) SetPath(s string) *MenuUpdateOne
SetPath sets the "path" field.
func (*MenuUpdateOne) SetPermissions ¶
func (muo *MenuUpdateOne) SetPermissions(s []string) *MenuUpdateOne
SetPermissions sets the "permissions" field.
func (*MenuUpdateOne) SetRedirect ¶
func (muo *MenuUpdateOne) SetRedirect(s string) *MenuUpdateOne
SetRedirect sets the "redirect" field.
func (*MenuUpdateOne) SetRemark ¶
func (muo *MenuUpdateOne) SetRemark(s string) *MenuUpdateOne
SetRemark sets the "remark" field.
func (*MenuUpdateOne) SetSort ¶
func (muo *MenuUpdateOne) SetSort(i int32) *MenuUpdateOne
SetSort sets the "sort" field.
func (*MenuUpdateOne) SetState ¶
func (muo *MenuUpdateOne) SetState(i int32) *MenuUpdateOne
SetState sets the "state" field.
func (*MenuUpdateOne) SetTitle ¶
func (muo *MenuUpdateOne) SetTitle(s string) *MenuUpdateOne
SetTitle sets the "title" field.
func (*MenuUpdateOne) SetType ¶
func (muo *MenuUpdateOne) SetType(i int32) *MenuUpdateOne
SetType sets the "type" field.
func (*MenuUpdateOne) SetUpdatedAt ¶
func (muo *MenuUpdateOne) SetUpdatedAt(t time.Time) *MenuUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MenuUpdateOne) SetVisible ¶
func (muo *MenuUpdateOne) SetVisible(b bool) *MenuUpdateOne
SetVisible sets the "visible" field.
func (*MenuUpdateOne) Where ¶
func (muo *MenuUpdateOne) Where(ps ...predicate.Menu) *MenuUpdateOne
Where appends a list predicates to the MenuUpdate builder.
type MenuUpsert ¶
MenuUpsert is the "OnConflict" setter.
func (*MenuUpsert) AddSort ¶
func (u *MenuUpsert) AddSort(v int32) *MenuUpsert
AddSort adds v to the "sort" field.
func (*MenuUpsert) AddState ¶
func (u *MenuUpsert) AddState(v int32) *MenuUpsert
AddState adds v to the "state" field.
func (*MenuUpsert) AddType ¶
func (u *MenuUpsert) AddType(v int32) *MenuUpsert
AddType adds v to the "type" field.
func (*MenuUpsert) ClearDeletedAt ¶
func (u *MenuUpsert) ClearDeletedAt() *MenuUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MenuUpsert) ClearParentID ¶
func (u *MenuUpsert) ClearParentID() *MenuUpsert
ClearParentID clears the value of the "parent_id" field.
func (*MenuUpsert) ClearPermissions ¶
func (u *MenuUpsert) ClearPermissions() *MenuUpsert
ClearPermissions clears the value of the "permissions" field.
func (*MenuUpsert) ClearRemark ¶
func (u *MenuUpsert) ClearRemark() *MenuUpsert
ClearRemark clears the value of the "remark" field.
func (*MenuUpsert) ClearUpdatedAt ¶
func (u *MenuUpsert) ClearUpdatedAt() *MenuUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MenuUpsert) SetComponent ¶
func (u *MenuUpsert) SetComponent(v string) *MenuUpsert
SetComponent sets the "component" field.
func (*MenuUpsert) SetCurrentActiveMenu ¶
func (u *MenuUpsert) SetCurrentActiveMenu(v string) *MenuUpsert
SetCurrentActiveMenu sets the "current_active_menu" field.
func (*MenuUpsert) SetDeletedAt ¶
func (u *MenuUpsert) SetDeletedAt(v time.Time) *MenuUpsert
SetDeletedAt sets the "deleted_at" field.
func (*MenuUpsert) SetExtURL ¶
func (u *MenuUpsert) SetExtURL(v string) *MenuUpsert
SetExtURL sets the "ext_url" field.
func (*MenuUpsert) SetHideBreadcrumb ¶
func (u *MenuUpsert) SetHideBreadcrumb(v bool) *MenuUpsert
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuUpsert) SetHideMenu ¶
func (u *MenuUpsert) SetHideMenu(v bool) *MenuUpsert
SetHideMenu sets the "hide_menu" field.
func (*MenuUpsert) SetHideTab ¶
func (u *MenuUpsert) SetHideTab(v bool) *MenuUpsert
SetHideTab sets the "hide_tab" field.
func (*MenuUpsert) SetIcon ¶
func (u *MenuUpsert) SetIcon(v string) *MenuUpsert
SetIcon sets the "icon" field.
func (*MenuUpsert) SetIsExt ¶
func (u *MenuUpsert) SetIsExt(v bool) *MenuUpsert
SetIsExt sets the "is_ext" field.
func (*MenuUpsert) SetKeepAlive ¶
func (u *MenuUpsert) SetKeepAlive(v bool) *MenuUpsert
SetKeepAlive sets the "keep_alive" field.
func (*MenuUpsert) SetName ¶
func (u *MenuUpsert) SetName(v string) *MenuUpsert
SetName sets the "name" field.
func (*MenuUpsert) SetParentID ¶
func (u *MenuUpsert) SetParentID(v uint32) *MenuUpsert
SetParentID sets the "parent_id" field.
func (*MenuUpsert) SetPath ¶
func (u *MenuUpsert) SetPath(v string) *MenuUpsert
SetPath sets the "path" field.
func (*MenuUpsert) SetPermissions ¶
func (u *MenuUpsert) SetPermissions(v []string) *MenuUpsert
SetPermissions sets the "permissions" field.
func (*MenuUpsert) SetRedirect ¶
func (u *MenuUpsert) SetRedirect(v string) *MenuUpsert
SetRedirect sets the "redirect" field.
func (*MenuUpsert) SetRemark ¶
func (u *MenuUpsert) SetRemark(v string) *MenuUpsert
SetRemark sets the "remark" field.
func (*MenuUpsert) SetSort ¶
func (u *MenuUpsert) SetSort(v int32) *MenuUpsert
SetSort sets the "sort" field.
func (*MenuUpsert) SetState ¶
func (u *MenuUpsert) SetState(v int32) *MenuUpsert
SetState sets the "state" field.
func (*MenuUpsert) SetTitle ¶
func (u *MenuUpsert) SetTitle(v string) *MenuUpsert
SetTitle sets the "title" field.
func (*MenuUpsert) SetType ¶
func (u *MenuUpsert) SetType(v int32) *MenuUpsert
SetType sets the "type" field.
func (*MenuUpsert) SetUpdatedAt ¶
func (u *MenuUpsert) SetUpdatedAt(v time.Time) *MenuUpsert
SetUpdatedAt sets the "updated_at" field.
func (*MenuUpsert) SetVisible ¶
func (u *MenuUpsert) SetVisible(v bool) *MenuUpsert
SetVisible sets the "visible" field.
func (*MenuUpsert) UpdateComponent ¶
func (u *MenuUpsert) UpdateComponent() *MenuUpsert
UpdateComponent sets the "component" field to the value that was provided on create.
func (*MenuUpsert) UpdateCurrentActiveMenu ¶
func (u *MenuUpsert) UpdateCurrentActiveMenu() *MenuUpsert
UpdateCurrentActiveMenu sets the "current_active_menu" field to the value that was provided on create.
func (*MenuUpsert) UpdateDeletedAt ¶
func (u *MenuUpsert) UpdateDeletedAt() *MenuUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*MenuUpsert) UpdateExtURL ¶
func (u *MenuUpsert) UpdateExtURL() *MenuUpsert
UpdateExtURL sets the "ext_url" field to the value that was provided on create.
func (*MenuUpsert) UpdateHideBreadcrumb ¶
func (u *MenuUpsert) UpdateHideBreadcrumb() *MenuUpsert
UpdateHideBreadcrumb sets the "hide_breadcrumb" field to the value that was provided on create.
func (*MenuUpsert) UpdateHideMenu ¶
func (u *MenuUpsert) UpdateHideMenu() *MenuUpsert
UpdateHideMenu sets the "hide_menu" field to the value that was provided on create.
func (*MenuUpsert) UpdateHideTab ¶
func (u *MenuUpsert) UpdateHideTab() *MenuUpsert
UpdateHideTab sets the "hide_tab" field to the value that was provided on create.
func (*MenuUpsert) UpdateIcon ¶
func (u *MenuUpsert) UpdateIcon() *MenuUpsert
UpdateIcon sets the "icon" field to the value that was provided on create.
func (*MenuUpsert) UpdateIsExt ¶
func (u *MenuUpsert) UpdateIsExt() *MenuUpsert
UpdateIsExt sets the "is_ext" field to the value that was provided on create.
func (*MenuUpsert) UpdateKeepAlive ¶
func (u *MenuUpsert) UpdateKeepAlive() *MenuUpsert
UpdateKeepAlive sets the "keep_alive" field to the value that was provided on create.
func (*MenuUpsert) UpdateName ¶
func (u *MenuUpsert) UpdateName() *MenuUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*MenuUpsert) UpdateParentID ¶
func (u *MenuUpsert) UpdateParentID() *MenuUpsert
UpdateParentID sets the "parent_id" field to the value that was provided on create.
func (*MenuUpsert) UpdatePath ¶
func (u *MenuUpsert) UpdatePath() *MenuUpsert
UpdatePath sets the "path" field to the value that was provided on create.
func (*MenuUpsert) UpdatePermissions ¶
func (u *MenuUpsert) UpdatePermissions() *MenuUpsert
UpdatePermissions sets the "permissions" field to the value that was provided on create.
func (*MenuUpsert) UpdateRedirect ¶
func (u *MenuUpsert) UpdateRedirect() *MenuUpsert
UpdateRedirect sets the "redirect" field to the value that was provided on create.
func (*MenuUpsert) UpdateRemark ¶
func (u *MenuUpsert) UpdateRemark() *MenuUpsert
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*MenuUpsert) UpdateSort ¶
func (u *MenuUpsert) UpdateSort() *MenuUpsert
UpdateSort sets the "sort" field to the value that was provided on create.
func (*MenuUpsert) UpdateState ¶
func (u *MenuUpsert) UpdateState() *MenuUpsert
UpdateState sets the "state" field to the value that was provided on create.
func (*MenuUpsert) UpdateTitle ¶
func (u *MenuUpsert) UpdateTitle() *MenuUpsert
UpdateTitle sets the "title" field to the value that was provided on create.
func (*MenuUpsert) UpdateType ¶
func (u *MenuUpsert) UpdateType() *MenuUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*MenuUpsert) UpdateUpdatedAt ¶
func (u *MenuUpsert) UpdateUpdatedAt() *MenuUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*MenuUpsert) UpdateVisible ¶
func (u *MenuUpsert) UpdateVisible() *MenuUpsert
UpdateVisible sets the "visible" field to the value that was provided on create.
type MenuUpsertBulk ¶
type MenuUpsertBulk struct {
// contains filtered or unexported fields
}
MenuUpsertBulk is the builder for "upsert"-ing a bulk of Menu nodes.
func (*MenuUpsertBulk) AddSort ¶
func (u *MenuUpsertBulk) AddSort(v int32) *MenuUpsertBulk
AddSort adds v to the "sort" field.
func (*MenuUpsertBulk) AddState ¶
func (u *MenuUpsertBulk) AddState(v int32) *MenuUpsertBulk
AddState adds v to the "state" field.
func (*MenuUpsertBulk) AddType ¶
func (u *MenuUpsertBulk) AddType(v int32) *MenuUpsertBulk
AddType adds v to the "type" field.
func (*MenuUpsertBulk) ClearDeletedAt ¶
func (u *MenuUpsertBulk) ClearDeletedAt() *MenuUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MenuUpsertBulk) ClearParentID ¶
func (u *MenuUpsertBulk) ClearParentID() *MenuUpsertBulk
ClearParentID clears the value of the "parent_id" field.
func (*MenuUpsertBulk) ClearPermissions ¶
func (u *MenuUpsertBulk) ClearPermissions() *MenuUpsertBulk
ClearPermissions clears the value of the "permissions" field.
func (*MenuUpsertBulk) ClearRemark ¶
func (u *MenuUpsertBulk) ClearRemark() *MenuUpsertBulk
ClearRemark clears the value of the "remark" field.
func (*MenuUpsertBulk) ClearUpdatedAt ¶
func (u *MenuUpsertBulk) ClearUpdatedAt() *MenuUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MenuUpsertBulk) DoNothing ¶
func (u *MenuUpsertBulk) DoNothing() *MenuUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MenuUpsertBulk) Exec ¶
func (u *MenuUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MenuUpsertBulk) ExecX ¶
func (u *MenuUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuUpsertBulk) Ignore ¶
func (u *MenuUpsertBulk) Ignore() *MenuUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Menu.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MenuUpsertBulk) SetComponent ¶
func (u *MenuUpsertBulk) SetComponent(v string) *MenuUpsertBulk
SetComponent sets the "component" field.
func (*MenuUpsertBulk) SetCurrentActiveMenu ¶
func (u *MenuUpsertBulk) SetCurrentActiveMenu(v string) *MenuUpsertBulk
SetCurrentActiveMenu sets the "current_active_menu" field.
func (*MenuUpsertBulk) SetDeletedAt ¶
func (u *MenuUpsertBulk) SetDeletedAt(v time.Time) *MenuUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*MenuUpsertBulk) SetExtURL ¶
func (u *MenuUpsertBulk) SetExtURL(v string) *MenuUpsertBulk
SetExtURL sets the "ext_url" field.
func (*MenuUpsertBulk) SetHideBreadcrumb ¶
func (u *MenuUpsertBulk) SetHideBreadcrumb(v bool) *MenuUpsertBulk
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuUpsertBulk) SetHideMenu ¶
func (u *MenuUpsertBulk) SetHideMenu(v bool) *MenuUpsertBulk
SetHideMenu sets the "hide_menu" field.
func (*MenuUpsertBulk) SetHideTab ¶
func (u *MenuUpsertBulk) SetHideTab(v bool) *MenuUpsertBulk
SetHideTab sets the "hide_tab" field.
func (*MenuUpsertBulk) SetIcon ¶
func (u *MenuUpsertBulk) SetIcon(v string) *MenuUpsertBulk
SetIcon sets the "icon" field.
func (*MenuUpsertBulk) SetIsExt ¶
func (u *MenuUpsertBulk) SetIsExt(v bool) *MenuUpsertBulk
SetIsExt sets the "is_ext" field.
func (*MenuUpsertBulk) SetKeepAlive ¶
func (u *MenuUpsertBulk) SetKeepAlive(v bool) *MenuUpsertBulk
SetKeepAlive sets the "keep_alive" field.
func (*MenuUpsertBulk) SetName ¶
func (u *MenuUpsertBulk) SetName(v string) *MenuUpsertBulk
SetName sets the "name" field.
func (*MenuUpsertBulk) SetParentID ¶
func (u *MenuUpsertBulk) SetParentID(v uint32) *MenuUpsertBulk
SetParentID sets the "parent_id" field.
func (*MenuUpsertBulk) SetPath ¶
func (u *MenuUpsertBulk) SetPath(v string) *MenuUpsertBulk
SetPath sets the "path" field.
func (*MenuUpsertBulk) SetPermissions ¶
func (u *MenuUpsertBulk) SetPermissions(v []string) *MenuUpsertBulk
SetPermissions sets the "permissions" field.
func (*MenuUpsertBulk) SetRedirect ¶
func (u *MenuUpsertBulk) SetRedirect(v string) *MenuUpsertBulk
SetRedirect sets the "redirect" field.
func (*MenuUpsertBulk) SetRemark ¶
func (u *MenuUpsertBulk) SetRemark(v string) *MenuUpsertBulk
SetRemark sets the "remark" field.
func (*MenuUpsertBulk) SetSort ¶
func (u *MenuUpsertBulk) SetSort(v int32) *MenuUpsertBulk
SetSort sets the "sort" field.
func (*MenuUpsertBulk) SetState ¶
func (u *MenuUpsertBulk) SetState(v int32) *MenuUpsertBulk
SetState sets the "state" field.
func (*MenuUpsertBulk) SetTitle ¶
func (u *MenuUpsertBulk) SetTitle(v string) *MenuUpsertBulk
SetTitle sets the "title" field.
func (*MenuUpsertBulk) SetType ¶
func (u *MenuUpsertBulk) SetType(v int32) *MenuUpsertBulk
SetType sets the "type" field.
func (*MenuUpsertBulk) SetUpdatedAt ¶
func (u *MenuUpsertBulk) SetUpdatedAt(v time.Time) *MenuUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*MenuUpsertBulk) SetVisible ¶
func (u *MenuUpsertBulk) SetVisible(v bool) *MenuUpsertBulk
SetVisible sets the "visible" field.
func (*MenuUpsertBulk) Update ¶
func (u *MenuUpsertBulk) Update(set func(*MenuUpsert)) *MenuUpsertBulk
Update allows overriding fields `UPDATE` values. See the MenuCreateBulk.OnConflict documentation for more info.
func (*MenuUpsertBulk) UpdateComponent ¶
func (u *MenuUpsertBulk) UpdateComponent() *MenuUpsertBulk
UpdateComponent sets the "component" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateCurrentActiveMenu ¶
func (u *MenuUpsertBulk) UpdateCurrentActiveMenu() *MenuUpsertBulk
UpdateCurrentActiveMenu sets the "current_active_menu" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateDeletedAt ¶
func (u *MenuUpsertBulk) UpdateDeletedAt() *MenuUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateExtURL ¶
func (u *MenuUpsertBulk) UpdateExtURL() *MenuUpsertBulk
UpdateExtURL sets the "ext_url" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateHideBreadcrumb ¶
func (u *MenuUpsertBulk) UpdateHideBreadcrumb() *MenuUpsertBulk
UpdateHideBreadcrumb sets the "hide_breadcrumb" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateHideMenu ¶
func (u *MenuUpsertBulk) UpdateHideMenu() *MenuUpsertBulk
UpdateHideMenu sets the "hide_menu" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateHideTab ¶
func (u *MenuUpsertBulk) UpdateHideTab() *MenuUpsertBulk
UpdateHideTab sets the "hide_tab" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateIcon ¶
func (u *MenuUpsertBulk) UpdateIcon() *MenuUpsertBulk
UpdateIcon sets the "icon" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateIsExt ¶
func (u *MenuUpsertBulk) UpdateIsExt() *MenuUpsertBulk
UpdateIsExt sets the "is_ext" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateKeepAlive ¶
func (u *MenuUpsertBulk) UpdateKeepAlive() *MenuUpsertBulk
UpdateKeepAlive sets the "keep_alive" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateName ¶
func (u *MenuUpsertBulk) UpdateName() *MenuUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateNewValues ¶
func (u *MenuUpsertBulk) UpdateNewValues() *MenuUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Menu.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(menu.FieldID) }), ). Exec(ctx)
func (*MenuUpsertBulk) UpdateParentID ¶
func (u *MenuUpsertBulk) UpdateParentID() *MenuUpsertBulk
UpdateParentID sets the "parent_id" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdatePath ¶
func (u *MenuUpsertBulk) UpdatePath() *MenuUpsertBulk
UpdatePath sets the "path" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdatePermissions ¶
func (u *MenuUpsertBulk) UpdatePermissions() *MenuUpsertBulk
UpdatePermissions sets the "permissions" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateRedirect ¶
func (u *MenuUpsertBulk) UpdateRedirect() *MenuUpsertBulk
UpdateRedirect sets the "redirect" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateRemark ¶
func (u *MenuUpsertBulk) UpdateRemark() *MenuUpsertBulk
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateSort ¶
func (u *MenuUpsertBulk) UpdateSort() *MenuUpsertBulk
UpdateSort sets the "sort" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateState ¶
func (u *MenuUpsertBulk) UpdateState() *MenuUpsertBulk
UpdateState sets the "state" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateTitle ¶
func (u *MenuUpsertBulk) UpdateTitle() *MenuUpsertBulk
UpdateTitle sets the "title" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateType ¶
func (u *MenuUpsertBulk) UpdateType() *MenuUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateUpdatedAt ¶
func (u *MenuUpsertBulk) UpdateUpdatedAt() *MenuUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*MenuUpsertBulk) UpdateVisible ¶
func (u *MenuUpsertBulk) UpdateVisible() *MenuUpsertBulk
UpdateVisible sets the "visible" field to the value that was provided on create.
type MenuUpsertOne ¶
type MenuUpsertOne struct {
// contains filtered or unexported fields
}
MenuUpsertOne is the builder for "upsert"-ing
one Menu node.
func (*MenuUpsertOne) AddSort ¶
func (u *MenuUpsertOne) AddSort(v int32) *MenuUpsertOne
AddSort adds v to the "sort" field.
func (*MenuUpsertOne) AddState ¶
func (u *MenuUpsertOne) AddState(v int32) *MenuUpsertOne
AddState adds v to the "state" field.
func (*MenuUpsertOne) AddType ¶
func (u *MenuUpsertOne) AddType(v int32) *MenuUpsertOne
AddType adds v to the "type" field.
func (*MenuUpsertOne) ClearDeletedAt ¶
func (u *MenuUpsertOne) ClearDeletedAt() *MenuUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*MenuUpsertOne) ClearParentID ¶
func (u *MenuUpsertOne) ClearParentID() *MenuUpsertOne
ClearParentID clears the value of the "parent_id" field.
func (*MenuUpsertOne) ClearPermissions ¶
func (u *MenuUpsertOne) ClearPermissions() *MenuUpsertOne
ClearPermissions clears the value of the "permissions" field.
func (*MenuUpsertOne) ClearRemark ¶
func (u *MenuUpsertOne) ClearRemark() *MenuUpsertOne
ClearRemark clears the value of the "remark" field.
func (*MenuUpsertOne) ClearUpdatedAt ¶
func (u *MenuUpsertOne) ClearUpdatedAt() *MenuUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MenuUpsertOne) DoNothing ¶
func (u *MenuUpsertOne) DoNothing() *MenuUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MenuUpsertOne) Exec ¶
func (u *MenuUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*MenuUpsertOne) ExecX ¶
func (u *MenuUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuUpsertOne) ID ¶
func (u *MenuUpsertOne) ID(ctx context.Context) (id uint32, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*MenuUpsertOne) IDX ¶
func (u *MenuUpsertOne) IDX(ctx context.Context) uint32
IDX is like ID, but panics if an error occurs.
func (*MenuUpsertOne) Ignore ¶
func (u *MenuUpsertOne) Ignore() *MenuUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Menu.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MenuUpsertOne) SetComponent ¶
func (u *MenuUpsertOne) SetComponent(v string) *MenuUpsertOne
SetComponent sets the "component" field.
func (*MenuUpsertOne) SetCurrentActiveMenu ¶
func (u *MenuUpsertOne) SetCurrentActiveMenu(v string) *MenuUpsertOne
SetCurrentActiveMenu sets the "current_active_menu" field.
func (*MenuUpsertOne) SetDeletedAt ¶
func (u *MenuUpsertOne) SetDeletedAt(v time.Time) *MenuUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*MenuUpsertOne) SetExtURL ¶
func (u *MenuUpsertOne) SetExtURL(v string) *MenuUpsertOne
SetExtURL sets the "ext_url" field.
func (*MenuUpsertOne) SetHideBreadcrumb ¶
func (u *MenuUpsertOne) SetHideBreadcrumb(v bool) *MenuUpsertOne
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuUpsertOne) SetHideMenu ¶
func (u *MenuUpsertOne) SetHideMenu(v bool) *MenuUpsertOne
SetHideMenu sets the "hide_menu" field.
func (*MenuUpsertOne) SetHideTab ¶
func (u *MenuUpsertOne) SetHideTab(v bool) *MenuUpsertOne
SetHideTab sets the "hide_tab" field.
func (*MenuUpsertOne) SetIcon ¶
func (u *MenuUpsertOne) SetIcon(v string) *MenuUpsertOne
SetIcon sets the "icon" field.
func (*MenuUpsertOne) SetIsExt ¶
func (u *MenuUpsertOne) SetIsExt(v bool) *MenuUpsertOne
SetIsExt sets the "is_ext" field.
func (*MenuUpsertOne) SetKeepAlive ¶
func (u *MenuUpsertOne) SetKeepAlive(v bool) *MenuUpsertOne
SetKeepAlive sets the "keep_alive" field.
func (*MenuUpsertOne) SetName ¶
func (u *MenuUpsertOne) SetName(v string) *MenuUpsertOne
SetName sets the "name" field.
func (*MenuUpsertOne) SetParentID ¶
func (u *MenuUpsertOne) SetParentID(v uint32) *MenuUpsertOne
SetParentID sets the "parent_id" field.
func (*MenuUpsertOne) SetPath ¶
func (u *MenuUpsertOne) SetPath(v string) *MenuUpsertOne
SetPath sets the "path" field.
func (*MenuUpsertOne) SetPermissions ¶
func (u *MenuUpsertOne) SetPermissions(v []string) *MenuUpsertOne
SetPermissions sets the "permissions" field.
func (*MenuUpsertOne) SetRedirect ¶
func (u *MenuUpsertOne) SetRedirect(v string) *MenuUpsertOne
SetRedirect sets the "redirect" field.
func (*MenuUpsertOne) SetRemark ¶
func (u *MenuUpsertOne) SetRemark(v string) *MenuUpsertOne
SetRemark sets the "remark" field.
func (*MenuUpsertOne) SetSort ¶
func (u *MenuUpsertOne) SetSort(v int32) *MenuUpsertOne
SetSort sets the "sort" field.
func (*MenuUpsertOne) SetState ¶
func (u *MenuUpsertOne) SetState(v int32) *MenuUpsertOne
SetState sets the "state" field.
func (*MenuUpsertOne) SetTitle ¶
func (u *MenuUpsertOne) SetTitle(v string) *MenuUpsertOne
SetTitle sets the "title" field.
func (*MenuUpsertOne) SetType ¶
func (u *MenuUpsertOne) SetType(v int32) *MenuUpsertOne
SetType sets the "type" field.
func (*MenuUpsertOne) SetUpdatedAt ¶
func (u *MenuUpsertOne) SetUpdatedAt(v time.Time) *MenuUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*MenuUpsertOne) SetVisible ¶
func (u *MenuUpsertOne) SetVisible(v bool) *MenuUpsertOne
SetVisible sets the "visible" field.
func (*MenuUpsertOne) Update ¶
func (u *MenuUpsertOne) Update(set func(*MenuUpsert)) *MenuUpsertOne
Update allows overriding fields `UPDATE` values. See the MenuCreate.OnConflict documentation for more info.
func (*MenuUpsertOne) UpdateComponent ¶
func (u *MenuUpsertOne) UpdateComponent() *MenuUpsertOne
UpdateComponent sets the "component" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateCurrentActiveMenu ¶
func (u *MenuUpsertOne) UpdateCurrentActiveMenu() *MenuUpsertOne
UpdateCurrentActiveMenu sets the "current_active_menu" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateDeletedAt ¶
func (u *MenuUpsertOne) UpdateDeletedAt() *MenuUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateExtURL ¶
func (u *MenuUpsertOne) UpdateExtURL() *MenuUpsertOne
UpdateExtURL sets the "ext_url" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateHideBreadcrumb ¶
func (u *MenuUpsertOne) UpdateHideBreadcrumb() *MenuUpsertOne
UpdateHideBreadcrumb sets the "hide_breadcrumb" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateHideMenu ¶
func (u *MenuUpsertOne) UpdateHideMenu() *MenuUpsertOne
UpdateHideMenu sets the "hide_menu" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateHideTab ¶
func (u *MenuUpsertOne) UpdateHideTab() *MenuUpsertOne
UpdateHideTab sets the "hide_tab" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateIcon ¶
func (u *MenuUpsertOne) UpdateIcon() *MenuUpsertOne
UpdateIcon sets the "icon" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateIsExt ¶
func (u *MenuUpsertOne) UpdateIsExt() *MenuUpsertOne
UpdateIsExt sets the "is_ext" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateKeepAlive ¶
func (u *MenuUpsertOne) UpdateKeepAlive() *MenuUpsertOne
UpdateKeepAlive sets the "keep_alive" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateName ¶
func (u *MenuUpsertOne) UpdateName() *MenuUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateNewValues ¶
func (u *MenuUpsertOne) UpdateNewValues() *MenuUpsertOne
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.Menu.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(menu.FieldID) }), ). Exec(ctx)
func (*MenuUpsertOne) UpdateParentID ¶
func (u *MenuUpsertOne) UpdateParentID() *MenuUpsertOne
UpdateParentID sets the "parent_id" field to the value that was provided on create.
func (*MenuUpsertOne) UpdatePath ¶
func (u *MenuUpsertOne) UpdatePath() *MenuUpsertOne
UpdatePath sets the "path" field to the value that was provided on create.
func (*MenuUpsertOne) UpdatePermissions ¶
func (u *MenuUpsertOne) UpdatePermissions() *MenuUpsertOne
UpdatePermissions sets the "permissions" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateRedirect ¶
func (u *MenuUpsertOne) UpdateRedirect() *MenuUpsertOne
UpdateRedirect sets the "redirect" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateRemark ¶
func (u *MenuUpsertOne) UpdateRemark() *MenuUpsertOne
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateSort ¶
func (u *MenuUpsertOne) UpdateSort() *MenuUpsertOne
UpdateSort sets the "sort" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateState ¶
func (u *MenuUpsertOne) UpdateState() *MenuUpsertOne
UpdateState sets the "state" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateTitle ¶
func (u *MenuUpsertOne) UpdateTitle() *MenuUpsertOne
UpdateTitle sets the "title" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateType ¶
func (u *MenuUpsertOne) UpdateType() *MenuUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateUpdatedAt ¶
func (u *MenuUpsertOne) UpdateUpdatedAt() *MenuUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*MenuUpsertOne) UpdateVisible ¶
func (u *MenuUpsertOne) UpdateVisible() *MenuUpsertOne
UpdateVisible sets the "visible" field to the value that was provided on create.
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 Post ¶
type Post struct { // ID of the ent. // id ID uint32 `json:"id,omitempty"` // 创建时间 CreatedAt *time.Time `json:"created_at,omitempty"` // 更新时间 UpdatedAt *time.Time `json:"updated_at,omitempty"` // 删除时间 DeletedAt *time.Time `json:"deleted_at,omitempty"` // 备注 Remark *string `json:"remark,omitempty"` // 排序 Sort *int32 `json:"sort,omitempty"` // 状态 0 UNSPECIFIED 开启 1 -> ACTIVE 关闭 2 -> INACTIVE, 禁用 3 -> BANNED State *int32 `json:"state,omitempty"` // 名称 Name *string `json:"name,omitempty"` // contains filtered or unexported fields }
岗位表
func (*Post) Unwrap ¶
Unwrap unwraps the Post 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 (*Post) Update ¶
func (po *Post) Update() *PostUpdateOne
Update returns a builder for updating this Post. Note that you need to call Post.Unwrap() before calling this method if this Post was returned from a transaction, and the transaction was committed or rolled back.
type PostClient ¶
type PostClient struct {
// contains filtered or unexported fields
}
PostClient is a client for the Post schema.
func NewPostClient ¶
func NewPostClient(c config) *PostClient
NewPostClient returns a client for the Post from the given config.
func (*PostClient) Create ¶
func (c *PostClient) Create() *PostCreate
Create returns a builder for creating a Post entity.
func (*PostClient) CreateBulk ¶
func (c *PostClient) CreateBulk(builders ...*PostCreate) *PostCreateBulk
CreateBulk returns a builder for creating a bulk of Post entities.
func (*PostClient) Delete ¶
func (c *PostClient) Delete() *PostDelete
Delete returns a delete builder for Post.
func (*PostClient) DeleteOne ¶
func (c *PostClient) DeleteOne(po *Post) *PostDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PostClient) DeleteOneID ¶
func (c *PostClient) DeleteOneID(id uint32) *PostDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PostClient) GetX ¶
func (c *PostClient) GetX(ctx context.Context, id uint32) *Post
GetX is like Get, but panics if an error occurs.
func (*PostClient) Intercept ¶
func (c *PostClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `post.Intercept(f(g(h())))`.
func (*PostClient) Interceptors ¶
func (c *PostClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PostClient) MapCreateBulk ¶
func (c *PostClient) MapCreateBulk(slice any, setFunc func(*PostCreate, int)) *PostCreateBulk
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 (*PostClient) Query ¶
func (c *PostClient) Query() *PostQuery
Query returns a query builder for Post.
func (*PostClient) Update ¶
func (c *PostClient) Update() *PostUpdate
Update returns an update builder for Post.
func (*PostClient) UpdateOne ¶
func (c *PostClient) UpdateOne(po *Post) *PostUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PostClient) UpdateOneID ¶
func (c *PostClient) UpdateOneID(id uint32) *PostUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PostClient) Use ¶
func (c *PostClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `post.Hooks(f(g(h())))`.
type PostCreate ¶
type PostCreate struct {
// contains filtered or unexported fields
}
PostCreate is the builder for creating a Post entity.
func (*PostCreate) Exec ¶
func (pc *PostCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PostCreate) ExecX ¶
func (pc *PostCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostCreate) Mutation ¶
func (pc *PostCreate) Mutation() *PostMutation
Mutation returns the PostMutation object of the builder.
func (*PostCreate) OnConflict ¶
func (pc *PostCreate) OnConflict(opts ...sql.ConflictOption) *PostUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Post.Create(). SetCreatedAt(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.PostUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*PostCreate) OnConflictColumns ¶
func (pc *PostCreate) OnConflictColumns(columns ...string) *PostUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Post.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*PostCreate) Save ¶
func (pc *PostCreate) Save(ctx context.Context) (*Post, error)
Save creates the Post in the database.
func (*PostCreate) SaveX ¶
func (pc *PostCreate) SaveX(ctx context.Context) *Post
SaveX calls Save and panics if Save returns an error.
func (*PostCreate) SetCreatedAt ¶
func (pc *PostCreate) SetCreatedAt(t time.Time) *PostCreate
SetCreatedAt sets the "created_at" field.
func (*PostCreate) SetDeletedAt ¶
func (pc *PostCreate) SetDeletedAt(t time.Time) *PostCreate
SetDeletedAt sets the "deleted_at" field.
func (*PostCreate) SetID ¶
func (pc *PostCreate) SetID(u uint32) *PostCreate
SetID sets the "id" field.
func (*PostCreate) SetName ¶
func (pc *PostCreate) SetName(s string) *PostCreate
SetName sets the "name" field.
func (*PostCreate) SetNillableCreatedAt ¶
func (pc *PostCreate) SetNillableCreatedAt(t *time.Time) *PostCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PostCreate) SetNillableDeletedAt ¶
func (pc *PostCreate) SetNillableDeletedAt(t *time.Time) *PostCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PostCreate) SetNillableName ¶
func (pc *PostCreate) SetNillableName(s *string) *PostCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*PostCreate) SetNillableRemark ¶
func (pc *PostCreate) SetNillableRemark(s *string) *PostCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PostCreate) SetNillableSort ¶
func (pc *PostCreate) SetNillableSort(i *int32) *PostCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*PostCreate) SetNillableState ¶
func (pc *PostCreate) SetNillableState(i *int32) *PostCreate
SetNillableState sets the "state" field if the given value is not nil.
func (*PostCreate) SetNillableUpdatedAt ¶
func (pc *PostCreate) SetNillableUpdatedAt(t *time.Time) *PostCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PostCreate) SetRemark ¶
func (pc *PostCreate) SetRemark(s string) *PostCreate
SetRemark sets the "remark" field.
func (*PostCreate) SetSort ¶
func (pc *PostCreate) SetSort(i int32) *PostCreate
SetSort sets the "sort" field.
func (*PostCreate) SetState ¶
func (pc *PostCreate) SetState(i int32) *PostCreate
SetState sets the "state" field.
func (*PostCreate) SetUpdatedAt ¶
func (pc *PostCreate) SetUpdatedAt(t time.Time) *PostCreate
SetUpdatedAt sets the "updated_at" field.
type PostCreateBulk ¶
type PostCreateBulk struct {
// contains filtered or unexported fields
}
PostCreateBulk is the builder for creating many Post entities in bulk.
func (*PostCreateBulk) Exec ¶
func (pcb *PostCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PostCreateBulk) ExecX ¶
func (pcb *PostCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostCreateBulk) OnConflict ¶
func (pcb *PostCreateBulk) OnConflict(opts ...sql.ConflictOption) *PostUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Post.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.PostUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*PostCreateBulk) OnConflictColumns ¶
func (pcb *PostCreateBulk) OnConflictColumns(columns ...string) *PostUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Post.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type PostDelete ¶
type PostDelete struct {
// contains filtered or unexported fields
}
PostDelete is the builder for deleting a Post entity.
func (*PostDelete) Exec ¶
func (pd *PostDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PostDelete) ExecX ¶
func (pd *PostDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PostDelete) Where ¶
func (pd *PostDelete) Where(ps ...predicate.Post) *PostDelete
Where appends a list predicates to the PostDelete builder.
type PostDeleteOne ¶
type PostDeleteOne struct {
// contains filtered or unexported fields
}
PostDeleteOne is the builder for deleting a single Post entity.
func (*PostDeleteOne) Exec ¶
func (pdo *PostDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PostDeleteOne) ExecX ¶
func (pdo *PostDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostDeleteOne) Where ¶
func (pdo *PostDeleteOne) Where(ps ...predicate.Post) *PostDeleteOne
Where appends a list predicates to the PostDelete builder.
type PostFilter ¶
type PostFilter struct {
// contains filtered or unexported fields
}
PostFilter provides a generic filtering capability at runtime for PostQuery.
func (*PostFilter) Where ¶
func (f *PostFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*PostFilter) WhereCreatedAt ¶
func (f *PostFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*PostFilter) WhereDeletedAt ¶
func (f *PostFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*PostFilter) WhereID ¶
func (f *PostFilter) WhereID(p entql.Uint32P)
WhereID applies the entql uint32 predicate on the id field.
func (*PostFilter) WhereName ¶
func (f *PostFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (*PostFilter) WhereRemark ¶
func (f *PostFilter) WhereRemark(p entql.StringP)
WhereRemark applies the entql string predicate on the remark field.
func (*PostFilter) WhereSort ¶
func (f *PostFilter) WhereSort(p entql.Int32P)
WhereSort applies the entql int32 predicate on the sort field.
func (*PostFilter) WhereState ¶
func (f *PostFilter) WhereState(p entql.Int32P)
WhereState applies the entql int32 predicate on the state field.
func (*PostFilter) WhereUpdatedAt ¶
func (f *PostFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type PostGroupBy ¶
type PostGroupBy struct {
// contains filtered or unexported fields
}
PostGroupBy is the group-by builder for Post entities.
func (*PostGroupBy) Aggregate ¶
func (pgb *PostGroupBy) Aggregate(fns ...AggregateFunc) *PostGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PostGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PostGroupBy) Scan ¶
func (pgb *PostGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PostGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PostMutation ¶
type PostMutation struct {
// contains filtered or unexported fields
}
PostMutation represents an operation that mutates the Post nodes in the graph.
func (*PostMutation) AddField ¶
func (m *PostMutation) 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 (*PostMutation) AddSort ¶
func (m *PostMutation) AddSort(i int32)
AddSort adds i to the "sort" field.
func (*PostMutation) AddState ¶
func (m *PostMutation) AddState(i int32)
AddState adds i to the "state" field.
func (*PostMutation) AddedEdges ¶
func (m *PostMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PostMutation) AddedField ¶
func (m *PostMutation) 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 (*PostMutation) AddedFields ¶
func (m *PostMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PostMutation) AddedIDs ¶
func (m *PostMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PostMutation) AddedSort ¶
func (m *PostMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*PostMutation) AddedState ¶
func (m *PostMutation) AddedState() (r int32, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*PostMutation) ClearCreatedAt ¶
func (m *PostMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*PostMutation) ClearDeletedAt ¶
func (m *PostMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostMutation) ClearEdge ¶
func (m *PostMutation) 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 (*PostMutation) ClearField ¶
func (m *PostMutation) 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 (*PostMutation) ClearRemark ¶
func (m *PostMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*PostMutation) ClearUpdatedAt ¶
func (m *PostMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*PostMutation) ClearedEdges ¶
func (m *PostMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PostMutation) ClearedFields ¶
func (m *PostMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PostMutation) Client ¶
func (m PostMutation) 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 (*PostMutation) CreatedAt ¶
func (m *PostMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PostMutation) CreatedAtCleared ¶
func (m *PostMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*PostMutation) DeletedAt ¶
func (m *PostMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*PostMutation) DeletedAtCleared ¶
func (m *PostMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*PostMutation) EdgeCleared ¶
func (m *PostMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PostMutation) Field ¶
func (m *PostMutation) 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 (*PostMutation) FieldCleared ¶
func (m *PostMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PostMutation) Fields ¶
func (m *PostMutation) 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 (*PostMutation) Filter ¶
func (m *PostMutation) Filter() *PostFilter
Filter returns an entql.Where implementation to apply filters on the PostMutation builder.
func (*PostMutation) ID ¶
func (m *PostMutation) ID() (id uint32, 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 (*PostMutation) IDs ¶
func (m *PostMutation) IDs(ctx context.Context) ([]uint32, 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 (*PostMutation) Name ¶
func (m *PostMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PostMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Post entity. If the Post 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 (*PostMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Post entity. If the Post 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 (*PostMutation) 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 (*PostMutation) OldName ¶
func (m *PostMutation) OldName(ctx context.Context) (v *string, err error)
OldName returns the old "name" field's value of the Post entity. If the Post 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 (*PostMutation) OldRemark ¶
func (m *PostMutation) OldRemark(ctx context.Context) (v *string, err error)
OldRemark returns the old "remark" field's value of the Post entity. If the Post 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 (*PostMutation) OldSort ¶
func (m *PostMutation) OldSort(ctx context.Context) (v *int32, err error)
OldSort returns the old "sort" field's value of the Post entity. If the Post 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 (*PostMutation) OldState ¶
func (m *PostMutation) OldState(ctx context.Context) (v *int32, err error)
OldState returns the old "state" field's value of the Post entity. If the Post 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 (*PostMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Post entity. If the Post 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 (*PostMutation) Remark ¶
func (m *PostMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*PostMutation) RemarkCleared ¶
func (m *PostMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*PostMutation) RemovedEdges ¶
func (m *PostMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PostMutation) RemovedIDs ¶
func (m *PostMutation) 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 (*PostMutation) ResetCreatedAt ¶
func (m *PostMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PostMutation) ResetDeletedAt ¶
func (m *PostMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*PostMutation) ResetEdge ¶
func (m *PostMutation) 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 (*PostMutation) ResetField ¶
func (m *PostMutation) 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 (*PostMutation) ResetName ¶
func (m *PostMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PostMutation) ResetRemark ¶
func (m *PostMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*PostMutation) ResetSort ¶
func (m *PostMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*PostMutation) ResetState ¶
func (m *PostMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*PostMutation) ResetUpdatedAt ¶
func (m *PostMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PostMutation) SetCreatedAt ¶
func (m *PostMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PostMutation) SetDeletedAt ¶
func (m *PostMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*PostMutation) SetField ¶
func (m *PostMutation) 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 (*PostMutation) SetID ¶
func (m *PostMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Post entities.
func (*PostMutation) SetName ¶
func (m *PostMutation) SetName(s string)
SetName sets the "name" field.
func (*PostMutation) SetOp ¶
func (m *PostMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PostMutation) SetRemark ¶
func (m *PostMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*PostMutation) SetSort ¶
func (m *PostMutation) SetSort(i int32)
SetSort sets the "sort" field.
func (*PostMutation) SetState ¶
func (m *PostMutation) SetState(i int32)
SetState sets the "state" field.
func (*PostMutation) SetUpdatedAt ¶
func (m *PostMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PostMutation) Sort ¶
func (m *PostMutation) Sort() (r int32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*PostMutation) State ¶
func (m *PostMutation) State() (r int32, exists bool)
State returns the value of the "state" field in the mutation.
func (PostMutation) Tx ¶
func (m PostMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PostMutation) Type ¶
func (m *PostMutation) Type() string
Type returns the node type of this mutation (Post).
func (*PostMutation) UpdatedAt ¶
func (m *PostMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PostMutation) UpdatedAtCleared ¶
func (m *PostMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*PostMutation) Where ¶
func (m *PostMutation) Where(ps ...predicate.Post)
Where appends a list predicates to the PostMutation builder.
func (*PostMutation) WhereP ¶
func (m *PostMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PostMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PostQuery ¶
type PostQuery struct {
// contains filtered or unexported fields
}
PostQuery is the builder for querying Post entities.
func (*PostQuery) Aggregate ¶
func (pq *PostQuery) Aggregate(fns ...AggregateFunc) *PostSelect
Aggregate returns a PostSelect configured with the given aggregations.
func (*PostQuery) Clone ¶
Clone returns a duplicate of the PostQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PostQuery) Filter ¶
func (pq *PostQuery) Filter() *PostFilter
Filter returns a Filter implementation to apply filters on the PostQuery builder.
func (*PostQuery) First ¶
First returns the first Post entity from the query. Returns a *NotFoundError when no Post was found.
func (*PostQuery) FirstID ¶
FirstID returns the first Post ID from the query. Returns a *NotFoundError when no Post ID was found.
func (*PostQuery) GroupBy ¶
func (pq *PostQuery) GroupBy(field string, fields ...string) *PostGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Post.Query(). GroupBy(post.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PostQuery) Modify ¶
func (pq *PostQuery) Modify(modifiers ...func(s *sql.Selector)) *PostSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*PostQuery) Only ¶
Only returns a single Post entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Post entity is found. Returns a *NotFoundError when no Post entities are found.
func (*PostQuery) OnlyID ¶
OnlyID is like Only, but returns the only Post ID in the query. Returns a *NotSingularError when more than one Post ID is found. Returns a *NotFoundError when no entities are found.
func (*PostQuery) Order ¶
func (pq *PostQuery) Order(o ...post.OrderOption) *PostQuery
Order specifies how the records should be ordered.
func (*PostQuery) Select ¶
func (pq *PostQuery) Select(fields ...string) *PostSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Post.Query(). Select(post.FieldCreatedAt). Scan(ctx, &v)
type PostSelect ¶
type PostSelect struct { *PostQuery // contains filtered or unexported fields }
PostSelect is the builder for selecting fields of Post entities.
func (*PostSelect) Aggregate ¶
func (ps *PostSelect) Aggregate(fns ...AggregateFunc) *PostSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PostSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PostSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PostSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PostSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PostSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PostSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PostSelect) Modify ¶
func (ps *PostSelect) Modify(modifiers ...func(s *sql.Selector)) *PostSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*PostSelect) Scan ¶
func (ps *PostSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PostSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PostUpdate ¶
type PostUpdate struct {
// contains filtered or unexported fields
}
PostUpdate is the builder for updating Post entities.
func (*PostUpdate) AddSort ¶
func (pu *PostUpdate) AddSort(i int32) *PostUpdate
AddSort adds i to the "sort" field.
func (*PostUpdate) AddState ¶
func (pu *PostUpdate) AddState(i int32) *PostUpdate
AddState adds i to the "state" field.
func (*PostUpdate) ClearDeletedAt ¶
func (pu *PostUpdate) ClearDeletedAt() *PostUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpdate) ClearRemark ¶
func (pu *PostUpdate) ClearRemark() *PostUpdate
ClearRemark clears the value of the "remark" field.
func (*PostUpdate) ClearUpdatedAt ¶
func (pu *PostUpdate) ClearUpdatedAt() *PostUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*PostUpdate) Exec ¶
func (pu *PostUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PostUpdate) ExecX ¶
func (pu *PostUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostUpdate) Modify ¶
func (pu *PostUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*PostUpdate) Mutation ¶
func (pu *PostUpdate) Mutation() *PostMutation
Mutation returns the PostMutation object of the builder.
func (*PostUpdate) Save ¶
func (pu *PostUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PostUpdate) SaveX ¶
func (pu *PostUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PostUpdate) SetDeletedAt ¶
func (pu *PostUpdate) SetDeletedAt(t time.Time) *PostUpdate
SetDeletedAt sets the "deleted_at" field.
func (*PostUpdate) SetName ¶
func (pu *PostUpdate) SetName(s string) *PostUpdate
SetName sets the "name" field.
func (*PostUpdate) SetNillableDeletedAt ¶
func (pu *PostUpdate) SetNillableDeletedAt(t *time.Time) *PostUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PostUpdate) SetNillableName ¶
func (pu *PostUpdate) SetNillableName(s *string) *PostUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*PostUpdate) SetNillableRemark ¶
func (pu *PostUpdate) SetNillableRemark(s *string) *PostUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PostUpdate) SetNillableSort ¶
func (pu *PostUpdate) SetNillableSort(i *int32) *PostUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*PostUpdate) SetNillableState ¶
func (pu *PostUpdate) SetNillableState(i *int32) *PostUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*PostUpdate) SetNillableUpdatedAt ¶
func (pu *PostUpdate) SetNillableUpdatedAt(t *time.Time) *PostUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PostUpdate) SetRemark ¶
func (pu *PostUpdate) SetRemark(s string) *PostUpdate
SetRemark sets the "remark" field.
func (*PostUpdate) SetSort ¶
func (pu *PostUpdate) SetSort(i int32) *PostUpdate
SetSort sets the "sort" field.
func (*PostUpdate) SetState ¶
func (pu *PostUpdate) SetState(i int32) *PostUpdate
SetState sets the "state" field.
func (*PostUpdate) SetUpdatedAt ¶
func (pu *PostUpdate) SetUpdatedAt(t time.Time) *PostUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PostUpdate) Where ¶
func (pu *PostUpdate) Where(ps ...predicate.Post) *PostUpdate
Where appends a list predicates to the PostUpdate builder.
type PostUpdateOne ¶
type PostUpdateOne struct {
// contains filtered or unexported fields
}
PostUpdateOne is the builder for updating a single Post entity.
func (*PostUpdateOne) AddSort ¶
func (puo *PostUpdateOne) AddSort(i int32) *PostUpdateOne
AddSort adds i to the "sort" field.
func (*PostUpdateOne) AddState ¶
func (puo *PostUpdateOne) AddState(i int32) *PostUpdateOne
AddState adds i to the "state" field.
func (*PostUpdateOne) ClearDeletedAt ¶
func (puo *PostUpdateOne) ClearDeletedAt() *PostUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpdateOne) ClearRemark ¶
func (puo *PostUpdateOne) ClearRemark() *PostUpdateOne
ClearRemark clears the value of the "remark" field.
func (*PostUpdateOne) ClearUpdatedAt ¶
func (puo *PostUpdateOne) ClearUpdatedAt() *PostUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*PostUpdateOne) Exec ¶
func (puo *PostUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PostUpdateOne) ExecX ¶
func (puo *PostUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostUpdateOne) Modify ¶
func (puo *PostUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *PostUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*PostUpdateOne) Mutation ¶
func (puo *PostUpdateOne) Mutation() *PostMutation
Mutation returns the PostMutation object of the builder.
func (*PostUpdateOne) Save ¶
func (puo *PostUpdateOne) Save(ctx context.Context) (*Post, error)
Save executes the query and returns the updated Post entity.
func (*PostUpdateOne) SaveX ¶
func (puo *PostUpdateOne) SaveX(ctx context.Context) *Post
SaveX is like Save, but panics if an error occurs.
func (*PostUpdateOne) Select ¶
func (puo *PostUpdateOne) Select(field string, fields ...string) *PostUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PostUpdateOne) SetDeletedAt ¶
func (puo *PostUpdateOne) SetDeletedAt(t time.Time) *PostUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*PostUpdateOne) SetName ¶
func (puo *PostUpdateOne) SetName(s string) *PostUpdateOne
SetName sets the "name" field.
func (*PostUpdateOne) SetNillableDeletedAt ¶
func (puo *PostUpdateOne) SetNillableDeletedAt(t *time.Time) *PostUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*PostUpdateOne) SetNillableName ¶
func (puo *PostUpdateOne) SetNillableName(s *string) *PostUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*PostUpdateOne) SetNillableRemark ¶
func (puo *PostUpdateOne) SetNillableRemark(s *string) *PostUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PostUpdateOne) SetNillableSort ¶
func (puo *PostUpdateOne) SetNillableSort(i *int32) *PostUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*PostUpdateOne) SetNillableState ¶
func (puo *PostUpdateOne) SetNillableState(i *int32) *PostUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*PostUpdateOne) SetNillableUpdatedAt ¶
func (puo *PostUpdateOne) SetNillableUpdatedAt(t *time.Time) *PostUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PostUpdateOne) SetRemark ¶
func (puo *PostUpdateOne) SetRemark(s string) *PostUpdateOne
SetRemark sets the "remark" field.
func (*PostUpdateOne) SetSort ¶
func (puo *PostUpdateOne) SetSort(i int32) *PostUpdateOne
SetSort sets the "sort" field.
func (*PostUpdateOne) SetState ¶
func (puo *PostUpdateOne) SetState(i int32) *PostUpdateOne
SetState sets the "state" field.
func (*PostUpdateOne) SetUpdatedAt ¶
func (puo *PostUpdateOne) SetUpdatedAt(t time.Time) *PostUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PostUpdateOne) Where ¶
func (puo *PostUpdateOne) Where(ps ...predicate.Post) *PostUpdateOne
Where appends a list predicates to the PostUpdate builder.
type PostUpsert ¶
PostUpsert is the "OnConflict" setter.
func (*PostUpsert) AddSort ¶
func (u *PostUpsert) AddSort(v int32) *PostUpsert
AddSort adds v to the "sort" field.
func (*PostUpsert) AddState ¶
func (u *PostUpsert) AddState(v int32) *PostUpsert
AddState adds v to the "state" field.
func (*PostUpsert) ClearDeletedAt ¶
func (u *PostUpsert) ClearDeletedAt() *PostUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpsert) ClearRemark ¶
func (u *PostUpsert) ClearRemark() *PostUpsert
ClearRemark clears the value of the "remark" field.
func (*PostUpsert) ClearUpdatedAt ¶
func (u *PostUpsert) ClearUpdatedAt() *PostUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*PostUpsert) SetDeletedAt ¶
func (u *PostUpsert) SetDeletedAt(v time.Time) *PostUpsert
SetDeletedAt sets the "deleted_at" field.
func (*PostUpsert) SetName ¶
func (u *PostUpsert) SetName(v string) *PostUpsert
SetName sets the "name" field.
func (*PostUpsert) SetRemark ¶
func (u *PostUpsert) SetRemark(v string) *PostUpsert
SetRemark sets the "remark" field.
func (*PostUpsert) SetSort ¶
func (u *PostUpsert) SetSort(v int32) *PostUpsert
SetSort sets the "sort" field.
func (*PostUpsert) SetState ¶
func (u *PostUpsert) SetState(v int32) *PostUpsert
SetState sets the "state" field.
func (*PostUpsert) SetUpdatedAt ¶
func (u *PostUpsert) SetUpdatedAt(v time.Time) *PostUpsert
SetUpdatedAt sets the "updated_at" field.
func (*PostUpsert) UpdateDeletedAt ¶
func (u *PostUpsert) UpdateDeletedAt() *PostUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PostUpsert) UpdateName ¶
func (u *PostUpsert) UpdateName() *PostUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*PostUpsert) UpdateRemark ¶
func (u *PostUpsert) UpdateRemark() *PostUpsert
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*PostUpsert) UpdateSort ¶
func (u *PostUpsert) UpdateSort() *PostUpsert
UpdateSort sets the "sort" field to the value that was provided on create.
func (*PostUpsert) UpdateState ¶
func (u *PostUpsert) UpdateState() *PostUpsert
UpdateState sets the "state" field to the value that was provided on create.
func (*PostUpsert) UpdateUpdatedAt ¶
func (u *PostUpsert) UpdateUpdatedAt() *PostUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type PostUpsertBulk ¶
type PostUpsertBulk struct {
// contains filtered or unexported fields
}
PostUpsertBulk is the builder for "upsert"-ing a bulk of Post nodes.
func (*PostUpsertBulk) AddSort ¶
func (u *PostUpsertBulk) AddSort(v int32) *PostUpsertBulk
AddSort adds v to the "sort" field.
func (*PostUpsertBulk) AddState ¶
func (u *PostUpsertBulk) AddState(v int32) *PostUpsertBulk
AddState adds v to the "state" field.
func (*PostUpsertBulk) ClearDeletedAt ¶
func (u *PostUpsertBulk) ClearDeletedAt() *PostUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpsertBulk) ClearRemark ¶
func (u *PostUpsertBulk) ClearRemark() *PostUpsertBulk
ClearRemark clears the value of the "remark" field.
func (*PostUpsertBulk) ClearUpdatedAt ¶
func (u *PostUpsertBulk) ClearUpdatedAt() *PostUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*PostUpsertBulk) DoNothing ¶
func (u *PostUpsertBulk) DoNothing() *PostUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PostUpsertBulk) Exec ¶
func (u *PostUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PostUpsertBulk) ExecX ¶
func (u *PostUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostUpsertBulk) Ignore ¶
func (u *PostUpsertBulk) Ignore() *PostUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Post.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PostUpsertBulk) SetDeletedAt ¶
func (u *PostUpsertBulk) SetDeletedAt(v time.Time) *PostUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*PostUpsertBulk) SetName ¶
func (u *PostUpsertBulk) SetName(v string) *PostUpsertBulk
SetName sets the "name" field.
func (*PostUpsertBulk) SetRemark ¶
func (u *PostUpsertBulk) SetRemark(v string) *PostUpsertBulk
SetRemark sets the "remark" field.
func (*PostUpsertBulk) SetSort ¶
func (u *PostUpsertBulk) SetSort(v int32) *PostUpsertBulk
SetSort sets the "sort" field.
func (*PostUpsertBulk) SetState ¶
func (u *PostUpsertBulk) SetState(v int32) *PostUpsertBulk
SetState sets the "state" field.
func (*PostUpsertBulk) SetUpdatedAt ¶
func (u *PostUpsertBulk) SetUpdatedAt(v time.Time) *PostUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*PostUpsertBulk) Update ¶
func (u *PostUpsertBulk) Update(set func(*PostUpsert)) *PostUpsertBulk
Update allows overriding fields `UPDATE` values. See the PostCreateBulk.OnConflict documentation for more info.
func (*PostUpsertBulk) UpdateDeletedAt ¶
func (u *PostUpsertBulk) UpdateDeletedAt() *PostUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateName ¶
func (u *PostUpsertBulk) UpdateName() *PostUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateNewValues ¶
func (u *PostUpsertBulk) UpdateNewValues() *PostUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Post.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(post.FieldID) }), ). Exec(ctx)
func (*PostUpsertBulk) UpdateRemark ¶
func (u *PostUpsertBulk) UpdateRemark() *PostUpsertBulk
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateSort ¶
func (u *PostUpsertBulk) UpdateSort() *PostUpsertBulk
UpdateSort sets the "sort" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateState ¶
func (u *PostUpsertBulk) UpdateState() *PostUpsertBulk
UpdateState sets the "state" field to the value that was provided on create.
func (*PostUpsertBulk) UpdateUpdatedAt ¶
func (u *PostUpsertBulk) UpdateUpdatedAt() *PostUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type PostUpsertOne ¶
type PostUpsertOne struct {
// contains filtered or unexported fields
}
PostUpsertOne is the builder for "upsert"-ing
one Post node.
func (*PostUpsertOne) AddSort ¶
func (u *PostUpsertOne) AddSort(v int32) *PostUpsertOne
AddSort adds v to the "sort" field.
func (*PostUpsertOne) AddState ¶
func (u *PostUpsertOne) AddState(v int32) *PostUpsertOne
AddState adds v to the "state" field.
func (*PostUpsertOne) ClearDeletedAt ¶
func (u *PostUpsertOne) ClearDeletedAt() *PostUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*PostUpsertOne) ClearRemark ¶
func (u *PostUpsertOne) ClearRemark() *PostUpsertOne
ClearRemark clears the value of the "remark" field.
func (*PostUpsertOne) ClearUpdatedAt ¶
func (u *PostUpsertOne) ClearUpdatedAt() *PostUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*PostUpsertOne) DoNothing ¶
func (u *PostUpsertOne) DoNothing() *PostUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PostUpsertOne) Exec ¶
func (u *PostUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*PostUpsertOne) ExecX ¶
func (u *PostUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PostUpsertOne) ID ¶
func (u *PostUpsertOne) ID(ctx context.Context) (id uint32, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*PostUpsertOne) IDX ¶
func (u *PostUpsertOne) IDX(ctx context.Context) uint32
IDX is like ID, but panics if an error occurs.
func (*PostUpsertOne) Ignore ¶
func (u *PostUpsertOne) Ignore() *PostUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Post.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PostUpsertOne) SetDeletedAt ¶
func (u *PostUpsertOne) SetDeletedAt(v time.Time) *PostUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*PostUpsertOne) SetName ¶
func (u *PostUpsertOne) SetName(v string) *PostUpsertOne
SetName sets the "name" field.
func (*PostUpsertOne) SetRemark ¶
func (u *PostUpsertOne) SetRemark(v string) *PostUpsertOne
SetRemark sets the "remark" field.
func (*PostUpsertOne) SetSort ¶
func (u *PostUpsertOne) SetSort(v int32) *PostUpsertOne
SetSort sets the "sort" field.
func (*PostUpsertOne) SetState ¶
func (u *PostUpsertOne) SetState(v int32) *PostUpsertOne
SetState sets the "state" field.
func (*PostUpsertOne) SetUpdatedAt ¶
func (u *PostUpsertOne) SetUpdatedAt(v time.Time) *PostUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*PostUpsertOne) Update ¶
func (u *PostUpsertOne) Update(set func(*PostUpsert)) *PostUpsertOne
Update allows overriding fields `UPDATE` values. See the PostCreate.OnConflict documentation for more info.
func (*PostUpsertOne) UpdateDeletedAt ¶
func (u *PostUpsertOne) UpdateDeletedAt() *PostUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*PostUpsertOne) UpdateName ¶
func (u *PostUpsertOne) UpdateName() *PostUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*PostUpsertOne) UpdateNewValues ¶
func (u *PostUpsertOne) UpdateNewValues() *PostUpsertOne
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.Post.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(post.FieldID) }), ). Exec(ctx)
func (*PostUpsertOne) UpdateRemark ¶
func (u *PostUpsertOne) UpdateRemark() *PostUpsertOne
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*PostUpsertOne) UpdateSort ¶
func (u *PostUpsertOne) UpdateSort() *PostUpsertOne
UpdateSort sets the "sort" field to the value that was provided on create.
func (*PostUpsertOne) UpdateState ¶
func (u *PostUpsertOne) UpdateState() *PostUpsertOne
UpdateState sets the "state" field to the value that was provided on create.
func (*PostUpsertOne) UpdateUpdatedAt ¶
func (u *PostUpsertOne) UpdateUpdatedAt() *PostUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
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 Role ¶
type Role struct { // ID of the ent. // id ID uint32 `json:"id,omitempty"` // 创建时间 CreatedAt *time.Time `json:"created_at,omitempty"` // 更新时间 UpdatedAt *time.Time `json:"updated_at,omitempty"` // 删除时间 DeletedAt *time.Time `json:"deleted_at,omitempty"` // 备注 Remark *string `json:"remark,omitempty"` // 排序 Sort *int32 `json:"sort,omitempty"` // 状态 0 UNSPECIFIED 开启 1 -> ACTIVE 关闭 2 -> INACTIVE, 禁用 3 -> BANNED State *int32 `json:"state,omitempty"` // 名称 Name *string `json:"name,omitempty"` // 默认路由 DefaultRouter *string `json:"default_router,omitempty"` // 数据范围(0:未指定 1:全部数据权限 2:本人数据权限 3:本部门数据权限 4:本部门及以下数据权限 5:自定部门数据权限 ) DataScope *int32 `json:"data_scope,omitempty"` // 菜单树选择项是否关联显示 MenuCheckStrictly *int32 `json:"menu_check_strictly,omitempty"` // 部门树选择项是否关联显示 DeptCheckStrictly *int32 `json:"dept_check_strictly,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RoleQuery when eager-loading is set. Edges RoleEdges `json:"edges"` // contains filtered or unexported fields }
角色表
func (*Role) QueryUsers ¶
QueryUsers queries the "users" edge of the Role entity.
func (*Role) Unwrap ¶
Unwrap unwraps the Role 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 (*Role) Update ¶
func (r *Role) Update() *RoleUpdateOne
Update returns a builder for updating this Role. Note that you need to call Role.Unwrap() before calling this method if this Role was returned from a transaction, and the transaction was committed or rolled back.
type RoleClient ¶
type RoleClient struct {
// contains filtered or unexported fields
}
RoleClient is a client for the Role schema.
func NewRoleClient ¶
func NewRoleClient(c config) *RoleClient
NewRoleClient returns a client for the Role from the given config.
func (*RoleClient) Create ¶
func (c *RoleClient) Create() *RoleCreate
Create returns a builder for creating a Role entity.
func (*RoleClient) CreateBulk ¶
func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk
CreateBulk returns a builder for creating a bulk of Role entities.
func (*RoleClient) Delete ¶
func (c *RoleClient) Delete() *RoleDelete
Delete returns a delete builder for Role.
func (*RoleClient) DeleteOne ¶
func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RoleClient) DeleteOneID ¶
func (c *RoleClient) DeleteOneID(id uint32) *RoleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RoleClient) GetX ¶
func (c *RoleClient) GetX(ctx context.Context, id uint32) *Role
GetX is like Get, but panics if an error occurs.
func (*RoleClient) Intercept ¶
func (c *RoleClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `role.Intercept(f(g(h())))`.
func (*RoleClient) Interceptors ¶
func (c *RoleClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RoleClient) MapCreateBulk ¶
func (c *RoleClient) MapCreateBulk(slice any, setFunc func(*RoleCreate, int)) *RoleCreateBulk
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 (*RoleClient) Query ¶
func (c *RoleClient) Query() *RoleQuery
Query returns a query builder for Role.
func (*RoleClient) QueryUsers ¶
func (c *RoleClient) QueryUsers(r *Role) *UserQuery
QueryUsers queries the users edge of a Role.
func (*RoleClient) Update ¶
func (c *RoleClient) Update() *RoleUpdate
Update returns an update builder for Role.
func (*RoleClient) UpdateOne ¶
func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RoleClient) UpdateOneID ¶
func (c *RoleClient) UpdateOneID(id uint32) *RoleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RoleClient) Use ¶
func (c *RoleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `role.Hooks(f(g(h())))`.
type RoleCreate ¶
type RoleCreate struct {
// contains filtered or unexported fields
}
RoleCreate is the builder for creating a Role entity.
func (*RoleCreate) AddUserIDs ¶
func (rc *RoleCreate) AddUserIDs(ids ...uint32) *RoleCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*RoleCreate) AddUsers ¶
func (rc *RoleCreate) AddUsers(u ...*User) *RoleCreate
AddUsers adds the "users" edges to the User entity.
func (*RoleCreate) Exec ¶
func (rc *RoleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleCreate) ExecX ¶
func (rc *RoleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleCreate) Mutation ¶
func (rc *RoleCreate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleCreate) OnConflict ¶
func (rc *RoleCreate) OnConflict(opts ...sql.ConflictOption) *RoleUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Role.Create(). SetCreatedAt(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.RoleUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*RoleCreate) OnConflictColumns ¶
func (rc *RoleCreate) OnConflictColumns(columns ...string) *RoleUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RoleCreate) Save ¶
func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)
Save creates the Role in the database.
func (*RoleCreate) SaveX ¶
func (rc *RoleCreate) SaveX(ctx context.Context) *Role
SaveX calls Save and panics if Save returns an error.
func (*RoleCreate) SetCreatedAt ¶
func (rc *RoleCreate) SetCreatedAt(t time.Time) *RoleCreate
SetCreatedAt sets the "created_at" field.
func (*RoleCreate) SetDataScope ¶
func (rc *RoleCreate) SetDataScope(i int32) *RoleCreate
SetDataScope sets the "data_scope" field.
func (*RoleCreate) SetDefaultRouter ¶
func (rc *RoleCreate) SetDefaultRouter(s string) *RoleCreate
SetDefaultRouter sets the "default_router" field.
func (*RoleCreate) SetDeletedAt ¶
func (rc *RoleCreate) SetDeletedAt(t time.Time) *RoleCreate
SetDeletedAt sets the "deleted_at" field.
func (*RoleCreate) SetDeptCheckStrictly ¶
func (rc *RoleCreate) SetDeptCheckStrictly(i int32) *RoleCreate
SetDeptCheckStrictly sets the "dept_check_strictly" field.
func (*RoleCreate) SetID ¶
func (rc *RoleCreate) SetID(u uint32) *RoleCreate
SetID sets the "id" field.
func (*RoleCreate) SetMenuCheckStrictly ¶
func (rc *RoleCreate) SetMenuCheckStrictly(i int32) *RoleCreate
SetMenuCheckStrictly sets the "menu_check_strictly" field.
func (*RoleCreate) SetName ¶
func (rc *RoleCreate) SetName(s string) *RoleCreate
SetName sets the "name" field.
func (*RoleCreate) SetNillableCreatedAt ¶
func (rc *RoleCreate) SetNillableCreatedAt(t *time.Time) *RoleCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RoleCreate) SetNillableDataScope ¶
func (rc *RoleCreate) SetNillableDataScope(i *int32) *RoleCreate
SetNillableDataScope sets the "data_scope" field if the given value is not nil.
func (*RoleCreate) SetNillableDefaultRouter ¶
func (rc *RoleCreate) SetNillableDefaultRouter(s *string) *RoleCreate
SetNillableDefaultRouter sets the "default_router" field if the given value is not nil.
func (*RoleCreate) SetNillableDeletedAt ¶
func (rc *RoleCreate) SetNillableDeletedAt(t *time.Time) *RoleCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RoleCreate) SetNillableDeptCheckStrictly ¶
func (rc *RoleCreate) SetNillableDeptCheckStrictly(i *int32) *RoleCreate
SetNillableDeptCheckStrictly sets the "dept_check_strictly" field if the given value is not nil.
func (*RoleCreate) SetNillableMenuCheckStrictly ¶
func (rc *RoleCreate) SetNillableMenuCheckStrictly(i *int32) *RoleCreate
SetNillableMenuCheckStrictly sets the "menu_check_strictly" field if the given value is not nil.
func (*RoleCreate) SetNillableName ¶
func (rc *RoleCreate) SetNillableName(s *string) *RoleCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*RoleCreate) SetNillableRemark ¶
func (rc *RoleCreate) SetNillableRemark(s *string) *RoleCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*RoleCreate) SetNillableSort ¶
func (rc *RoleCreate) SetNillableSort(i *int32) *RoleCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*RoleCreate) SetNillableState ¶
func (rc *RoleCreate) SetNillableState(i *int32) *RoleCreate
SetNillableState sets the "state" field if the given value is not nil.
func (*RoleCreate) SetNillableUpdatedAt ¶
func (rc *RoleCreate) SetNillableUpdatedAt(t *time.Time) *RoleCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*RoleCreate) SetRemark ¶
func (rc *RoleCreate) SetRemark(s string) *RoleCreate
SetRemark sets the "remark" field.
func (*RoleCreate) SetSort ¶
func (rc *RoleCreate) SetSort(i int32) *RoleCreate
SetSort sets the "sort" field.
func (*RoleCreate) SetState ¶
func (rc *RoleCreate) SetState(i int32) *RoleCreate
SetState sets the "state" field.
func (*RoleCreate) SetUpdatedAt ¶
func (rc *RoleCreate) SetUpdatedAt(t time.Time) *RoleCreate
SetUpdatedAt sets the "updated_at" field.
type RoleCreateBulk ¶
type RoleCreateBulk struct {
// contains filtered or unexported fields
}
RoleCreateBulk is the builder for creating many Role entities in bulk.
func (*RoleCreateBulk) Exec ¶
func (rcb *RoleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleCreateBulk) ExecX ¶
func (rcb *RoleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleCreateBulk) OnConflict ¶
func (rcb *RoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *RoleUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Role.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.RoleUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*RoleCreateBulk) OnConflictColumns ¶
func (rcb *RoleCreateBulk) OnConflictColumns(columns ...string) *RoleUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type RoleDelete ¶
type RoleDelete struct {
// contains filtered or unexported fields
}
RoleDelete is the builder for deleting a Role entity.
func (*RoleDelete) Exec ¶
func (rd *RoleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RoleDelete) ExecX ¶
func (rd *RoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoleDelete) Where ¶
func (rd *RoleDelete) Where(ps ...predicate.Role) *RoleDelete
Where appends a list predicates to the RoleDelete builder.
type RoleDeleteOne ¶
type RoleDeleteOne struct {
// contains filtered or unexported fields
}
RoleDeleteOne is the builder for deleting a single Role entity.
func (*RoleDeleteOne) Exec ¶
func (rdo *RoleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RoleDeleteOne) ExecX ¶
func (rdo *RoleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleDeleteOne) Where ¶
func (rdo *RoleDeleteOne) Where(ps ...predicate.Role) *RoleDeleteOne
Where appends a list predicates to the RoleDelete builder.
type RoleEdges ¶
type RoleEdges struct { // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // contains filtered or unexported fields }
RoleEdges holds the relations/edges for other nodes in the graph.
func (RoleEdges) UsersOrErr ¶
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type RoleFilter ¶
type RoleFilter struct {
// contains filtered or unexported fields
}
RoleFilter provides a generic filtering capability at runtime for RoleQuery.
func (*RoleFilter) Where ¶
func (f *RoleFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*RoleFilter) WhereCreatedAt ¶
func (f *RoleFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*RoleFilter) WhereDataScope ¶
func (f *RoleFilter) WhereDataScope(p entql.Int32P)
WhereDataScope applies the entql int32 predicate on the data_scope field.
func (*RoleFilter) WhereDefaultRouter ¶
func (f *RoleFilter) WhereDefaultRouter(p entql.StringP)
WhereDefaultRouter applies the entql string predicate on the default_router field.
func (*RoleFilter) WhereDeletedAt ¶
func (f *RoleFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*RoleFilter) WhereDeptCheckStrictly ¶
func (f *RoleFilter) WhereDeptCheckStrictly(p entql.Int32P)
WhereDeptCheckStrictly applies the entql int32 predicate on the dept_check_strictly field.
func (*RoleFilter) WhereHasUsers ¶
func (f *RoleFilter) WhereHasUsers()
WhereHasUsers applies a predicate to check if query has an edge users.
func (*RoleFilter) WhereHasUsersWith ¶
func (f *RoleFilter) WhereHasUsersWith(preds ...predicate.User)
WhereHasUsersWith applies a predicate to check if query has an edge users with a given conditions (other predicates).
func (*RoleFilter) WhereID ¶
func (f *RoleFilter) WhereID(p entql.Uint32P)
WhereID applies the entql uint32 predicate on the id field.
func (*RoleFilter) WhereMenuCheckStrictly ¶
func (f *RoleFilter) WhereMenuCheckStrictly(p entql.Int32P)
WhereMenuCheckStrictly applies the entql int32 predicate on the menu_check_strictly field.
func (*RoleFilter) WhereName ¶
func (f *RoleFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (*RoleFilter) WhereRemark ¶
func (f *RoleFilter) WhereRemark(p entql.StringP)
WhereRemark applies the entql string predicate on the remark field.
func (*RoleFilter) WhereSort ¶
func (f *RoleFilter) WhereSort(p entql.Int32P)
WhereSort applies the entql int32 predicate on the sort field.
func (*RoleFilter) WhereState ¶
func (f *RoleFilter) WhereState(p entql.Int32P)
WhereState applies the entql int32 predicate on the state field.
func (*RoleFilter) WhereUpdatedAt ¶
func (f *RoleFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type RoleGroupBy ¶
type RoleGroupBy struct {
// contains filtered or unexported fields
}
RoleGroupBy is the group-by builder for Role entities.
func (*RoleGroupBy) Aggregate ¶
func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RoleGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Scan ¶
func (rgb *RoleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoleGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoleMutation ¶
type RoleMutation struct {
// contains filtered or unexported fields
}
RoleMutation represents an operation that mutates the Role nodes in the graph.
func (*RoleMutation) AddDataScope ¶
func (m *RoleMutation) AddDataScope(i int32)
AddDataScope adds i to the "data_scope" field.
func (*RoleMutation) AddDeptCheckStrictly ¶
func (m *RoleMutation) AddDeptCheckStrictly(i int32)
AddDeptCheckStrictly adds i to the "dept_check_strictly" field.
func (*RoleMutation) AddField ¶
func (m *RoleMutation) 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 (*RoleMutation) AddMenuCheckStrictly ¶
func (m *RoleMutation) AddMenuCheckStrictly(i int32)
AddMenuCheckStrictly adds i to the "menu_check_strictly" field.
func (*RoleMutation) AddSort ¶
func (m *RoleMutation) AddSort(i int32)
AddSort adds i to the "sort" field.
func (*RoleMutation) AddState ¶
func (m *RoleMutation) AddState(i int32)
AddState adds i to the "state" field.
func (*RoleMutation) AddUserIDs ¶
func (m *RoleMutation) AddUserIDs(ids ...uint32)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*RoleMutation) AddedDataScope ¶
func (m *RoleMutation) AddedDataScope() (r int32, exists bool)
AddedDataScope returns the value that was added to the "data_scope" field in this mutation.
func (*RoleMutation) AddedDeptCheckStrictly ¶
func (m *RoleMutation) AddedDeptCheckStrictly() (r int32, exists bool)
AddedDeptCheckStrictly returns the value that was added to the "dept_check_strictly" field in this mutation.
func (*RoleMutation) AddedEdges ¶
func (m *RoleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RoleMutation) AddedField ¶
func (m *RoleMutation) 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 (*RoleMutation) AddedFields ¶
func (m *RoleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RoleMutation) AddedIDs ¶
func (m *RoleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RoleMutation) AddedMenuCheckStrictly ¶
func (m *RoleMutation) AddedMenuCheckStrictly() (r int32, exists bool)
AddedMenuCheckStrictly returns the value that was added to the "menu_check_strictly" field in this mutation.
func (*RoleMutation) AddedSort ¶
func (m *RoleMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*RoleMutation) AddedState ¶
func (m *RoleMutation) AddedState() (r int32, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*RoleMutation) ClearCreatedAt ¶
func (m *RoleMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*RoleMutation) ClearDeletedAt ¶
func (m *RoleMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*RoleMutation) ClearEdge ¶
func (m *RoleMutation) 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 (*RoleMutation) ClearField ¶
func (m *RoleMutation) 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 (*RoleMutation) ClearRemark ¶
func (m *RoleMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*RoleMutation) ClearUpdatedAt ¶
func (m *RoleMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*RoleMutation) ClearUsers ¶
func (m *RoleMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*RoleMutation) ClearedEdges ¶
func (m *RoleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RoleMutation) ClearedFields ¶
func (m *RoleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RoleMutation) Client ¶
func (m RoleMutation) 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 (*RoleMutation) CreatedAt ¶
func (m *RoleMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RoleMutation) CreatedAtCleared ¶
func (m *RoleMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*RoleMutation) DataScope ¶
func (m *RoleMutation) DataScope() (r int32, exists bool)
DataScope returns the value of the "data_scope" field in the mutation.
func (*RoleMutation) DefaultRouter ¶
func (m *RoleMutation) DefaultRouter() (r string, exists bool)
DefaultRouter returns the value of the "default_router" field in the mutation.
func (*RoleMutation) DeletedAt ¶
func (m *RoleMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*RoleMutation) DeletedAtCleared ¶
func (m *RoleMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*RoleMutation) DeptCheckStrictly ¶
func (m *RoleMutation) DeptCheckStrictly() (r int32, exists bool)
DeptCheckStrictly returns the value of the "dept_check_strictly" field in the mutation.
func (*RoleMutation) EdgeCleared ¶
func (m *RoleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RoleMutation) Field ¶
func (m *RoleMutation) 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 (*RoleMutation) FieldCleared ¶
func (m *RoleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RoleMutation) Fields ¶
func (m *RoleMutation) 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 (*RoleMutation) Filter ¶
func (m *RoleMutation) Filter() *RoleFilter
Filter returns an entql.Where implementation to apply filters on the RoleMutation builder.
func (*RoleMutation) ID ¶
func (m *RoleMutation) ID() (id uint32, 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 (*RoleMutation) IDs ¶
func (m *RoleMutation) IDs(ctx context.Context) ([]uint32, 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 (*RoleMutation) MenuCheckStrictly ¶
func (m *RoleMutation) MenuCheckStrictly() (r int32, exists bool)
MenuCheckStrictly returns the value of the "menu_check_strictly" field in the mutation.
func (*RoleMutation) Name ¶
func (m *RoleMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*RoleMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Role entity. If the Role 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 (*RoleMutation) OldDataScope ¶
func (m *RoleMutation) OldDataScope(ctx context.Context) (v *int32, err error)
OldDataScope returns the old "data_scope" field's value of the Role entity. If the Role 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 (*RoleMutation) OldDefaultRouter ¶
func (m *RoleMutation) OldDefaultRouter(ctx context.Context) (v *string, err error)
OldDefaultRouter returns the old "default_router" field's value of the Role entity. If the Role 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 (*RoleMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Role entity. If the Role 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 (*RoleMutation) OldDeptCheckStrictly ¶
func (m *RoleMutation) OldDeptCheckStrictly(ctx context.Context) (v *int32, err error)
OldDeptCheckStrictly returns the old "dept_check_strictly" field's value of the Role entity. If the Role 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 (*RoleMutation) 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 (*RoleMutation) OldMenuCheckStrictly ¶
func (m *RoleMutation) OldMenuCheckStrictly(ctx context.Context) (v *int32, err error)
OldMenuCheckStrictly returns the old "menu_check_strictly" field's value of the Role entity. If the Role 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 (*RoleMutation) OldName ¶
func (m *RoleMutation) OldName(ctx context.Context) (v *string, err error)
OldName returns the old "name" field's value of the Role entity. If the Role 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 (*RoleMutation) OldRemark ¶
func (m *RoleMutation) OldRemark(ctx context.Context) (v *string, err error)
OldRemark returns the old "remark" field's value of the Role entity. If the Role 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 (*RoleMutation) OldSort ¶
func (m *RoleMutation) OldSort(ctx context.Context) (v *int32, err error)
OldSort returns the old "sort" field's value of the Role entity. If the Role 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 (*RoleMutation) OldState ¶
func (m *RoleMutation) OldState(ctx context.Context) (v *int32, err error)
OldState returns the old "state" field's value of the Role entity. If the Role 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 (*RoleMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Role entity. If the Role 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 (*RoleMutation) Remark ¶
func (m *RoleMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*RoleMutation) RemarkCleared ¶
func (m *RoleMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*RoleMutation) RemoveUserIDs ¶
func (m *RoleMutation) RemoveUserIDs(ids ...uint32)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*RoleMutation) RemovedEdges ¶
func (m *RoleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RoleMutation) RemovedIDs ¶
func (m *RoleMutation) 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 (*RoleMutation) RemovedUsersIDs ¶
func (m *RoleMutation) RemovedUsersIDs() (ids []uint32)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*RoleMutation) ResetCreatedAt ¶
func (m *RoleMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RoleMutation) ResetDataScope ¶
func (m *RoleMutation) ResetDataScope()
ResetDataScope resets all changes to the "data_scope" field.
func (*RoleMutation) ResetDefaultRouter ¶
func (m *RoleMutation) ResetDefaultRouter()
ResetDefaultRouter resets all changes to the "default_router" field.
func (*RoleMutation) ResetDeletedAt ¶
func (m *RoleMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*RoleMutation) ResetDeptCheckStrictly ¶
func (m *RoleMutation) ResetDeptCheckStrictly()
ResetDeptCheckStrictly resets all changes to the "dept_check_strictly" field.
func (*RoleMutation) ResetEdge ¶
func (m *RoleMutation) 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 (*RoleMutation) ResetField ¶
func (m *RoleMutation) 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 (*RoleMutation) ResetMenuCheckStrictly ¶
func (m *RoleMutation) ResetMenuCheckStrictly()
ResetMenuCheckStrictly resets all changes to the "menu_check_strictly" field.
func (*RoleMutation) ResetName ¶
func (m *RoleMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*RoleMutation) ResetRemark ¶
func (m *RoleMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*RoleMutation) ResetSort ¶
func (m *RoleMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*RoleMutation) ResetState ¶
func (m *RoleMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*RoleMutation) ResetUpdatedAt ¶
func (m *RoleMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*RoleMutation) ResetUsers ¶
func (m *RoleMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*RoleMutation) SetCreatedAt ¶
func (m *RoleMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RoleMutation) SetDataScope ¶
func (m *RoleMutation) SetDataScope(i int32)
SetDataScope sets the "data_scope" field.
func (*RoleMutation) SetDefaultRouter ¶
func (m *RoleMutation) SetDefaultRouter(s string)
SetDefaultRouter sets the "default_router" field.
func (*RoleMutation) SetDeletedAt ¶
func (m *RoleMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*RoleMutation) SetDeptCheckStrictly ¶
func (m *RoleMutation) SetDeptCheckStrictly(i int32)
SetDeptCheckStrictly sets the "dept_check_strictly" field.
func (*RoleMutation) SetField ¶
func (m *RoleMutation) 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 (*RoleMutation) SetID ¶
func (m *RoleMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Role entities.
func (*RoleMutation) SetMenuCheckStrictly ¶
func (m *RoleMutation) SetMenuCheckStrictly(i int32)
SetMenuCheckStrictly sets the "menu_check_strictly" field.
func (*RoleMutation) SetName ¶
func (m *RoleMutation) SetName(s string)
SetName sets the "name" field.
func (*RoleMutation) SetOp ¶
func (m *RoleMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RoleMutation) SetRemark ¶
func (m *RoleMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*RoleMutation) SetSort ¶
func (m *RoleMutation) SetSort(i int32)
SetSort sets the "sort" field.
func (*RoleMutation) SetState ¶
func (m *RoleMutation) SetState(i int32)
SetState sets the "state" field.
func (*RoleMutation) SetUpdatedAt ¶
func (m *RoleMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*RoleMutation) Sort ¶
func (m *RoleMutation) Sort() (r int32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*RoleMutation) State ¶
func (m *RoleMutation) State() (r int32, exists bool)
State returns the value of the "state" field in the mutation.
func (RoleMutation) Tx ¶
func (m RoleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RoleMutation) Type ¶
func (m *RoleMutation) Type() string
Type returns the node type of this mutation (Role).
func (*RoleMutation) UpdatedAt ¶
func (m *RoleMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*RoleMutation) UpdatedAtCleared ¶
func (m *RoleMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*RoleMutation) UsersCleared ¶
func (m *RoleMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*RoleMutation) UsersIDs ¶
func (m *RoleMutation) UsersIDs() (ids []uint32)
UsersIDs returns the "users" edge IDs in the mutation.
func (*RoleMutation) Where ¶
func (m *RoleMutation) Where(ps ...predicate.Role)
Where appends a list predicates to the RoleMutation builder.
func (*RoleMutation) WhereP ¶
func (m *RoleMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RoleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RoleQuery ¶
type RoleQuery struct {
// contains filtered or unexported fields
}
RoleQuery is the builder for querying Role entities.
func (*RoleQuery) Aggregate ¶
func (rq *RoleQuery) Aggregate(fns ...AggregateFunc) *RoleSelect
Aggregate returns a RoleSelect configured with the given aggregations.
func (*RoleQuery) Clone ¶
Clone returns a duplicate of the RoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RoleQuery) Filter ¶
func (rq *RoleQuery) Filter() *RoleFilter
Filter returns a Filter implementation to apply filters on the RoleQuery builder.
func (*RoleQuery) First ¶
First returns the first Role entity from the query. Returns a *NotFoundError when no Role was found.
func (*RoleQuery) FirstID ¶
FirstID returns the first Role ID from the query. Returns a *NotFoundError when no Role ID was found.
func (*RoleQuery) GroupBy ¶
func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Role.Query(). GroupBy(role.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RoleQuery) Modify ¶
func (rq *RoleQuery) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*RoleQuery) Only ¶
Only returns a single Role entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Role entity is found. Returns a *NotFoundError when no Role entities are found.
func (*RoleQuery) OnlyID ¶
OnlyID is like Only, but returns the only Role ID in the query. Returns a *NotSingularError when more than one Role ID is found. Returns a *NotFoundError when no entities are found.
func (*RoleQuery) Order ¶
func (rq *RoleQuery) Order(o ...role.OrderOption) *RoleQuery
Order specifies how the records should be ordered.
func (*RoleQuery) QueryUsers ¶
QueryUsers chains the current query on the "users" edge.
func (*RoleQuery) Select ¶
func (rq *RoleQuery) Select(fields ...string) *RoleSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Role.Query(). Select(role.FieldCreatedAt). Scan(ctx, &v)
func (*RoleQuery) 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.
type RoleSelect ¶
type RoleSelect struct { *RoleQuery // contains filtered or unexported fields }
RoleSelect is the builder for selecting fields of Role entities.
func (*RoleSelect) Aggregate ¶
func (rs *RoleSelect) Aggregate(fns ...AggregateFunc) *RoleSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RoleSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Modify ¶
func (rs *RoleSelect) Modify(modifiers ...func(s *sql.Selector)) *RoleSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*RoleSelect) Scan ¶
func (rs *RoleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoleSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RoleUpdate ¶
type RoleUpdate struct {
// contains filtered or unexported fields
}
RoleUpdate is the builder for updating Role entities.
func (*RoleUpdate) AddDataScope ¶
func (ru *RoleUpdate) AddDataScope(i int32) *RoleUpdate
AddDataScope adds i to the "data_scope" field.
func (*RoleUpdate) AddDeptCheckStrictly ¶
func (ru *RoleUpdate) AddDeptCheckStrictly(i int32) *RoleUpdate
AddDeptCheckStrictly adds i to the "dept_check_strictly" field.
func (*RoleUpdate) AddMenuCheckStrictly ¶
func (ru *RoleUpdate) AddMenuCheckStrictly(i int32) *RoleUpdate
AddMenuCheckStrictly adds i to the "menu_check_strictly" field.
func (*RoleUpdate) AddSort ¶
func (ru *RoleUpdate) AddSort(i int32) *RoleUpdate
AddSort adds i to the "sort" field.
func (*RoleUpdate) AddState ¶
func (ru *RoleUpdate) AddState(i int32) *RoleUpdate
AddState adds i to the "state" field.
func (*RoleUpdate) AddUserIDs ¶
func (ru *RoleUpdate) AddUserIDs(ids ...uint32) *RoleUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*RoleUpdate) AddUsers ¶
func (ru *RoleUpdate) AddUsers(u ...*User) *RoleUpdate
AddUsers adds the "users" edges to the User entity.
func (*RoleUpdate) ClearDeletedAt ¶
func (ru *RoleUpdate) ClearDeletedAt() *RoleUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*RoleUpdate) ClearRemark ¶
func (ru *RoleUpdate) ClearRemark() *RoleUpdate
ClearRemark clears the value of the "remark" field.
func (*RoleUpdate) ClearUpdatedAt ¶
func (ru *RoleUpdate) ClearUpdatedAt() *RoleUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*RoleUpdate) ClearUsers ¶
func (ru *RoleUpdate) ClearUsers() *RoleUpdate
ClearUsers clears all "users" edges to the User entity.
func (*RoleUpdate) Exec ¶
func (ru *RoleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpdate) ExecX ¶
func (ru *RoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdate) Modify ¶
func (ru *RoleUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*RoleUpdate) Mutation ¶
func (ru *RoleUpdate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdate) RemoveUserIDs ¶
func (ru *RoleUpdate) RemoveUserIDs(ids ...uint32) *RoleUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*RoleUpdate) RemoveUsers ¶
func (ru *RoleUpdate) RemoveUsers(u ...*User) *RoleUpdate
RemoveUsers removes "users" edges to User entities.
func (*RoleUpdate) Save ¶
func (ru *RoleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RoleUpdate) SaveX ¶
func (ru *RoleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RoleUpdate) SetDataScope ¶
func (ru *RoleUpdate) SetDataScope(i int32) *RoleUpdate
SetDataScope sets the "data_scope" field.
func (*RoleUpdate) SetDefaultRouter ¶
func (ru *RoleUpdate) SetDefaultRouter(s string) *RoleUpdate
SetDefaultRouter sets the "default_router" field.
func (*RoleUpdate) SetDeletedAt ¶
func (ru *RoleUpdate) SetDeletedAt(t time.Time) *RoleUpdate
SetDeletedAt sets the "deleted_at" field.
func (*RoleUpdate) SetDeptCheckStrictly ¶
func (ru *RoleUpdate) SetDeptCheckStrictly(i int32) *RoleUpdate
SetDeptCheckStrictly sets the "dept_check_strictly" field.
func (*RoleUpdate) SetMenuCheckStrictly ¶
func (ru *RoleUpdate) SetMenuCheckStrictly(i int32) *RoleUpdate
SetMenuCheckStrictly sets the "menu_check_strictly" field.
func (*RoleUpdate) SetName ¶
func (ru *RoleUpdate) SetName(s string) *RoleUpdate
SetName sets the "name" field.
func (*RoleUpdate) SetNillableDataScope ¶
func (ru *RoleUpdate) SetNillableDataScope(i *int32) *RoleUpdate
SetNillableDataScope sets the "data_scope" field if the given value is not nil.
func (*RoleUpdate) SetNillableDefaultRouter ¶
func (ru *RoleUpdate) SetNillableDefaultRouter(s *string) *RoleUpdate
SetNillableDefaultRouter sets the "default_router" field if the given value is not nil.
func (*RoleUpdate) SetNillableDeletedAt ¶
func (ru *RoleUpdate) SetNillableDeletedAt(t *time.Time) *RoleUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RoleUpdate) SetNillableDeptCheckStrictly ¶
func (ru *RoleUpdate) SetNillableDeptCheckStrictly(i *int32) *RoleUpdate
SetNillableDeptCheckStrictly sets the "dept_check_strictly" field if the given value is not nil.
func (*RoleUpdate) SetNillableMenuCheckStrictly ¶
func (ru *RoleUpdate) SetNillableMenuCheckStrictly(i *int32) *RoleUpdate
SetNillableMenuCheckStrictly sets the "menu_check_strictly" field if the given value is not nil.
func (*RoleUpdate) SetNillableName ¶
func (ru *RoleUpdate) SetNillableName(s *string) *RoleUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*RoleUpdate) SetNillableRemark ¶
func (ru *RoleUpdate) SetNillableRemark(s *string) *RoleUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*RoleUpdate) SetNillableSort ¶
func (ru *RoleUpdate) SetNillableSort(i *int32) *RoleUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*RoleUpdate) SetNillableState ¶
func (ru *RoleUpdate) SetNillableState(i *int32) *RoleUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*RoleUpdate) SetNillableUpdatedAt ¶
func (ru *RoleUpdate) SetNillableUpdatedAt(t *time.Time) *RoleUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*RoleUpdate) SetRemark ¶
func (ru *RoleUpdate) SetRemark(s string) *RoleUpdate
SetRemark sets the "remark" field.
func (*RoleUpdate) SetSort ¶
func (ru *RoleUpdate) SetSort(i int32) *RoleUpdate
SetSort sets the "sort" field.
func (*RoleUpdate) SetState ¶
func (ru *RoleUpdate) SetState(i int32) *RoleUpdate
SetState sets the "state" field.
func (*RoleUpdate) SetUpdatedAt ¶
func (ru *RoleUpdate) SetUpdatedAt(t time.Time) *RoleUpdate
SetUpdatedAt sets the "updated_at" field.
func (*RoleUpdate) Where ¶
func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
Where appends a list predicates to the RoleUpdate builder.
type RoleUpdateOne ¶
type RoleUpdateOne struct {
// contains filtered or unexported fields
}
RoleUpdateOne is the builder for updating a single Role entity.
func (*RoleUpdateOne) AddDataScope ¶
func (ruo *RoleUpdateOne) AddDataScope(i int32) *RoleUpdateOne
AddDataScope adds i to the "data_scope" field.
func (*RoleUpdateOne) AddDeptCheckStrictly ¶
func (ruo *RoleUpdateOne) AddDeptCheckStrictly(i int32) *RoleUpdateOne
AddDeptCheckStrictly adds i to the "dept_check_strictly" field.
func (*RoleUpdateOne) AddMenuCheckStrictly ¶
func (ruo *RoleUpdateOne) AddMenuCheckStrictly(i int32) *RoleUpdateOne
AddMenuCheckStrictly adds i to the "menu_check_strictly" field.
func (*RoleUpdateOne) AddSort ¶
func (ruo *RoleUpdateOne) AddSort(i int32) *RoleUpdateOne
AddSort adds i to the "sort" field.
func (*RoleUpdateOne) AddState ¶
func (ruo *RoleUpdateOne) AddState(i int32) *RoleUpdateOne
AddState adds i to the "state" field.
func (*RoleUpdateOne) AddUserIDs ¶
func (ruo *RoleUpdateOne) AddUserIDs(ids ...uint32) *RoleUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*RoleUpdateOne) AddUsers ¶
func (ruo *RoleUpdateOne) AddUsers(u ...*User) *RoleUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*RoleUpdateOne) ClearDeletedAt ¶
func (ruo *RoleUpdateOne) ClearDeletedAt() *RoleUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*RoleUpdateOne) ClearRemark ¶
func (ruo *RoleUpdateOne) ClearRemark() *RoleUpdateOne
ClearRemark clears the value of the "remark" field.
func (*RoleUpdateOne) ClearUpdatedAt ¶
func (ruo *RoleUpdateOne) ClearUpdatedAt() *RoleUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*RoleUpdateOne) ClearUsers ¶
func (ruo *RoleUpdateOne) ClearUsers() *RoleUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*RoleUpdateOne) Exec ¶
func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RoleUpdateOne) ExecX ¶
func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdateOne) Modify ¶
func (ruo *RoleUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *RoleUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*RoleUpdateOne) Mutation ¶
func (ruo *RoleUpdateOne) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdateOne) RemoveUserIDs ¶
func (ruo *RoleUpdateOne) RemoveUserIDs(ids ...uint32) *RoleUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*RoleUpdateOne) RemoveUsers ¶
func (ruo *RoleUpdateOne) RemoveUsers(u ...*User) *RoleUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*RoleUpdateOne) Save ¶
func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)
Save executes the query and returns the updated Role entity.
func (*RoleUpdateOne) SaveX ¶
func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role
SaveX is like Save, but panics if an error occurs.
func (*RoleUpdateOne) Select ¶
func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RoleUpdateOne) SetDataScope ¶
func (ruo *RoleUpdateOne) SetDataScope(i int32) *RoleUpdateOne
SetDataScope sets the "data_scope" field.
func (*RoleUpdateOne) SetDefaultRouter ¶
func (ruo *RoleUpdateOne) SetDefaultRouter(s string) *RoleUpdateOne
SetDefaultRouter sets the "default_router" field.
func (*RoleUpdateOne) SetDeletedAt ¶
func (ruo *RoleUpdateOne) SetDeletedAt(t time.Time) *RoleUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*RoleUpdateOne) SetDeptCheckStrictly ¶
func (ruo *RoleUpdateOne) SetDeptCheckStrictly(i int32) *RoleUpdateOne
SetDeptCheckStrictly sets the "dept_check_strictly" field.
func (*RoleUpdateOne) SetMenuCheckStrictly ¶
func (ruo *RoleUpdateOne) SetMenuCheckStrictly(i int32) *RoleUpdateOne
SetMenuCheckStrictly sets the "menu_check_strictly" field.
func (*RoleUpdateOne) SetName ¶
func (ruo *RoleUpdateOne) SetName(s string) *RoleUpdateOne
SetName sets the "name" field.
func (*RoleUpdateOne) SetNillableDataScope ¶
func (ruo *RoleUpdateOne) SetNillableDataScope(i *int32) *RoleUpdateOne
SetNillableDataScope sets the "data_scope" field if the given value is not nil.
func (*RoleUpdateOne) SetNillableDefaultRouter ¶
func (ruo *RoleUpdateOne) SetNillableDefaultRouter(s *string) *RoleUpdateOne
SetNillableDefaultRouter sets the "default_router" field if the given value is not nil.
func (*RoleUpdateOne) SetNillableDeletedAt ¶
func (ruo *RoleUpdateOne) SetNillableDeletedAt(t *time.Time) *RoleUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*RoleUpdateOne) SetNillableDeptCheckStrictly ¶
func (ruo *RoleUpdateOne) SetNillableDeptCheckStrictly(i *int32) *RoleUpdateOne
SetNillableDeptCheckStrictly sets the "dept_check_strictly" field if the given value is not nil.
func (*RoleUpdateOne) SetNillableMenuCheckStrictly ¶
func (ruo *RoleUpdateOne) SetNillableMenuCheckStrictly(i *int32) *RoleUpdateOne
SetNillableMenuCheckStrictly sets the "menu_check_strictly" field if the given value is not nil.
func (*RoleUpdateOne) SetNillableName ¶
func (ruo *RoleUpdateOne) SetNillableName(s *string) *RoleUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*RoleUpdateOne) SetNillableRemark ¶
func (ruo *RoleUpdateOne) SetNillableRemark(s *string) *RoleUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*RoleUpdateOne) SetNillableSort ¶
func (ruo *RoleUpdateOne) SetNillableSort(i *int32) *RoleUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*RoleUpdateOne) SetNillableState ¶
func (ruo *RoleUpdateOne) SetNillableState(i *int32) *RoleUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*RoleUpdateOne) SetNillableUpdatedAt ¶
func (ruo *RoleUpdateOne) SetNillableUpdatedAt(t *time.Time) *RoleUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*RoleUpdateOne) SetRemark ¶
func (ruo *RoleUpdateOne) SetRemark(s string) *RoleUpdateOne
SetRemark sets the "remark" field.
func (*RoleUpdateOne) SetSort ¶
func (ruo *RoleUpdateOne) SetSort(i int32) *RoleUpdateOne
SetSort sets the "sort" field.
func (*RoleUpdateOne) SetState ¶
func (ruo *RoleUpdateOne) SetState(i int32) *RoleUpdateOne
SetState sets the "state" field.
func (*RoleUpdateOne) SetUpdatedAt ¶
func (ruo *RoleUpdateOne) SetUpdatedAt(t time.Time) *RoleUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*RoleUpdateOne) Where ¶
func (ruo *RoleUpdateOne) Where(ps ...predicate.Role) *RoleUpdateOne
Where appends a list predicates to the RoleUpdate builder.
type RoleUpsert ¶
RoleUpsert is the "OnConflict" setter.
func (*RoleUpsert) AddDataScope ¶
func (u *RoleUpsert) AddDataScope(v int32) *RoleUpsert
AddDataScope adds v to the "data_scope" field.
func (*RoleUpsert) AddDeptCheckStrictly ¶
func (u *RoleUpsert) AddDeptCheckStrictly(v int32) *RoleUpsert
AddDeptCheckStrictly adds v to the "dept_check_strictly" field.
func (*RoleUpsert) AddMenuCheckStrictly ¶
func (u *RoleUpsert) AddMenuCheckStrictly(v int32) *RoleUpsert
AddMenuCheckStrictly adds v to the "menu_check_strictly" field.
func (*RoleUpsert) AddSort ¶
func (u *RoleUpsert) AddSort(v int32) *RoleUpsert
AddSort adds v to the "sort" field.
func (*RoleUpsert) AddState ¶
func (u *RoleUpsert) AddState(v int32) *RoleUpsert
AddState adds v to the "state" field.
func (*RoleUpsert) ClearDeletedAt ¶
func (u *RoleUpsert) ClearDeletedAt() *RoleUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*RoleUpsert) ClearRemark ¶
func (u *RoleUpsert) ClearRemark() *RoleUpsert
ClearRemark clears the value of the "remark" field.
func (*RoleUpsert) ClearUpdatedAt ¶
func (u *RoleUpsert) ClearUpdatedAt() *RoleUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*RoleUpsert) SetDataScope ¶
func (u *RoleUpsert) SetDataScope(v int32) *RoleUpsert
SetDataScope sets the "data_scope" field.
func (*RoleUpsert) SetDefaultRouter ¶
func (u *RoleUpsert) SetDefaultRouter(v string) *RoleUpsert
SetDefaultRouter sets the "default_router" field.
func (*RoleUpsert) SetDeletedAt ¶
func (u *RoleUpsert) SetDeletedAt(v time.Time) *RoleUpsert
SetDeletedAt sets the "deleted_at" field.
func (*RoleUpsert) SetDeptCheckStrictly ¶
func (u *RoleUpsert) SetDeptCheckStrictly(v int32) *RoleUpsert
SetDeptCheckStrictly sets the "dept_check_strictly" field.
func (*RoleUpsert) SetMenuCheckStrictly ¶
func (u *RoleUpsert) SetMenuCheckStrictly(v int32) *RoleUpsert
SetMenuCheckStrictly sets the "menu_check_strictly" field.
func (*RoleUpsert) SetName ¶
func (u *RoleUpsert) SetName(v string) *RoleUpsert
SetName sets the "name" field.
func (*RoleUpsert) SetRemark ¶
func (u *RoleUpsert) SetRemark(v string) *RoleUpsert
SetRemark sets the "remark" field.
func (*RoleUpsert) SetSort ¶
func (u *RoleUpsert) SetSort(v int32) *RoleUpsert
SetSort sets the "sort" field.
func (*RoleUpsert) SetState ¶
func (u *RoleUpsert) SetState(v int32) *RoleUpsert
SetState sets the "state" field.
func (*RoleUpsert) SetUpdatedAt ¶
func (u *RoleUpsert) SetUpdatedAt(v time.Time) *RoleUpsert
SetUpdatedAt sets the "updated_at" field.
func (*RoleUpsert) UpdateDataScope ¶
func (u *RoleUpsert) UpdateDataScope() *RoleUpsert
UpdateDataScope sets the "data_scope" field to the value that was provided on create.
func (*RoleUpsert) UpdateDefaultRouter ¶
func (u *RoleUpsert) UpdateDefaultRouter() *RoleUpsert
UpdateDefaultRouter sets the "default_router" field to the value that was provided on create.
func (*RoleUpsert) UpdateDeletedAt ¶
func (u *RoleUpsert) UpdateDeletedAt() *RoleUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*RoleUpsert) UpdateDeptCheckStrictly ¶
func (u *RoleUpsert) UpdateDeptCheckStrictly() *RoleUpsert
UpdateDeptCheckStrictly sets the "dept_check_strictly" field to the value that was provided on create.
func (*RoleUpsert) UpdateMenuCheckStrictly ¶
func (u *RoleUpsert) UpdateMenuCheckStrictly() *RoleUpsert
UpdateMenuCheckStrictly sets the "menu_check_strictly" field to the value that was provided on create.
func (*RoleUpsert) UpdateName ¶
func (u *RoleUpsert) UpdateName() *RoleUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*RoleUpsert) UpdateRemark ¶
func (u *RoleUpsert) UpdateRemark() *RoleUpsert
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*RoleUpsert) UpdateSort ¶
func (u *RoleUpsert) UpdateSort() *RoleUpsert
UpdateSort sets the "sort" field to the value that was provided on create.
func (*RoleUpsert) UpdateState ¶
func (u *RoleUpsert) UpdateState() *RoleUpsert
UpdateState sets the "state" field to the value that was provided on create.
func (*RoleUpsert) UpdateUpdatedAt ¶
func (u *RoleUpsert) UpdateUpdatedAt() *RoleUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type RoleUpsertBulk ¶
type RoleUpsertBulk struct {
// contains filtered or unexported fields
}
RoleUpsertBulk is the builder for "upsert"-ing a bulk of Role nodes.
func (*RoleUpsertBulk) AddDataScope ¶
func (u *RoleUpsertBulk) AddDataScope(v int32) *RoleUpsertBulk
AddDataScope adds v to the "data_scope" field.
func (*RoleUpsertBulk) AddDeptCheckStrictly ¶
func (u *RoleUpsertBulk) AddDeptCheckStrictly(v int32) *RoleUpsertBulk
AddDeptCheckStrictly adds v to the "dept_check_strictly" field.
func (*RoleUpsertBulk) AddMenuCheckStrictly ¶
func (u *RoleUpsertBulk) AddMenuCheckStrictly(v int32) *RoleUpsertBulk
AddMenuCheckStrictly adds v to the "menu_check_strictly" field.
func (*RoleUpsertBulk) AddSort ¶
func (u *RoleUpsertBulk) AddSort(v int32) *RoleUpsertBulk
AddSort adds v to the "sort" field.
func (*RoleUpsertBulk) AddState ¶
func (u *RoleUpsertBulk) AddState(v int32) *RoleUpsertBulk
AddState adds v to the "state" field.
func (*RoleUpsertBulk) ClearDeletedAt ¶
func (u *RoleUpsertBulk) ClearDeletedAt() *RoleUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*RoleUpsertBulk) ClearRemark ¶
func (u *RoleUpsertBulk) ClearRemark() *RoleUpsertBulk
ClearRemark clears the value of the "remark" field.
func (*RoleUpsertBulk) ClearUpdatedAt ¶
func (u *RoleUpsertBulk) ClearUpdatedAt() *RoleUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*RoleUpsertBulk) DoNothing ¶
func (u *RoleUpsertBulk) DoNothing() *RoleUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RoleUpsertBulk) Exec ¶
func (u *RoleUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpsertBulk) ExecX ¶
func (u *RoleUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpsertBulk) Ignore ¶
func (u *RoleUpsertBulk) Ignore() *RoleUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RoleUpsertBulk) SetDataScope ¶
func (u *RoleUpsertBulk) SetDataScope(v int32) *RoleUpsertBulk
SetDataScope sets the "data_scope" field.
func (*RoleUpsertBulk) SetDefaultRouter ¶
func (u *RoleUpsertBulk) SetDefaultRouter(v string) *RoleUpsertBulk
SetDefaultRouter sets the "default_router" field.
func (*RoleUpsertBulk) SetDeletedAt ¶
func (u *RoleUpsertBulk) SetDeletedAt(v time.Time) *RoleUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*RoleUpsertBulk) SetDeptCheckStrictly ¶
func (u *RoleUpsertBulk) SetDeptCheckStrictly(v int32) *RoleUpsertBulk
SetDeptCheckStrictly sets the "dept_check_strictly" field.
func (*RoleUpsertBulk) SetMenuCheckStrictly ¶
func (u *RoleUpsertBulk) SetMenuCheckStrictly(v int32) *RoleUpsertBulk
SetMenuCheckStrictly sets the "menu_check_strictly" field.
func (*RoleUpsertBulk) SetName ¶
func (u *RoleUpsertBulk) SetName(v string) *RoleUpsertBulk
SetName sets the "name" field.
func (*RoleUpsertBulk) SetRemark ¶
func (u *RoleUpsertBulk) SetRemark(v string) *RoleUpsertBulk
SetRemark sets the "remark" field.
func (*RoleUpsertBulk) SetSort ¶
func (u *RoleUpsertBulk) SetSort(v int32) *RoleUpsertBulk
SetSort sets the "sort" field.
func (*RoleUpsertBulk) SetState ¶
func (u *RoleUpsertBulk) SetState(v int32) *RoleUpsertBulk
SetState sets the "state" field.
func (*RoleUpsertBulk) SetUpdatedAt ¶
func (u *RoleUpsertBulk) SetUpdatedAt(v time.Time) *RoleUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*RoleUpsertBulk) Update ¶
func (u *RoleUpsertBulk) Update(set func(*RoleUpsert)) *RoleUpsertBulk
Update allows overriding fields `UPDATE` values. See the RoleCreateBulk.OnConflict documentation for more info.
func (*RoleUpsertBulk) UpdateDataScope ¶
func (u *RoleUpsertBulk) UpdateDataScope() *RoleUpsertBulk
UpdateDataScope sets the "data_scope" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateDefaultRouter ¶
func (u *RoleUpsertBulk) UpdateDefaultRouter() *RoleUpsertBulk
UpdateDefaultRouter sets the "default_router" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateDeletedAt ¶
func (u *RoleUpsertBulk) UpdateDeletedAt() *RoleUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateDeptCheckStrictly ¶
func (u *RoleUpsertBulk) UpdateDeptCheckStrictly() *RoleUpsertBulk
UpdateDeptCheckStrictly sets the "dept_check_strictly" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateMenuCheckStrictly ¶
func (u *RoleUpsertBulk) UpdateMenuCheckStrictly() *RoleUpsertBulk
UpdateMenuCheckStrictly sets the "menu_check_strictly" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateName ¶
func (u *RoleUpsertBulk) UpdateName() *RoleUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateNewValues ¶
func (u *RoleUpsertBulk) UpdateNewValues() *RoleUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Role.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(role.FieldID) }), ). Exec(ctx)
func (*RoleUpsertBulk) UpdateRemark ¶
func (u *RoleUpsertBulk) UpdateRemark() *RoleUpsertBulk
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateSort ¶
func (u *RoleUpsertBulk) UpdateSort() *RoleUpsertBulk
UpdateSort sets the "sort" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateState ¶
func (u *RoleUpsertBulk) UpdateState() *RoleUpsertBulk
UpdateState sets the "state" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateUpdatedAt ¶
func (u *RoleUpsertBulk) UpdateUpdatedAt() *RoleUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type RoleUpsertOne ¶
type RoleUpsertOne struct {
// contains filtered or unexported fields
}
RoleUpsertOne is the builder for "upsert"-ing
one Role node.
func (*RoleUpsertOne) AddDataScope ¶
func (u *RoleUpsertOne) AddDataScope(v int32) *RoleUpsertOne
AddDataScope adds v to the "data_scope" field.
func (*RoleUpsertOne) AddDeptCheckStrictly ¶
func (u *RoleUpsertOne) AddDeptCheckStrictly(v int32) *RoleUpsertOne
AddDeptCheckStrictly adds v to the "dept_check_strictly" field.
func (*RoleUpsertOne) AddMenuCheckStrictly ¶
func (u *RoleUpsertOne) AddMenuCheckStrictly(v int32) *RoleUpsertOne
AddMenuCheckStrictly adds v to the "menu_check_strictly" field.
func (*RoleUpsertOne) AddSort ¶
func (u *RoleUpsertOne) AddSort(v int32) *RoleUpsertOne
AddSort adds v to the "sort" field.
func (*RoleUpsertOne) AddState ¶
func (u *RoleUpsertOne) AddState(v int32) *RoleUpsertOne
AddState adds v to the "state" field.
func (*RoleUpsertOne) ClearDeletedAt ¶
func (u *RoleUpsertOne) ClearDeletedAt() *RoleUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*RoleUpsertOne) ClearRemark ¶
func (u *RoleUpsertOne) ClearRemark() *RoleUpsertOne
ClearRemark clears the value of the "remark" field.
func (*RoleUpsertOne) ClearUpdatedAt ¶
func (u *RoleUpsertOne) ClearUpdatedAt() *RoleUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*RoleUpsertOne) DoNothing ¶
func (u *RoleUpsertOne) DoNothing() *RoleUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RoleUpsertOne) Exec ¶
func (u *RoleUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpsertOne) ExecX ¶
func (u *RoleUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpsertOne) ID ¶
func (u *RoleUpsertOne) ID(ctx context.Context) (id uint32, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*RoleUpsertOne) IDX ¶
func (u *RoleUpsertOne) IDX(ctx context.Context) uint32
IDX is like ID, but panics if an error occurs.
func (*RoleUpsertOne) Ignore ¶
func (u *RoleUpsertOne) Ignore() *RoleUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RoleUpsertOne) SetDataScope ¶
func (u *RoleUpsertOne) SetDataScope(v int32) *RoleUpsertOne
SetDataScope sets the "data_scope" field.
func (*RoleUpsertOne) SetDefaultRouter ¶
func (u *RoleUpsertOne) SetDefaultRouter(v string) *RoleUpsertOne
SetDefaultRouter sets the "default_router" field.
func (*RoleUpsertOne) SetDeletedAt ¶
func (u *RoleUpsertOne) SetDeletedAt(v time.Time) *RoleUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*RoleUpsertOne) SetDeptCheckStrictly ¶
func (u *RoleUpsertOne) SetDeptCheckStrictly(v int32) *RoleUpsertOne
SetDeptCheckStrictly sets the "dept_check_strictly" field.
func (*RoleUpsertOne) SetMenuCheckStrictly ¶
func (u *RoleUpsertOne) SetMenuCheckStrictly(v int32) *RoleUpsertOne
SetMenuCheckStrictly sets the "menu_check_strictly" field.
func (*RoleUpsertOne) SetName ¶
func (u *RoleUpsertOne) SetName(v string) *RoleUpsertOne
SetName sets the "name" field.
func (*RoleUpsertOne) SetRemark ¶
func (u *RoleUpsertOne) SetRemark(v string) *RoleUpsertOne
SetRemark sets the "remark" field.
func (*RoleUpsertOne) SetSort ¶
func (u *RoleUpsertOne) SetSort(v int32) *RoleUpsertOne
SetSort sets the "sort" field.
func (*RoleUpsertOne) SetState ¶
func (u *RoleUpsertOne) SetState(v int32) *RoleUpsertOne
SetState sets the "state" field.
func (*RoleUpsertOne) SetUpdatedAt ¶
func (u *RoleUpsertOne) SetUpdatedAt(v time.Time) *RoleUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*RoleUpsertOne) Update ¶
func (u *RoleUpsertOne) Update(set func(*RoleUpsert)) *RoleUpsertOne
Update allows overriding fields `UPDATE` values. See the RoleCreate.OnConflict documentation for more info.
func (*RoleUpsertOne) UpdateDataScope ¶
func (u *RoleUpsertOne) UpdateDataScope() *RoleUpsertOne
UpdateDataScope sets the "data_scope" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateDefaultRouter ¶
func (u *RoleUpsertOne) UpdateDefaultRouter() *RoleUpsertOne
UpdateDefaultRouter sets the "default_router" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateDeletedAt ¶
func (u *RoleUpsertOne) UpdateDeletedAt() *RoleUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateDeptCheckStrictly ¶
func (u *RoleUpsertOne) UpdateDeptCheckStrictly() *RoleUpsertOne
UpdateDeptCheckStrictly sets the "dept_check_strictly" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateMenuCheckStrictly ¶
func (u *RoleUpsertOne) UpdateMenuCheckStrictly() *RoleUpsertOne
UpdateMenuCheckStrictly sets the "menu_check_strictly" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateName ¶
func (u *RoleUpsertOne) UpdateName() *RoleUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateNewValues ¶
func (u *RoleUpsertOne) UpdateNewValues() *RoleUpsertOne
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.Role.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(role.FieldID) }), ). Exec(ctx)
func (*RoleUpsertOne) UpdateRemark ¶
func (u *RoleUpsertOne) UpdateRemark() *RoleUpsertOne
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateSort ¶
func (u *RoleUpsertOne) UpdateSort() *RoleUpsertOne
UpdateSort sets the "sort" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateState ¶
func (u *RoleUpsertOne) UpdateState() *RoleUpsertOne
UpdateState sets the "state" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateUpdatedAt ¶
func (u *RoleUpsertOne) UpdateUpdatedAt() *RoleUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
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 Tenant ¶
type Tenant struct { // ID of the ent. // id ID uint32 `json:"id,omitempty"` // 创建时间 CreatedAt *time.Time `json:"created_at,omitempty"` // 更新时间 UpdatedAt *time.Time `json:"updated_at,omitempty"` // 删除时间 DeletedAt *time.Time `json:"deleted_at,omitempty"` // 备注 Remark *string `json:"remark,omitempty"` // 排序 Sort *int32 `json:"sort,omitempty"` // 状态 0 UNSPECIFIED 开启 1 -> ACTIVE 关闭 2 -> INACTIVE, 禁用 3 -> BANNED State *int32 `json:"state,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // contains filtered or unexported fields }
租户表
func (*Tenant) Unwrap ¶
Unwrap unwraps the Tenant 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 (*Tenant) Update ¶
func (t *Tenant) Update() *TenantUpdateOne
Update returns a builder for updating this Tenant. Note that you need to call Tenant.Unwrap() before calling this method if this Tenant was returned from a transaction, and the transaction was committed or rolled back.
type TenantClient ¶
type TenantClient struct {
// contains filtered or unexported fields
}
TenantClient is a client for the Tenant schema.
func NewTenantClient ¶
func NewTenantClient(c config) *TenantClient
NewTenantClient returns a client for the Tenant from the given config.
func (*TenantClient) Create ¶
func (c *TenantClient) Create() *TenantCreate
Create returns a builder for creating a Tenant entity.
func (*TenantClient) CreateBulk ¶
func (c *TenantClient) CreateBulk(builders ...*TenantCreate) *TenantCreateBulk
CreateBulk returns a builder for creating a bulk of Tenant entities.
func (*TenantClient) Delete ¶
func (c *TenantClient) Delete() *TenantDelete
Delete returns a delete builder for Tenant.
func (*TenantClient) DeleteOne ¶
func (c *TenantClient) DeleteOne(t *Tenant) *TenantDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TenantClient) DeleteOneID ¶
func (c *TenantClient) DeleteOneID(id uint32) *TenantDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TenantClient) GetX ¶
func (c *TenantClient) GetX(ctx context.Context, id uint32) *Tenant
GetX is like Get, but panics if an error occurs.
func (*TenantClient) Intercept ¶
func (c *TenantClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tenant.Intercept(f(g(h())))`.
func (*TenantClient) Interceptors ¶
func (c *TenantClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TenantClient) MapCreateBulk ¶
func (c *TenantClient) MapCreateBulk(slice any, setFunc func(*TenantCreate, int)) *TenantCreateBulk
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 (*TenantClient) Query ¶
func (c *TenantClient) Query() *TenantQuery
Query returns a query builder for Tenant.
func (*TenantClient) Update ¶
func (c *TenantClient) Update() *TenantUpdate
Update returns an update builder for Tenant.
func (*TenantClient) UpdateOne ¶
func (c *TenantClient) UpdateOne(t *Tenant) *TenantUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TenantClient) UpdateOneID ¶
func (c *TenantClient) UpdateOneID(id uint32) *TenantUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TenantClient) Use ¶
func (c *TenantClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tenant.Hooks(f(g(h())))`.
type TenantCreate ¶
type TenantCreate struct {
// contains filtered or unexported fields
}
TenantCreate is the builder for creating a Tenant entity.
func (*TenantCreate) Exec ¶
func (tc *TenantCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TenantCreate) ExecX ¶
func (tc *TenantCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TenantCreate) Mutation ¶
func (tc *TenantCreate) Mutation() *TenantMutation
Mutation returns the TenantMutation object of the builder.
func (*TenantCreate) OnConflict ¶
func (tc *TenantCreate) OnConflict(opts ...sql.ConflictOption) *TenantUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tenant.Create(). SetCreatedAt(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.TenantUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*TenantCreate) OnConflictColumns ¶
func (tc *TenantCreate) OnConflictColumns(columns ...string) *TenantUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tenant.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TenantCreate) Save ¶
func (tc *TenantCreate) Save(ctx context.Context) (*Tenant, error)
Save creates the Tenant in the database.
func (*TenantCreate) SaveX ¶
func (tc *TenantCreate) SaveX(ctx context.Context) *Tenant
SaveX calls Save and panics if Save returns an error.
func (*TenantCreate) SetCreatedAt ¶
func (tc *TenantCreate) SetCreatedAt(t time.Time) *TenantCreate
SetCreatedAt sets the "created_at" field.
func (*TenantCreate) SetDeletedAt ¶
func (tc *TenantCreate) SetDeletedAt(t time.Time) *TenantCreate
SetDeletedAt sets the "deleted_at" field.
func (*TenantCreate) SetID ¶
func (tc *TenantCreate) SetID(u uint32) *TenantCreate
SetID sets the "id" field.
func (*TenantCreate) SetName ¶
func (tc *TenantCreate) SetName(s string) *TenantCreate
SetName sets the "name" field.
func (*TenantCreate) SetNillableCreatedAt ¶
func (tc *TenantCreate) SetNillableCreatedAt(t *time.Time) *TenantCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TenantCreate) SetNillableDeletedAt ¶
func (tc *TenantCreate) SetNillableDeletedAt(t *time.Time) *TenantCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*TenantCreate) SetNillableRemark ¶
func (tc *TenantCreate) SetNillableRemark(s *string) *TenantCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*TenantCreate) SetNillableSort ¶
func (tc *TenantCreate) SetNillableSort(i *int32) *TenantCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*TenantCreate) SetNillableState ¶
func (tc *TenantCreate) SetNillableState(i *int32) *TenantCreate
SetNillableState sets the "state" field if the given value is not nil.
func (*TenantCreate) SetNillableUpdatedAt ¶
func (tc *TenantCreate) SetNillableUpdatedAt(t *time.Time) *TenantCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*TenantCreate) SetRemark ¶
func (tc *TenantCreate) SetRemark(s string) *TenantCreate
SetRemark sets the "remark" field.
func (*TenantCreate) SetSort ¶
func (tc *TenantCreate) SetSort(i int32) *TenantCreate
SetSort sets the "sort" field.
func (*TenantCreate) SetState ¶
func (tc *TenantCreate) SetState(i int32) *TenantCreate
SetState sets the "state" field.
func (*TenantCreate) SetUpdatedAt ¶
func (tc *TenantCreate) SetUpdatedAt(t time.Time) *TenantCreate
SetUpdatedAt sets the "updated_at" field.
type TenantCreateBulk ¶
type TenantCreateBulk struct {
// contains filtered or unexported fields
}
TenantCreateBulk is the builder for creating many Tenant entities in bulk.
func (*TenantCreateBulk) Exec ¶
func (tcb *TenantCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TenantCreateBulk) ExecX ¶
func (tcb *TenantCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TenantCreateBulk) OnConflict ¶
func (tcb *TenantCreateBulk) OnConflict(opts ...sql.ConflictOption) *TenantUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tenant.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.TenantUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*TenantCreateBulk) OnConflictColumns ¶
func (tcb *TenantCreateBulk) OnConflictColumns(columns ...string) *TenantUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tenant.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TenantDelete ¶
type TenantDelete struct {
// contains filtered or unexported fields
}
TenantDelete is the builder for deleting a Tenant entity.
func (*TenantDelete) Exec ¶
func (td *TenantDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TenantDelete) ExecX ¶
func (td *TenantDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TenantDelete) Where ¶
func (td *TenantDelete) Where(ps ...predicate.Tenant) *TenantDelete
Where appends a list predicates to the TenantDelete builder.
type TenantDeleteOne ¶
type TenantDeleteOne struct {
// contains filtered or unexported fields
}
TenantDeleteOne is the builder for deleting a single Tenant entity.
func (*TenantDeleteOne) Exec ¶
func (tdo *TenantDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TenantDeleteOne) ExecX ¶
func (tdo *TenantDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TenantDeleteOne) Where ¶
func (tdo *TenantDeleteOne) Where(ps ...predicate.Tenant) *TenantDeleteOne
Where appends a list predicates to the TenantDelete builder.
type TenantFilter ¶
type TenantFilter struct {
// contains filtered or unexported fields
}
TenantFilter provides a generic filtering capability at runtime for TenantQuery.
func (*TenantFilter) Where ¶
func (f *TenantFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*TenantFilter) WhereCreatedAt ¶
func (f *TenantFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*TenantFilter) WhereDeletedAt ¶
func (f *TenantFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*TenantFilter) WhereID ¶
func (f *TenantFilter) WhereID(p entql.Uint32P)
WhereID applies the entql uint32 predicate on the id field.
func (*TenantFilter) WhereName ¶
func (f *TenantFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (*TenantFilter) WhereRemark ¶
func (f *TenantFilter) WhereRemark(p entql.StringP)
WhereRemark applies the entql string predicate on the remark field.
func (*TenantFilter) WhereSort ¶
func (f *TenantFilter) WhereSort(p entql.Int32P)
WhereSort applies the entql int32 predicate on the sort field.
func (*TenantFilter) WhereState ¶
func (f *TenantFilter) WhereState(p entql.Int32P)
WhereState applies the entql int32 predicate on the state field.
func (*TenantFilter) WhereUpdatedAt ¶
func (f *TenantFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
type TenantGroupBy ¶
type TenantGroupBy struct {
// contains filtered or unexported fields
}
TenantGroupBy is the group-by builder for Tenant entities.
func (*TenantGroupBy) Aggregate ¶
func (tgb *TenantGroupBy) Aggregate(fns ...AggregateFunc) *TenantGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TenantGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TenantGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TenantGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TenantGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TenantGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TenantGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TenantGroupBy) Scan ¶
func (tgb *TenantGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TenantGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TenantMutation ¶
type TenantMutation struct {
// contains filtered or unexported fields
}
TenantMutation represents an operation that mutates the Tenant nodes in the graph.
func (*TenantMutation) AddField ¶
func (m *TenantMutation) 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 (*TenantMutation) AddSort ¶
func (m *TenantMutation) AddSort(i int32)
AddSort adds i to the "sort" field.
func (*TenantMutation) AddState ¶
func (m *TenantMutation) AddState(i int32)
AddState adds i to the "state" field.
func (*TenantMutation) AddedEdges ¶
func (m *TenantMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TenantMutation) AddedField ¶
func (m *TenantMutation) 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 (*TenantMutation) AddedFields ¶
func (m *TenantMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TenantMutation) AddedIDs ¶
func (m *TenantMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TenantMutation) AddedSort ¶
func (m *TenantMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*TenantMutation) AddedState ¶
func (m *TenantMutation) AddedState() (r int32, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*TenantMutation) ClearCreatedAt ¶
func (m *TenantMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*TenantMutation) ClearDeletedAt ¶
func (m *TenantMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TenantMutation) ClearEdge ¶
func (m *TenantMutation) 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 (*TenantMutation) ClearField ¶
func (m *TenantMutation) 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 (*TenantMutation) ClearRemark ¶
func (m *TenantMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*TenantMutation) ClearUpdatedAt ¶
func (m *TenantMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TenantMutation) ClearedEdges ¶
func (m *TenantMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TenantMutation) ClearedFields ¶
func (m *TenantMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TenantMutation) Client ¶
func (m TenantMutation) 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 (*TenantMutation) CreatedAt ¶
func (m *TenantMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TenantMutation) CreatedAtCleared ¶
func (m *TenantMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*TenantMutation) DeletedAt ¶
func (m *TenantMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*TenantMutation) DeletedAtCleared ¶
func (m *TenantMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*TenantMutation) EdgeCleared ¶
func (m *TenantMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TenantMutation) Field ¶
func (m *TenantMutation) 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 (*TenantMutation) FieldCleared ¶
func (m *TenantMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TenantMutation) Fields ¶
func (m *TenantMutation) 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 (*TenantMutation) Filter ¶
func (m *TenantMutation) Filter() *TenantFilter
Filter returns an entql.Where implementation to apply filters on the TenantMutation builder.
func (*TenantMutation) ID ¶
func (m *TenantMutation) ID() (id uint32, 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 (*TenantMutation) IDs ¶
func (m *TenantMutation) IDs(ctx context.Context) ([]uint32, 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 (*TenantMutation) Name ¶
func (m *TenantMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TenantMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) 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 (*TenantMutation) OldName ¶
func (m *TenantMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldRemark ¶
func (m *TenantMutation) OldRemark(ctx context.Context) (v *string, err error)
OldRemark returns the old "remark" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldSort ¶
func (m *TenantMutation) OldSort(ctx context.Context) (v *int32, err error)
OldSort returns the old "sort" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldState ¶
func (m *TenantMutation) OldState(ctx context.Context) (v *int32, err error)
OldState returns the old "state" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Tenant entity. If the Tenant 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 (*TenantMutation) Remark ¶
func (m *TenantMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*TenantMutation) RemarkCleared ¶
func (m *TenantMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*TenantMutation) RemovedEdges ¶
func (m *TenantMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TenantMutation) RemovedIDs ¶
func (m *TenantMutation) 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 (*TenantMutation) ResetCreatedAt ¶
func (m *TenantMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TenantMutation) ResetDeletedAt ¶
func (m *TenantMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*TenantMutation) ResetEdge ¶
func (m *TenantMutation) 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 (*TenantMutation) ResetField ¶
func (m *TenantMutation) 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 (*TenantMutation) ResetName ¶
func (m *TenantMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TenantMutation) ResetRemark ¶
func (m *TenantMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*TenantMutation) ResetSort ¶
func (m *TenantMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*TenantMutation) ResetState ¶
func (m *TenantMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*TenantMutation) ResetUpdatedAt ¶
func (m *TenantMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*TenantMutation) SetCreatedAt ¶
func (m *TenantMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TenantMutation) SetDeletedAt ¶
func (m *TenantMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*TenantMutation) SetField ¶
func (m *TenantMutation) 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 (*TenantMutation) SetID ¶
func (m *TenantMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Tenant entities.
func (*TenantMutation) SetName ¶
func (m *TenantMutation) SetName(s string)
SetName sets the "name" field.
func (*TenantMutation) SetOp ¶
func (m *TenantMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TenantMutation) SetRemark ¶
func (m *TenantMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*TenantMutation) SetSort ¶
func (m *TenantMutation) SetSort(i int32)
SetSort sets the "sort" field.
func (*TenantMutation) SetState ¶
func (m *TenantMutation) SetState(i int32)
SetState sets the "state" field.
func (*TenantMutation) SetUpdatedAt ¶
func (m *TenantMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*TenantMutation) Sort ¶
func (m *TenantMutation) Sort() (r int32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*TenantMutation) State ¶
func (m *TenantMutation) State() (r int32, exists bool)
State returns the value of the "state" field in the mutation.
func (TenantMutation) Tx ¶
func (m TenantMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TenantMutation) Type ¶
func (m *TenantMutation) Type() string
Type returns the node type of this mutation (Tenant).
func (*TenantMutation) UpdatedAt ¶
func (m *TenantMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*TenantMutation) UpdatedAtCleared ¶
func (m *TenantMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*TenantMutation) Where ¶
func (m *TenantMutation) Where(ps ...predicate.Tenant)
Where appends a list predicates to the TenantMutation builder.
func (*TenantMutation) WhereP ¶
func (m *TenantMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TenantMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TenantQuery ¶
type TenantQuery struct {
// contains filtered or unexported fields
}
TenantQuery is the builder for querying Tenant entities.
func (*TenantQuery) Aggregate ¶
func (tq *TenantQuery) Aggregate(fns ...AggregateFunc) *TenantSelect
Aggregate returns a TenantSelect configured with the given aggregations.
func (*TenantQuery) All ¶
func (tq *TenantQuery) All(ctx context.Context) ([]*Tenant, error)
All executes the query and returns a list of Tenants.
func (*TenantQuery) AllX ¶
func (tq *TenantQuery) AllX(ctx context.Context) []*Tenant
AllX is like All, but panics if an error occurs.
func (*TenantQuery) Clone ¶
func (tq *TenantQuery) Clone() *TenantQuery
Clone returns a duplicate of the TenantQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TenantQuery) Count ¶
func (tq *TenantQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TenantQuery) CountX ¶
func (tq *TenantQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TenantQuery) Exist ¶
func (tq *TenantQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TenantQuery) ExistX ¶
func (tq *TenantQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TenantQuery) Filter ¶
func (tq *TenantQuery) Filter() *TenantFilter
Filter returns a Filter implementation to apply filters on the TenantQuery builder.
func (*TenantQuery) First ¶
func (tq *TenantQuery) First(ctx context.Context) (*Tenant, error)
First returns the first Tenant entity from the query. Returns a *NotFoundError when no Tenant was found.
func (*TenantQuery) FirstID ¶
func (tq *TenantQuery) FirstID(ctx context.Context) (id uint32, err error)
FirstID returns the first Tenant ID from the query. Returns a *NotFoundError when no Tenant ID was found.
func (*TenantQuery) FirstIDX ¶
func (tq *TenantQuery) FirstIDX(ctx context.Context) uint32
FirstIDX is like FirstID, but panics if an error occurs.
func (*TenantQuery) FirstX ¶
func (tq *TenantQuery) FirstX(ctx context.Context) *Tenant
FirstX is like First, but panics if an error occurs.
func (*TenantQuery) GroupBy ¶
func (tq *TenantQuery) GroupBy(field string, fields ...string) *TenantGroupBy
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Tenant.Query(). GroupBy(tenant.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TenantQuery) IDs ¶
func (tq *TenantQuery) IDs(ctx context.Context) (ids []uint32, err error)
IDs executes the query and returns a list of Tenant IDs.
func (*TenantQuery) IDsX ¶
func (tq *TenantQuery) IDsX(ctx context.Context) []uint32
IDsX is like IDs, but panics if an error occurs.
func (*TenantQuery) Limit ¶
func (tq *TenantQuery) Limit(limit int) *TenantQuery
Limit the number of records to be returned by this query.
func (*TenantQuery) Modify ¶
func (tq *TenantQuery) Modify(modifiers ...func(s *sql.Selector)) *TenantSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*TenantQuery) Offset ¶
func (tq *TenantQuery) Offset(offset int) *TenantQuery
Offset to start from.
func (*TenantQuery) Only ¶
func (tq *TenantQuery) Only(ctx context.Context) (*Tenant, error)
Only returns a single Tenant entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tenant entity is found. Returns a *NotFoundError when no Tenant entities are found.
func (*TenantQuery) OnlyID ¶
func (tq *TenantQuery) OnlyID(ctx context.Context) (id uint32, err error)
OnlyID is like Only, but returns the only Tenant ID in the query. Returns a *NotSingularError when more than one Tenant ID is found. Returns a *NotFoundError when no entities are found.
func (*TenantQuery) OnlyIDX ¶
func (tq *TenantQuery) OnlyIDX(ctx context.Context) uint32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TenantQuery) OnlyX ¶
func (tq *TenantQuery) OnlyX(ctx context.Context) *Tenant
OnlyX is like Only, but panics if an error occurs.
func (*TenantQuery) Order ¶
func (tq *TenantQuery) Order(o ...tenant.OrderOption) *TenantQuery
Order specifies how the records should be ordered.
func (*TenantQuery) Select ¶
func (tq *TenantQuery) Select(fields ...string) *TenantSelect
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Tenant.Query(). Select(tenant.FieldCreatedAt). Scan(ctx, &v)
func (*TenantQuery) Unique ¶
func (tq *TenantQuery) Unique(unique bool) *TenantQuery
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 (*TenantQuery) Where ¶
func (tq *TenantQuery) Where(ps ...predicate.Tenant) *TenantQuery
Where adds a new predicate for the TenantQuery builder.
type TenantSelect ¶
type TenantSelect struct { *TenantQuery // contains filtered or unexported fields }
TenantSelect is the builder for selecting fields of Tenant entities.
func (*TenantSelect) Aggregate ¶
func (ts *TenantSelect) Aggregate(fns ...AggregateFunc) *TenantSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TenantSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TenantSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TenantSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TenantSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TenantSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TenantSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TenantSelect) Modify ¶
func (ts *TenantSelect) Modify(modifiers ...func(s *sql.Selector)) *TenantSelect
Modify adds a query modifier for attaching custom logic to queries.
func (*TenantSelect) Scan ¶
func (ts *TenantSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TenantSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TenantUpdate ¶
type TenantUpdate struct {
// contains filtered or unexported fields
}
TenantUpdate is the builder for updating Tenant entities.
func (*TenantUpdate) AddSort ¶
func (tu *TenantUpdate) AddSort(i int32) *TenantUpdate
AddSort adds i to the "sort" field.
func (*TenantUpdate) AddState ¶
func (tu *TenantUpdate) AddState(i int32) *TenantUpdate
AddState adds i to the "state" field.
func (*TenantUpdate) ClearDeletedAt ¶
func (tu *TenantUpdate) ClearDeletedAt() *TenantUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TenantUpdate) ClearRemark ¶
func (tu *TenantUpdate) ClearRemark() *TenantUpdate
ClearRemark clears the value of the "remark" field.
func (*TenantUpdate) ClearUpdatedAt ¶
func (tu *TenantUpdate) ClearUpdatedAt() *TenantUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TenantUpdate) Exec ¶
func (tu *TenantUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TenantUpdate) ExecX ¶
func (tu *TenantUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TenantUpdate) Modify ¶
func (tu *TenantUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TenantUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*TenantUpdate) Mutation ¶
func (tu *TenantUpdate) Mutation() *TenantMutation
Mutation returns the TenantMutation object of the builder.
func (*TenantUpdate) Save ¶
func (tu *TenantUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TenantUpdate) SaveX ¶
func (tu *TenantUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TenantUpdate) SetDeletedAt ¶
func (tu *TenantUpdate) SetDeletedAt(t time.Time) *TenantUpdate
SetDeletedAt sets the "deleted_at" field.
func (*TenantUpdate) SetName ¶
func (tu *TenantUpdate) SetName(s string) *TenantUpdate
SetName sets the "name" field.
func (*TenantUpdate) SetNillableDeletedAt ¶
func (tu *TenantUpdate) SetNillableDeletedAt(t *time.Time) *TenantUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*TenantUpdate) SetNillableName ¶
func (tu *TenantUpdate) SetNillableName(s *string) *TenantUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*TenantUpdate) SetNillableRemark ¶
func (tu *TenantUpdate) SetNillableRemark(s *string) *TenantUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*TenantUpdate) SetNillableSort ¶
func (tu *TenantUpdate) SetNillableSort(i *int32) *TenantUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*TenantUpdate) SetNillableState ¶
func (tu *TenantUpdate) SetNillableState(i *int32) *TenantUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*TenantUpdate) SetNillableUpdatedAt ¶
func (tu *TenantUpdate) SetNillableUpdatedAt(t *time.Time) *TenantUpdate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*TenantUpdate) SetRemark ¶
func (tu *TenantUpdate) SetRemark(s string) *TenantUpdate
SetRemark sets the "remark" field.
func (*TenantUpdate) SetSort ¶
func (tu *TenantUpdate) SetSort(i int32) *TenantUpdate
SetSort sets the "sort" field.
func (*TenantUpdate) SetState ¶
func (tu *TenantUpdate) SetState(i int32) *TenantUpdate
SetState sets the "state" field.
func (*TenantUpdate) SetUpdatedAt ¶
func (tu *TenantUpdate) SetUpdatedAt(t time.Time) *TenantUpdate
SetUpdatedAt sets the "updated_at" field.
func (*TenantUpdate) Where ¶
func (tu *TenantUpdate) Where(ps ...predicate.Tenant) *TenantUpdate
Where appends a list predicates to the TenantUpdate builder.
type TenantUpdateOne ¶
type TenantUpdateOne struct {
// contains filtered or unexported fields
}
TenantUpdateOne is the builder for updating a single Tenant entity.
func (*TenantUpdateOne) AddSort ¶
func (tuo *TenantUpdateOne) AddSort(i int32) *TenantUpdateOne
AddSort adds i to the "sort" field.
func (*TenantUpdateOne) AddState ¶
func (tuo *TenantUpdateOne) AddState(i int32) *TenantUpdateOne
AddState adds i to the "state" field.
func (*TenantUpdateOne) ClearDeletedAt ¶
func (tuo *TenantUpdateOne) ClearDeletedAt() *TenantUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TenantUpdateOne) ClearRemark ¶
func (tuo *TenantUpdateOne) ClearRemark() *TenantUpdateOne
ClearRemark clears the value of the "remark" field.
func (*TenantUpdateOne) ClearUpdatedAt ¶
func (tuo *TenantUpdateOne) ClearUpdatedAt() *TenantUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TenantUpdateOne) Exec ¶
func (tuo *TenantUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TenantUpdateOne) ExecX ¶
func (tuo *TenantUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TenantUpdateOne) Modify ¶
func (tuo *TenantUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *TenantUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*TenantUpdateOne) Mutation ¶
func (tuo *TenantUpdateOne) Mutation() *TenantMutation
Mutation returns the TenantMutation object of the builder.
func (*TenantUpdateOne) Save ¶
func (tuo *TenantUpdateOne) Save(ctx context.Context) (*Tenant, error)
Save executes the query and returns the updated Tenant entity.
func (*TenantUpdateOne) SaveX ¶
func (tuo *TenantUpdateOne) SaveX(ctx context.Context) *Tenant
SaveX is like Save, but panics if an error occurs.
func (*TenantUpdateOne) Select ¶
func (tuo *TenantUpdateOne) Select(field string, fields ...string) *TenantUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TenantUpdateOne) SetDeletedAt ¶
func (tuo *TenantUpdateOne) SetDeletedAt(t time.Time) *TenantUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*TenantUpdateOne) SetName ¶
func (tuo *TenantUpdateOne) SetName(s string) *TenantUpdateOne
SetName sets the "name" field.
func (*TenantUpdateOne) SetNillableDeletedAt ¶
func (tuo *TenantUpdateOne) SetNillableDeletedAt(t *time.Time) *TenantUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*TenantUpdateOne) SetNillableName ¶
func (tuo *TenantUpdateOne) SetNillableName(s *string) *TenantUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*TenantUpdateOne) SetNillableRemark ¶
func (tuo *TenantUpdateOne) SetNillableRemark(s *string) *TenantUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*TenantUpdateOne) SetNillableSort ¶
func (tuo *TenantUpdateOne) SetNillableSort(i *int32) *TenantUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*TenantUpdateOne) SetNillableState ¶
func (tuo *TenantUpdateOne) SetNillableState(i *int32) *TenantUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*TenantUpdateOne) SetNillableUpdatedAt ¶
func (tuo *TenantUpdateOne) SetNillableUpdatedAt(t *time.Time) *TenantUpdateOne
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*TenantUpdateOne) SetRemark ¶
func (tuo *TenantUpdateOne) SetRemark(s string) *TenantUpdateOne
SetRemark sets the "remark" field.
func (*TenantUpdateOne) SetSort ¶
func (tuo *TenantUpdateOne) SetSort(i int32) *TenantUpdateOne
SetSort sets the "sort" field.
func (*TenantUpdateOne) SetState ¶
func (tuo *TenantUpdateOne) SetState(i int32) *TenantUpdateOne
SetState sets the "state" field.
func (*TenantUpdateOne) SetUpdatedAt ¶
func (tuo *TenantUpdateOne) SetUpdatedAt(t time.Time) *TenantUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*TenantUpdateOne) Where ¶
func (tuo *TenantUpdateOne) Where(ps ...predicate.Tenant) *TenantUpdateOne
Where appends a list predicates to the TenantUpdate builder.
type TenantUpsert ¶
TenantUpsert is the "OnConflict" setter.
func (*TenantUpsert) AddSort ¶
func (u *TenantUpsert) AddSort(v int32) *TenantUpsert
AddSort adds v to the "sort" field.
func (*TenantUpsert) AddState ¶
func (u *TenantUpsert) AddState(v int32) *TenantUpsert
AddState adds v to the "state" field.
func (*TenantUpsert) ClearDeletedAt ¶
func (u *TenantUpsert) ClearDeletedAt() *TenantUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TenantUpsert) ClearRemark ¶
func (u *TenantUpsert) ClearRemark() *TenantUpsert
ClearRemark clears the value of the "remark" field.
func (*TenantUpsert) ClearUpdatedAt ¶
func (u *TenantUpsert) ClearUpdatedAt() *TenantUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TenantUpsert) SetDeletedAt ¶
func (u *TenantUpsert) SetDeletedAt(v time.Time) *TenantUpsert
SetDeletedAt sets the "deleted_at" field.
func (*TenantUpsert) SetName ¶
func (u *TenantUpsert) SetName(v string) *TenantUpsert
SetName sets the "name" field.
func (*TenantUpsert) SetRemark ¶
func (u *TenantUpsert) SetRemark(v string) *TenantUpsert
SetRemark sets the "remark" field.
func (*TenantUpsert) SetSort ¶
func (u *TenantUpsert) SetSort(v int32) *TenantUpsert
SetSort sets the "sort" field.
func (*TenantUpsert) SetState ¶
func (u *TenantUpsert) SetState(v int32) *TenantUpsert
SetState sets the "state" field.
func (*TenantUpsert) SetUpdatedAt ¶
func (u *TenantUpsert) SetUpdatedAt(v time.Time) *TenantUpsert
SetUpdatedAt sets the "updated_at" field.
func (*TenantUpsert) UpdateDeletedAt ¶
func (u *TenantUpsert) UpdateDeletedAt() *TenantUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*TenantUpsert) UpdateName ¶
func (u *TenantUpsert) UpdateName() *TenantUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*TenantUpsert) UpdateRemark ¶
func (u *TenantUpsert) UpdateRemark() *TenantUpsert
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*TenantUpsert) UpdateSort ¶
func (u *TenantUpsert) UpdateSort() *TenantUpsert
UpdateSort sets the "sort" field to the value that was provided on create.
func (*TenantUpsert) UpdateState ¶
func (u *TenantUpsert) UpdateState() *TenantUpsert
UpdateState sets the "state" field to the value that was provided on create.
func (*TenantUpsert) UpdateUpdatedAt ¶
func (u *TenantUpsert) UpdateUpdatedAt() *TenantUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TenantUpsertBulk ¶
type TenantUpsertBulk struct {
// contains filtered or unexported fields
}
TenantUpsertBulk is the builder for "upsert"-ing a bulk of Tenant nodes.
func (*TenantUpsertBulk) AddSort ¶
func (u *TenantUpsertBulk) AddSort(v int32) *TenantUpsertBulk
AddSort adds v to the "sort" field.
func (*TenantUpsertBulk) AddState ¶
func (u *TenantUpsertBulk) AddState(v int32) *TenantUpsertBulk
AddState adds v to the "state" field.
func (*TenantUpsertBulk) ClearDeletedAt ¶
func (u *TenantUpsertBulk) ClearDeletedAt() *TenantUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TenantUpsertBulk) ClearRemark ¶
func (u *TenantUpsertBulk) ClearRemark() *TenantUpsertBulk
ClearRemark clears the value of the "remark" field.
func (*TenantUpsertBulk) ClearUpdatedAt ¶
func (u *TenantUpsertBulk) ClearUpdatedAt() *TenantUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TenantUpsertBulk) DoNothing ¶
func (u *TenantUpsertBulk) DoNothing() *TenantUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TenantUpsertBulk) Exec ¶
func (u *TenantUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TenantUpsertBulk) ExecX ¶
func (u *TenantUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TenantUpsertBulk) Ignore ¶
func (u *TenantUpsertBulk) Ignore() *TenantUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tenant.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TenantUpsertBulk) SetDeletedAt ¶
func (u *TenantUpsertBulk) SetDeletedAt(v time.Time) *TenantUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*TenantUpsertBulk) SetName ¶
func (u *TenantUpsertBulk) SetName(v string) *TenantUpsertBulk
SetName sets the "name" field.
func (*TenantUpsertBulk) SetRemark ¶
func (u *TenantUpsertBulk) SetRemark(v string) *TenantUpsertBulk
SetRemark sets the "remark" field.
func (*TenantUpsertBulk) SetSort ¶
func (u *TenantUpsertBulk) SetSort(v int32) *TenantUpsertBulk
SetSort sets the "sort" field.
func (*TenantUpsertBulk) SetState ¶
func (u *TenantUpsertBulk) SetState(v int32) *TenantUpsertBulk
SetState sets the "state" field.
func (*TenantUpsertBulk) SetUpdatedAt ¶
func (u *TenantUpsertBulk) SetUpdatedAt(v time.Time) *TenantUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*TenantUpsertBulk) Update ¶
func (u *TenantUpsertBulk) Update(set func(*TenantUpsert)) *TenantUpsertBulk
Update allows overriding fields `UPDATE` values. See the TenantCreateBulk.OnConflict documentation for more info.
func (*TenantUpsertBulk) UpdateDeletedAt ¶
func (u *TenantUpsertBulk) UpdateDeletedAt() *TenantUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*TenantUpsertBulk) UpdateName ¶
func (u *TenantUpsertBulk) UpdateName() *TenantUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*TenantUpsertBulk) UpdateNewValues ¶
func (u *TenantUpsertBulk) UpdateNewValues() *TenantUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tenant.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(tenant.FieldID) }), ). Exec(ctx)
func (*TenantUpsertBulk) UpdateRemark ¶
func (u *TenantUpsertBulk) UpdateRemark() *TenantUpsertBulk
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*TenantUpsertBulk) UpdateSort ¶
func (u *TenantUpsertBulk) UpdateSort() *TenantUpsertBulk
UpdateSort sets the "sort" field to the value that was provided on create.
func (*TenantUpsertBulk) UpdateState ¶
func (u *TenantUpsertBulk) UpdateState() *TenantUpsertBulk
UpdateState sets the "state" field to the value that was provided on create.
func (*TenantUpsertBulk) UpdateUpdatedAt ¶
func (u *TenantUpsertBulk) UpdateUpdatedAt() *TenantUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TenantUpsertOne ¶
type TenantUpsertOne struct {
// contains filtered or unexported fields
}
TenantUpsertOne is the builder for "upsert"-ing
one Tenant node.
func (*TenantUpsertOne) AddSort ¶
func (u *TenantUpsertOne) AddSort(v int32) *TenantUpsertOne
AddSort adds v to the "sort" field.
func (*TenantUpsertOne) AddState ¶
func (u *TenantUpsertOne) AddState(v int32) *TenantUpsertOne
AddState adds v to the "state" field.
func (*TenantUpsertOne) ClearDeletedAt ¶
func (u *TenantUpsertOne) ClearDeletedAt() *TenantUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*TenantUpsertOne) ClearRemark ¶
func (u *TenantUpsertOne) ClearRemark() *TenantUpsertOne
ClearRemark clears the value of the "remark" field.
func (*TenantUpsertOne) ClearUpdatedAt ¶
func (u *TenantUpsertOne) ClearUpdatedAt() *TenantUpsertOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*TenantUpsertOne) DoNothing ¶
func (u *TenantUpsertOne) DoNothing() *TenantUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TenantUpsertOne) Exec ¶
func (u *TenantUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TenantUpsertOne) ExecX ¶
func (u *TenantUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TenantUpsertOne) ID ¶
func (u *TenantUpsertOne) ID(ctx context.Context) (id uint32, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TenantUpsertOne) IDX ¶
func (u *TenantUpsertOne) IDX(ctx context.Context) uint32
IDX is like ID, but panics if an error occurs.
func (*TenantUpsertOne) Ignore ¶
func (u *TenantUpsertOne) Ignore() *TenantUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tenant.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TenantUpsertOne) SetDeletedAt ¶
func (u *TenantUpsertOne) SetDeletedAt(v time.Time) *TenantUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*TenantUpsertOne) SetName ¶
func (u *TenantUpsertOne) SetName(v string) *TenantUpsertOne
SetName sets the "name" field.
func (*TenantUpsertOne) SetRemark ¶
func (u *TenantUpsertOne) SetRemark(v string) *TenantUpsertOne
SetRemark sets the "remark" field.
func (*TenantUpsertOne) SetSort ¶
func (u *TenantUpsertOne) SetSort(v int32) *TenantUpsertOne
SetSort sets the "sort" field.
func (*TenantUpsertOne) SetState ¶
func (u *TenantUpsertOne) SetState(v int32) *TenantUpsertOne
SetState sets the "state" field.
func (*TenantUpsertOne) SetUpdatedAt ¶
func (u *TenantUpsertOne) SetUpdatedAt(v time.Time) *TenantUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*TenantUpsertOne) Update ¶
func (u *TenantUpsertOne) Update(set func(*TenantUpsert)) *TenantUpsertOne
Update allows overriding fields `UPDATE` values. See the TenantCreate.OnConflict documentation for more info.
func (*TenantUpsertOne) UpdateDeletedAt ¶
func (u *TenantUpsertOne) UpdateDeletedAt() *TenantUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*TenantUpsertOne) UpdateName ¶
func (u *TenantUpsertOne) UpdateName() *TenantUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*TenantUpsertOne) UpdateNewValues ¶
func (u *TenantUpsertOne) UpdateNewValues() *TenantUpsertOne
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.Tenant.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(tenant.FieldID) }), ). Exec(ctx)
func (*TenantUpsertOne) UpdateRemark ¶
func (u *TenantUpsertOne) UpdateRemark() *TenantUpsertOne
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*TenantUpsertOne) UpdateSort ¶
func (u *TenantUpsertOne) UpdateSort() *TenantUpsertOne
UpdateSort sets the "sort" field to the value that was provided on create.
func (*TenantUpsertOne) UpdateState ¶
func (u *TenantUpsertOne) UpdateState() *TenantUpsertOne
UpdateState sets the "state" field to the value that was provided on create.
func (*TenantUpsertOne) UpdateUpdatedAt ¶
func (u *TenantUpsertOne) UpdateUpdatedAt() *TenantUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Dept is the client for interacting with the Dept builders. Dept *DeptClient // Member is the client for interacting with the Member builders. Member *MemberClient // Menu is the client for interacting with the Menu builders. Menu *MenuClient // Post is the client for interacting with the Post builders. Post *PostClient // Role is the client for interacting with the Role builders. Role *RoleClient // Tenant is the client for interacting with the Tenant builders. Tenant *TenantClient // 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) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. // id ID uint32 `json:"id,omitempty"` // 创建时间 CreatedAt *time.Time `json:"created_at,omitempty"` // 更新时间 UpdatedAt *time.Time `json:"updated_at,omitempty"` // 删除时间 DeletedAt *time.Time `json:"deleted_at,omitempty"` // 备注 Remark *string `json:"remark,omitempty"` // 排序 Sort *int32 `json:"sort,omitempty"` // 状态 0 UNSPECIFIED 开启 1 -> ACTIVE 关闭 2 -> INACTIVE, 禁用 3 -> BANNED State *int32 `json:"state,omitempty"` // 用户名 Name *string `json:"name,omitempty"` // 密码 Password *string `json:"password,omitempty"` // 昵称 NickName *string `json:"nick_name,omitempty"` // 昵称 RealName *string `json:"real_name,omitempty"` // 手机号 Phone *string `json:"phone,omitempty"` // 电子邮箱 Email *string `json:"email,omitempty"` // 生日 Birthday *time.Time `json:"birthday,omitempty"` // 性别 0 UNSPECIFIED, 1 -> MAN, 2 -> WOMAN Gender *int32 `json:"gender,omitempty"` // 头像 Avatar *string `json:"avatar,omitempty"` // 个人说明 Description *string `json:"description,omitempty"` // 授权 0 UNSPECIFIED, 1 -> SYS_ADMIN, 2 -> CUSTOMER_USER, 3 -> GUEST_USER, 4 -> REFRESH_TOKEN Authority *int32 `json:"authority,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 }
用户表
func (*User) QueryPosts ¶
QueryPosts queries the "posts" edge of the User entity.
func (*User) QueryRoles ¶
QueryRoles queries the "roles" 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 uint32) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id uint32) *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) QueryPosts ¶
func (c *UserClient) QueryPosts(u *User) *PostQuery
QueryPosts queries the posts edge of a User.
func (*UserClient) QueryRoles ¶
func (c *UserClient) QueryRoles(u *User) *RoleQuery
QueryRoles queries the roles 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 uint32) *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) AddPostIDs ¶
func (uc *UserCreate) AddPostIDs(ids ...uint32) *UserCreate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*UserCreate) AddPosts ¶
func (uc *UserCreate) AddPosts(p ...*Post) *UserCreate
AddPosts adds the "posts" edges to the Post entity.
func (*UserCreate) AddRoleIDs ¶
func (uc *UserCreate) AddRoleIDs(ids ...uint32) *UserCreate
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*UserCreate) AddRoles ¶
func (uc *UserCreate) AddRoles(r ...*Role) *UserCreate
AddRoles adds the "roles" edges to the Role entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
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(). SetCreatedAt(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) { SetCreatedAt(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) 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) SetAuthority ¶
func (uc *UserCreate) SetAuthority(i int32) *UserCreate
SetAuthority sets the "authority" field.
func (*UserCreate) SetAvatar ¶
func (uc *UserCreate) SetAvatar(s string) *UserCreate
SetAvatar sets the "avatar" field.
func (*UserCreate) SetBirthday ¶
func (uc *UserCreate) SetBirthday(t time.Time) *UserCreate
SetBirthday sets the "birthday" field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetDeletedAt ¶
func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
SetDeletedAt sets the "deleted_at" field.
func (*UserCreate) SetDescription ¶
func (uc *UserCreate) SetDescription(s string) *UserCreate
SetDescription sets the "description" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetGender ¶
func (uc *UserCreate) SetGender(i int32) *UserCreate
SetGender sets the "gender" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uint32) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNickName ¶
func (uc *UserCreate) SetNickName(s string) *UserCreate
SetNickName sets the "nick_name" field.
func (*UserCreate) SetNillableAuthority ¶
func (uc *UserCreate) SetNillableAuthority(i *int32) *UserCreate
SetNillableAuthority sets the "authority" field if the given value is not nil.
func (*UserCreate) SetNillableAvatar ¶
func (uc *UserCreate) SetNillableAvatar(s *string) *UserCreate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserCreate) SetNillableBirthday ¶
func (uc *UserCreate) SetNillableBirthday(t *time.Time) *UserCreate
SetNillableBirthday sets the "birthday" 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) SetNillableDeletedAt ¶
func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserCreate) SetNillableDescription ¶
func (uc *UserCreate) SetNillableDescription(s *string) *UserCreate
SetNillableDescription sets the "description" 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) SetNillableGender ¶
func (uc *UserCreate) SetNillableGender(i *int32) *UserCreate
SetNillableGender sets the "gender" field if the given value is not nil.
func (*UserCreate) SetNillableNickName ¶
func (uc *UserCreate) SetNillableNickName(s *string) *UserCreate
SetNillableNickName sets the "nick_name" field if the given value is not nil.
func (*UserCreate) SetNillablePassword ¶
func (uc *UserCreate) SetNillablePassword(s *string) *UserCreate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserCreate) SetNillableRealName ¶
func (uc *UserCreate) SetNillableRealName(s *string) *UserCreate
SetNillableRealName sets the "real_name" field if the given value is not nil.
func (*UserCreate) SetNillableRemark ¶
func (uc *UserCreate) SetNillableRemark(s *string) *UserCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*UserCreate) SetNillableSort ¶
func (uc *UserCreate) SetNillableSort(i *int32) *UserCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*UserCreate) SetNillableState ¶
func (uc *UserCreate) SetNillableState(i *int32) *UserCreate
SetNillableState sets the "state" 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) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetPhone ¶
func (uc *UserCreate) SetPhone(s string) *UserCreate
SetPhone sets the "phone" field.
func (*UserCreate) SetRealName ¶
func (uc *UserCreate) SetRealName(s string) *UserCreate
SetRealName sets the "real_name" field.
func (*UserCreate) SetRemark ¶
func (uc *UserCreate) SetRemark(s string) *UserCreate
SetRemark sets the "remark" field.
func (*UserCreate) SetSort ¶
func (uc *UserCreate) SetSort(i int32) *UserCreate
SetSort sets the "sort" field.
func (*UserCreate) SetState ¶
func (uc *UserCreate) SetState(i int32) *UserCreate
SetState sets the "state" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" 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) 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) { SetCreatedAt(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)
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) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
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 { // Roles holds the value of the roles edge. Roles []*Role `json:"roles,omitempty"` // Posts holds the value of the posts edge. Posts []*Post `json:"posts,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) PostsOrErr ¶
PostsOrErr returns the Posts value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RolesOrErr ¶
RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.
type UserFilter ¶
type UserFilter struct {
// contains filtered or unexported fields
}
UserFilter provides a generic filtering capability at runtime for UserQuery.
func (*UserFilter) Where ¶
func (f *UserFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*UserFilter) WhereAuthority ¶
func (f *UserFilter) WhereAuthority(p entql.Int32P)
WhereAuthority applies the entql int32 predicate on the authority field.
func (*UserFilter) WhereAvatar ¶
func (f *UserFilter) WhereAvatar(p entql.StringP)
WhereAvatar applies the entql string predicate on the avatar field.
func (*UserFilter) WhereBirthday ¶
func (f *UserFilter) WhereBirthday(p entql.TimeP)
WhereBirthday applies the entql time.Time predicate on the birthday field.
func (*UserFilter) WhereCreatedAt ¶
func (f *UserFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*UserFilter) WhereDeletedAt ¶
func (f *UserFilter) WhereDeletedAt(p entql.TimeP)
WhereDeletedAt applies the entql time.Time predicate on the deleted_at field.
func (*UserFilter) WhereDescription ¶
func (f *UserFilter) WhereDescription(p entql.StringP)
WhereDescription applies the entql string predicate on the description field.
func (*UserFilter) WhereEmail ¶
func (f *UserFilter) WhereEmail(p entql.StringP)
WhereEmail applies the entql string predicate on the email field.
func (*UserFilter) WhereGender ¶
func (f *UserFilter) WhereGender(p entql.Int32P)
WhereGender applies the entql int32 predicate on the gender field.
func (*UserFilter) WhereHasPosts ¶
func (f *UserFilter) WhereHasPosts()
WhereHasPosts applies a predicate to check if query has an edge posts.
func (*UserFilter) WhereHasPostsWith ¶
func (f *UserFilter) WhereHasPostsWith(preds ...predicate.Post)
WhereHasPostsWith applies a predicate to check if query has an edge posts with a given conditions (other predicates).
func (*UserFilter) WhereHasRoles ¶
func (f *UserFilter) WhereHasRoles()
WhereHasRoles applies a predicate to check if query has an edge roles.
func (*UserFilter) WhereHasRolesWith ¶
func (f *UserFilter) WhereHasRolesWith(preds ...predicate.Role)
WhereHasRolesWith applies a predicate to check if query has an edge roles with a given conditions (other predicates).
func (*UserFilter) WhereID ¶
func (f *UserFilter) WhereID(p entql.Uint32P)
WhereID applies the entql uint32 predicate on the id field.
func (*UserFilter) WhereName ¶
func (f *UserFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
func (*UserFilter) WhereNickName ¶
func (f *UserFilter) WhereNickName(p entql.StringP)
WhereNickName applies the entql string predicate on the nick_name field.
func (*UserFilter) WherePassword ¶
func (f *UserFilter) WherePassword(p entql.StringP)
WherePassword applies the entql string predicate on the password field.
func (*UserFilter) WherePhone ¶
func (f *UserFilter) WherePhone(p entql.StringP)
WherePhone applies the entql string predicate on the phone field.
func (*UserFilter) WhereRealName ¶
func (f *UserFilter) WhereRealName(p entql.StringP)
WhereRealName applies the entql string predicate on the real_name field.
func (*UserFilter) WhereRemark ¶
func (f *UserFilter) WhereRemark(p entql.StringP)
WhereRemark applies the entql string predicate on the remark field.
func (*UserFilter) WhereSort ¶
func (f *UserFilter) WhereSort(p entql.Int32P)
WhereSort applies the entql int32 predicate on the sort field.
func (*UserFilter) WhereState ¶
func (f *UserFilter) WhereState(p entql.Int32P)
WhereState applies the entql int32 predicate on the state field.
func (*UserFilter) WhereUpdatedAt ¶
func (f *UserFilter) WhereUpdatedAt(p entql.TimeP)
WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
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) AddAuthority ¶
func (m *UserMutation) AddAuthority(i int32)
AddAuthority adds i to the "authority" 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) AddGender ¶
func (m *UserMutation) AddGender(i int32)
AddGender adds i to the "gender" field.
func (*UserMutation) AddPostIDs ¶
func (m *UserMutation) AddPostIDs(ids ...uint32)
AddPostIDs adds the "posts" edge to the Post entity by ids.
func (*UserMutation) AddRoleIDs ¶
func (m *UserMutation) AddRoleIDs(ids ...uint32)
AddRoleIDs adds the "roles" edge to the Role entity by ids.
func (*UserMutation) AddSort ¶
func (m *UserMutation) AddSort(i int32)
AddSort adds i to the "sort" field.
func (*UserMutation) AddState ¶
func (m *UserMutation) AddState(i int32)
AddState adds i to the "state" field.
func (*UserMutation) AddedAuthority ¶
func (m *UserMutation) AddedAuthority() (r int32, exists bool)
AddedAuthority returns the value that was added to the "authority" 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) AddedGender ¶
func (m *UserMutation) AddedGender() (r int32, exists bool)
AddedGender returns the value that was added to the "gender" field in 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) AddedSort ¶
func (m *UserMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*UserMutation) AddedState ¶
func (m *UserMutation) AddedState() (r int32, exists bool)
AddedState returns the value that was added to the "state" field in this mutation.
func (*UserMutation) Authority ¶
func (m *UserMutation) Authority() (r int32, exists bool)
Authority returns the value of the "authority" field in the 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) Birthday ¶
func (m *UserMutation) Birthday() (r time.Time, exists bool)
Birthday returns the value of the "birthday" field in the mutation.
func (*UserMutation) ClearCreatedAt ¶
func (m *UserMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" 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) 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) ClearPosts ¶
func (m *UserMutation) ClearPosts()
ClearPosts clears the "posts" edge to the Post entity.
func (*UserMutation) ClearRemark ¶
func (m *UserMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*UserMutation) ClearRoles ¶
func (m *UserMutation) ClearRoles()
ClearRoles clears the "roles" edge to the Role entity.
func (*UserMutation) ClearUpdatedAt ¶
func (m *UserMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" 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) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) CreatedAtCleared ¶
func (m *UserMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this 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) Description ¶
func (m *UserMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the 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) 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) Filter ¶
func (m *UserMutation) Filter() *UserFilter
Filter returns an entql.Where implementation to apply filters on the UserMutation builder.
func (*UserMutation) Gender ¶
func (m *UserMutation) Gender() (r int32, exists bool)
Gender returns the value of the "gender" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uint32, 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) ([]uint32, 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) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) NickName ¶
func (m *UserMutation) NickName() (r string, exists bool)
NickName returns the value of the "nick_name" field in the mutation.
func (*UserMutation) OldAuthority ¶
func (m *UserMutation) OldAuthority(ctx context.Context) (v *int32, err error)
OldAuthority returns the old "authority" 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) 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) OldBirthday ¶
OldBirthday returns the old "birthday" 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) 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) OldDescription ¶
func (m *UserMutation) OldDescription(ctx context.Context) (v *string, err error)
OldDescription returns the old "description" 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) 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) OldGender ¶
func (m *UserMutation) OldGender(ctx context.Context) (v *int32, err error)
OldGender returns the old "gender" 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) OldNickName ¶
func (m *UserMutation) OldNickName(ctx context.Context) (v *string, err error)
OldNickName returns the old "nick_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) 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) OldPhone ¶
func (m *UserMutation) OldPhone(ctx context.Context) (v *string, err error)
OldPhone returns the old "phone" 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) OldRealName ¶
func (m *UserMutation) OldRealName(ctx context.Context) (v *string, err error)
OldRealName returns the old "real_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) OldRemark ¶
func (m *UserMutation) OldRemark(ctx context.Context) (v *string, err error)
OldRemark returns the old "remark" 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) OldSort ¶
func (m *UserMutation) OldSort(ctx context.Context) (v *int32, err error)
OldSort returns the old "sort" 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) OldState ¶
func (m *UserMutation) OldState(ctx context.Context) (v *int32, err error)
OldState returns the old "state" 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) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) Phone ¶
func (m *UserMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*UserMutation) PostsCleared ¶
func (m *UserMutation) PostsCleared() bool
PostsCleared reports if the "posts" edge to the Post entity was cleared.
func (*UserMutation) PostsIDs ¶
func (m *UserMutation) PostsIDs() (ids []uint32)
PostsIDs returns the "posts" edge IDs in the mutation.
func (*UserMutation) RealName ¶
func (m *UserMutation) RealName() (r string, exists bool)
RealName returns the value of the "real_name" field in the mutation.
func (*UserMutation) Remark ¶
func (m *UserMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*UserMutation) RemarkCleared ¶
func (m *UserMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*UserMutation) RemovePostIDs ¶
func (m *UserMutation) RemovePostIDs(ids ...uint32)
RemovePostIDs removes the "posts" edge to the Post entity by IDs.
func (*UserMutation) RemoveRoleIDs ¶
func (m *UserMutation) RemoveRoleIDs(ids ...uint32)
RemoveRoleIDs removes the "roles" edge to the Role 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) RemovedPostsIDs ¶
func (m *UserMutation) RemovedPostsIDs() (ids []uint32)
RemovedPosts returns the removed IDs of the "posts" edge to the Post entity.
func (*UserMutation) RemovedRolesIDs ¶
func (m *UserMutation) RemovedRolesIDs() (ids []uint32)
RemovedRoles returns the removed IDs of the "roles" edge to the Role entity.
func (*UserMutation) ResetAuthority ¶
func (m *UserMutation) ResetAuthority()
ResetAuthority resets all changes to the "authority" field.
func (*UserMutation) ResetAvatar ¶
func (m *UserMutation) ResetAvatar()
ResetAvatar resets all changes to the "avatar" field.
func (*UserMutation) ResetBirthday ¶
func (m *UserMutation) ResetBirthday()
ResetBirthday resets all changes to the "birthday" field.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetDeletedAt ¶
func (m *UserMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*UserMutation) ResetDescription ¶
func (m *UserMutation) ResetDescription()
ResetDescription resets all changes to the "description" 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) 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) ResetGender ¶
func (m *UserMutation) ResetGender()
ResetGender resets all changes to the "gender" field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetNickName ¶
func (m *UserMutation) ResetNickName()
ResetNickName resets all changes to the "nick_name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetPhone ¶
func (m *UserMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*UserMutation) ResetPosts ¶
func (m *UserMutation) ResetPosts()
ResetPosts resets all changes to the "posts" edge.
func (*UserMutation) ResetRealName ¶
func (m *UserMutation) ResetRealName()
ResetRealName resets all changes to the "real_name" field.
func (*UserMutation) ResetRemark ¶
func (m *UserMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*UserMutation) ResetRoles ¶
func (m *UserMutation) ResetRoles()
ResetRoles resets all changes to the "roles" edge.
func (*UserMutation) ResetSort ¶
func (m *UserMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*UserMutation) ResetState ¶
func (m *UserMutation) ResetState()
ResetState resets all changes to the "state" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) RolesCleared ¶
func (m *UserMutation) RolesCleared() bool
RolesCleared reports if the "roles" edge to the Role entity was cleared.
func (*UserMutation) RolesIDs ¶
func (m *UserMutation) RolesIDs() (ids []uint32)
RolesIDs returns the "roles" edge IDs in the mutation.
func (*UserMutation) SetAuthority ¶
func (m *UserMutation) SetAuthority(i int32)
SetAuthority sets the "authority" field.
func (*UserMutation) SetAvatar ¶
func (m *UserMutation) SetAvatar(s string)
SetAvatar sets the "avatar" field.
func (*UserMutation) SetBirthday ¶
func (m *UserMutation) SetBirthday(t time.Time)
SetBirthday sets the "birthday" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetDeletedAt ¶
func (m *UserMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*UserMutation) SetDescription ¶
func (m *UserMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" 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) SetGender ¶
func (m *UserMutation) SetGender(i int32)
SetGender sets the "gender" field.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uint32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetNickName ¶
func (m *UserMutation) SetNickName(s string)
SetNickName sets the "nick_name" 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) SetPhone ¶
func (m *UserMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*UserMutation) SetRealName ¶
func (m *UserMutation) SetRealName(s string)
SetRealName sets the "real_name" field.
func (*UserMutation) SetRemark ¶
func (m *UserMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*UserMutation) SetSort ¶
func (m *UserMutation) SetSort(i int32)
SetSort sets the "sort" field.
func (*UserMutation) SetState ¶
func (m *UserMutation) SetState(i int32)
SetState sets the "state" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) Sort ¶
func (m *UserMutation) Sort() (r int32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*UserMutation) State ¶
func (m *UserMutation) State() (r int32, exists bool)
State returns the value of the "state" field in the mutation.
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) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) UpdatedAtCleared ¶
func (m *UserMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" 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) Filter ¶
func (uq *UserQuery) Filter() *UserFilter
Filter returns a Filter implementation to apply filters on the UserQuery builder.
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Modify ¶
func (uq *UserQuery) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
Modify adds a query modifier for attaching custom logic to queries.
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) QueryPosts ¶
QueryPosts chains the current query on the "posts" edge.
func (*UserQuery) QueryRoles ¶
QueryRoles chains the current query on the "roles" 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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.User.Query(). Select(user.FieldCreatedAt). 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.
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) 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) Modify ¶
func (us *UserSelect) Modify(modifiers ...func(s *sql.Selector)) *UserSelect
Modify adds a query modifier for attaching custom logic to queries.
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) AddAuthority ¶
func (uu *UserUpdate) AddAuthority(i int32) *UserUpdate
AddAuthority adds i to the "authority" field.
func (*UserUpdate) AddGender ¶
func (uu *UserUpdate) AddGender(i int32) *UserUpdate
AddGender adds i to the "gender" field.
func (*UserUpdate) AddPostIDs ¶
func (uu *UserUpdate) AddPostIDs(ids ...uint32) *UserUpdate
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*UserUpdate) AddPosts ¶
func (uu *UserUpdate) AddPosts(p ...*Post) *UserUpdate
AddPosts adds the "posts" edges to the Post entity.
func (*UserUpdate) AddRoleIDs ¶
func (uu *UserUpdate) AddRoleIDs(ids ...uint32) *UserUpdate
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*UserUpdate) AddRoles ¶
func (uu *UserUpdate) AddRoles(r ...*Role) *UserUpdate
AddRoles adds the "roles" edges to the Role entity.
func (*UserUpdate) AddSort ¶
func (uu *UserUpdate) AddSort(i int32) *UserUpdate
AddSort adds i to the "sort" field.
func (*UserUpdate) AddState ¶
func (uu *UserUpdate) AddState(i int32) *UserUpdate
AddState adds i to the "state" field.
func (*UserUpdate) ClearDeletedAt ¶
func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdate) ClearPosts ¶
func (uu *UserUpdate) ClearPosts() *UserUpdate
ClearPosts clears all "posts" edges to the Post entity.
func (*UserUpdate) ClearRemark ¶
func (uu *UserUpdate) ClearRemark() *UserUpdate
ClearRemark clears the value of the "remark" field.
func (*UserUpdate) ClearRoles ¶
func (uu *UserUpdate) ClearRoles() *UserUpdate
ClearRoles clears all "roles" edges to the Role entity.
func (*UserUpdate) ClearUpdatedAt ¶
func (uu *UserUpdate) ClearUpdatedAt() *UserUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Modify ¶
func (uu *UserUpdate) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdate
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemovePostIDs ¶
func (uu *UserUpdate) RemovePostIDs(ids ...uint32) *UserUpdate
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*UserUpdate) RemovePosts ¶
func (uu *UserUpdate) RemovePosts(p ...*Post) *UserUpdate
RemovePosts removes "posts" edges to Post entities.
func (*UserUpdate) RemoveRoleIDs ¶
func (uu *UserUpdate) RemoveRoleIDs(ids ...uint32) *UserUpdate
RemoveRoleIDs removes the "roles" edge to Role entities by IDs.
func (*UserUpdate) RemoveRoles ¶
func (uu *UserUpdate) RemoveRoles(r ...*Role) *UserUpdate
RemoveRoles removes "roles" edges to Role 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) SetAuthority ¶
func (uu *UserUpdate) SetAuthority(i int32) *UserUpdate
SetAuthority sets the "authority" field.
func (*UserUpdate) SetAvatar ¶
func (uu *UserUpdate) SetAvatar(s string) *UserUpdate
SetAvatar sets the "avatar" field.
func (*UserUpdate) SetBirthday ¶
func (uu *UserUpdate) SetBirthday(t time.Time) *UserUpdate
SetBirthday sets the "birthday" field.
func (*UserUpdate) SetDeletedAt ¶
func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdate) SetDescription ¶
func (uu *UserUpdate) SetDescription(s string) *UserUpdate
SetDescription sets the "description" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetGender ¶
func (uu *UserUpdate) SetGender(i int32) *UserUpdate
SetGender sets the "gender" field.
func (*UserUpdate) SetNickName ¶
func (uu *UserUpdate) SetNickName(s string) *UserUpdate
SetNickName sets the "nick_name" field.
func (*UserUpdate) SetNillableAuthority ¶
func (uu *UserUpdate) SetNillableAuthority(i *int32) *UserUpdate
SetNillableAuthority sets the "authority" field if the given value is not nil.
func (*UserUpdate) SetNillableAvatar ¶
func (uu *UserUpdate) SetNillableAvatar(s *string) *UserUpdate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserUpdate) SetNillableBirthday ¶
func (uu *UserUpdate) SetNillableBirthday(t *time.Time) *UserUpdate
SetNillableBirthday sets the "birthday" 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) SetNillableDescription ¶
func (uu *UserUpdate) SetNillableDescription(s *string) *UserUpdate
SetNillableDescription sets the "description" 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) SetNillableGender ¶
func (uu *UserUpdate) SetNillableGender(i *int32) *UserUpdate
SetNillableGender sets the "gender" field if the given value is not nil.
func (*UserUpdate) SetNillableNickName ¶
func (uu *UserUpdate) SetNillableNickName(s *string) *UserUpdate
SetNillableNickName sets the "nick_name" 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) SetNillablePhone ¶
func (uu *UserUpdate) SetNillablePhone(s *string) *UserUpdate
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserUpdate) SetNillableRealName ¶
func (uu *UserUpdate) SetNillableRealName(s *string) *UserUpdate
SetNillableRealName sets the "real_name" field if the given value is not nil.
func (*UserUpdate) SetNillableRemark ¶
func (uu *UserUpdate) SetNillableRemark(s *string) *UserUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*UserUpdate) SetNillableSort ¶
func (uu *UserUpdate) SetNillableSort(i *int32) *UserUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*UserUpdate) SetNillableState ¶
func (uu *UserUpdate) SetNillableState(i *int32) *UserUpdate
SetNillableState sets the "state" field if the given value is not nil.
func (*UserUpdate) SetNillableUpdatedAt ¶
func (uu *UserUpdate) SetNillableUpdatedAt(t *time.Time) *UserUpdate
SetNillableUpdatedAt sets the "updated_at" 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) SetPhone ¶
func (uu *UserUpdate) SetPhone(s string) *UserUpdate
SetPhone sets the "phone" field.
func (*UserUpdate) SetRealName ¶
func (uu *UserUpdate) SetRealName(s string) *UserUpdate
SetRealName sets the "real_name" field.
func (*UserUpdate) SetRemark ¶
func (uu *UserUpdate) SetRemark(s string) *UserUpdate
SetRemark sets the "remark" field.
func (*UserUpdate) SetSort ¶
func (uu *UserUpdate) SetSort(i int32) *UserUpdate
SetSort sets the "sort" field.
func (*UserUpdate) SetState ¶
func (uu *UserUpdate) SetState(i int32) *UserUpdate
SetState sets the "state" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" 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) AddAuthority ¶
func (uuo *UserUpdateOne) AddAuthority(i int32) *UserUpdateOne
AddAuthority adds i to the "authority" field.
func (*UserUpdateOne) AddGender ¶
func (uuo *UserUpdateOne) AddGender(i int32) *UserUpdateOne
AddGender adds i to the "gender" field.
func (*UserUpdateOne) AddPostIDs ¶
func (uuo *UserUpdateOne) AddPostIDs(ids ...uint32) *UserUpdateOne
AddPostIDs adds the "posts" edge to the Post entity by IDs.
func (*UserUpdateOne) AddPosts ¶
func (uuo *UserUpdateOne) AddPosts(p ...*Post) *UserUpdateOne
AddPosts adds the "posts" edges to the Post entity.
func (*UserUpdateOne) AddRoleIDs ¶
func (uuo *UserUpdateOne) AddRoleIDs(ids ...uint32) *UserUpdateOne
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*UserUpdateOne) AddRoles ¶
func (uuo *UserUpdateOne) AddRoles(r ...*Role) *UserUpdateOne
AddRoles adds the "roles" edges to the Role entity.
func (*UserUpdateOne) AddSort ¶
func (uuo *UserUpdateOne) AddSort(i int32) *UserUpdateOne
AddSort adds i to the "sort" field.
func (*UserUpdateOne) AddState ¶
func (uuo *UserUpdateOne) AddState(i int32) *UserUpdateOne
AddState adds i to the "state" field.
func (*UserUpdateOne) ClearDeletedAt ¶
func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdateOne) ClearPosts ¶
func (uuo *UserUpdateOne) ClearPosts() *UserUpdateOne
ClearPosts clears all "posts" edges to the Post entity.
func (*UserUpdateOne) ClearRemark ¶
func (uuo *UserUpdateOne) ClearRemark() *UserUpdateOne
ClearRemark clears the value of the "remark" field.
func (*UserUpdateOne) ClearRoles ¶
func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne
ClearRoles clears all "roles" edges to the Role entity.
func (*UserUpdateOne) ClearUpdatedAt ¶
func (uuo *UserUpdateOne) ClearUpdatedAt() *UserUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Modify ¶
func (uuo *UserUpdateOne) Modify(modifiers ...func(u *sql.UpdateBuilder)) *UserUpdateOne
Modify adds a statement modifier for attaching custom logic to the UPDATE statement.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemovePostIDs ¶
func (uuo *UserUpdateOne) RemovePostIDs(ids ...uint32) *UserUpdateOne
RemovePostIDs removes the "posts" edge to Post entities by IDs.
func (*UserUpdateOne) RemovePosts ¶
func (uuo *UserUpdateOne) RemovePosts(p ...*Post) *UserUpdateOne
RemovePosts removes "posts" edges to Post entities.
func (*UserUpdateOne) RemoveRoleIDs ¶
func (uuo *UserUpdateOne) RemoveRoleIDs(ids ...uint32) *UserUpdateOne
RemoveRoleIDs removes the "roles" edge to Role entities by IDs.
func (*UserUpdateOne) RemoveRoles ¶
func (uuo *UserUpdateOne) RemoveRoles(r ...*Role) *UserUpdateOne
RemoveRoles removes "roles" edges to Role 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) SetAuthority ¶
func (uuo *UserUpdateOne) SetAuthority(i int32) *UserUpdateOne
SetAuthority sets the "authority" field.
func (*UserUpdateOne) SetAvatar ¶
func (uuo *UserUpdateOne) SetAvatar(s string) *UserUpdateOne
SetAvatar sets the "avatar" field.
func (*UserUpdateOne) SetBirthday ¶
func (uuo *UserUpdateOne) SetBirthday(t time.Time) *UserUpdateOne
SetBirthday sets the "birthday" field.
func (*UserUpdateOne) SetDeletedAt ¶
func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdateOne) SetDescription ¶
func (uuo *UserUpdateOne) SetDescription(s string) *UserUpdateOne
SetDescription sets the "description" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetGender ¶
func (uuo *UserUpdateOne) SetGender(i int32) *UserUpdateOne
SetGender sets the "gender" field.
func (*UserUpdateOne) SetNickName ¶
func (uuo *UserUpdateOne) SetNickName(s string) *UserUpdateOne
SetNickName sets the "nick_name" field.
func (*UserUpdateOne) SetNillableAuthority ¶
func (uuo *UserUpdateOne) SetNillableAuthority(i *int32) *UserUpdateOne
SetNillableAuthority sets the "authority" field if the given value is not nil.
func (*UserUpdateOne) SetNillableAvatar ¶
func (uuo *UserUpdateOne) SetNillableAvatar(s *string) *UserUpdateOne
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserUpdateOne) SetNillableBirthday ¶
func (uuo *UserUpdateOne) SetNillableBirthday(t *time.Time) *UserUpdateOne
SetNillableBirthday sets the "birthday" 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) SetNillableDescription ¶
func (uuo *UserUpdateOne) SetNillableDescription(s *string) *UserUpdateOne
SetNillableDescription sets the "description" 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) SetNillableGender ¶
func (uuo *UserUpdateOne) SetNillableGender(i *int32) *UserUpdateOne
SetNillableGender sets the "gender" field if the given value is not nil.
func (*UserUpdateOne) SetNillableNickName ¶
func (uuo *UserUpdateOne) SetNillableNickName(s *string) *UserUpdateOne
SetNillableNickName sets the "nick_name" 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) SetNillablePhone ¶
func (uuo *UserUpdateOne) SetNillablePhone(s *string) *UserUpdateOne
SetNillablePhone sets the "phone" field if the given value is not nil.
func (*UserUpdateOne) SetNillableRealName ¶
func (uuo *UserUpdateOne) SetNillableRealName(s *string) *UserUpdateOne
SetNillableRealName sets the "real_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableRemark ¶
func (uuo *UserUpdateOne) SetNillableRemark(s *string) *UserUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*UserUpdateOne) SetNillableSort ¶
func (uuo *UserUpdateOne) SetNillableSort(i *int32) *UserUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*UserUpdateOne) SetNillableState ¶
func (uuo *UserUpdateOne) SetNillableState(i *int32) *UserUpdateOne
SetNillableState sets the "state" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUpdatedAt ¶
func (uuo *UserUpdateOne) SetNillableUpdatedAt(t *time.Time) *UserUpdateOne
SetNillableUpdatedAt sets the "updated_at" 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) SetPhone ¶
func (uuo *UserUpdateOne) SetPhone(s string) *UserUpdateOne
SetPhone sets the "phone" field.
func (*UserUpdateOne) SetRealName ¶
func (uuo *UserUpdateOne) SetRealName(s string) *UserUpdateOne
SetRealName sets the "real_name" field.
func (*UserUpdateOne) SetRemark ¶
func (uuo *UserUpdateOne) SetRemark(s string) *UserUpdateOne
SetRemark sets the "remark" field.
func (*UserUpdateOne) SetSort ¶
func (uuo *UserUpdateOne) SetSort(i int32) *UserUpdateOne
SetSort sets the "sort" field.
func (*UserUpdateOne) SetState ¶
func (uuo *UserUpdateOne) SetState(i int32) *UserUpdateOne
SetState sets the "state" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" 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) AddAuthority ¶
func (u *UserUpsert) AddAuthority(v int32) *UserUpsert
AddAuthority adds v to the "authority" field.
func (*UserUpsert) AddGender ¶
func (u *UserUpsert) AddGender(v int32) *UserUpsert
AddGender adds v to the "gender" field.
func (*UserUpsert) AddSort ¶
func (u *UserUpsert) AddSort(v int32) *UserUpsert
AddSort adds v to the "sort" field.
func (*UserUpsert) AddState ¶
func (u *UserUpsert) AddState(v int32) *UserUpsert
AddState adds v to the "state" field.
func (*UserUpsert) ClearDeletedAt ¶
func (u *UserUpsert) ClearDeletedAt() *UserUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpsert) ClearRemark ¶
func (u *UserUpsert) ClearRemark() *UserUpsert
ClearRemark clears the value of the "remark" field.
func (*UserUpsert) ClearUpdatedAt ¶
func (u *UserUpsert) ClearUpdatedAt() *UserUpsert
ClearUpdatedAt clears the value of the "updated_at" field.
func (*UserUpsert) SetAuthority ¶
func (u *UserUpsert) SetAuthority(v int32) *UserUpsert
SetAuthority sets the "authority" field.
func (*UserUpsert) SetAvatar ¶
func (u *UserUpsert) SetAvatar(v string) *UserUpsert
SetAvatar sets the "avatar" field.
func (*UserUpsert) SetBirthday ¶
func (u *UserUpsert) SetBirthday(v time.Time) *UserUpsert
SetBirthday sets the "birthday" field.
func (*UserUpsert) SetDeletedAt ¶
func (u *UserUpsert) SetDeletedAt(v time.Time) *UserUpsert
SetDeletedAt sets the "deleted_at" field.
func (*UserUpsert) SetDescription ¶
func (u *UserUpsert) SetDescription(v string) *UserUpsert
SetDescription sets the "description" field.
func (*UserUpsert) SetEmail ¶
func (u *UserUpsert) SetEmail(v string) *UserUpsert
SetEmail sets the "email" field.
func (*UserUpsert) SetGender ¶
func (u *UserUpsert) SetGender(v int32) *UserUpsert
SetGender sets the "gender" field.
func (*UserUpsert) SetNickName ¶
func (u *UserUpsert) SetNickName(v string) *UserUpsert
SetNickName sets the "nick_name" field.
func (*UserUpsert) SetPassword ¶
func (u *UserUpsert) SetPassword(v string) *UserUpsert
SetPassword sets the "password" field.
func (*UserUpsert) SetPhone ¶
func (u *UserUpsert) SetPhone(v string) *UserUpsert
SetPhone sets the "phone" field.
func (*UserUpsert) SetRealName ¶
func (u *UserUpsert) SetRealName(v string) *UserUpsert
SetRealName sets the "real_name" field.
func (*UserUpsert) SetRemark ¶
func (u *UserUpsert) SetRemark(v string) *UserUpsert
SetRemark sets the "remark" field.
func (*UserUpsert) SetSort ¶
func (u *UserUpsert) SetSort(v int32) *UserUpsert
SetSort sets the "sort" field.
func (*UserUpsert) SetState ¶
func (u *UserUpsert) SetState(v int32) *UserUpsert
SetState sets the "state" field.
func (*UserUpsert) SetUpdatedAt ¶
func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsert) UpdateAuthority ¶
func (u *UserUpsert) UpdateAuthority() *UserUpsert
UpdateAuthority sets the "authority" field to the value that was provided on create.
func (*UserUpsert) UpdateAvatar ¶
func (u *UserUpsert) UpdateAvatar() *UserUpsert
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*UserUpsert) UpdateBirthday ¶
func (u *UserUpsert) UpdateBirthday() *UserUpsert
UpdateBirthday sets the "birthday" 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) UpdateDescription ¶
func (u *UserUpsert) UpdateDescription() *UserUpsert
UpdateDescription sets the "description" 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) UpdateGender ¶
func (u *UserUpsert) UpdateGender() *UserUpsert
UpdateGender sets the "gender" field to the value that was provided on create.
func (*UserUpsert) UpdateNickName ¶
func (u *UserUpsert) UpdateNickName() *UserUpsert
UpdateNickName sets the "nick_name" 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) UpdatePhone ¶
func (u *UserUpsert) UpdatePhone() *UserUpsert
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*UserUpsert) UpdateRealName ¶
func (u *UserUpsert) UpdateRealName() *UserUpsert
UpdateRealName sets the "real_name" field to the value that was provided on create.
func (*UserUpsert) UpdateRemark ¶
func (u *UserUpsert) UpdateRemark() *UserUpsert
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*UserUpsert) UpdateSort ¶
func (u *UserUpsert) UpdateSort() *UserUpsert
UpdateSort sets the "sort" field to the value that was provided on create.
func (*UserUpsert) UpdateState ¶
func (u *UserUpsert) UpdateState() *UserUpsert
UpdateState sets the "state" 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.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) AddAuthority ¶
func (u *UserUpsertBulk) AddAuthority(v int32) *UserUpsertBulk
AddAuthority adds v to the "authority" field.
func (*UserUpsertBulk) AddGender ¶
func (u *UserUpsertBulk) AddGender(v int32) *UserUpsertBulk
AddGender adds v to the "gender" field.
func (*UserUpsertBulk) AddSort ¶
func (u *UserUpsertBulk) AddSort(v int32) *UserUpsertBulk
AddSort adds v to the "sort" field.
func (*UserUpsertBulk) AddState ¶
func (u *UserUpsertBulk) AddState(v int32) *UserUpsertBulk
AddState adds v to the "state" field.
func (*UserUpsertBulk) ClearDeletedAt ¶
func (u *UserUpsertBulk) ClearDeletedAt() *UserUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpsertBulk) ClearRemark ¶
func (u *UserUpsertBulk) ClearRemark() *UserUpsertBulk
ClearRemark clears the value of the "remark" field.
func (*UserUpsertBulk) ClearUpdatedAt ¶
func (u *UserUpsertBulk) ClearUpdatedAt() *UserUpsertBulk
ClearUpdatedAt clears the value of the "updated_at" 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) SetAuthority ¶
func (u *UserUpsertBulk) SetAuthority(v int32) *UserUpsertBulk
SetAuthority sets the "authority" field.
func (*UserUpsertBulk) SetAvatar ¶
func (u *UserUpsertBulk) SetAvatar(v string) *UserUpsertBulk
SetAvatar sets the "avatar" field.
func (*UserUpsertBulk) SetBirthday ¶
func (u *UserUpsertBulk) SetBirthday(v time.Time) *UserUpsertBulk
SetBirthday sets the "birthday" field.
func (*UserUpsertBulk) SetDeletedAt ¶
func (u *UserUpsertBulk) SetDeletedAt(v time.Time) *UserUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*UserUpsertBulk) SetDescription ¶
func (u *UserUpsertBulk) SetDescription(v string) *UserUpsertBulk
SetDescription sets the "description" field.
func (*UserUpsertBulk) SetEmail ¶
func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
SetEmail sets the "email" field.
func (*UserUpsertBulk) SetGender ¶
func (u *UserUpsertBulk) SetGender(v int32) *UserUpsertBulk
SetGender sets the "gender" field.
func (*UserUpsertBulk) SetNickName ¶
func (u *UserUpsertBulk) SetNickName(v string) *UserUpsertBulk
SetNickName sets the "nick_name" field.
func (*UserUpsertBulk) SetPassword ¶
func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk
SetPassword sets the "password" field.
func (*UserUpsertBulk) SetPhone ¶
func (u *UserUpsertBulk) SetPhone(v string) *UserUpsertBulk
SetPhone sets the "phone" field.
func (*UserUpsertBulk) SetRealName ¶
func (u *UserUpsertBulk) SetRealName(v string) *UserUpsertBulk
SetRealName sets the "real_name" field.
func (*UserUpsertBulk) SetRemark ¶
func (u *UserUpsertBulk) SetRemark(v string) *UserUpsertBulk
SetRemark sets the "remark" field.
func (*UserUpsertBulk) SetSort ¶
func (u *UserUpsertBulk) SetSort(v int32) *UserUpsertBulk
SetSort sets the "sort" field.
func (*UserUpsertBulk) SetState ¶
func (u *UserUpsertBulk) SetState(v int32) *UserUpsertBulk
SetState sets the "state" field.
func (*UserUpsertBulk) SetUpdatedAt ¶
func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
SetUpdatedAt sets the "updated_at" 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) UpdateAuthority ¶
func (u *UserUpsertBulk) UpdateAuthority() *UserUpsertBulk
UpdateAuthority sets the "authority" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateAvatar ¶
func (u *UserUpsertBulk) UpdateAvatar() *UserUpsertBulk
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateBirthday ¶
func (u *UserUpsertBulk) UpdateBirthday() *UserUpsertBulk
UpdateBirthday sets the "birthday" 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) UpdateDescription ¶
func (u *UserUpsertBulk) UpdateDescription() *UserUpsertBulk
UpdateDescription sets the "description" 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) UpdateGender ¶
func (u *UserUpsertBulk) UpdateGender() *UserUpsertBulk
UpdateGender sets the "gender" 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) UpdateNickName ¶
func (u *UserUpsertBulk) UpdateNickName() *UserUpsertBulk
UpdateNickName sets the "nick_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdatePassword ¶
func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertBulk) UpdatePhone ¶
func (u *UserUpsertBulk) UpdatePhone() *UserUpsertBulk
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateRealName ¶
func (u *UserUpsertBulk) UpdateRealName() *UserUpsertBulk
UpdateRealName sets the "real_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateRemark ¶
func (u *UserUpsertBulk) UpdateRemark() *UserUpsertBulk
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateSort ¶
func (u *UserUpsertBulk) UpdateSort() *UserUpsertBulk
UpdateSort sets the "sort" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateState ¶
func (u *UserUpsertBulk) UpdateState() *UserUpsertBulk
UpdateState sets the "state" 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.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) AddAuthority ¶
func (u *UserUpsertOne) AddAuthority(v int32) *UserUpsertOne
AddAuthority adds v to the "authority" field.
func (*UserUpsertOne) AddGender ¶
func (u *UserUpsertOne) AddGender(v int32) *UserUpsertOne
AddGender adds v to the "gender" field.
func (*UserUpsertOne) AddSort ¶
func (u *UserUpsertOne) AddSort(v int32) *UserUpsertOne
AddSort adds v to the "sort" field.
func (*UserUpsertOne) AddState ¶
func (u *UserUpsertOne) AddState(v int32) *UserUpsertOne
AddState adds v to the "state" field.
func (*UserUpsertOne) ClearDeletedAt ¶
func (u *UserUpsertOne) ClearDeletedAt() *UserUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpsertOne) ClearRemark ¶
func (u *UserUpsertOne) ClearRemark() *UserUpsertOne
ClearRemark clears the value of the "remark" field.
func (*UserUpsertOne) ClearUpdatedAt ¶
func (u *UserUpsertOne) ClearUpdatedAt() *UserUpsertOne
ClearUpdatedAt clears the value of the "updated_at" 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 uint32, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) uint32
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) SetAuthority ¶
func (u *UserUpsertOne) SetAuthority(v int32) *UserUpsertOne
SetAuthority sets the "authority" field.
func (*UserUpsertOne) SetAvatar ¶
func (u *UserUpsertOne) SetAvatar(v string) *UserUpsertOne
SetAvatar sets the "avatar" field.
func (*UserUpsertOne) SetBirthday ¶
func (u *UserUpsertOne) SetBirthday(v time.Time) *UserUpsertOne
SetBirthday sets the "birthday" field.
func (*UserUpsertOne) SetDeletedAt ¶
func (u *UserUpsertOne) SetDeletedAt(v time.Time) *UserUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*UserUpsertOne) SetDescription ¶
func (u *UserUpsertOne) SetDescription(v string) *UserUpsertOne
SetDescription sets the "description" field.
func (*UserUpsertOne) SetEmail ¶
func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
SetEmail sets the "email" field.
func (*UserUpsertOne) SetGender ¶
func (u *UserUpsertOne) SetGender(v int32) *UserUpsertOne
SetGender sets the "gender" field.
func (*UserUpsertOne) SetNickName ¶
func (u *UserUpsertOne) SetNickName(v string) *UserUpsertOne
SetNickName sets the "nick_name" field.
func (*UserUpsertOne) SetPassword ¶
func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne
SetPassword sets the "password" field.
func (*UserUpsertOne) SetPhone ¶
func (u *UserUpsertOne) SetPhone(v string) *UserUpsertOne
SetPhone sets the "phone" field.
func (*UserUpsertOne) SetRealName ¶
func (u *UserUpsertOne) SetRealName(v string) *UserUpsertOne
SetRealName sets the "real_name" field.
func (*UserUpsertOne) SetRemark ¶
func (u *UserUpsertOne) SetRemark(v string) *UserUpsertOne
SetRemark sets the "remark" field.
func (*UserUpsertOne) SetSort ¶
func (u *UserUpsertOne) SetSort(v int32) *UserUpsertOne
SetSort sets the "sort" field.
func (*UserUpsertOne) SetState ¶
func (u *UserUpsertOne) SetState(v int32) *UserUpsertOne
SetState sets the "state" field.
func (*UserUpsertOne) SetUpdatedAt ¶
func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
SetUpdatedAt sets the "updated_at" 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) UpdateAuthority ¶
func (u *UserUpsertOne) UpdateAuthority() *UserUpsertOne
UpdateAuthority sets the "authority" field to the value that was provided on create.
func (*UserUpsertOne) UpdateAvatar ¶
func (u *UserUpsertOne) UpdateAvatar() *UserUpsertOne
UpdateAvatar sets the "avatar" field to the value that was provided on create.
func (*UserUpsertOne) UpdateBirthday ¶
func (u *UserUpsertOne) UpdateBirthday() *UserUpsertOne
UpdateBirthday sets the "birthday" 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) UpdateDescription ¶
func (u *UserUpsertOne) UpdateDescription() *UserUpsertOne
UpdateDescription sets the "description" 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) UpdateGender ¶
func (u *UserUpsertOne) UpdateGender() *UserUpsertOne
UpdateGender sets the "gender" 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) UpdateNickName ¶
func (u *UserUpsertOne) UpdateNickName() *UserUpsertOne
UpdateNickName sets the "nick_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdatePassword ¶
func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertOne) UpdatePhone ¶
func (u *UserUpsertOne) UpdatePhone() *UserUpsertOne
UpdatePhone sets the "phone" field to the value that was provided on create.
func (*UserUpsertOne) UpdateRealName ¶
func (u *UserUpsertOne) UpdateRealName() *UserUpsertOne
UpdateRealName sets the "real_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateRemark ¶
func (u *UserUpsertOne) UpdateRemark() *UserUpsertOne
UpdateRemark sets the "remark" field to the value that was provided on create.
func (*UserUpsertOne) UpdateSort ¶
func (u *UserUpsertOne) UpdateSort() *UserUpsertOne
UpdateSort sets the "sort" field to the value that was provided on create.
func (*UserUpsertOne) UpdateState ¶
func (u *UserUpsertOne) UpdateState() *UserUpsertOne
UpdateState sets the "state" 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.
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 ¶
- client.go
- dept.go
- dept_create.go
- dept_delete.go
- dept_query.go
- dept_update.go
- ent.go
- entql.go
- generate.go
- member.go
- member_create.go
- member_delete.go
- member_query.go
- member_update.go
- menu.go
- menu_create.go
- menu_delete.go
- menu_query.go
- menu_update.go
- mutation.go
- post.go
- post_create.go
- post_delete.go
- post_query.go
- post_update.go
- role.go
- role_create.go
- role_delete.go
- role_query.go
- role_update.go
- runtime.go
- tenant.go
- tenant_create.go
- tenant_delete.go
- tenant_query.go
- tenant_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go