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 API
- func (c *API) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *API) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (a *API) String() string
- func (a *API) Unwrap() *API
- func (a *API) Update() *APIUpdateOne
- func (a *API) Value(name string) (ent.Value, error)
- type APIClient
- func (c *APIClient) Create() *APICreate
- func (c *APIClient) CreateBulk(builders ...*APICreate) *APICreateBulk
- func (c *APIClient) Delete() *APIDelete
- func (c *APIClient) DeleteOne(a *API) *APIDeleteOne
- func (c *APIClient) DeleteOneID(id uint64) *APIDeleteOne
- func (c *APIClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *APIClient) Get(ctx context.Context, id uint64) (*API, error)
- func (c *APIClient) GetX(ctx context.Context, id uint64) *API
- func (c *APIClient) Hooks() []Hook
- func (c *APIClient) Intercept(interceptors ...Interceptor)
- func (c *APIClient) Interceptors() []Interceptor
- func (c *APIClient) Query() *APIQuery
- func (c *APIClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *APIClient) Update() *APIUpdate
- func (c *APIClient) UpdateOne(a *API) *APIUpdateOne
- func (c *APIClient) UpdateOneID(id uint64) *APIUpdateOne
- func (c *APIClient) Use(hooks ...Hook)
- type APICreate
- func (ac *APICreate) Exec(ctx context.Context) error
- func (c *APICreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ac *APICreate) ExecX(ctx context.Context)
- func (ac *APICreate) Mutation() *APIMutation
- func (c *APICreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ac *APICreate) Save(ctx context.Context) (*API, error)
- func (ac *APICreate) SaveX(ctx context.Context) *API
- func (ac *APICreate) SetAPIGroup(s string) *APICreate
- func (ac *APICreate) SetCreatedAt(t time.Time) *APICreate
- func (ac *APICreate) SetDescription(s string) *APICreate
- func (ac *APICreate) SetID(u uint64) *APICreate
- func (ac *APICreate) SetIsRequired(b bool) *APICreate
- func (ac *APICreate) SetMethod(s string) *APICreate
- func (ac *APICreate) SetNillableCreatedAt(t *time.Time) *APICreate
- func (ac *APICreate) SetNillableIsRequired(b *bool) *APICreate
- func (ac *APICreate) SetNillableMethod(s *string) *APICreate
- func (ac *APICreate) SetNillableUpdatedAt(t *time.Time) *APICreate
- func (a *APICreate) SetNotNilAPIGroup(value *string) *APICreate
- func (a *APICreate) SetNotNilDescription(value *string) *APICreate
- func (a *APICreate) SetNotNilIsRequired(value *bool) *APICreate
- func (a *APICreate) SetNotNilMethod(value *string) *APICreate
- func (a *APICreate) SetNotNilPath(value *string) *APICreate
- func (a *APICreate) SetNotNilUpdatedAt(value *time.Time) *APICreate
- func (ac *APICreate) SetPath(s string) *APICreate
- func (ac *APICreate) SetUpdatedAt(t time.Time) *APICreate
- type APICreateBulk
- func (acb *APICreateBulk) Exec(ctx context.Context) error
- func (c *APICreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (acb *APICreateBulk) ExecX(ctx context.Context)
- func (c *APICreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (acb *APICreateBulk) Save(ctx context.Context) ([]*API, error)
- func (acb *APICreateBulk) SaveX(ctx context.Context) []*API
- type APIDelete
- func (ad *APIDelete) Exec(ctx context.Context) (int, error)
- func (c *APIDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ad *APIDelete) ExecX(ctx context.Context) int
- func (c *APIDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ad *APIDelete) Where(ps ...predicate.API) *APIDelete
- type APIDeleteOne
- type APIGroupBy
- func (agb *APIGroupBy) Aggregate(fns ...AggregateFunc) *APIGroupBy
- func (s *APIGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *APIGroupBy) BoolX(ctx context.Context) bool
- func (s *APIGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *APIGroupBy) BoolsX(ctx context.Context) []bool
- func (s *APIGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *APIGroupBy) Float64X(ctx context.Context) float64
- func (s *APIGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *APIGroupBy) Float64sX(ctx context.Context) []float64
- func (s *APIGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *APIGroupBy) IntX(ctx context.Context) int
- func (s *APIGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *APIGroupBy) IntsX(ctx context.Context) []int
- func (agb *APIGroupBy) Scan(ctx context.Context, v any) error
- func (s *APIGroupBy) ScanX(ctx context.Context, v any)
- func (s *APIGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *APIGroupBy) StringX(ctx context.Context) string
- func (s *APIGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *APIGroupBy) StringsX(ctx context.Context) []string
- type APIMutation
- func (m *APIMutation) APIGroup() (r string, exists bool)
- func (m *APIMutation) AddField(name string, value ent.Value) error
- func (m *APIMutation) AddedEdges() []string
- func (m *APIMutation) AddedField(name string) (ent.Value, bool)
- func (m *APIMutation) AddedFields() []string
- func (m *APIMutation) AddedIDs(name string) []ent.Value
- func (m *APIMutation) ClearEdge(name string) error
- func (m *APIMutation) ClearField(name string) error
- func (m *APIMutation) ClearedEdges() []string
- func (m *APIMutation) ClearedFields() []string
- func (m APIMutation) Client() *Client
- func (m *APIMutation) CreatedAt() (r time.Time, exists bool)
- func (m *APIMutation) Description() (r string, exists bool)
- func (m *APIMutation) EdgeCleared(name string) bool
- func (c *APIMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *APIMutation) Field(name string) (ent.Value, bool)
- func (m *APIMutation) FieldCleared(name string) bool
- func (m *APIMutation) Fields() []string
- func (m *APIMutation) ID() (id uint64, exists bool)
- func (m *APIMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *APIMutation) IsRequired() (r bool, exists bool)
- func (m *APIMutation) Method() (r string, exists bool)
- func (m *APIMutation) OldAPIGroup(ctx context.Context) (v string, err error)
- func (m *APIMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *APIMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *APIMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *APIMutation) OldIsRequired(ctx context.Context) (v bool, err error)
- func (m *APIMutation) OldMethod(ctx context.Context) (v string, err error)
- func (m *APIMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *APIMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *APIMutation) Op() Op
- func (m *APIMutation) Path() (r string, exists bool)
- func (c *APIMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *APIMutation) RemovedEdges() []string
- func (m *APIMutation) RemovedIDs(name string) []ent.Value
- func (m *APIMutation) ResetAPIGroup()
- func (m *APIMutation) ResetCreatedAt()
- func (m *APIMutation) ResetDescription()
- func (m *APIMutation) ResetEdge(name string) error
- func (m *APIMutation) ResetField(name string) error
- func (m *APIMutation) ResetIsRequired()
- func (m *APIMutation) ResetMethod()
- func (m *APIMutation) ResetPath()
- func (m *APIMutation) ResetUpdatedAt()
- func (m *APIMutation) SetAPIGroup(s string)
- func (m *APIMutation) SetCreatedAt(t time.Time)
- func (m *APIMutation) SetDescription(s string)
- func (m *APIMutation) SetField(name string, value ent.Value) error
- func (m *APIMutation) SetID(id uint64)
- func (m *APIMutation) SetIsRequired(b bool)
- func (m *APIMutation) SetMethod(s string)
- func (m *APIMutation) SetOp(op Op)
- func (m *APIMutation) SetPath(s string)
- func (m *APIMutation) SetUpdatedAt(t time.Time)
- func (m APIMutation) Tx() (*Tx, error)
- func (m *APIMutation) Type() string
- func (m *APIMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *APIMutation) Where(ps ...predicate.API)
- func (m *APIMutation) WhereP(ps ...func(*sql.Selector))
- type APIPageList
- type APIPager
- type APIPaginateOption
- type APIQuery
- func (aq *APIQuery) Aggregate(fns ...AggregateFunc) *APISelect
- func (aq *APIQuery) All(ctx context.Context) ([]*API, error)
- func (aq *APIQuery) AllX(ctx context.Context) []*API
- func (aq *APIQuery) Clone() *APIQuery
- func (aq *APIQuery) Count(ctx context.Context) (int, error)
- func (aq *APIQuery) CountX(ctx context.Context) int
- func (c *APIQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (aq *APIQuery) Exist(ctx context.Context) (bool, error)
- func (aq *APIQuery) ExistX(ctx context.Context) bool
- func (aq *APIQuery) First(ctx context.Context) (*API, error)
- func (aq *APIQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (aq *APIQuery) FirstIDX(ctx context.Context) uint64
- func (aq *APIQuery) FirstX(ctx context.Context) *API
- func (aq *APIQuery) GroupBy(field string, fields ...string) *APIGroupBy
- func (aq *APIQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (aq *APIQuery) IDsX(ctx context.Context) []uint64
- func (aq *APIQuery) Limit(limit int) *APIQuery
- func (aq *APIQuery) Offset(offset int) *APIQuery
- func (aq *APIQuery) Only(ctx context.Context) (*API, error)
- func (aq *APIQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (aq *APIQuery) OnlyIDX(ctx context.Context) uint64
- func (aq *APIQuery) OnlyX(ctx context.Context) *API
- func (aq *APIQuery) Order(o ...api.OrderOption) *APIQuery
- func (a *APIQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*APIPageList, error)
- func (c *APIQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (aq *APIQuery) Select(fields ...string) *APISelect
- func (aq *APIQuery) Unique(unique bool) *APIQuery
- func (aq *APIQuery) Where(ps ...predicate.API) *APIQuery
- type APISelect
- func (as *APISelect) Aggregate(fns ...AggregateFunc) *APISelect
- func (s *APISelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *APISelect) BoolX(ctx context.Context) bool
- func (s *APISelect) Bools(ctx context.Context) ([]bool, error)
- func (s *APISelect) BoolsX(ctx context.Context) []bool
- func (c APISelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *APISelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *APISelect) Float64X(ctx context.Context) float64
- func (s *APISelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *APISelect) Float64sX(ctx context.Context) []float64
- func (s *APISelect) Int(ctx context.Context) (_ int, err error)
- func (s *APISelect) IntX(ctx context.Context) int
- func (s *APISelect) Ints(ctx context.Context) ([]int, error)
- func (s *APISelect) IntsX(ctx context.Context) []int
- func (c APISelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (as *APISelect) Scan(ctx context.Context, v any) error
- func (s *APISelect) ScanX(ctx context.Context, v any)
- func (s *APISelect) String(ctx context.Context) (_ string, err error)
- func (s *APISelect) StringX(ctx context.Context) string
- func (s *APISelect) Strings(ctx context.Context) ([]string, error)
- func (s *APISelect) StringsX(ctx context.Context) []string
- type APIUpdate
- func (au *APIUpdate) Exec(ctx context.Context) error
- func (c *APIUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (au *APIUpdate) ExecX(ctx context.Context)
- func (au *APIUpdate) Mutation() *APIMutation
- func (c *APIUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (au *APIUpdate) Save(ctx context.Context) (int, error)
- func (au *APIUpdate) SaveX(ctx context.Context) int
- func (au *APIUpdate) SetAPIGroup(s string) *APIUpdate
- func (au *APIUpdate) SetDescription(s string) *APIUpdate
- func (au *APIUpdate) SetIsRequired(b bool) *APIUpdate
- func (au *APIUpdate) SetMethod(s string) *APIUpdate
- func (au *APIUpdate) SetNillableIsRequired(b *bool) *APIUpdate
- func (au *APIUpdate) SetNillableMethod(s *string) *APIUpdate
- func (a *APIUpdate) SetNotEmptyAPIGroup(value string) *APIUpdate
- func (a *APIUpdate) SetNotEmptyDescription(value string) *APIUpdate
- func (a *APIUpdate) SetNotEmptyMethod(value string) *APIUpdate
- func (a *APIUpdate) SetNotEmptyPath(value string) *APIUpdate
- func (a *APIUpdate) SetNotNilAPIGroup(value *string) *APIUpdate
- func (a *APIUpdate) SetNotNilDescription(value *string) *APIUpdate
- func (a *APIUpdate) SetNotNilIsRequired(value *bool) *APIUpdate
- func (a *APIUpdate) SetNotNilMethod(value *string) *APIUpdate
- func (a *APIUpdate) SetNotNilPath(value *string) *APIUpdate
- func (a *APIUpdate) SetNotNilUpdatedAt(value *time.Time) *APIUpdate
- func (au *APIUpdate) SetPath(s string) *APIUpdate
- func (au *APIUpdate) SetUpdatedAt(t time.Time) *APIUpdate
- func (au *APIUpdate) Where(ps ...predicate.API) *APIUpdate
- type APIUpdateOne
- func (auo *APIUpdateOne) Exec(ctx context.Context) error
- func (c *APIUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (auo *APIUpdateOne) ExecX(ctx context.Context)
- func (auo *APIUpdateOne) Mutation() *APIMutation
- func (c *APIUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (auo *APIUpdateOne) Save(ctx context.Context) (*API, error)
- func (auo *APIUpdateOne) SaveX(ctx context.Context) *API
- func (auo *APIUpdateOne) Select(field string, fields ...string) *APIUpdateOne
- func (auo *APIUpdateOne) SetAPIGroup(s string) *APIUpdateOne
- func (auo *APIUpdateOne) SetDescription(s string) *APIUpdateOne
- func (auo *APIUpdateOne) SetIsRequired(b bool) *APIUpdateOne
- func (auo *APIUpdateOne) SetMethod(s string) *APIUpdateOne
- func (auo *APIUpdateOne) SetNillableIsRequired(b *bool) *APIUpdateOne
- func (auo *APIUpdateOne) SetNillableMethod(s *string) *APIUpdateOne
- func (a *APIUpdateOne) SetNotEmptyAPIGroup(value string) *APIUpdateOne
- func (a *APIUpdateOne) SetNotEmptyDescription(value string) *APIUpdateOne
- func (a *APIUpdateOne) SetNotEmptyMethod(value string) *APIUpdateOne
- func (a *APIUpdateOne) SetNotEmptyPath(value string) *APIUpdateOne
- func (a *APIUpdateOne) SetNotNilAPIGroup(value *string) *APIUpdateOne
- func (a *APIUpdateOne) SetNotNilDescription(value *string) *APIUpdateOne
- func (a *APIUpdateOne) SetNotNilIsRequired(value *bool) *APIUpdateOne
- func (a *APIUpdateOne) SetNotNilMethod(value *string) *APIUpdateOne
- func (a *APIUpdateOne) SetNotNilPath(value *string) *APIUpdateOne
- func (a *APIUpdateOne) SetNotNilUpdatedAt(value *time.Time) *APIUpdateOne
- func (auo *APIUpdateOne) SetPath(s string) *APIUpdateOne
- func (auo *APIUpdateOne) SetUpdatedAt(t time.Time) *APIUpdateOne
- func (auo *APIUpdateOne) Where(ps ...predicate.API) *APIUpdateOne
- type APIs
- 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) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Department
- func (c *Department) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (d *Department) QueryChildren() *DepartmentQuery
- func (c *Department) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (d *Department) QueryParent() *DepartmentQuery
- func (d *Department) QueryUsers() *UserQuery
- func (d *Department) String() string
- func (d *Department) Unwrap() *Department
- func (d *Department) Update() *DepartmentUpdateOne
- func (d *Department) Value(name string) (ent.Value, error)
- type DepartmentClient
- func (c *DepartmentClient) Create() *DepartmentCreate
- func (c *DepartmentClient) CreateBulk(builders ...*DepartmentCreate) *DepartmentCreateBulk
- func (c *DepartmentClient) Delete() *DepartmentDelete
- func (c *DepartmentClient) DeleteOne(d *Department) *DepartmentDeleteOne
- func (c *DepartmentClient) DeleteOneID(id uint64) *DepartmentDeleteOne
- func (c *DepartmentClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *DepartmentClient) Get(ctx context.Context, id uint64) (*Department, error)
- func (c *DepartmentClient) GetX(ctx context.Context, id uint64) *Department
- func (c *DepartmentClient) Hooks() []Hook
- func (c *DepartmentClient) Intercept(interceptors ...Interceptor)
- func (c *DepartmentClient) Interceptors() []Interceptor
- func (c *DepartmentClient) Query() *DepartmentQuery
- func (c *DepartmentClient) QueryChildren(d *Department) *DepartmentQuery
- func (c *DepartmentClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *DepartmentClient) QueryParent(d *Department) *DepartmentQuery
- func (c *DepartmentClient) QueryUsers(d *Department) *UserQuery
- func (c *DepartmentClient) Update() *DepartmentUpdate
- func (c *DepartmentClient) UpdateOne(d *Department) *DepartmentUpdateOne
- func (c *DepartmentClient) UpdateOneID(id uint64) *DepartmentUpdateOne
- func (c *DepartmentClient) Use(hooks ...Hook)
- type DepartmentCreate
- func (dc *DepartmentCreate) AddChildIDs(ids ...uint64) *DepartmentCreate
- func (dc *DepartmentCreate) AddChildren(d ...*Department) *DepartmentCreate
- func (dc *DepartmentCreate) AddUserIDs(ids ...uuid.UUID) *DepartmentCreate
- func (dc *DepartmentCreate) AddUsers(u ...*User) *DepartmentCreate
- func (dc *DepartmentCreate) Exec(ctx context.Context) error
- func (c *DepartmentCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dc *DepartmentCreate) ExecX(ctx context.Context)
- func (dc *DepartmentCreate) Mutation() *DepartmentMutation
- func (c *DepartmentCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dc *DepartmentCreate) Save(ctx context.Context) (*Department, error)
- func (dc *DepartmentCreate) SaveX(ctx context.Context) *Department
- func (dc *DepartmentCreate) SetAncestors(s string) *DepartmentCreate
- func (dc *DepartmentCreate) SetCreatedAt(t time.Time) *DepartmentCreate
- func (dc *DepartmentCreate) SetEmail(s string) *DepartmentCreate
- func (dc *DepartmentCreate) SetID(u uint64) *DepartmentCreate
- func (dc *DepartmentCreate) SetLeader(s string) *DepartmentCreate
- func (dc *DepartmentCreate) SetName(s string) *DepartmentCreate
- func (dc *DepartmentCreate) SetNillableAncestors(s *string) *DepartmentCreate
- func (dc *DepartmentCreate) SetNillableCreatedAt(t *time.Time) *DepartmentCreate
- func (dc *DepartmentCreate) SetNillableParentID(u *uint64) *DepartmentCreate
- func (dc *DepartmentCreate) SetNillableRemark(s *string) *DepartmentCreate
- func (dc *DepartmentCreate) SetNillableSort(u *uint32) *DepartmentCreate
- func (dc *DepartmentCreate) SetNillableStatus(u *uint8) *DepartmentCreate
- func (dc *DepartmentCreate) SetNillableUpdatedAt(t *time.Time) *DepartmentCreate
- func (d *DepartmentCreate) SetNotNilAncestors(value *string) *DepartmentCreate
- func (d *DepartmentCreate) SetNotNilEmail(value *string) *DepartmentCreate
- func (d *DepartmentCreate) SetNotNilLeader(value *string) *DepartmentCreate
- func (d *DepartmentCreate) SetNotNilName(value *string) *DepartmentCreate
- func (d *DepartmentCreate) SetNotNilParentID(value *uint64) *DepartmentCreate
- func (d *DepartmentCreate) SetNotNilPhone(value *string) *DepartmentCreate
- func (d *DepartmentCreate) SetNotNilRemark(value *string) *DepartmentCreate
- func (d *DepartmentCreate) SetNotNilSort(value *uint32) *DepartmentCreate
- func (d *DepartmentCreate) SetNotNilStatus(value *uint8) *DepartmentCreate
- func (d *DepartmentCreate) SetNotNilUpdatedAt(value *time.Time) *DepartmentCreate
- func (dc *DepartmentCreate) SetParent(d *Department) *DepartmentCreate
- func (dc *DepartmentCreate) SetParentID(u uint64) *DepartmentCreate
- func (dc *DepartmentCreate) SetPhone(s string) *DepartmentCreate
- func (dc *DepartmentCreate) SetRemark(s string) *DepartmentCreate
- func (dc *DepartmentCreate) SetSort(u uint32) *DepartmentCreate
- func (dc *DepartmentCreate) SetStatus(u uint8) *DepartmentCreate
- func (dc *DepartmentCreate) SetUpdatedAt(t time.Time) *DepartmentCreate
- type DepartmentCreateBulk
- func (dcb *DepartmentCreateBulk) Exec(ctx context.Context) error
- func (c *DepartmentCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dcb *DepartmentCreateBulk) ExecX(ctx context.Context)
- func (c *DepartmentCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dcb *DepartmentCreateBulk) Save(ctx context.Context) ([]*Department, error)
- func (dcb *DepartmentCreateBulk) SaveX(ctx context.Context) []*Department
- type DepartmentDelete
- func (dd *DepartmentDelete) Exec(ctx context.Context) (int, error)
- func (c *DepartmentDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dd *DepartmentDelete) ExecX(ctx context.Context) int
- func (c *DepartmentDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dd *DepartmentDelete) Where(ps ...predicate.Department) *DepartmentDelete
- type DepartmentDeleteOne
- type DepartmentEdges
- type DepartmentGroupBy
- func (dgb *DepartmentGroupBy) Aggregate(fns ...AggregateFunc) *DepartmentGroupBy
- func (s *DepartmentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DepartmentGroupBy) BoolX(ctx context.Context) bool
- func (s *DepartmentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DepartmentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DepartmentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DepartmentGroupBy) Float64X(ctx context.Context) float64
- func (s *DepartmentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DepartmentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DepartmentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DepartmentGroupBy) IntX(ctx context.Context) int
- func (s *DepartmentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DepartmentGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DepartmentGroupBy) Scan(ctx context.Context, v any) error
- func (s *DepartmentGroupBy) ScanX(ctx context.Context, v any)
- func (s *DepartmentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DepartmentGroupBy) StringX(ctx context.Context) string
- func (s *DepartmentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DepartmentGroupBy) StringsX(ctx context.Context) []string
- type DepartmentMutation
- func (m *DepartmentMutation) AddChildIDs(ids ...uint64)
- func (m *DepartmentMutation) AddField(name string, value ent.Value) error
- func (m *DepartmentMutation) AddSort(u int32)
- func (m *DepartmentMutation) AddStatus(u int8)
- func (m *DepartmentMutation) AddUserIDs(ids ...uuid.UUID)
- func (m *DepartmentMutation) AddedEdges() []string
- func (m *DepartmentMutation) AddedField(name string) (ent.Value, bool)
- func (m *DepartmentMutation) AddedFields() []string
- func (m *DepartmentMutation) AddedIDs(name string) []ent.Value
- func (m *DepartmentMutation) AddedSort() (r int32, exists bool)
- func (m *DepartmentMutation) AddedStatus() (r int8, exists bool)
- func (m *DepartmentMutation) Ancestors() (r string, exists bool)
- func (m *DepartmentMutation) AncestorsCleared() bool
- func (m *DepartmentMutation) ChildrenCleared() bool
- func (m *DepartmentMutation) ChildrenIDs() (ids []uint64)
- func (m *DepartmentMutation) ClearAncestors()
- func (m *DepartmentMutation) ClearChildren()
- func (m *DepartmentMutation) ClearEdge(name string) error
- func (m *DepartmentMutation) ClearField(name string) error
- func (m *DepartmentMutation) ClearParent()
- func (m *DepartmentMutation) ClearParentID()
- func (m *DepartmentMutation) ClearRemark()
- func (m *DepartmentMutation) ClearStatus()
- func (m *DepartmentMutation) ClearUsers()
- func (m *DepartmentMutation) ClearedEdges() []string
- func (m *DepartmentMutation) ClearedFields() []string
- func (m DepartmentMutation) Client() *Client
- func (m *DepartmentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DepartmentMutation) EdgeCleared(name string) bool
- func (m *DepartmentMutation) Email() (r string, exists bool)
- func (c *DepartmentMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *DepartmentMutation) Field(name string) (ent.Value, bool)
- func (m *DepartmentMutation) FieldCleared(name string) bool
- func (m *DepartmentMutation) Fields() []string
- func (m *DepartmentMutation) ID() (id uint64, exists bool)
- func (m *DepartmentMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *DepartmentMutation) Leader() (r string, exists bool)
- func (m *DepartmentMutation) Name() (r string, exists bool)
- func (m *DepartmentMutation) OldAncestors(ctx context.Context) (v string, err error)
- func (m *DepartmentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DepartmentMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *DepartmentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DepartmentMutation) OldLeader(ctx context.Context) (v string, err error)
- func (m *DepartmentMutation) OldName(ctx context.Context) (v string, err error)
- func (m *DepartmentMutation) OldParentID(ctx context.Context) (v uint64, err error)
- func (m *DepartmentMutation) OldPhone(ctx context.Context) (v string, err error)
- func (m *DepartmentMutation) OldRemark(ctx context.Context) (v string, err error)
- func (m *DepartmentMutation) OldSort(ctx context.Context) (v uint32, err error)
- func (m *DepartmentMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *DepartmentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DepartmentMutation) Op() Op
- func (m *DepartmentMutation) ParentCleared() bool
- func (m *DepartmentMutation) ParentID() (r uint64, exists bool)
- func (m *DepartmentMutation) ParentIDCleared() bool
- func (m *DepartmentMutation) ParentIDs() (ids []uint64)
- func (m *DepartmentMutation) Phone() (r string, exists bool)
- func (c *DepartmentMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *DepartmentMutation) Remark() (r string, exists bool)
- func (m *DepartmentMutation) RemarkCleared() bool
- func (m *DepartmentMutation) RemoveChildIDs(ids ...uint64)
- func (m *DepartmentMutation) RemoveUserIDs(ids ...uuid.UUID)
- func (m *DepartmentMutation) RemovedChildrenIDs() (ids []uint64)
- func (m *DepartmentMutation) RemovedEdges() []string
- func (m *DepartmentMutation) RemovedIDs(name string) []ent.Value
- func (m *DepartmentMutation) RemovedUsersIDs() (ids []uuid.UUID)
- func (m *DepartmentMutation) ResetAncestors()
- func (m *DepartmentMutation) ResetChildren()
- func (m *DepartmentMutation) ResetCreatedAt()
- func (m *DepartmentMutation) ResetEdge(name string) error
- func (m *DepartmentMutation) ResetEmail()
- func (m *DepartmentMutation) ResetField(name string) error
- func (m *DepartmentMutation) ResetLeader()
- func (m *DepartmentMutation) ResetName()
- func (m *DepartmentMutation) ResetParent()
- func (m *DepartmentMutation) ResetParentID()
- func (m *DepartmentMutation) ResetPhone()
- func (m *DepartmentMutation) ResetRemark()
- func (m *DepartmentMutation) ResetSort()
- func (m *DepartmentMutation) ResetStatus()
- func (m *DepartmentMutation) ResetUpdatedAt()
- func (m *DepartmentMutation) ResetUsers()
- func (m *DepartmentMutation) SetAncestors(s string)
- func (m *DepartmentMutation) SetCreatedAt(t time.Time)
- func (m *DepartmentMutation) SetEmail(s string)
- func (m *DepartmentMutation) SetField(name string, value ent.Value) error
- func (m *DepartmentMutation) SetID(id uint64)
- func (m *DepartmentMutation) SetLeader(s string)
- func (m *DepartmentMutation) SetName(s string)
- func (m *DepartmentMutation) SetOp(op Op)
- func (m *DepartmentMutation) SetParentID(u uint64)
- func (m *DepartmentMutation) SetPhone(s string)
- func (m *DepartmentMutation) SetRemark(s string)
- func (m *DepartmentMutation) SetSort(u uint32)
- func (m *DepartmentMutation) SetStatus(u uint8)
- func (m *DepartmentMutation) SetUpdatedAt(t time.Time)
- func (m *DepartmentMutation) Sort() (r uint32, exists bool)
- func (m *DepartmentMutation) Status() (r uint8, exists bool)
- func (m *DepartmentMutation) StatusCleared() bool
- func (m DepartmentMutation) Tx() (*Tx, error)
- func (m *DepartmentMutation) Type() string
- func (m *DepartmentMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DepartmentMutation) UsersCleared() bool
- func (m *DepartmentMutation) UsersIDs() (ids []uuid.UUID)
- func (m *DepartmentMutation) Where(ps ...predicate.Department)
- func (m *DepartmentMutation) WhereP(ps ...func(*sql.Selector))
- type DepartmentPageList
- type DepartmentPager
- type DepartmentPaginateOption
- type DepartmentQuery
- func (dq *DepartmentQuery) Aggregate(fns ...AggregateFunc) *DepartmentSelect
- func (dq *DepartmentQuery) All(ctx context.Context) ([]*Department, error)
- func (dq *DepartmentQuery) AllX(ctx context.Context) []*Department
- func (dq *DepartmentQuery) Clone() *DepartmentQuery
- func (dq *DepartmentQuery) Count(ctx context.Context) (int, error)
- func (dq *DepartmentQuery) CountX(ctx context.Context) int
- func (c *DepartmentQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dq *DepartmentQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DepartmentQuery) ExistX(ctx context.Context) bool
- func (dq *DepartmentQuery) First(ctx context.Context) (*Department, error)
- func (dq *DepartmentQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (dq *DepartmentQuery) FirstIDX(ctx context.Context) uint64
- func (dq *DepartmentQuery) FirstX(ctx context.Context) *Department
- func (dq *DepartmentQuery) GroupBy(field string, fields ...string) *DepartmentGroupBy
- func (dq *DepartmentQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (dq *DepartmentQuery) IDsX(ctx context.Context) []uint64
- func (dq *DepartmentQuery) Limit(limit int) *DepartmentQuery
- func (dq *DepartmentQuery) Offset(offset int) *DepartmentQuery
- func (dq *DepartmentQuery) Only(ctx context.Context) (*Department, error)
- func (dq *DepartmentQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (dq *DepartmentQuery) OnlyIDX(ctx context.Context) uint64
- func (dq *DepartmentQuery) OnlyX(ctx context.Context) *Department
- func (dq *DepartmentQuery) Order(o ...department.OrderOption) *DepartmentQuery
- func (d *DepartmentQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*DepartmentPageList, error)
- func (dq *DepartmentQuery) QueryChildren() *DepartmentQuery
- func (c *DepartmentQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dq *DepartmentQuery) QueryParent() *DepartmentQuery
- func (dq *DepartmentQuery) QueryUsers() *UserQuery
- func (dq *DepartmentQuery) Select(fields ...string) *DepartmentSelect
- func (dq *DepartmentQuery) Unique(unique bool) *DepartmentQuery
- func (dq *DepartmentQuery) Where(ps ...predicate.Department) *DepartmentQuery
- func (dq *DepartmentQuery) WithChildren(opts ...func(*DepartmentQuery)) *DepartmentQuery
- func (dq *DepartmentQuery) WithParent(opts ...func(*DepartmentQuery)) *DepartmentQuery
- func (dq *DepartmentQuery) WithUsers(opts ...func(*UserQuery)) *DepartmentQuery
- type DepartmentSelect
- func (ds *DepartmentSelect) Aggregate(fns ...AggregateFunc) *DepartmentSelect
- func (s *DepartmentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DepartmentSelect) BoolX(ctx context.Context) bool
- func (s *DepartmentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DepartmentSelect) BoolsX(ctx context.Context) []bool
- func (c DepartmentSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *DepartmentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DepartmentSelect) Float64X(ctx context.Context) float64
- func (s *DepartmentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DepartmentSelect) Float64sX(ctx context.Context) []float64
- func (s *DepartmentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DepartmentSelect) IntX(ctx context.Context) int
- func (s *DepartmentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DepartmentSelect) IntsX(ctx context.Context) []int
- func (c DepartmentSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ds *DepartmentSelect) Scan(ctx context.Context, v any) error
- func (s *DepartmentSelect) ScanX(ctx context.Context, v any)
- func (s *DepartmentSelect) String(ctx context.Context) (_ string, err error)
- func (s *DepartmentSelect) StringX(ctx context.Context) string
- func (s *DepartmentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DepartmentSelect) StringsX(ctx context.Context) []string
- type DepartmentUpdate
- func (du *DepartmentUpdate) AddChildIDs(ids ...uint64) *DepartmentUpdate
- func (du *DepartmentUpdate) AddChildren(d ...*Department) *DepartmentUpdate
- func (du *DepartmentUpdate) AddSort(u int32) *DepartmentUpdate
- func (du *DepartmentUpdate) AddStatus(u int8) *DepartmentUpdate
- func (du *DepartmentUpdate) AddUserIDs(ids ...uuid.UUID) *DepartmentUpdate
- func (du *DepartmentUpdate) AddUsers(u ...*User) *DepartmentUpdate
- func (du *DepartmentUpdate) ClearAncestors() *DepartmentUpdate
- func (du *DepartmentUpdate) ClearChildren() *DepartmentUpdate
- func (du *DepartmentUpdate) ClearParent() *DepartmentUpdate
- func (du *DepartmentUpdate) ClearParentID() *DepartmentUpdate
- func (du *DepartmentUpdate) ClearRemark() *DepartmentUpdate
- func (du *DepartmentUpdate) ClearStatus() *DepartmentUpdate
- func (du *DepartmentUpdate) ClearUsers() *DepartmentUpdate
- func (du *DepartmentUpdate) Exec(ctx context.Context) error
- func (c *DepartmentUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (du *DepartmentUpdate) ExecX(ctx context.Context)
- func (du *DepartmentUpdate) Mutation() *DepartmentMutation
- func (c *DepartmentUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (du *DepartmentUpdate) RemoveChildIDs(ids ...uint64) *DepartmentUpdate
- func (du *DepartmentUpdate) RemoveChildren(d ...*Department) *DepartmentUpdate
- func (du *DepartmentUpdate) RemoveUserIDs(ids ...uuid.UUID) *DepartmentUpdate
- func (du *DepartmentUpdate) RemoveUsers(u ...*User) *DepartmentUpdate
- func (du *DepartmentUpdate) Save(ctx context.Context) (int, error)
- func (du *DepartmentUpdate) SaveX(ctx context.Context) int
- func (du *DepartmentUpdate) SetAncestors(s string) *DepartmentUpdate
- func (du *DepartmentUpdate) SetEmail(s string) *DepartmentUpdate
- func (du *DepartmentUpdate) SetLeader(s string) *DepartmentUpdate
- func (du *DepartmentUpdate) SetName(s string) *DepartmentUpdate
- func (du *DepartmentUpdate) SetNillableAncestors(s *string) *DepartmentUpdate
- func (du *DepartmentUpdate) SetNillableParentID(u *uint64) *DepartmentUpdate
- func (du *DepartmentUpdate) SetNillableRemark(s *string) *DepartmentUpdate
- func (du *DepartmentUpdate) SetNillableSort(u *uint32) *DepartmentUpdate
- func (du *DepartmentUpdate) SetNillableStatus(u *uint8) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotEmptyAncestors(value string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotEmptyEmail(value string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotEmptyLeader(value string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotEmptyName(value string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotEmptyParentID(value uint64) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotEmptyPhone(value string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotEmptyRemark(value string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotEmptySort(value uint32) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotEmptyStatus(value uint8) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotNilAncestors(value *string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotNilEmail(value *string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotNilLeader(value *string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotNilName(value *string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotNilParentID(value *uint64) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotNilPhone(value *string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotNilRemark(value *string) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotNilSort(value *uint32) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotNilStatus(value *uint8) *DepartmentUpdate
- func (d *DepartmentUpdate) SetNotNilUpdatedAt(value *time.Time) *DepartmentUpdate
- func (du *DepartmentUpdate) SetParent(d *Department) *DepartmentUpdate
- func (du *DepartmentUpdate) SetParentID(u uint64) *DepartmentUpdate
- func (du *DepartmentUpdate) SetPhone(s string) *DepartmentUpdate
- func (du *DepartmentUpdate) SetRemark(s string) *DepartmentUpdate
- func (du *DepartmentUpdate) SetSort(u uint32) *DepartmentUpdate
- func (du *DepartmentUpdate) SetStatus(u uint8) *DepartmentUpdate
- func (du *DepartmentUpdate) SetUpdatedAt(t time.Time) *DepartmentUpdate
- func (du *DepartmentUpdate) Where(ps ...predicate.Department) *DepartmentUpdate
- type DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) AddChildIDs(ids ...uint64) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) AddChildren(d ...*Department) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) AddSort(u int32) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) AddStatus(u int8) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) AddUserIDs(ids ...uuid.UUID) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) AddUsers(u ...*User) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) ClearAncestors() *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) ClearChildren() *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) ClearParent() *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) ClearParentID() *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) ClearRemark() *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) ClearStatus() *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) ClearUsers() *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) Exec(ctx context.Context) error
- func (c *DepartmentUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (duo *DepartmentUpdateOne) ExecX(ctx context.Context)
- func (duo *DepartmentUpdateOne) Mutation() *DepartmentMutation
- func (c *DepartmentUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (duo *DepartmentUpdateOne) RemoveChildIDs(ids ...uint64) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) RemoveChildren(d ...*Department) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) RemoveUsers(u ...*User) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) Save(ctx context.Context) (*Department, error)
- func (duo *DepartmentUpdateOne) SaveX(ctx context.Context) *Department
- func (duo *DepartmentUpdateOne) Select(field string, fields ...string) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetAncestors(s string) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetEmail(s string) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetLeader(s string) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetName(s string) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetNillableAncestors(s *string) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetNillableParentID(u *uint64) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetNillableRemark(s *string) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetNillableSort(u *uint32) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetNillableStatus(u *uint8) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotEmptyAncestors(value string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotEmptyEmail(value string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotEmptyLeader(value string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotEmptyName(value string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotEmptyParentID(value uint64) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotEmptyPhone(value string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotEmptyRemark(value string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotEmptySort(value uint32) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotEmptyStatus(value uint8) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotNilAncestors(value *string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotNilEmail(value *string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotNilLeader(value *string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotNilName(value *string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotNilParentID(value *uint64) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotNilPhone(value *string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotNilRemark(value *string) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotNilSort(value *uint32) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotNilStatus(value *uint8) *DepartmentUpdateOne
- func (d *DepartmentUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetParent(d *Department) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetParentID(u uint64) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetPhone(s string) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetRemark(s string) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetSort(u uint32) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetStatus(u uint8) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) SetUpdatedAt(t time.Time) *DepartmentUpdateOne
- func (duo *DepartmentUpdateOne) Where(ps ...predicate.Department) *DepartmentUpdateOne
- type Departments
- type Dictionaries
- type Dictionary
- func (c *Dictionary) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Dictionary) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (d *Dictionary) QueryDictionaryDetails() *DictionaryDetailQuery
- func (d *Dictionary) String() string
- func (d *Dictionary) Unwrap() *Dictionary
- func (d *Dictionary) Update() *DictionaryUpdateOne
- func (d *Dictionary) Value(name string) (ent.Value, error)
- type DictionaryClient
- func (c *DictionaryClient) Create() *DictionaryCreate
- func (c *DictionaryClient) CreateBulk(builders ...*DictionaryCreate) *DictionaryCreateBulk
- func (c *DictionaryClient) Delete() *DictionaryDelete
- func (c *DictionaryClient) DeleteOne(d *Dictionary) *DictionaryDeleteOne
- func (c *DictionaryClient) DeleteOneID(id uint64) *DictionaryDeleteOne
- func (c *DictionaryClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *DictionaryClient) Get(ctx context.Context, id uint64) (*Dictionary, error)
- func (c *DictionaryClient) GetX(ctx context.Context, id uint64) *Dictionary
- func (c *DictionaryClient) Hooks() []Hook
- func (c *DictionaryClient) Intercept(interceptors ...Interceptor)
- func (c *DictionaryClient) Interceptors() []Interceptor
- func (c *DictionaryClient) Query() *DictionaryQuery
- func (c *DictionaryClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *DictionaryClient) QueryDictionaryDetails(d *Dictionary) *DictionaryDetailQuery
- func (c *DictionaryClient) Update() *DictionaryUpdate
- func (c *DictionaryClient) UpdateOne(d *Dictionary) *DictionaryUpdateOne
- func (c *DictionaryClient) UpdateOneID(id uint64) *DictionaryUpdateOne
- func (c *DictionaryClient) Use(hooks ...Hook)
- type DictionaryCreate
- func (dc *DictionaryCreate) AddDictionaryDetailIDs(ids ...uint64) *DictionaryCreate
- func (dc *DictionaryCreate) AddDictionaryDetails(d ...*DictionaryDetail) *DictionaryCreate
- func (dc *DictionaryCreate) Exec(ctx context.Context) error
- func (c *DictionaryCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dc *DictionaryCreate) ExecX(ctx context.Context)
- func (dc *DictionaryCreate) Mutation() *DictionaryMutation
- func (c *DictionaryCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dc *DictionaryCreate) Save(ctx context.Context) (*Dictionary, error)
- func (dc *DictionaryCreate) SaveX(ctx context.Context) *Dictionary
- func (dc *DictionaryCreate) SetCreatedAt(t time.Time) *DictionaryCreate
- func (dc *DictionaryCreate) SetDesc(s string) *DictionaryCreate
- func (dc *DictionaryCreate) SetID(u uint64) *DictionaryCreate
- func (dc *DictionaryCreate) SetName(s string) *DictionaryCreate
- func (dc *DictionaryCreate) SetNillableCreatedAt(t *time.Time) *DictionaryCreate
- func (dc *DictionaryCreate) SetNillableDesc(s *string) *DictionaryCreate
- func (dc *DictionaryCreate) SetNillableStatus(u *uint8) *DictionaryCreate
- func (dc *DictionaryCreate) SetNillableUpdatedAt(t *time.Time) *DictionaryCreate
- func (d *DictionaryCreate) SetNotNilDesc(value *string) *DictionaryCreate
- func (d *DictionaryCreate) SetNotNilName(value *string) *DictionaryCreate
- func (d *DictionaryCreate) SetNotNilStatus(value *uint8) *DictionaryCreate
- func (d *DictionaryCreate) SetNotNilTitle(value *string) *DictionaryCreate
- func (d *DictionaryCreate) SetNotNilUpdatedAt(value *time.Time) *DictionaryCreate
- func (dc *DictionaryCreate) SetStatus(u uint8) *DictionaryCreate
- func (dc *DictionaryCreate) SetTitle(s string) *DictionaryCreate
- func (dc *DictionaryCreate) SetUpdatedAt(t time.Time) *DictionaryCreate
- type DictionaryCreateBulk
- func (dcb *DictionaryCreateBulk) Exec(ctx context.Context) error
- func (c *DictionaryCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dcb *DictionaryCreateBulk) ExecX(ctx context.Context)
- func (c *DictionaryCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dcb *DictionaryCreateBulk) Save(ctx context.Context) ([]*Dictionary, error)
- func (dcb *DictionaryCreateBulk) SaveX(ctx context.Context) []*Dictionary
- type DictionaryDelete
- func (dd *DictionaryDelete) Exec(ctx context.Context) (int, error)
- func (c *DictionaryDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dd *DictionaryDelete) ExecX(ctx context.Context) int
- func (c *DictionaryDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dd *DictionaryDelete) Where(ps ...predicate.Dictionary) *DictionaryDelete
- type DictionaryDeleteOne
- type DictionaryDetail
- func (c *DictionaryDetail) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dd *DictionaryDetail) GetValue(name string) (ent.Value, error)
- func (c *DictionaryDetail) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dd *DictionaryDetail) QueryDictionaries() *DictionaryQuery
- func (dd *DictionaryDetail) String() string
- func (dd *DictionaryDetail) Unwrap() *DictionaryDetail
- func (dd *DictionaryDetail) Update() *DictionaryDetailUpdateOne
- type DictionaryDetailClient
- func (c *DictionaryDetailClient) Create() *DictionaryDetailCreate
- func (c *DictionaryDetailClient) CreateBulk(builders ...*DictionaryDetailCreate) *DictionaryDetailCreateBulk
- func (c *DictionaryDetailClient) Delete() *DictionaryDetailDelete
- func (c *DictionaryDetailClient) DeleteOne(dd *DictionaryDetail) *DictionaryDetailDeleteOne
- func (c *DictionaryDetailClient) DeleteOneID(id uint64) *DictionaryDetailDeleteOne
- func (c *DictionaryDetailClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *DictionaryDetailClient) Get(ctx context.Context, id uint64) (*DictionaryDetail, error)
- func (c *DictionaryDetailClient) GetX(ctx context.Context, id uint64) *DictionaryDetail
- func (c *DictionaryDetailClient) Hooks() []Hook
- func (c *DictionaryDetailClient) Intercept(interceptors ...Interceptor)
- func (c *DictionaryDetailClient) Interceptors() []Interceptor
- func (c *DictionaryDetailClient) Query() *DictionaryDetailQuery
- func (c *DictionaryDetailClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *DictionaryDetailClient) QueryDictionaries(dd *DictionaryDetail) *DictionaryQuery
- func (c *DictionaryDetailClient) Update() *DictionaryDetailUpdate
- func (c *DictionaryDetailClient) UpdateOne(dd *DictionaryDetail) *DictionaryDetailUpdateOne
- func (c *DictionaryDetailClient) UpdateOneID(id uint64) *DictionaryDetailUpdateOne
- func (c *DictionaryDetailClient) Use(hooks ...Hook)
- type DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) Exec(ctx context.Context) error
- func (c *DictionaryDetailCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ddc *DictionaryDetailCreate) ExecX(ctx context.Context)
- func (ddc *DictionaryDetailCreate) Mutation() *DictionaryDetailMutation
- func (c *DictionaryDetailCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ddc *DictionaryDetailCreate) Save(ctx context.Context) (*DictionaryDetail, error)
- func (ddc *DictionaryDetailCreate) SaveX(ctx context.Context) *DictionaryDetail
- func (ddc *DictionaryDetailCreate) SetCreatedAt(t time.Time) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetDictionaries(d *Dictionary) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetDictionariesID(id uint64) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetDictionaryID(u uint64) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetID(u uint64) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetKey(s string) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetNillableCreatedAt(t *time.Time) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetNillableDictionariesID(id *uint64) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetNillableDictionaryID(u *uint64) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetNillableSort(u *uint32) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetNillableStatus(u *uint8) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetNillableUpdatedAt(t *time.Time) *DictionaryDetailCreate
- func (dd *DictionaryDetailCreate) SetNotNilDictionaryID(value *uint64) *DictionaryDetailCreate
- func (dd *DictionaryDetailCreate) SetNotNilKey(value *string) *DictionaryDetailCreate
- func (dd *DictionaryDetailCreate) SetNotNilSort(value *uint32) *DictionaryDetailCreate
- func (dd *DictionaryDetailCreate) SetNotNilStatus(value *uint8) *DictionaryDetailCreate
- func (dd *DictionaryDetailCreate) SetNotNilTitle(value *string) *DictionaryDetailCreate
- func (dd *DictionaryDetailCreate) SetNotNilUpdatedAt(value *time.Time) *DictionaryDetailCreate
- func (dd *DictionaryDetailCreate) SetNotNilValue(value *string) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetSort(u uint32) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetStatus(u uint8) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetTitle(s string) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetUpdatedAt(t time.Time) *DictionaryDetailCreate
- func (ddc *DictionaryDetailCreate) SetValue(s string) *DictionaryDetailCreate
- type DictionaryDetailCreateBulk
- func (ddcb *DictionaryDetailCreateBulk) Exec(ctx context.Context) error
- func (c *DictionaryDetailCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ddcb *DictionaryDetailCreateBulk) ExecX(ctx context.Context)
- func (c *DictionaryDetailCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ddcb *DictionaryDetailCreateBulk) Save(ctx context.Context) ([]*DictionaryDetail, error)
- func (ddcb *DictionaryDetailCreateBulk) SaveX(ctx context.Context) []*DictionaryDetail
- type DictionaryDetailDelete
- func (ddd *DictionaryDetailDelete) Exec(ctx context.Context) (int, error)
- func (c *DictionaryDetailDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ddd *DictionaryDetailDelete) ExecX(ctx context.Context) int
- func (c *DictionaryDetailDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ddd *DictionaryDetailDelete) Where(ps ...predicate.DictionaryDetail) *DictionaryDetailDelete
- type DictionaryDetailDeleteOne
- type DictionaryDetailEdges
- type DictionaryDetailGroupBy
- func (ddgb *DictionaryDetailGroupBy) Aggregate(fns ...AggregateFunc) *DictionaryDetailGroupBy
- func (s *DictionaryDetailGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DictionaryDetailGroupBy) BoolX(ctx context.Context) bool
- func (s *DictionaryDetailGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DictionaryDetailGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DictionaryDetailGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DictionaryDetailGroupBy) Float64X(ctx context.Context) float64
- func (s *DictionaryDetailGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DictionaryDetailGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DictionaryDetailGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DictionaryDetailGroupBy) IntX(ctx context.Context) int
- func (s *DictionaryDetailGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DictionaryDetailGroupBy) IntsX(ctx context.Context) []int
- func (ddgb *DictionaryDetailGroupBy) Scan(ctx context.Context, v any) error
- func (s *DictionaryDetailGroupBy) ScanX(ctx context.Context, v any)
- func (s *DictionaryDetailGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DictionaryDetailGroupBy) StringX(ctx context.Context) string
- func (s *DictionaryDetailGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DictionaryDetailGroupBy) StringsX(ctx context.Context) []string
- type DictionaryDetailMutation
- func (m *DictionaryDetailMutation) AddField(name string, value ent.Value) error
- func (m *DictionaryDetailMutation) AddSort(u int32)
- func (m *DictionaryDetailMutation) AddStatus(u int8)
- func (m *DictionaryDetailMutation) AddedEdges() []string
- func (m *DictionaryDetailMutation) AddedField(name string) (ent.Value, bool)
- func (m *DictionaryDetailMutation) AddedFields() []string
- func (m *DictionaryDetailMutation) AddedIDs(name string) []ent.Value
- func (m *DictionaryDetailMutation) AddedSort() (r int32, exists bool)
- func (m *DictionaryDetailMutation) AddedStatus() (r int8, exists bool)
- func (m *DictionaryDetailMutation) ClearDictionaries()
- func (m *DictionaryDetailMutation) ClearDictionaryID()
- func (m *DictionaryDetailMutation) ClearEdge(name string) error
- func (m *DictionaryDetailMutation) ClearField(name string) error
- func (m *DictionaryDetailMutation) ClearStatus()
- func (m *DictionaryDetailMutation) ClearedEdges() []string
- func (m *DictionaryDetailMutation) ClearedFields() []string
- func (m DictionaryDetailMutation) Client() *Client
- func (m *DictionaryDetailMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DictionaryDetailMutation) DictionariesCleared() bool
- func (m *DictionaryDetailMutation) DictionariesID() (id uint64, exists bool)
- func (m *DictionaryDetailMutation) DictionariesIDs() (ids []uint64)
- func (m *DictionaryDetailMutation) DictionaryID() (r uint64, exists bool)
- func (m *DictionaryDetailMutation) DictionaryIDCleared() bool
- func (m *DictionaryDetailMutation) EdgeCleared(name string) bool
- func (c *DictionaryDetailMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *DictionaryDetailMutation) Field(name string) (ent.Value, bool)
- func (m *DictionaryDetailMutation) FieldCleared(name string) bool
- func (m *DictionaryDetailMutation) Fields() []string
- func (m *DictionaryDetailMutation) ID() (id uint64, exists bool)
- func (m *DictionaryDetailMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *DictionaryDetailMutation) Key() (r string, exists bool)
- func (m *DictionaryDetailMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DictionaryDetailMutation) OldDictionaryID(ctx context.Context) (v uint64, err error)
- func (m *DictionaryDetailMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DictionaryDetailMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *DictionaryDetailMutation) OldSort(ctx context.Context) (v uint32, err error)
- func (m *DictionaryDetailMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *DictionaryDetailMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *DictionaryDetailMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DictionaryDetailMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *DictionaryDetailMutation) Op() Op
- func (c *DictionaryDetailMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *DictionaryDetailMutation) RemovedEdges() []string
- func (m *DictionaryDetailMutation) RemovedIDs(name string) []ent.Value
- func (m *DictionaryDetailMutation) ResetCreatedAt()
- func (m *DictionaryDetailMutation) ResetDictionaries()
- func (m *DictionaryDetailMutation) ResetDictionaryID()
- func (m *DictionaryDetailMutation) ResetEdge(name string) error
- func (m *DictionaryDetailMutation) ResetField(name string) error
- func (m *DictionaryDetailMutation) ResetKey()
- func (m *DictionaryDetailMutation) ResetSort()
- func (m *DictionaryDetailMutation) ResetStatus()
- func (m *DictionaryDetailMutation) ResetTitle()
- func (m *DictionaryDetailMutation) ResetUpdatedAt()
- func (m *DictionaryDetailMutation) ResetValue()
- func (m *DictionaryDetailMutation) SetCreatedAt(t time.Time)
- func (m *DictionaryDetailMutation) SetDictionariesID(id uint64)
- func (m *DictionaryDetailMutation) SetDictionaryID(u uint64)
- func (m *DictionaryDetailMutation) SetField(name string, value ent.Value) error
- func (m *DictionaryDetailMutation) SetID(id uint64)
- func (m *DictionaryDetailMutation) SetKey(s string)
- func (m *DictionaryDetailMutation) SetOp(op Op)
- func (m *DictionaryDetailMutation) SetSort(u uint32)
- func (m *DictionaryDetailMutation) SetStatus(u uint8)
- func (m *DictionaryDetailMutation) SetTitle(s string)
- func (m *DictionaryDetailMutation) SetUpdatedAt(t time.Time)
- func (m *DictionaryDetailMutation) SetValue(s string)
- func (m *DictionaryDetailMutation) Sort() (r uint32, exists bool)
- func (m *DictionaryDetailMutation) Status() (r uint8, exists bool)
- func (m *DictionaryDetailMutation) StatusCleared() bool
- func (m *DictionaryDetailMutation) Title() (r string, exists bool)
- func (m DictionaryDetailMutation) Tx() (*Tx, error)
- func (m *DictionaryDetailMutation) Type() string
- func (m *DictionaryDetailMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DictionaryDetailMutation) Value() (r string, exists bool)
- func (m *DictionaryDetailMutation) Where(ps ...predicate.DictionaryDetail)
- func (m *DictionaryDetailMutation) WhereP(ps ...func(*sql.Selector))
- type DictionaryDetailPageList
- type DictionaryDetailPager
- type DictionaryDetailPaginateOption
- type DictionaryDetailQuery
- func (ddq *DictionaryDetailQuery) Aggregate(fns ...AggregateFunc) *DictionaryDetailSelect
- func (ddq *DictionaryDetailQuery) All(ctx context.Context) ([]*DictionaryDetail, error)
- func (ddq *DictionaryDetailQuery) AllX(ctx context.Context) []*DictionaryDetail
- func (ddq *DictionaryDetailQuery) Clone() *DictionaryDetailQuery
- func (ddq *DictionaryDetailQuery) Count(ctx context.Context) (int, error)
- func (ddq *DictionaryDetailQuery) CountX(ctx context.Context) int
- func (c *DictionaryDetailQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ddq *DictionaryDetailQuery) Exist(ctx context.Context) (bool, error)
- func (ddq *DictionaryDetailQuery) ExistX(ctx context.Context) bool
- func (ddq *DictionaryDetailQuery) First(ctx context.Context) (*DictionaryDetail, error)
- func (ddq *DictionaryDetailQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (ddq *DictionaryDetailQuery) FirstIDX(ctx context.Context) uint64
- func (ddq *DictionaryDetailQuery) FirstX(ctx context.Context) *DictionaryDetail
- func (ddq *DictionaryDetailQuery) GroupBy(field string, fields ...string) *DictionaryDetailGroupBy
- func (ddq *DictionaryDetailQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (ddq *DictionaryDetailQuery) IDsX(ctx context.Context) []uint64
- func (ddq *DictionaryDetailQuery) Limit(limit int) *DictionaryDetailQuery
- func (ddq *DictionaryDetailQuery) Offset(offset int) *DictionaryDetailQuery
- func (ddq *DictionaryDetailQuery) Only(ctx context.Context) (*DictionaryDetail, error)
- func (ddq *DictionaryDetailQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (ddq *DictionaryDetailQuery) OnlyIDX(ctx context.Context) uint64
- func (ddq *DictionaryDetailQuery) OnlyX(ctx context.Context) *DictionaryDetail
- func (ddq *DictionaryDetailQuery) Order(o ...dictionarydetail.OrderOption) *DictionaryDetailQuery
- func (dd *DictionaryDetailQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*DictionaryDetailPageList, error)
- func (c *DictionaryDetailQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ddq *DictionaryDetailQuery) QueryDictionaries() *DictionaryQuery
- func (ddq *DictionaryDetailQuery) Select(fields ...string) *DictionaryDetailSelect
- func (ddq *DictionaryDetailQuery) Unique(unique bool) *DictionaryDetailQuery
- func (ddq *DictionaryDetailQuery) Where(ps ...predicate.DictionaryDetail) *DictionaryDetailQuery
- func (ddq *DictionaryDetailQuery) WithDictionaries(opts ...func(*DictionaryQuery)) *DictionaryDetailQuery
- type DictionaryDetailSelect
- func (dds *DictionaryDetailSelect) Aggregate(fns ...AggregateFunc) *DictionaryDetailSelect
- func (s *DictionaryDetailSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DictionaryDetailSelect) BoolX(ctx context.Context) bool
- func (s *DictionaryDetailSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DictionaryDetailSelect) BoolsX(ctx context.Context) []bool
- func (c DictionaryDetailSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *DictionaryDetailSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DictionaryDetailSelect) Float64X(ctx context.Context) float64
- func (s *DictionaryDetailSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DictionaryDetailSelect) Float64sX(ctx context.Context) []float64
- func (s *DictionaryDetailSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DictionaryDetailSelect) IntX(ctx context.Context) int
- func (s *DictionaryDetailSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DictionaryDetailSelect) IntsX(ctx context.Context) []int
- func (c DictionaryDetailSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dds *DictionaryDetailSelect) Scan(ctx context.Context, v any) error
- func (s *DictionaryDetailSelect) ScanX(ctx context.Context, v any)
- func (s *DictionaryDetailSelect) String(ctx context.Context) (_ string, err error)
- func (s *DictionaryDetailSelect) StringX(ctx context.Context) string
- func (s *DictionaryDetailSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DictionaryDetailSelect) StringsX(ctx context.Context) []string
- type DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) AddSort(u int32) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) AddStatus(u int8) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) ClearDictionaries() *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) ClearDictionaryID() *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) ClearStatus() *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) Exec(ctx context.Context) error
- func (c *DictionaryDetailUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ddu *DictionaryDetailUpdate) ExecX(ctx context.Context)
- func (ddu *DictionaryDetailUpdate) Mutation() *DictionaryDetailMutation
- func (c *DictionaryDetailUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ddu *DictionaryDetailUpdate) Save(ctx context.Context) (int, error)
- func (ddu *DictionaryDetailUpdate) SaveX(ctx context.Context) int
- func (ddu *DictionaryDetailUpdate) SetDictionaries(d *Dictionary) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetDictionariesID(id uint64) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetDictionaryID(u uint64) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetKey(s string) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetNillableDictionariesID(id *uint64) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetNillableDictionaryID(u *uint64) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetNillableSort(u *uint32) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetNillableStatus(u *uint8) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotEmptyDictionaryID(value uint64) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotEmptyKey(value string) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotEmptySort(value uint32) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotEmptyStatus(value uint8) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotEmptyTitle(value string) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotEmptyValue(value string) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotNilDictionaryID(value *uint64) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotNilKey(value *string) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotNilSort(value *uint32) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotNilStatus(value *uint8) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotNilTitle(value *string) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotNilUpdatedAt(value *time.Time) *DictionaryDetailUpdate
- func (dd *DictionaryDetailUpdate) SetNotNilValue(value *string) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetSort(u uint32) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetStatus(u uint8) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetTitle(s string) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetUpdatedAt(t time.Time) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) SetValue(s string) *DictionaryDetailUpdate
- func (ddu *DictionaryDetailUpdate) Where(ps ...predicate.DictionaryDetail) *DictionaryDetailUpdate
- type DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) AddSort(u int32) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) AddStatus(u int8) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) ClearDictionaries() *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) ClearDictionaryID() *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) ClearStatus() *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) Exec(ctx context.Context) error
- func (c *DictionaryDetailUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dduo *DictionaryDetailUpdateOne) ExecX(ctx context.Context)
- func (dduo *DictionaryDetailUpdateOne) Mutation() *DictionaryDetailMutation
- func (c *DictionaryDetailUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dduo *DictionaryDetailUpdateOne) Save(ctx context.Context) (*DictionaryDetail, error)
- func (dduo *DictionaryDetailUpdateOne) SaveX(ctx context.Context) *DictionaryDetail
- func (dduo *DictionaryDetailUpdateOne) Select(field string, fields ...string) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetDictionaries(d *Dictionary) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetDictionariesID(id uint64) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetDictionaryID(u uint64) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetKey(s string) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetNillableDictionariesID(id *uint64) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetNillableDictionaryID(u *uint64) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetNillableSort(u *uint32) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetNillableStatus(u *uint8) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotEmptyDictionaryID(value uint64) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotEmptyKey(value string) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotEmptySort(value uint32) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotEmptyStatus(value uint8) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotEmptyTitle(value string) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotEmptyValue(value string) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotNilDictionaryID(value *uint64) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotNilKey(value *string) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotNilSort(value *uint32) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotNilStatus(value *uint8) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotNilTitle(value *string) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DictionaryDetailUpdateOne
- func (dd *DictionaryDetailUpdateOne) SetNotNilValue(value *string) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetSort(u uint32) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetStatus(u uint8) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetTitle(s string) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetUpdatedAt(t time.Time) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) SetValue(s string) *DictionaryDetailUpdateOne
- func (dduo *DictionaryDetailUpdateOne) Where(ps ...predicate.DictionaryDetail) *DictionaryDetailUpdateOne
- type DictionaryDetails
- type DictionaryEdges
- type DictionaryGroupBy
- func (dgb *DictionaryGroupBy) Aggregate(fns ...AggregateFunc) *DictionaryGroupBy
- func (s *DictionaryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DictionaryGroupBy) BoolX(ctx context.Context) bool
- func (s *DictionaryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DictionaryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DictionaryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DictionaryGroupBy) Float64X(ctx context.Context) float64
- func (s *DictionaryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DictionaryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DictionaryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DictionaryGroupBy) IntX(ctx context.Context) int
- func (s *DictionaryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DictionaryGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DictionaryGroupBy) Scan(ctx context.Context, v any) error
- func (s *DictionaryGroupBy) ScanX(ctx context.Context, v any)
- func (s *DictionaryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DictionaryGroupBy) StringX(ctx context.Context) string
- func (s *DictionaryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DictionaryGroupBy) StringsX(ctx context.Context) []string
- type DictionaryMutation
- func (m *DictionaryMutation) AddDictionaryDetailIDs(ids ...uint64)
- func (m *DictionaryMutation) AddField(name string, value ent.Value) error
- func (m *DictionaryMutation) AddStatus(u int8)
- func (m *DictionaryMutation) AddedEdges() []string
- func (m *DictionaryMutation) AddedField(name string) (ent.Value, bool)
- func (m *DictionaryMutation) AddedFields() []string
- func (m *DictionaryMutation) AddedIDs(name string) []ent.Value
- func (m *DictionaryMutation) AddedStatus() (r int8, exists bool)
- func (m *DictionaryMutation) ClearDesc()
- func (m *DictionaryMutation) ClearDictionaryDetails()
- func (m *DictionaryMutation) ClearEdge(name string) error
- func (m *DictionaryMutation) ClearField(name string) error
- func (m *DictionaryMutation) ClearStatus()
- func (m *DictionaryMutation) ClearedEdges() []string
- func (m *DictionaryMutation) ClearedFields() []string
- func (m DictionaryMutation) Client() *Client
- func (m *DictionaryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DictionaryMutation) Desc() (r string, exists bool)
- func (m *DictionaryMutation) DescCleared() bool
- func (m *DictionaryMutation) DictionaryDetailsCleared() bool
- func (m *DictionaryMutation) DictionaryDetailsIDs() (ids []uint64)
- func (m *DictionaryMutation) EdgeCleared(name string) bool
- func (c *DictionaryMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *DictionaryMutation) Field(name string) (ent.Value, bool)
- func (m *DictionaryMutation) FieldCleared(name string) bool
- func (m *DictionaryMutation) Fields() []string
- func (m *DictionaryMutation) ID() (id uint64, exists bool)
- func (m *DictionaryMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *DictionaryMutation) Name() (r string, exists bool)
- func (m *DictionaryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DictionaryMutation) OldDesc(ctx context.Context) (v string, err error)
- func (m *DictionaryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DictionaryMutation) OldName(ctx context.Context) (v string, err error)
- func (m *DictionaryMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *DictionaryMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *DictionaryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *DictionaryMutation) Op() Op
- func (c *DictionaryMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *DictionaryMutation) RemoveDictionaryDetailIDs(ids ...uint64)
- func (m *DictionaryMutation) RemovedDictionaryDetailsIDs() (ids []uint64)
- func (m *DictionaryMutation) RemovedEdges() []string
- func (m *DictionaryMutation) RemovedIDs(name string) []ent.Value
- func (m *DictionaryMutation) ResetCreatedAt()
- func (m *DictionaryMutation) ResetDesc()
- func (m *DictionaryMutation) ResetDictionaryDetails()
- func (m *DictionaryMutation) ResetEdge(name string) error
- func (m *DictionaryMutation) ResetField(name string) error
- func (m *DictionaryMutation) ResetName()
- func (m *DictionaryMutation) ResetStatus()
- func (m *DictionaryMutation) ResetTitle()
- func (m *DictionaryMutation) ResetUpdatedAt()
- func (m *DictionaryMutation) SetCreatedAt(t time.Time)
- func (m *DictionaryMutation) SetDesc(s string)
- func (m *DictionaryMutation) SetField(name string, value ent.Value) error
- func (m *DictionaryMutation) SetID(id uint64)
- func (m *DictionaryMutation) SetName(s string)
- func (m *DictionaryMutation) SetOp(op Op)
- func (m *DictionaryMutation) SetStatus(u uint8)
- func (m *DictionaryMutation) SetTitle(s string)
- func (m *DictionaryMutation) SetUpdatedAt(t time.Time)
- func (m *DictionaryMutation) Status() (r uint8, exists bool)
- func (m *DictionaryMutation) StatusCleared() bool
- func (m *DictionaryMutation) Title() (r string, exists bool)
- func (m DictionaryMutation) Tx() (*Tx, error)
- func (m *DictionaryMutation) Type() string
- func (m *DictionaryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DictionaryMutation) Where(ps ...predicate.Dictionary)
- func (m *DictionaryMutation) WhereP(ps ...func(*sql.Selector))
- type DictionaryPageList
- type DictionaryPager
- type DictionaryPaginateOption
- type DictionaryQuery
- func (dq *DictionaryQuery) Aggregate(fns ...AggregateFunc) *DictionarySelect
- func (dq *DictionaryQuery) All(ctx context.Context) ([]*Dictionary, error)
- func (dq *DictionaryQuery) AllX(ctx context.Context) []*Dictionary
- func (dq *DictionaryQuery) Clone() *DictionaryQuery
- func (dq *DictionaryQuery) Count(ctx context.Context) (int, error)
- func (dq *DictionaryQuery) CountX(ctx context.Context) int
- func (c *DictionaryQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (dq *DictionaryQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DictionaryQuery) ExistX(ctx context.Context) bool
- func (dq *DictionaryQuery) First(ctx context.Context) (*Dictionary, error)
- func (dq *DictionaryQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (dq *DictionaryQuery) FirstIDX(ctx context.Context) uint64
- func (dq *DictionaryQuery) FirstX(ctx context.Context) *Dictionary
- func (dq *DictionaryQuery) GroupBy(field string, fields ...string) *DictionaryGroupBy
- func (dq *DictionaryQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (dq *DictionaryQuery) IDsX(ctx context.Context) []uint64
- func (dq *DictionaryQuery) Limit(limit int) *DictionaryQuery
- func (dq *DictionaryQuery) Offset(offset int) *DictionaryQuery
- func (dq *DictionaryQuery) Only(ctx context.Context) (*Dictionary, error)
- func (dq *DictionaryQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (dq *DictionaryQuery) OnlyIDX(ctx context.Context) uint64
- func (dq *DictionaryQuery) OnlyX(ctx context.Context) *Dictionary
- func (dq *DictionaryQuery) Order(o ...dictionary.OrderOption) *DictionaryQuery
- func (d *DictionaryQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*DictionaryPageList, error)
- func (c *DictionaryQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (dq *DictionaryQuery) QueryDictionaryDetails() *DictionaryDetailQuery
- func (dq *DictionaryQuery) Select(fields ...string) *DictionarySelect
- func (dq *DictionaryQuery) Unique(unique bool) *DictionaryQuery
- func (dq *DictionaryQuery) Where(ps ...predicate.Dictionary) *DictionaryQuery
- func (dq *DictionaryQuery) WithDictionaryDetails(opts ...func(*DictionaryDetailQuery)) *DictionaryQuery
- type DictionarySelect
- func (ds *DictionarySelect) Aggregate(fns ...AggregateFunc) *DictionarySelect
- func (s *DictionarySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DictionarySelect) BoolX(ctx context.Context) bool
- func (s *DictionarySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DictionarySelect) BoolsX(ctx context.Context) []bool
- func (c DictionarySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *DictionarySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DictionarySelect) Float64X(ctx context.Context) float64
- func (s *DictionarySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DictionarySelect) Float64sX(ctx context.Context) []float64
- func (s *DictionarySelect) Int(ctx context.Context) (_ int, err error)
- func (s *DictionarySelect) IntX(ctx context.Context) int
- func (s *DictionarySelect) Ints(ctx context.Context) ([]int, error)
- func (s *DictionarySelect) IntsX(ctx context.Context) []int
- func (c DictionarySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ds *DictionarySelect) Scan(ctx context.Context, v any) error
- func (s *DictionarySelect) ScanX(ctx context.Context, v any)
- func (s *DictionarySelect) String(ctx context.Context) (_ string, err error)
- func (s *DictionarySelect) StringX(ctx context.Context) string
- func (s *DictionarySelect) Strings(ctx context.Context) ([]string, error)
- func (s *DictionarySelect) StringsX(ctx context.Context) []string
- type DictionaryUpdate
- func (du *DictionaryUpdate) AddDictionaryDetailIDs(ids ...uint64) *DictionaryUpdate
- func (du *DictionaryUpdate) AddDictionaryDetails(d ...*DictionaryDetail) *DictionaryUpdate
- func (du *DictionaryUpdate) AddStatus(u int8) *DictionaryUpdate
- func (du *DictionaryUpdate) ClearDesc() *DictionaryUpdate
- func (du *DictionaryUpdate) ClearDictionaryDetails() *DictionaryUpdate
- func (du *DictionaryUpdate) ClearStatus() *DictionaryUpdate
- func (du *DictionaryUpdate) Exec(ctx context.Context) error
- func (c *DictionaryUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (du *DictionaryUpdate) ExecX(ctx context.Context)
- func (du *DictionaryUpdate) Mutation() *DictionaryMutation
- func (c *DictionaryUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (du *DictionaryUpdate) RemoveDictionaryDetailIDs(ids ...uint64) *DictionaryUpdate
- func (du *DictionaryUpdate) RemoveDictionaryDetails(d ...*DictionaryDetail) *DictionaryUpdate
- func (du *DictionaryUpdate) Save(ctx context.Context) (int, error)
- func (du *DictionaryUpdate) SaveX(ctx context.Context) int
- func (du *DictionaryUpdate) SetDesc(s string) *DictionaryUpdate
- func (du *DictionaryUpdate) SetName(s string) *DictionaryUpdate
- func (du *DictionaryUpdate) SetNillableDesc(s *string) *DictionaryUpdate
- func (du *DictionaryUpdate) SetNillableStatus(u *uint8) *DictionaryUpdate
- func (d *DictionaryUpdate) SetNotEmptyDesc(value string) *DictionaryUpdate
- func (d *DictionaryUpdate) SetNotEmptyName(value string) *DictionaryUpdate
- func (d *DictionaryUpdate) SetNotEmptyStatus(value uint8) *DictionaryUpdate
- func (d *DictionaryUpdate) SetNotEmptyTitle(value string) *DictionaryUpdate
- func (d *DictionaryUpdate) SetNotNilDesc(value *string) *DictionaryUpdate
- func (d *DictionaryUpdate) SetNotNilName(value *string) *DictionaryUpdate
- func (d *DictionaryUpdate) SetNotNilStatus(value *uint8) *DictionaryUpdate
- func (d *DictionaryUpdate) SetNotNilTitle(value *string) *DictionaryUpdate
- func (d *DictionaryUpdate) SetNotNilUpdatedAt(value *time.Time) *DictionaryUpdate
- func (du *DictionaryUpdate) SetStatus(u uint8) *DictionaryUpdate
- func (du *DictionaryUpdate) SetTitle(s string) *DictionaryUpdate
- func (du *DictionaryUpdate) SetUpdatedAt(t time.Time) *DictionaryUpdate
- func (du *DictionaryUpdate) Where(ps ...predicate.Dictionary) *DictionaryUpdate
- type DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) AddDictionaryDetailIDs(ids ...uint64) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) AddDictionaryDetails(d ...*DictionaryDetail) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) AddStatus(u int8) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) ClearDesc() *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) ClearDictionaryDetails() *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) ClearStatus() *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) Exec(ctx context.Context) error
- func (c *DictionaryUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (duo *DictionaryUpdateOne) ExecX(ctx context.Context)
- func (duo *DictionaryUpdateOne) Mutation() *DictionaryMutation
- func (c *DictionaryUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (duo *DictionaryUpdateOne) RemoveDictionaryDetailIDs(ids ...uint64) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) RemoveDictionaryDetails(d ...*DictionaryDetail) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) Save(ctx context.Context) (*Dictionary, error)
- func (duo *DictionaryUpdateOne) SaveX(ctx context.Context) *Dictionary
- func (duo *DictionaryUpdateOne) Select(field string, fields ...string) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) SetDesc(s string) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) SetName(s string) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) SetNillableDesc(s *string) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) SetNillableStatus(u *uint8) *DictionaryUpdateOne
- func (d *DictionaryUpdateOne) SetNotEmptyDesc(value string) *DictionaryUpdateOne
- func (d *DictionaryUpdateOne) SetNotEmptyName(value string) *DictionaryUpdateOne
- func (d *DictionaryUpdateOne) SetNotEmptyStatus(value uint8) *DictionaryUpdateOne
- func (d *DictionaryUpdateOne) SetNotEmptyTitle(value string) *DictionaryUpdateOne
- func (d *DictionaryUpdateOne) SetNotNilDesc(value *string) *DictionaryUpdateOne
- func (d *DictionaryUpdateOne) SetNotNilName(value *string) *DictionaryUpdateOne
- func (d *DictionaryUpdateOne) SetNotNilStatus(value *uint8) *DictionaryUpdateOne
- func (d *DictionaryUpdateOne) SetNotNilTitle(value *string) *DictionaryUpdateOne
- func (d *DictionaryUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) SetStatus(u uint8) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) SetTitle(s string) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) SetUpdatedAt(t time.Time) *DictionaryUpdateOne
- func (duo *DictionaryUpdateOne) Where(ps ...predicate.Dictionary) *DictionaryUpdateOne
- type Hook
- type InterceptFunc
- type Interceptor
- type Menu
- func (c *Menu) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *Menu) QueryChildren() *MenuQuery
- func (c *Menu) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *Menu) QueryParent() *MenuQuery
- func (m *Menu) QueryRoles() *RoleQuery
- func (m *Menu) String() string
- func (m *Menu) Unwrap() *Menu
- func (m *Menu) Update() *MenuUpdateOne
- func (m *Menu) Value(name string) (ent.Value, error)
- 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 uint64) *MenuDeleteOne
- func (c *MenuClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *MenuClient) Get(ctx context.Context, id uint64) (*Menu, error)
- func (c *MenuClient) GetX(ctx context.Context, id uint64) *Menu
- func (c *MenuClient) Hooks() []Hook
- func (c *MenuClient) Intercept(interceptors ...Interceptor)
- func (c *MenuClient) Interceptors() []Interceptor
- func (c *MenuClient) Query() *MenuQuery
- func (c *MenuClient) QueryChildren(m *Menu) *MenuQuery
- func (c *MenuClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *MenuClient) QueryParent(m *Menu) *MenuQuery
- func (c *MenuClient) QueryRoles(m *Menu) *RoleQuery
- func (c *MenuClient) Update() *MenuUpdate
- func (c *MenuClient) UpdateOne(m *Menu) *MenuUpdateOne
- func (c *MenuClient) UpdateOneID(id uint64) *MenuUpdateOne
- func (c *MenuClient) Use(hooks ...Hook)
- type MenuCreate
- func (mc *MenuCreate) AddChildIDs(ids ...uint64) *MenuCreate
- func (mc *MenuCreate) AddChildren(m ...*Menu) *MenuCreate
- func (mc *MenuCreate) AddRoleIDs(ids ...uint64) *MenuCreate
- func (mc *MenuCreate) AddRoles(r ...*Role) *MenuCreate
- func (mc *MenuCreate) Exec(ctx context.Context) error
- func (c *MenuCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mc *MenuCreate) ExecX(ctx context.Context)
- func (mc *MenuCreate) Mutation() *MenuMutation
- func (c *MenuCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mc *MenuCreate) Save(ctx context.Context) (*Menu, error)
- func (mc *MenuCreate) SaveX(ctx context.Context) *Menu
- func (mc *MenuCreate) SetAffix(b bool) *MenuCreate
- func (mc *MenuCreate) SetCarryParam(b bool) *MenuCreate
- func (mc *MenuCreate) SetComponent(s string) *MenuCreate
- func (mc *MenuCreate) SetCreatedAt(t time.Time) *MenuCreate
- func (mc *MenuCreate) SetDisabled(b bool) *MenuCreate
- func (mc *MenuCreate) SetDynamicLevel(u uint32) *MenuCreate
- func (mc *MenuCreate) SetFrameSrc(s string) *MenuCreate
- func (mc *MenuCreate) SetHideBreadcrumb(b bool) *MenuCreate
- func (mc *MenuCreate) SetHideChildrenInMenu(b bool) *MenuCreate
- func (mc *MenuCreate) SetHideMenu(b bool) *MenuCreate
- func (mc *MenuCreate) SetHideTab(b bool) *MenuCreate
- func (mc *MenuCreate) SetID(u uint64) *MenuCreate
- func (mc *MenuCreate) SetIcon(s string) *MenuCreate
- func (mc *MenuCreate) SetIgnoreKeepAlive(b bool) *MenuCreate
- func (mc *MenuCreate) SetMenuLevel(u uint32) *MenuCreate
- func (mc *MenuCreate) SetMenuType(u uint32) *MenuCreate
- func (mc *MenuCreate) SetName(s string) *MenuCreate
- func (mc *MenuCreate) SetNillableAffix(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableCarryParam(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableComponent(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableCreatedAt(t *time.Time) *MenuCreate
- func (mc *MenuCreate) SetNillableDisabled(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableDynamicLevel(u *uint32) *MenuCreate
- func (mc *MenuCreate) SetNillableFrameSrc(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableHideBreadcrumb(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableHideChildrenInMenu(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableHideMenu(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableHideTab(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableIgnoreKeepAlive(b *bool) *MenuCreate
- func (mc *MenuCreate) SetNillableParentID(u *uint64) *MenuCreate
- func (mc *MenuCreate) SetNillablePath(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableRealPath(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableRedirect(s *string) *MenuCreate
- func (mc *MenuCreate) SetNillableSort(u *uint32) *MenuCreate
- func (mc *MenuCreate) SetNillableUpdatedAt(t *time.Time) *MenuCreate
- func (m *MenuCreate) SetNotNilAffix(value *bool) *MenuCreate
- func (m *MenuCreate) SetNotNilCarryParam(value *bool) *MenuCreate
- func (m *MenuCreate) SetNotNilComponent(value *string) *MenuCreate
- func (m *MenuCreate) SetNotNilDisabled(value *bool) *MenuCreate
- func (m *MenuCreate) SetNotNilDynamicLevel(value *uint32) *MenuCreate
- func (m *MenuCreate) SetNotNilFrameSrc(value *string) *MenuCreate
- func (m *MenuCreate) SetNotNilHideBreadcrumb(value *bool) *MenuCreate
- func (m *MenuCreate) SetNotNilHideChildrenInMenu(value *bool) *MenuCreate
- func (m *MenuCreate) SetNotNilHideMenu(value *bool) *MenuCreate
- func (m *MenuCreate) SetNotNilHideTab(value *bool) *MenuCreate
- func (m *MenuCreate) SetNotNilIcon(value *string) *MenuCreate
- func (m *MenuCreate) SetNotNilIgnoreKeepAlive(value *bool) *MenuCreate
- func (m *MenuCreate) SetNotNilMenuLevel(value *uint32) *MenuCreate
- func (m *MenuCreate) SetNotNilMenuType(value *uint32) *MenuCreate
- func (m *MenuCreate) SetNotNilName(value *string) *MenuCreate
- func (m *MenuCreate) SetNotNilParentID(value *uint64) *MenuCreate
- func (m *MenuCreate) SetNotNilPath(value *string) *MenuCreate
- func (m *MenuCreate) SetNotNilRealPath(value *string) *MenuCreate
- func (m *MenuCreate) SetNotNilRedirect(value *string) *MenuCreate
- func (m *MenuCreate) SetNotNilSort(value *uint32) *MenuCreate
- func (m *MenuCreate) SetNotNilTitle(value *string) *MenuCreate
- func (m *MenuCreate) SetNotNilUpdatedAt(value *time.Time) *MenuCreate
- func (mc *MenuCreate) SetParent(m *Menu) *MenuCreate
- func (mc *MenuCreate) SetParentID(u uint64) *MenuCreate
- func (mc *MenuCreate) SetPath(s string) *MenuCreate
- func (mc *MenuCreate) SetRealPath(s string) *MenuCreate
- func (mc *MenuCreate) SetRedirect(s string) *MenuCreate
- func (mc *MenuCreate) SetSort(u uint32) *MenuCreate
- func (mc *MenuCreate) SetTitle(s string) *MenuCreate
- func (mc *MenuCreate) SetUpdatedAt(t time.Time) *MenuCreate
- type MenuCreateBulk
- func (mcb *MenuCreateBulk) Exec(ctx context.Context) error
- func (c *MenuCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mcb *MenuCreateBulk) ExecX(ctx context.Context)
- func (c *MenuCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mcb *MenuCreateBulk) Save(ctx context.Context) ([]*Menu, error)
- func (mcb *MenuCreateBulk) SaveX(ctx context.Context) []*Menu
- type MenuDelete
- func (md *MenuDelete) Exec(ctx context.Context) (int, error)
- func (c *MenuDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (md *MenuDelete) ExecX(ctx context.Context) int
- func (c *MenuDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (md *MenuDelete) Where(ps ...predicate.Menu) *MenuDelete
- type MenuDeleteOne
- type MenuEdges
- 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 ...uint64)
- func (m *MenuMutation) AddDynamicLevel(u int32)
- func (m *MenuMutation) AddField(name string, value ent.Value) error
- func (m *MenuMutation) AddMenuLevel(u int32)
- func (m *MenuMutation) AddMenuType(u int32)
- func (m *MenuMutation) AddRoleIDs(ids ...uint64)
- func (m *MenuMutation) AddSort(u int32)
- func (m *MenuMutation) AddedDynamicLevel() (r int32, exists bool)
- 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) AddedMenuLevel() (r int32, exists bool)
- func (m *MenuMutation) AddedMenuType() (r int32, exists bool)
- func (m *MenuMutation) AddedSort() (r int32, exists bool)
- func (m *MenuMutation) Affix() (r bool, exists bool)
- func (m *MenuMutation) AffixCleared() bool
- func (m *MenuMutation) CarryParam() (r bool, exists bool)
- func (m *MenuMutation) CarryParamCleared() bool
- func (m *MenuMutation) ChildrenCleared() bool
- func (m *MenuMutation) ChildrenIDs() (ids []uint64)
- func (m *MenuMutation) ClearAffix()
- func (m *MenuMutation) ClearCarryParam()
- func (m *MenuMutation) ClearChildren()
- func (m *MenuMutation) ClearComponent()
- func (m *MenuMutation) ClearDisabled()
- func (m *MenuMutation) ClearDynamicLevel()
- func (m *MenuMutation) ClearEdge(name string) error
- func (m *MenuMutation) ClearField(name string) error
- func (m *MenuMutation) ClearFrameSrc()
- func (m *MenuMutation) ClearHideBreadcrumb()
- func (m *MenuMutation) ClearHideChildrenInMenu()
- func (m *MenuMutation) ClearHideMenu()
- func (m *MenuMutation) ClearHideTab()
- func (m *MenuMutation) ClearIgnoreKeepAlive()
- func (m *MenuMutation) ClearParent()
- func (m *MenuMutation) ClearParentID()
- func (m *MenuMutation) ClearPath()
- func (m *MenuMutation) ClearRealPath()
- func (m *MenuMutation) ClearRedirect()
- func (m *MenuMutation) ClearRoles()
- 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) ComponentCleared() bool
- func (m *MenuMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MenuMutation) Disabled() (r bool, exists bool)
- func (m *MenuMutation) DisabledCleared() bool
- func (m *MenuMutation) DynamicLevel() (r uint32, exists bool)
- func (m *MenuMutation) DynamicLevelCleared() bool
- func (m *MenuMutation) EdgeCleared(name string) bool
- func (c *MenuMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *MenuMutation) Field(name string) (ent.Value, bool)
- func (m *MenuMutation) FieldCleared(name string) bool
- func (m *MenuMutation) Fields() []string
- func (m *MenuMutation) FrameSrc() (r string, exists bool)
- func (m *MenuMutation) FrameSrcCleared() bool
- func (m *MenuMutation) HideBreadcrumb() (r bool, exists bool)
- func (m *MenuMutation) HideBreadcrumbCleared() bool
- func (m *MenuMutation) HideChildrenInMenu() (r bool, exists bool)
- func (m *MenuMutation) HideChildrenInMenuCleared() bool
- func (m *MenuMutation) HideMenu() (r bool, exists bool)
- func (m *MenuMutation) HideMenuCleared() bool
- func (m *MenuMutation) HideTab() (r bool, exists bool)
- func (m *MenuMutation) HideTabCleared() bool
- func (m *MenuMutation) ID() (id uint64, exists bool)
- func (m *MenuMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *MenuMutation) Icon() (r string, exists bool)
- func (m *MenuMutation) IgnoreKeepAlive() (r bool, exists bool)
- func (m *MenuMutation) IgnoreKeepAliveCleared() bool
- func (m *MenuMutation) MenuLevel() (r uint32, exists bool)
- func (m *MenuMutation) MenuType() (r uint32, exists bool)
- func (m *MenuMutation) Name() (r string, exists bool)
- func (m *MenuMutation) OldAffix(ctx context.Context) (v bool, err error)
- func (m *MenuMutation) OldCarryParam(ctx context.Context) (v bool, err error)
- 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) OldDisabled(ctx context.Context) (v bool, err error)
- func (m *MenuMutation) OldDynamicLevel(ctx context.Context) (v uint32, err error)
- func (m *MenuMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MenuMutation) OldFrameSrc(ctx context.Context) (v string, err error)
- func (m *MenuMutation) OldHideBreadcrumb(ctx context.Context) (v bool, err error)
- func (m *MenuMutation) OldHideChildrenInMenu(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) OldIgnoreKeepAlive(ctx context.Context) (v bool, err error)
- func (m *MenuMutation) OldMenuLevel(ctx context.Context) (v uint32, err error)
- func (m *MenuMutation) OldMenuType(ctx context.Context) (v uint32, err error)
- func (m *MenuMutation) OldName(ctx context.Context) (v string, err error)
- func (m *MenuMutation) OldParentID(ctx context.Context) (v uint64, err error)
- func (m *MenuMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *MenuMutation) OldRealPath(ctx context.Context) (v string, err error)
- func (m *MenuMutation) OldRedirect(ctx context.Context) (v string, err error)
- func (m *MenuMutation) OldSort(ctx context.Context) (v uint32, err error)
- func (m *MenuMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *MenuMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MenuMutation) Op() Op
- func (m *MenuMutation) ParentCleared() bool
- func (m *MenuMutation) ParentID() (r uint64, exists bool)
- func (m *MenuMutation) ParentIDCleared() bool
- func (m *MenuMutation) ParentIDs() (ids []uint64)
- func (m *MenuMutation) Path() (r string, exists bool)
- func (m *MenuMutation) PathCleared() bool
- func (c *MenuMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *MenuMutation) RealPath() (r string, exists bool)
- func (m *MenuMutation) RealPathCleared() bool
- func (m *MenuMutation) Redirect() (r string, exists bool)
- func (m *MenuMutation) RedirectCleared() bool
- func (m *MenuMutation) RemoveChildIDs(ids ...uint64)
- func (m *MenuMutation) RemoveRoleIDs(ids ...uint64)
- func (m *MenuMutation) RemovedChildrenIDs() (ids []uint64)
- func (m *MenuMutation) RemovedEdges() []string
- func (m *MenuMutation) RemovedIDs(name string) []ent.Value
- func (m *MenuMutation) RemovedRolesIDs() (ids []uint64)
- func (m *MenuMutation) ResetAffix()
- func (m *MenuMutation) ResetCarryParam()
- func (m *MenuMutation) ResetChildren()
- func (m *MenuMutation) ResetComponent()
- func (m *MenuMutation) ResetCreatedAt()
- func (m *MenuMutation) ResetDisabled()
- func (m *MenuMutation) ResetDynamicLevel()
- func (m *MenuMutation) ResetEdge(name string) error
- func (m *MenuMutation) ResetField(name string) error
- func (m *MenuMutation) ResetFrameSrc()
- func (m *MenuMutation) ResetHideBreadcrumb()
- func (m *MenuMutation) ResetHideChildrenInMenu()
- func (m *MenuMutation) ResetHideMenu()
- func (m *MenuMutation) ResetHideTab()
- func (m *MenuMutation) ResetIcon()
- func (m *MenuMutation) ResetIgnoreKeepAlive()
- func (m *MenuMutation) ResetMenuLevel()
- func (m *MenuMutation) ResetMenuType()
- func (m *MenuMutation) ResetName()
- func (m *MenuMutation) ResetParent()
- func (m *MenuMutation) ResetParentID()
- func (m *MenuMutation) ResetPath()
- func (m *MenuMutation) ResetRealPath()
- func (m *MenuMutation) ResetRedirect()
- func (m *MenuMutation) ResetRoles()
- func (m *MenuMutation) ResetSort()
- func (m *MenuMutation) ResetTitle()
- func (m *MenuMutation) ResetUpdatedAt()
- func (m *MenuMutation) RolesCleared() bool
- func (m *MenuMutation) RolesIDs() (ids []uint64)
- func (m *MenuMutation) SetAffix(b bool)
- func (m *MenuMutation) SetCarryParam(b bool)
- func (m *MenuMutation) SetComponent(s string)
- func (m *MenuMutation) SetCreatedAt(t time.Time)
- func (m *MenuMutation) SetDisabled(b bool)
- func (m *MenuMutation) SetDynamicLevel(u uint32)
- func (m *MenuMutation) SetField(name string, value ent.Value) error
- func (m *MenuMutation) SetFrameSrc(s string)
- func (m *MenuMutation) SetHideBreadcrumb(b bool)
- func (m *MenuMutation) SetHideChildrenInMenu(b bool)
- func (m *MenuMutation) SetHideMenu(b bool)
- func (m *MenuMutation) SetHideTab(b bool)
- func (m *MenuMutation) SetID(id uint64)
- func (m *MenuMutation) SetIcon(s string)
- func (m *MenuMutation) SetIgnoreKeepAlive(b bool)
- func (m *MenuMutation) SetMenuLevel(u uint32)
- func (m *MenuMutation) SetMenuType(u uint32)
- func (m *MenuMutation) SetName(s string)
- func (m *MenuMutation) SetOp(op Op)
- func (m *MenuMutation) SetParentID(u uint64)
- func (m *MenuMutation) SetPath(s string)
- func (m *MenuMutation) SetRealPath(s string)
- func (m *MenuMutation) SetRedirect(s string)
- func (m *MenuMutation) SetSort(u uint32)
- func (m *MenuMutation) SetTitle(s string)
- func (m *MenuMutation) SetUpdatedAt(t time.Time)
- func (m *MenuMutation) Sort() (r uint32, 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) Where(ps ...predicate.Menu)
- func (m *MenuMutation) WhereP(ps ...func(*sql.Selector))
- type MenuPageList
- type MenuPager
- type MenuPaginateOption
- 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 (c *MenuQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mq *MenuQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MenuQuery) ExistX(ctx context.Context) bool
- func (mq *MenuQuery) First(ctx context.Context) (*Menu, error)
- func (mq *MenuQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (mq *MenuQuery) FirstIDX(ctx context.Context) uint64
- 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 []uint64, err error)
- func (mq *MenuQuery) IDsX(ctx context.Context) []uint64
- func (mq *MenuQuery) Limit(limit int) *MenuQuery
- func (mq *MenuQuery) Offset(offset int) *MenuQuery
- func (mq *MenuQuery) Only(ctx context.Context) (*Menu, error)
- func (mq *MenuQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (mq *MenuQuery) OnlyIDX(ctx context.Context) uint64
- func (mq *MenuQuery) OnlyX(ctx context.Context) *Menu
- func (mq *MenuQuery) Order(o ...menu.OrderOption) *MenuQuery
- func (m *MenuQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*MenuPageList, error)
- func (mq *MenuQuery) QueryChildren() *MenuQuery
- func (c *MenuQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mq *MenuQuery) QueryParent() *MenuQuery
- func (mq *MenuQuery) QueryRoles() *RoleQuery
- 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
- func (mq *MenuQuery) WithRoles(opts ...func(*RoleQuery)) *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 (c MenuSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 (c MenuSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- 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 ...uint64) *MenuUpdate
- func (mu *MenuUpdate) AddChildren(m ...*Menu) *MenuUpdate
- func (mu *MenuUpdate) AddDynamicLevel(u int32) *MenuUpdate
- func (mu *MenuUpdate) AddMenuLevel(u int32) *MenuUpdate
- func (mu *MenuUpdate) AddMenuType(u int32) *MenuUpdate
- func (mu *MenuUpdate) AddRoleIDs(ids ...uint64) *MenuUpdate
- func (mu *MenuUpdate) AddRoles(r ...*Role) *MenuUpdate
- func (mu *MenuUpdate) AddSort(u int32) *MenuUpdate
- func (mu *MenuUpdate) ClearAffix() *MenuUpdate
- func (mu *MenuUpdate) ClearCarryParam() *MenuUpdate
- func (mu *MenuUpdate) ClearChildren() *MenuUpdate
- func (mu *MenuUpdate) ClearComponent() *MenuUpdate
- func (mu *MenuUpdate) ClearDisabled() *MenuUpdate
- func (mu *MenuUpdate) ClearDynamicLevel() *MenuUpdate
- func (mu *MenuUpdate) ClearFrameSrc() *MenuUpdate
- func (mu *MenuUpdate) ClearHideBreadcrumb() *MenuUpdate
- func (mu *MenuUpdate) ClearHideChildrenInMenu() *MenuUpdate
- func (mu *MenuUpdate) ClearHideMenu() *MenuUpdate
- func (mu *MenuUpdate) ClearHideTab() *MenuUpdate
- func (mu *MenuUpdate) ClearIgnoreKeepAlive() *MenuUpdate
- func (mu *MenuUpdate) ClearParent() *MenuUpdate
- func (mu *MenuUpdate) ClearParentID() *MenuUpdate
- func (mu *MenuUpdate) ClearPath() *MenuUpdate
- func (mu *MenuUpdate) ClearRealPath() *MenuUpdate
- func (mu *MenuUpdate) ClearRedirect() *MenuUpdate
- func (mu *MenuUpdate) ClearRoles() *MenuUpdate
- func (mu *MenuUpdate) Exec(ctx context.Context) error
- func (c *MenuUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (mu *MenuUpdate) ExecX(ctx context.Context)
- func (mu *MenuUpdate) Mutation() *MenuMutation
- func (c *MenuUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (mu *MenuUpdate) RemoveChildIDs(ids ...uint64) *MenuUpdate
- func (mu *MenuUpdate) RemoveChildren(m ...*Menu) *MenuUpdate
- func (mu *MenuUpdate) RemoveRoleIDs(ids ...uint64) *MenuUpdate
- func (mu *MenuUpdate) RemoveRoles(r ...*Role) *MenuUpdate
- func (mu *MenuUpdate) Save(ctx context.Context) (int, error)
- func (mu *MenuUpdate) SaveX(ctx context.Context) int
- func (mu *MenuUpdate) SetAffix(b bool) *MenuUpdate
- func (mu *MenuUpdate) SetCarryParam(b bool) *MenuUpdate
- func (mu *MenuUpdate) SetComponent(s string) *MenuUpdate
- func (mu *MenuUpdate) SetDisabled(b bool) *MenuUpdate
- func (mu *MenuUpdate) SetDynamicLevel(u uint32) *MenuUpdate
- func (mu *MenuUpdate) SetFrameSrc(s string) *MenuUpdate
- func (mu *MenuUpdate) SetHideBreadcrumb(b bool) *MenuUpdate
- func (mu *MenuUpdate) SetHideChildrenInMenu(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) SetIgnoreKeepAlive(b bool) *MenuUpdate
- func (mu *MenuUpdate) SetMenuLevel(u uint32) *MenuUpdate
- func (mu *MenuUpdate) SetMenuType(u uint32) *MenuUpdate
- func (mu *MenuUpdate) SetName(s string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableAffix(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableCarryParam(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableComponent(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableDisabled(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableDynamicLevel(u *uint32) *MenuUpdate
- func (mu *MenuUpdate) SetNillableFrameSrc(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableHideBreadcrumb(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableHideChildrenInMenu(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableHideMenu(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableHideTab(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableIgnoreKeepAlive(b *bool) *MenuUpdate
- func (mu *MenuUpdate) SetNillableParentID(u *uint64) *MenuUpdate
- func (mu *MenuUpdate) SetNillablePath(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableRealPath(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableRedirect(s *string) *MenuUpdate
- func (mu *MenuUpdate) SetNillableSort(u *uint32) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyComponent(value string) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyDynamicLevel(value uint32) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyFrameSrc(value string) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyIcon(value string) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyMenuLevel(value uint32) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyMenuType(value uint32) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyName(value string) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyParentID(value uint64) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyPath(value string) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyRealPath(value string) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyRedirect(value string) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptySort(value uint32) *MenuUpdate
- func (m *MenuUpdate) SetNotEmptyTitle(value string) *MenuUpdate
- func (m *MenuUpdate) SetNotNilAffix(value *bool) *MenuUpdate
- func (m *MenuUpdate) SetNotNilCarryParam(value *bool) *MenuUpdate
- func (m *MenuUpdate) SetNotNilComponent(value *string) *MenuUpdate
- func (m *MenuUpdate) SetNotNilDisabled(value *bool) *MenuUpdate
- func (m *MenuUpdate) SetNotNilDynamicLevel(value *uint32) *MenuUpdate
- func (m *MenuUpdate) SetNotNilFrameSrc(value *string) *MenuUpdate
- func (m *MenuUpdate) SetNotNilHideBreadcrumb(value *bool) *MenuUpdate
- func (m *MenuUpdate) SetNotNilHideChildrenInMenu(value *bool) *MenuUpdate
- func (m *MenuUpdate) SetNotNilHideMenu(value *bool) *MenuUpdate
- func (m *MenuUpdate) SetNotNilHideTab(value *bool) *MenuUpdate
- func (m *MenuUpdate) SetNotNilIcon(value *string) *MenuUpdate
- func (m *MenuUpdate) SetNotNilIgnoreKeepAlive(value *bool) *MenuUpdate
- func (m *MenuUpdate) SetNotNilMenuLevel(value *uint32) *MenuUpdate
- func (m *MenuUpdate) SetNotNilMenuType(value *uint32) *MenuUpdate
- func (m *MenuUpdate) SetNotNilName(value *string) *MenuUpdate
- func (m *MenuUpdate) SetNotNilParentID(value *uint64) *MenuUpdate
- func (m *MenuUpdate) SetNotNilPath(value *string) *MenuUpdate
- func (m *MenuUpdate) SetNotNilRealPath(value *string) *MenuUpdate
- func (m *MenuUpdate) SetNotNilRedirect(value *string) *MenuUpdate
- func (m *MenuUpdate) SetNotNilSort(value *uint32) *MenuUpdate
- func (m *MenuUpdate) SetNotNilTitle(value *string) *MenuUpdate
- func (m *MenuUpdate) SetNotNilUpdatedAt(value *time.Time) *MenuUpdate
- func (mu *MenuUpdate) SetParent(m *Menu) *MenuUpdate
- func (mu *MenuUpdate) SetParentID(u uint64) *MenuUpdate
- func (mu *MenuUpdate) SetPath(s string) *MenuUpdate
- func (mu *MenuUpdate) SetRealPath(s string) *MenuUpdate
- func (mu *MenuUpdate) SetRedirect(s string) *MenuUpdate
- func (mu *MenuUpdate) SetSort(u uint32) *MenuUpdate
- func (mu *MenuUpdate) SetTitle(s string) *MenuUpdate
- func (mu *MenuUpdate) SetUpdatedAt(t time.Time) *MenuUpdate
- func (mu *MenuUpdate) Where(ps ...predicate.Menu) *MenuUpdate
- type MenuUpdateOne
- func (muo *MenuUpdateOne) AddChildIDs(ids ...uint64) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddChildren(m ...*Menu) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddDynamicLevel(u int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddMenuLevel(u int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddMenuType(u int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddRoleIDs(ids ...uint64) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddRoles(r ...*Role) *MenuUpdateOne
- func (muo *MenuUpdateOne) AddSort(u int32) *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearAffix() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearCarryParam() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearChildren() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearComponent() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearDisabled() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearDynamicLevel() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearFrameSrc() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearHideBreadcrumb() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearHideChildrenInMenu() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearHideMenu() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearHideTab() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearIgnoreKeepAlive() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearParent() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearParentID() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearPath() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearRealPath() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearRedirect() *MenuUpdateOne
- func (muo *MenuUpdateOne) ClearRoles() *MenuUpdateOne
- func (muo *MenuUpdateOne) Exec(ctx context.Context) error
- func (c *MenuUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (muo *MenuUpdateOne) ExecX(ctx context.Context)
- func (muo *MenuUpdateOne) Mutation() *MenuMutation
- func (c *MenuUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (muo *MenuUpdateOne) RemoveChildIDs(ids ...uint64) *MenuUpdateOne
- func (muo *MenuUpdateOne) RemoveChildren(m ...*Menu) *MenuUpdateOne
- func (muo *MenuUpdateOne) RemoveRoleIDs(ids ...uint64) *MenuUpdateOne
- func (muo *MenuUpdateOne) RemoveRoles(r ...*Role) *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) SetAffix(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetCarryParam(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetComponent(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetDisabled(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetDynamicLevel(u uint32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetFrameSrc(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetHideBreadcrumb(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetHideChildrenInMenu(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) SetIgnoreKeepAlive(b bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetMenuLevel(u uint32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetMenuType(u uint32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetName(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableAffix(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableCarryParam(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableComponent(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableDisabled(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableDynamicLevel(u *uint32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableFrameSrc(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableHideBreadcrumb(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableHideChildrenInMenu(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableHideMenu(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableHideTab(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableIgnoreKeepAlive(b *bool) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableParentID(u *uint64) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillablePath(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableRealPath(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableRedirect(s *string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetNillableSort(u *uint32) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyComponent(value string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyDynamicLevel(value uint32) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyFrameSrc(value string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyIcon(value string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyMenuLevel(value uint32) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyMenuType(value uint32) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyName(value string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyParentID(value uint64) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyPath(value string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyRealPath(value string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyRedirect(value string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptySort(value uint32) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotEmptyTitle(value string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilAffix(value *bool) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilCarryParam(value *bool) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilComponent(value *string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilDisabled(value *bool) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilDynamicLevel(value *uint32) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilFrameSrc(value *string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilHideBreadcrumb(value *bool) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilHideChildrenInMenu(value *bool) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilHideMenu(value *bool) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilHideTab(value *bool) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilIcon(value *string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilIgnoreKeepAlive(value *bool) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilMenuLevel(value *uint32) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilMenuType(value *uint32) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilName(value *string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilParentID(value *uint64) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilPath(value *string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilRealPath(value *string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilRedirect(value *string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilSort(value *uint32) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilTitle(value *string) *MenuUpdateOne
- func (m *MenuUpdateOne) SetNotNilUpdatedAt(value *time.Time) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetParent(m *Menu) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetParentID(u uint64) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetPath(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetRealPath(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetRedirect(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetSort(u uint32) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetTitle(s string) *MenuUpdateOne
- func (muo *MenuUpdateOne) SetUpdatedAt(t time.Time) *MenuUpdateOne
- func (muo *MenuUpdateOne) Where(ps ...predicate.Menu) *MenuUpdateOne
- type Menus
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type OauthProvider
- func (c *OauthProvider) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *OauthProvider) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (op *OauthProvider) String() string
- func (op *OauthProvider) Unwrap() *OauthProvider
- func (op *OauthProvider) Update() *OauthProviderUpdateOne
- func (op *OauthProvider) Value(name string) (ent.Value, error)
- type OauthProviderClient
- func (c *OauthProviderClient) Create() *OauthProviderCreate
- func (c *OauthProviderClient) CreateBulk(builders ...*OauthProviderCreate) *OauthProviderCreateBulk
- func (c *OauthProviderClient) Delete() *OauthProviderDelete
- func (c *OauthProviderClient) DeleteOne(op *OauthProvider) *OauthProviderDeleteOne
- func (c *OauthProviderClient) DeleteOneID(id uint64) *OauthProviderDeleteOne
- func (c *OauthProviderClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *OauthProviderClient) Get(ctx context.Context, id uint64) (*OauthProvider, error)
- func (c *OauthProviderClient) GetX(ctx context.Context, id uint64) *OauthProvider
- func (c *OauthProviderClient) Hooks() []Hook
- func (c *OauthProviderClient) Intercept(interceptors ...Interceptor)
- func (c *OauthProviderClient) Interceptors() []Interceptor
- func (c *OauthProviderClient) Query() *OauthProviderQuery
- func (c *OauthProviderClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *OauthProviderClient) Update() *OauthProviderUpdate
- func (c *OauthProviderClient) UpdateOne(op *OauthProvider) *OauthProviderUpdateOne
- func (c *OauthProviderClient) UpdateOneID(id uint64) *OauthProviderUpdateOne
- func (c *OauthProviderClient) Use(hooks ...Hook)
- type OauthProviderCreate
- func (opc *OauthProviderCreate) Exec(ctx context.Context) error
- func (c *OauthProviderCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (opc *OauthProviderCreate) ExecX(ctx context.Context)
- func (opc *OauthProviderCreate) Mutation() *OauthProviderMutation
- func (c *OauthProviderCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (opc *OauthProviderCreate) Save(ctx context.Context) (*OauthProvider, error)
- func (opc *OauthProviderCreate) SaveX(ctx context.Context) *OauthProvider
- func (opc *OauthProviderCreate) SetAuthStyle(u uint64) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetAuthURL(s string) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetClientID(s string) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetClientSecret(s string) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetCreatedAt(t time.Time) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetID(u uint64) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetInfoURL(s string) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetName(s string) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetNillableCreatedAt(t *time.Time) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetNillableUpdatedAt(t *time.Time) *OauthProviderCreate
- func (op *OauthProviderCreate) SetNotNilAuthStyle(value *uint64) *OauthProviderCreate
- func (op *OauthProviderCreate) SetNotNilAuthURL(value *string) *OauthProviderCreate
- func (op *OauthProviderCreate) SetNotNilClientID(value *string) *OauthProviderCreate
- func (op *OauthProviderCreate) SetNotNilClientSecret(value *string) *OauthProviderCreate
- func (op *OauthProviderCreate) SetNotNilInfoURL(value *string) *OauthProviderCreate
- func (op *OauthProviderCreate) SetNotNilName(value *string) *OauthProviderCreate
- func (op *OauthProviderCreate) SetNotNilRedirectURL(value *string) *OauthProviderCreate
- func (op *OauthProviderCreate) SetNotNilScopes(value *string) *OauthProviderCreate
- func (op *OauthProviderCreate) SetNotNilTokenURL(value *string) *OauthProviderCreate
- func (op *OauthProviderCreate) SetNotNilUpdatedAt(value *time.Time) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetRedirectURL(s string) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetScopes(s string) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetTokenURL(s string) *OauthProviderCreate
- func (opc *OauthProviderCreate) SetUpdatedAt(t time.Time) *OauthProviderCreate
- type OauthProviderCreateBulk
- func (opcb *OauthProviderCreateBulk) Exec(ctx context.Context) error
- func (c *OauthProviderCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (opcb *OauthProviderCreateBulk) ExecX(ctx context.Context)
- func (c *OauthProviderCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (opcb *OauthProviderCreateBulk) Save(ctx context.Context) ([]*OauthProvider, error)
- func (opcb *OauthProviderCreateBulk) SaveX(ctx context.Context) []*OauthProvider
- type OauthProviderDelete
- func (opd *OauthProviderDelete) Exec(ctx context.Context) (int, error)
- func (c *OauthProviderDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (opd *OauthProviderDelete) ExecX(ctx context.Context) int
- func (c *OauthProviderDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (opd *OauthProviderDelete) Where(ps ...predicate.OauthProvider) *OauthProviderDelete
- type OauthProviderDeleteOne
- type OauthProviderGroupBy
- func (opgb *OauthProviderGroupBy) Aggregate(fns ...AggregateFunc) *OauthProviderGroupBy
- func (s *OauthProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *OauthProviderGroupBy) BoolX(ctx context.Context) bool
- func (s *OauthProviderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *OauthProviderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *OauthProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *OauthProviderGroupBy) Float64X(ctx context.Context) float64
- func (s *OauthProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *OauthProviderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *OauthProviderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *OauthProviderGroupBy) IntX(ctx context.Context) int
- func (s *OauthProviderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *OauthProviderGroupBy) IntsX(ctx context.Context) []int
- func (opgb *OauthProviderGroupBy) Scan(ctx context.Context, v any) error
- func (s *OauthProviderGroupBy) ScanX(ctx context.Context, v any)
- func (s *OauthProviderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *OauthProviderGroupBy) StringX(ctx context.Context) string
- func (s *OauthProviderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *OauthProviderGroupBy) StringsX(ctx context.Context) []string
- type OauthProviderMutation
- func (m *OauthProviderMutation) AddAuthStyle(u int64)
- func (m *OauthProviderMutation) AddField(name string, value ent.Value) error
- func (m *OauthProviderMutation) AddedAuthStyle() (r int64, exists bool)
- func (m *OauthProviderMutation) AddedEdges() []string
- func (m *OauthProviderMutation) AddedField(name string) (ent.Value, bool)
- func (m *OauthProviderMutation) AddedFields() []string
- func (m *OauthProviderMutation) AddedIDs(name string) []ent.Value
- func (m *OauthProviderMutation) AuthStyle() (r uint64, exists bool)
- func (m *OauthProviderMutation) AuthURL() (r string, exists bool)
- func (m *OauthProviderMutation) ClearEdge(name string) error
- func (m *OauthProviderMutation) ClearField(name string) error
- func (m *OauthProviderMutation) ClearedEdges() []string
- func (m *OauthProviderMutation) ClearedFields() []string
- func (m OauthProviderMutation) Client() *Client
- func (m *OauthProviderMutation) ClientID() (r string, exists bool)
- func (m *OauthProviderMutation) ClientSecret() (r string, exists bool)
- func (m *OauthProviderMutation) CreatedAt() (r time.Time, exists bool)
- func (m *OauthProviderMutation) EdgeCleared(name string) bool
- func (c *OauthProviderMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *OauthProviderMutation) Field(name string) (ent.Value, bool)
- func (m *OauthProviderMutation) FieldCleared(name string) bool
- func (m *OauthProviderMutation) Fields() []string
- func (m *OauthProviderMutation) ID() (id uint64, exists bool)
- func (m *OauthProviderMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *OauthProviderMutation) InfoURL() (r string, exists bool)
- func (m *OauthProviderMutation) Name() (r string, exists bool)
- func (m *OauthProviderMutation) OldAuthStyle(ctx context.Context) (v uint64, err error)
- func (m *OauthProviderMutation) OldAuthURL(ctx context.Context) (v string, err error)
- func (m *OauthProviderMutation) OldClientID(ctx context.Context) (v string, err error)
- func (m *OauthProviderMutation) OldClientSecret(ctx context.Context) (v string, err error)
- func (m *OauthProviderMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OauthProviderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OauthProviderMutation) OldInfoURL(ctx context.Context) (v string, err error)
- func (m *OauthProviderMutation) OldName(ctx context.Context) (v string, err error)
- func (m *OauthProviderMutation) OldRedirectURL(ctx context.Context) (v string, err error)
- func (m *OauthProviderMutation) OldScopes(ctx context.Context) (v string, err error)
- func (m *OauthProviderMutation) OldTokenURL(ctx context.Context) (v string, err error)
- func (m *OauthProviderMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *OauthProviderMutation) Op() Op
- func (c *OauthProviderMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *OauthProviderMutation) RedirectURL() (r string, exists bool)
- func (m *OauthProviderMutation) RemovedEdges() []string
- func (m *OauthProviderMutation) RemovedIDs(name string) []ent.Value
- func (m *OauthProviderMutation) ResetAuthStyle()
- func (m *OauthProviderMutation) ResetAuthURL()
- func (m *OauthProviderMutation) ResetClientID()
- func (m *OauthProviderMutation) ResetClientSecret()
- func (m *OauthProviderMutation) ResetCreatedAt()
- func (m *OauthProviderMutation) ResetEdge(name string) error
- func (m *OauthProviderMutation) ResetField(name string) error
- func (m *OauthProviderMutation) ResetInfoURL()
- func (m *OauthProviderMutation) ResetName()
- func (m *OauthProviderMutation) ResetRedirectURL()
- func (m *OauthProviderMutation) ResetScopes()
- func (m *OauthProviderMutation) ResetTokenURL()
- func (m *OauthProviderMutation) ResetUpdatedAt()
- func (m *OauthProviderMutation) Scopes() (r string, exists bool)
- func (m *OauthProviderMutation) SetAuthStyle(u uint64)
- func (m *OauthProviderMutation) SetAuthURL(s string)
- func (m *OauthProviderMutation) SetClientID(s string)
- func (m *OauthProviderMutation) SetClientSecret(s string)
- func (m *OauthProviderMutation) SetCreatedAt(t time.Time)
- func (m *OauthProviderMutation) SetField(name string, value ent.Value) error
- func (m *OauthProviderMutation) SetID(id uint64)
- func (m *OauthProviderMutation) SetInfoURL(s string)
- func (m *OauthProviderMutation) SetName(s string)
- func (m *OauthProviderMutation) SetOp(op Op)
- func (m *OauthProviderMutation) SetRedirectURL(s string)
- func (m *OauthProviderMutation) SetScopes(s string)
- func (m *OauthProviderMutation) SetTokenURL(s string)
- func (m *OauthProviderMutation) SetUpdatedAt(t time.Time)
- func (m *OauthProviderMutation) TokenURL() (r string, exists bool)
- func (m OauthProviderMutation) Tx() (*Tx, error)
- func (m *OauthProviderMutation) Type() string
- func (m *OauthProviderMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *OauthProviderMutation) Where(ps ...predicate.OauthProvider)
- func (m *OauthProviderMutation) WhereP(ps ...func(*sql.Selector))
- type OauthProviderPageList
- type OauthProviderPager
- type OauthProviderPaginateOption
- type OauthProviderQuery
- func (opq *OauthProviderQuery) Aggregate(fns ...AggregateFunc) *OauthProviderSelect
- func (opq *OauthProviderQuery) All(ctx context.Context) ([]*OauthProvider, error)
- func (opq *OauthProviderQuery) AllX(ctx context.Context) []*OauthProvider
- func (opq *OauthProviderQuery) Clone() *OauthProviderQuery
- func (opq *OauthProviderQuery) Count(ctx context.Context) (int, error)
- func (opq *OauthProviderQuery) CountX(ctx context.Context) int
- func (c *OauthProviderQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (opq *OauthProviderQuery) Exist(ctx context.Context) (bool, error)
- func (opq *OauthProviderQuery) ExistX(ctx context.Context) bool
- func (opq *OauthProviderQuery) First(ctx context.Context) (*OauthProvider, error)
- func (opq *OauthProviderQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (opq *OauthProviderQuery) FirstIDX(ctx context.Context) uint64
- func (opq *OauthProviderQuery) FirstX(ctx context.Context) *OauthProvider
- func (opq *OauthProviderQuery) GroupBy(field string, fields ...string) *OauthProviderGroupBy
- func (opq *OauthProviderQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (opq *OauthProviderQuery) IDsX(ctx context.Context) []uint64
- func (opq *OauthProviderQuery) Limit(limit int) *OauthProviderQuery
- func (opq *OauthProviderQuery) Offset(offset int) *OauthProviderQuery
- func (opq *OauthProviderQuery) Only(ctx context.Context) (*OauthProvider, error)
- func (opq *OauthProviderQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (opq *OauthProviderQuery) OnlyIDX(ctx context.Context) uint64
- func (opq *OauthProviderQuery) OnlyX(ctx context.Context) *OauthProvider
- func (opq *OauthProviderQuery) Order(o ...oauthprovider.OrderOption) *OauthProviderQuery
- func (op *OauthProviderQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*OauthProviderPageList, error)
- func (c *OauthProviderQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (opq *OauthProviderQuery) Select(fields ...string) *OauthProviderSelect
- func (opq *OauthProviderQuery) Unique(unique bool) *OauthProviderQuery
- func (opq *OauthProviderQuery) Where(ps ...predicate.OauthProvider) *OauthProviderQuery
- type OauthProviderSelect
- func (ops *OauthProviderSelect) Aggregate(fns ...AggregateFunc) *OauthProviderSelect
- func (s *OauthProviderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *OauthProviderSelect) BoolX(ctx context.Context) bool
- func (s *OauthProviderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *OauthProviderSelect) BoolsX(ctx context.Context) []bool
- func (c OauthProviderSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *OauthProviderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *OauthProviderSelect) Float64X(ctx context.Context) float64
- func (s *OauthProviderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *OauthProviderSelect) Float64sX(ctx context.Context) []float64
- func (s *OauthProviderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *OauthProviderSelect) IntX(ctx context.Context) int
- func (s *OauthProviderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *OauthProviderSelect) IntsX(ctx context.Context) []int
- func (c OauthProviderSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ops *OauthProviderSelect) Scan(ctx context.Context, v any) error
- func (s *OauthProviderSelect) ScanX(ctx context.Context, v any)
- func (s *OauthProviderSelect) String(ctx context.Context) (_ string, err error)
- func (s *OauthProviderSelect) StringX(ctx context.Context) string
- func (s *OauthProviderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *OauthProviderSelect) StringsX(ctx context.Context) []string
- type OauthProviderUpdate
- func (opu *OauthProviderUpdate) AddAuthStyle(u int64) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) Exec(ctx context.Context) error
- func (c *OauthProviderUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (opu *OauthProviderUpdate) ExecX(ctx context.Context)
- func (opu *OauthProviderUpdate) Mutation() *OauthProviderMutation
- func (c *OauthProviderUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (opu *OauthProviderUpdate) Save(ctx context.Context) (int, error)
- func (opu *OauthProviderUpdate) SaveX(ctx context.Context) int
- func (opu *OauthProviderUpdate) SetAuthStyle(u uint64) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) SetAuthURL(s string) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) SetClientID(s string) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) SetClientSecret(s string) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) SetInfoURL(s string) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) SetName(s string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotEmptyAuthStyle(value uint64) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotEmptyAuthURL(value string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotEmptyClientID(value string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotEmptyClientSecret(value string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotEmptyInfoURL(value string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotEmptyName(value string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotEmptyRedirectURL(value string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotEmptyScopes(value string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotEmptyTokenURL(value string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotNilAuthStyle(value *uint64) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotNilAuthURL(value *string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotNilClientID(value *string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotNilClientSecret(value *string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotNilInfoURL(value *string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotNilName(value *string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotNilRedirectURL(value *string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotNilScopes(value *string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotNilTokenURL(value *string) *OauthProviderUpdate
- func (op *OauthProviderUpdate) SetNotNilUpdatedAt(value *time.Time) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) SetRedirectURL(s string) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) SetScopes(s string) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) SetTokenURL(s string) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) SetUpdatedAt(t time.Time) *OauthProviderUpdate
- func (opu *OauthProviderUpdate) Where(ps ...predicate.OauthProvider) *OauthProviderUpdate
- type OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) AddAuthStyle(u int64) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) Exec(ctx context.Context) error
- func (c *OauthProviderUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (opuo *OauthProviderUpdateOne) ExecX(ctx context.Context)
- func (opuo *OauthProviderUpdateOne) Mutation() *OauthProviderMutation
- func (c *OauthProviderUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (opuo *OauthProviderUpdateOne) Save(ctx context.Context) (*OauthProvider, error)
- func (opuo *OauthProviderUpdateOne) SaveX(ctx context.Context) *OauthProvider
- func (opuo *OauthProviderUpdateOne) Select(field string, fields ...string) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) SetAuthStyle(u uint64) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) SetAuthURL(s string) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) SetClientID(s string) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) SetClientSecret(s string) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) SetInfoURL(s string) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) SetName(s string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotEmptyAuthStyle(value uint64) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotEmptyAuthURL(value string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotEmptyClientID(value string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotEmptyClientSecret(value string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotEmptyInfoURL(value string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotEmptyName(value string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotEmptyRedirectURL(value string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotEmptyScopes(value string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotEmptyTokenURL(value string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotNilAuthStyle(value *uint64) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotNilAuthURL(value *string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotNilClientID(value *string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotNilClientSecret(value *string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotNilInfoURL(value *string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotNilName(value *string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotNilRedirectURL(value *string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotNilScopes(value *string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotNilTokenURL(value *string) *OauthProviderUpdateOne
- func (op *OauthProviderUpdateOne) SetNotNilUpdatedAt(value *time.Time) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) SetRedirectURL(s string) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) SetScopes(s string) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) SetTokenURL(s string) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) SetUpdatedAt(t time.Time) *OauthProviderUpdateOne
- func (opuo *OauthProviderUpdateOne) Where(ps ...predicate.OauthProvider) *OauthProviderUpdateOne
- type OauthProviders
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageDetails
- type Policy
- type Position
- func (c *Position) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Position) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (po *Position) QueryUsers() *UserQuery
- func (po *Position) String() string
- func (po *Position) Unwrap() *Position
- func (po *Position) Update() *PositionUpdateOne
- func (po *Position) Value(name string) (ent.Value, error)
- type PositionClient
- func (c *PositionClient) Create() *PositionCreate
- func (c *PositionClient) CreateBulk(builders ...*PositionCreate) *PositionCreateBulk
- func (c *PositionClient) Delete() *PositionDelete
- func (c *PositionClient) DeleteOne(po *Position) *PositionDeleteOne
- func (c *PositionClient) DeleteOneID(id uint64) *PositionDeleteOne
- func (c *PositionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *PositionClient) Get(ctx context.Context, id uint64) (*Position, error)
- func (c *PositionClient) GetX(ctx context.Context, id uint64) *Position
- func (c *PositionClient) Hooks() []Hook
- func (c *PositionClient) Intercept(interceptors ...Interceptor)
- func (c *PositionClient) Interceptors() []Interceptor
- func (c *PositionClient) Query() *PositionQuery
- func (c *PositionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *PositionClient) QueryUsers(po *Position) *UserQuery
- func (c *PositionClient) Update() *PositionUpdate
- func (c *PositionClient) UpdateOne(po *Position) *PositionUpdateOne
- func (c *PositionClient) UpdateOneID(id uint64) *PositionUpdateOne
- func (c *PositionClient) Use(hooks ...Hook)
- type PositionCreate
- func (pc *PositionCreate) AddUserIDs(ids ...uuid.UUID) *PositionCreate
- func (pc *PositionCreate) AddUsers(u ...*User) *PositionCreate
- func (pc *PositionCreate) Exec(ctx context.Context) error
- func (c *PositionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (pc *PositionCreate) ExecX(ctx context.Context)
- func (pc *PositionCreate) Mutation() *PositionMutation
- func (c *PositionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pc *PositionCreate) Save(ctx context.Context) (*Position, error)
- func (pc *PositionCreate) SaveX(ctx context.Context) *Position
- func (pc *PositionCreate) SetCode(s string) *PositionCreate
- func (pc *PositionCreate) SetCreatedAt(t time.Time) *PositionCreate
- func (pc *PositionCreate) SetID(u uint64) *PositionCreate
- func (pc *PositionCreate) SetName(s string) *PositionCreate
- func (pc *PositionCreate) SetNillableCreatedAt(t *time.Time) *PositionCreate
- func (pc *PositionCreate) SetNillableRemark(s *string) *PositionCreate
- func (pc *PositionCreate) SetNillableSort(u *uint32) *PositionCreate
- func (pc *PositionCreate) SetNillableStatus(u *uint8) *PositionCreate
- func (pc *PositionCreate) SetNillableUpdatedAt(t *time.Time) *PositionCreate
- func (po *PositionCreate) SetNotNilCode(value *string) *PositionCreate
- func (po *PositionCreate) SetNotNilName(value *string) *PositionCreate
- func (po *PositionCreate) SetNotNilRemark(value *string) *PositionCreate
- func (po *PositionCreate) SetNotNilSort(value *uint32) *PositionCreate
- func (po *PositionCreate) SetNotNilStatus(value *uint8) *PositionCreate
- func (po *PositionCreate) SetNotNilUpdatedAt(value *time.Time) *PositionCreate
- func (pc *PositionCreate) SetRemark(s string) *PositionCreate
- func (pc *PositionCreate) SetSort(u uint32) *PositionCreate
- func (pc *PositionCreate) SetStatus(u uint8) *PositionCreate
- func (pc *PositionCreate) SetUpdatedAt(t time.Time) *PositionCreate
- type PositionCreateBulk
- func (pcb *PositionCreateBulk) Exec(ctx context.Context) error
- func (c *PositionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (pcb *PositionCreateBulk) ExecX(ctx context.Context)
- func (c *PositionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pcb *PositionCreateBulk) Save(ctx context.Context) ([]*Position, error)
- func (pcb *PositionCreateBulk) SaveX(ctx context.Context) []*Position
- type PositionDelete
- func (pd *PositionDelete) Exec(ctx context.Context) (int, error)
- func (c *PositionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (pd *PositionDelete) ExecX(ctx context.Context) int
- func (c *PositionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pd *PositionDelete) Where(ps ...predicate.Position) *PositionDelete
- type PositionDeleteOne
- type PositionEdges
- type PositionGroupBy
- func (pgb *PositionGroupBy) Aggregate(fns ...AggregateFunc) *PositionGroupBy
- func (s *PositionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PositionGroupBy) BoolX(ctx context.Context) bool
- func (s *PositionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PositionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PositionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PositionGroupBy) Float64X(ctx context.Context) float64
- func (s *PositionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PositionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PositionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PositionGroupBy) IntX(ctx context.Context) int
- func (s *PositionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PositionGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PositionGroupBy) Scan(ctx context.Context, v any) error
- func (s *PositionGroupBy) ScanX(ctx context.Context, v any)
- func (s *PositionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PositionGroupBy) StringX(ctx context.Context) string
- func (s *PositionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PositionGroupBy) StringsX(ctx context.Context) []string
- type PositionMutation
- func (m *PositionMutation) AddField(name string, value ent.Value) error
- func (m *PositionMutation) AddSort(u int32)
- func (m *PositionMutation) AddStatus(u int8)
- func (m *PositionMutation) AddUserIDs(ids ...uuid.UUID)
- func (m *PositionMutation) AddedEdges() []string
- func (m *PositionMutation) AddedField(name string) (ent.Value, bool)
- func (m *PositionMutation) AddedFields() []string
- func (m *PositionMutation) AddedIDs(name string) []ent.Value
- func (m *PositionMutation) AddedSort() (r int32, exists bool)
- func (m *PositionMutation) AddedStatus() (r int8, exists bool)
- func (m *PositionMutation) ClearEdge(name string) error
- func (m *PositionMutation) ClearField(name string) error
- func (m *PositionMutation) ClearRemark()
- func (m *PositionMutation) ClearStatus()
- func (m *PositionMutation) ClearUsers()
- func (m *PositionMutation) ClearedEdges() []string
- func (m *PositionMutation) ClearedFields() []string
- func (m PositionMutation) Client() *Client
- func (m *PositionMutation) Code() (r string, exists bool)
- func (m *PositionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *PositionMutation) EdgeCleared(name string) bool
- func (c *PositionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *PositionMutation) Field(name string) (ent.Value, bool)
- func (m *PositionMutation) FieldCleared(name string) bool
- func (m *PositionMutation) Fields() []string
- func (m *PositionMutation) ID() (id uint64, exists bool)
- func (m *PositionMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *PositionMutation) Name() (r string, exists bool)
- func (m *PositionMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *PositionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PositionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PositionMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PositionMutation) OldRemark(ctx context.Context) (v string, err error)
- func (m *PositionMutation) OldSort(ctx context.Context) (v uint32, err error)
- func (m *PositionMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *PositionMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *PositionMutation) Op() Op
- func (c *PositionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *PositionMutation) Remark() (r string, exists bool)
- func (m *PositionMutation) RemarkCleared() bool
- func (m *PositionMutation) RemoveUserIDs(ids ...uuid.UUID)
- func (m *PositionMutation) RemovedEdges() []string
- func (m *PositionMutation) RemovedIDs(name string) []ent.Value
- func (m *PositionMutation) RemovedUsersIDs() (ids []uuid.UUID)
- func (m *PositionMutation) ResetCode()
- func (m *PositionMutation) ResetCreatedAt()
- func (m *PositionMutation) ResetEdge(name string) error
- func (m *PositionMutation) ResetField(name string) error
- func (m *PositionMutation) ResetName()
- func (m *PositionMutation) ResetRemark()
- func (m *PositionMutation) ResetSort()
- func (m *PositionMutation) ResetStatus()
- func (m *PositionMutation) ResetUpdatedAt()
- func (m *PositionMutation) ResetUsers()
- func (m *PositionMutation) SetCode(s string)
- func (m *PositionMutation) SetCreatedAt(t time.Time)
- func (m *PositionMutation) SetField(name string, value ent.Value) error
- func (m *PositionMutation) SetID(id uint64)
- func (m *PositionMutation) SetName(s string)
- func (m *PositionMutation) SetOp(op Op)
- func (m *PositionMutation) SetRemark(s string)
- func (m *PositionMutation) SetSort(u uint32)
- func (m *PositionMutation) SetStatus(u uint8)
- func (m *PositionMutation) SetUpdatedAt(t time.Time)
- func (m *PositionMutation) Sort() (r uint32, exists bool)
- func (m *PositionMutation) Status() (r uint8, exists bool)
- func (m *PositionMutation) StatusCleared() bool
- func (m PositionMutation) Tx() (*Tx, error)
- func (m *PositionMutation) Type() string
- func (m *PositionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *PositionMutation) UsersCleared() bool
- func (m *PositionMutation) UsersIDs() (ids []uuid.UUID)
- func (m *PositionMutation) Where(ps ...predicate.Position)
- func (m *PositionMutation) WhereP(ps ...func(*sql.Selector))
- type PositionPageList
- type PositionPager
- type PositionPaginateOption
- type PositionQuery
- func (pq *PositionQuery) Aggregate(fns ...AggregateFunc) *PositionSelect
- func (pq *PositionQuery) All(ctx context.Context) ([]*Position, error)
- func (pq *PositionQuery) AllX(ctx context.Context) []*Position
- func (pq *PositionQuery) Clone() *PositionQuery
- func (pq *PositionQuery) Count(ctx context.Context) (int, error)
- func (pq *PositionQuery) CountX(ctx context.Context) int
- func (c *PositionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (pq *PositionQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PositionQuery) ExistX(ctx context.Context) bool
- func (pq *PositionQuery) First(ctx context.Context) (*Position, error)
- func (pq *PositionQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (pq *PositionQuery) FirstIDX(ctx context.Context) uint64
- func (pq *PositionQuery) FirstX(ctx context.Context) *Position
- func (pq *PositionQuery) GroupBy(field string, fields ...string) *PositionGroupBy
- func (pq *PositionQuery) IDs(ctx context.Context) (ids []uint64, err error)
- func (pq *PositionQuery) IDsX(ctx context.Context) []uint64
- func (pq *PositionQuery) Limit(limit int) *PositionQuery
- func (pq *PositionQuery) Offset(offset int) *PositionQuery
- func (pq *PositionQuery) Only(ctx context.Context) (*Position, error)
- func (pq *PositionQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (pq *PositionQuery) OnlyIDX(ctx context.Context) uint64
- func (pq *PositionQuery) OnlyX(ctx context.Context) *Position
- func (pq *PositionQuery) Order(o ...position.OrderOption) *PositionQuery
- func (po *PositionQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*PositionPageList, error)
- func (c *PositionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pq *PositionQuery) QueryUsers() *UserQuery
- func (pq *PositionQuery) Select(fields ...string) *PositionSelect
- func (pq *PositionQuery) Unique(unique bool) *PositionQuery
- func (pq *PositionQuery) Where(ps ...predicate.Position) *PositionQuery
- func (pq *PositionQuery) WithUsers(opts ...func(*UserQuery)) *PositionQuery
- type PositionSelect
- func (ps *PositionSelect) Aggregate(fns ...AggregateFunc) *PositionSelect
- func (s *PositionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PositionSelect) BoolX(ctx context.Context) bool
- func (s *PositionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PositionSelect) BoolsX(ctx context.Context) []bool
- func (c PositionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *PositionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PositionSelect) Float64X(ctx context.Context) float64
- func (s *PositionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PositionSelect) Float64sX(ctx context.Context) []float64
- func (s *PositionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PositionSelect) IntX(ctx context.Context) int
- func (s *PositionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PositionSelect) IntsX(ctx context.Context) []int
- func (c PositionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ps *PositionSelect) Scan(ctx context.Context, v any) error
- func (s *PositionSelect) ScanX(ctx context.Context, v any)
- func (s *PositionSelect) String(ctx context.Context) (_ string, err error)
- func (s *PositionSelect) StringX(ctx context.Context) string
- func (s *PositionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PositionSelect) StringsX(ctx context.Context) []string
- type PositionUpdate
- func (pu *PositionUpdate) AddSort(u int32) *PositionUpdate
- func (pu *PositionUpdate) AddStatus(u int8) *PositionUpdate
- func (pu *PositionUpdate) AddUserIDs(ids ...uuid.UUID) *PositionUpdate
- func (pu *PositionUpdate) AddUsers(u ...*User) *PositionUpdate
- func (pu *PositionUpdate) ClearRemark() *PositionUpdate
- func (pu *PositionUpdate) ClearStatus() *PositionUpdate
- func (pu *PositionUpdate) ClearUsers() *PositionUpdate
- func (pu *PositionUpdate) Exec(ctx context.Context) error
- func (c *PositionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (pu *PositionUpdate) ExecX(ctx context.Context)
- func (pu *PositionUpdate) Mutation() *PositionMutation
- func (c *PositionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (pu *PositionUpdate) RemoveUserIDs(ids ...uuid.UUID) *PositionUpdate
- func (pu *PositionUpdate) RemoveUsers(u ...*User) *PositionUpdate
- func (pu *PositionUpdate) Save(ctx context.Context) (int, error)
- func (pu *PositionUpdate) SaveX(ctx context.Context) int
- func (pu *PositionUpdate) SetCode(s string) *PositionUpdate
- func (pu *PositionUpdate) SetName(s string) *PositionUpdate
- func (pu *PositionUpdate) SetNillableRemark(s *string) *PositionUpdate
- func (pu *PositionUpdate) SetNillableSort(u *uint32) *PositionUpdate
- func (pu *PositionUpdate) SetNillableStatus(u *uint8) *PositionUpdate
- func (po *PositionUpdate) SetNotEmptyCode(value string) *PositionUpdate
- func (po *PositionUpdate) SetNotEmptyName(value string) *PositionUpdate
- func (po *PositionUpdate) SetNotEmptyRemark(value string) *PositionUpdate
- func (po *PositionUpdate) SetNotEmptySort(value uint32) *PositionUpdate
- func (po *PositionUpdate) SetNotEmptyStatus(value uint8) *PositionUpdate
- func (po *PositionUpdate) SetNotNilCode(value *string) *PositionUpdate
- func (po *PositionUpdate) SetNotNilName(value *string) *PositionUpdate
- func (po *PositionUpdate) SetNotNilRemark(value *string) *PositionUpdate
- func (po *PositionUpdate) SetNotNilSort(value *uint32) *PositionUpdate
- func (po *PositionUpdate) SetNotNilStatus(value *uint8) *PositionUpdate
- func (po *PositionUpdate) SetNotNilUpdatedAt(value *time.Time) *PositionUpdate
- func (pu *PositionUpdate) SetRemark(s string) *PositionUpdate
- func (pu *PositionUpdate) SetSort(u uint32) *PositionUpdate
- func (pu *PositionUpdate) SetStatus(u uint8) *PositionUpdate
- func (pu *PositionUpdate) SetUpdatedAt(t time.Time) *PositionUpdate
- func (pu *PositionUpdate) Where(ps ...predicate.Position) *PositionUpdate
- type PositionUpdateOne
- func (puo *PositionUpdateOne) AddSort(u int32) *PositionUpdateOne
- func (puo *PositionUpdateOne) AddStatus(u int8) *PositionUpdateOne
- func (puo *PositionUpdateOne) AddUserIDs(ids ...uuid.UUID) *PositionUpdateOne
- func (puo *PositionUpdateOne) AddUsers(u ...*User) *PositionUpdateOne
- func (puo *PositionUpdateOne) ClearRemark() *PositionUpdateOne
- func (puo *PositionUpdateOne) ClearStatus() *PositionUpdateOne
- func (puo *PositionUpdateOne) ClearUsers() *PositionUpdateOne
- func (puo *PositionUpdateOne) Exec(ctx context.Context) error
- func (c *PositionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (puo *PositionUpdateOne) ExecX(ctx context.Context)
- func (puo *PositionUpdateOne) Mutation() *PositionMutation
- func (c *PositionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (puo *PositionUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *PositionUpdateOne
- func (puo *PositionUpdateOne) RemoveUsers(u ...*User) *PositionUpdateOne
- func (puo *PositionUpdateOne) Save(ctx context.Context) (*Position, error)
- func (puo *PositionUpdateOne) SaveX(ctx context.Context) *Position
- func (puo *PositionUpdateOne) Select(field string, fields ...string) *PositionUpdateOne
- func (puo *PositionUpdateOne) SetCode(s string) *PositionUpdateOne
- func (puo *PositionUpdateOne) SetName(s string) *PositionUpdateOne
- func (puo *PositionUpdateOne) SetNillableRemark(s *string) *PositionUpdateOne
- func (puo *PositionUpdateOne) SetNillableSort(u *uint32) *PositionUpdateOne
- func (puo *PositionUpdateOne) SetNillableStatus(u *uint8) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotEmptyCode(value string) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotEmptyName(value string) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotEmptyRemark(value string) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotEmptySort(value uint32) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotEmptyStatus(value uint8) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotNilCode(value *string) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotNilName(value *string) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotNilRemark(value *string) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotNilSort(value *uint32) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotNilStatus(value *uint8) *PositionUpdateOne
- func (po *PositionUpdateOne) SetNotNilUpdatedAt(value *time.Time) *PositionUpdateOne
- func (puo *PositionUpdateOne) SetRemark(s string) *PositionUpdateOne
- func (puo *PositionUpdateOne) SetSort(u uint32) *PositionUpdateOne
- func (puo *PositionUpdateOne) SetStatus(u uint8) *PositionUpdateOne
- func (puo *PositionUpdateOne) SetUpdatedAt(t time.Time) *PositionUpdateOne
- func (puo *PositionUpdateOne) Where(ps ...predicate.Position) *PositionUpdateOne
- type Positions
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Role
- func (c *Role) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Role) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (r *Role) QueryMenus() *MenuQuery
- func (r *Role) QueryUsers() *UserQuery
- func (r *Role) String() string
- func (r *Role) Unwrap() *Role
- func (r *Role) Update() *RoleUpdateOne
- func (r *Role) Value(name string) (ent.Value, error)
- 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 uint64) *RoleDeleteOne
- func (c *RoleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *RoleClient) Get(ctx context.Context, id uint64) (*Role, error)
- func (c *RoleClient) GetX(ctx context.Context, id uint64) *Role
- func (c *RoleClient) Hooks() []Hook
- func (c *RoleClient) Intercept(interceptors ...Interceptor)
- func (c *RoleClient) Interceptors() []Interceptor
- func (c *RoleClient) Query() *RoleQuery
- func (c *RoleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *RoleClient) QueryMenus(r *Role) *MenuQuery
- func (c *RoleClient) QueryUsers(r *Role) *UserQuery
- func (c *RoleClient) Update() *RoleUpdate
- func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
- func (c *RoleClient) UpdateOneID(id uint64) *RoleUpdateOne
- func (c *RoleClient) Use(hooks ...Hook)
- type RoleCreate
- func (rc *RoleCreate) AddMenuIDs(ids ...uint64) *RoleCreate
- func (rc *RoleCreate) AddMenus(m ...*Menu) *RoleCreate
- func (rc *RoleCreate) AddUserIDs(ids ...uuid.UUID) *RoleCreate
- func (rc *RoleCreate) AddUsers(u ...*User) *RoleCreate
- func (rc *RoleCreate) Exec(ctx context.Context) error
- func (c *RoleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (rc *RoleCreate) ExecX(ctx context.Context)
- func (rc *RoleCreate) Mutation() *RoleMutation
- func (c *RoleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)
- func (rc *RoleCreate) SaveX(ctx context.Context) *Role
- func (rc *RoleCreate) SetCode(s string) *RoleCreate
- func (rc *RoleCreate) SetCreatedAt(t time.Time) *RoleCreate
- func (rc *RoleCreate) SetDefaultRouter(s string) *RoleCreate
- func (rc *RoleCreate) SetID(u uint64) *RoleCreate
- func (rc *RoleCreate) SetName(s string) *RoleCreate
- func (rc *RoleCreate) SetNillableCreatedAt(t *time.Time) *RoleCreate
- func (rc *RoleCreate) SetNillableDefaultRouter(s *string) *RoleCreate
- func (rc *RoleCreate) SetNillableRemark(s *string) *RoleCreate
- func (rc *RoleCreate) SetNillableSort(u *uint32) *RoleCreate
- func (rc *RoleCreate) SetNillableStatus(u *uint8) *RoleCreate
- func (rc *RoleCreate) SetNillableUpdatedAt(t *time.Time) *RoleCreate
- func (r *RoleCreate) SetNotNilCode(value *string) *RoleCreate
- func (r *RoleCreate) SetNotNilDefaultRouter(value *string) *RoleCreate
- func (r *RoleCreate) SetNotNilName(value *string) *RoleCreate
- func (r *RoleCreate) SetNotNilRemark(value *string) *RoleCreate
- func (r *RoleCreate) SetNotNilSort(value *uint32) *RoleCreate
- func (r *RoleCreate) SetNotNilStatus(value *uint8) *RoleCreate
- func (r *RoleCreate) SetNotNilUpdatedAt(value *time.Time) *RoleCreate
- func (rc *RoleCreate) SetRemark(s string) *RoleCreate
- func (rc *RoleCreate) SetSort(u uint32) *RoleCreate
- func (rc *RoleCreate) SetStatus(u uint8) *RoleCreate
- func (rc *RoleCreate) SetUpdatedAt(t time.Time) *RoleCreate
- type RoleCreateBulk
- func (rcb *RoleCreateBulk) Exec(ctx context.Context) error
- func (c *RoleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (rcb *RoleCreateBulk) ExecX(ctx context.Context)
- func (c *RoleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (rcb *RoleCreateBulk) Save(ctx context.Context) ([]*Role, error)
- func (rcb *RoleCreateBulk) SaveX(ctx context.Context) []*Role
- type RoleDelete
- func (rd *RoleDelete) Exec(ctx context.Context) (int, error)
- func (c *RoleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (rd *RoleDelete) ExecX(ctx context.Context) int
- func (c *RoleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (rd *RoleDelete) Where(ps ...predicate.Role) *RoleDelete
- type RoleDeleteOne
- type RoleEdges
- 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) AddField(name string, value ent.Value) error
- func (m *RoleMutation) AddMenuIDs(ids ...uint64)
- func (m *RoleMutation) AddSort(u int32)
- func (m *RoleMutation) AddStatus(u int8)
- func (m *RoleMutation) AddUserIDs(ids ...uuid.UUID)
- 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) AddedSort() (r int32, exists bool)
- func (m *RoleMutation) AddedStatus() (r int8, exists bool)
- func (m *RoleMutation) ClearEdge(name string) error
- func (m *RoleMutation) ClearField(name string) error
- func (m *RoleMutation) ClearMenus()
- func (m *RoleMutation) ClearStatus()
- func (m *RoleMutation) ClearUsers()
- func (m *RoleMutation) ClearedEdges() []string
- func (m *RoleMutation) ClearedFields() []string
- func (m RoleMutation) Client() *Client
- func (m *RoleMutation) Code() (r string, exists bool)
- func (m *RoleMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RoleMutation) DefaultRouter() (r string, exists bool)
- func (m *RoleMutation) EdgeCleared(name string) bool
- func (c *RoleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *RoleMutation) Field(name string) (ent.Value, bool)
- func (m *RoleMutation) FieldCleared(name string) bool
- func (m *RoleMutation) Fields() []string
- func (m *RoleMutation) ID() (id uint64, exists bool)
- func (m *RoleMutation) IDs(ctx context.Context) ([]uint64, error)
- func (m *RoleMutation) MenusCleared() bool
- func (m *RoleMutation) MenusIDs() (ids []uint64)
- func (m *RoleMutation) Name() (r string, exists bool)
- func (m *RoleMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *RoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoleMutation) OldDefaultRouter(ctx context.Context) (v string, err error)
- func (m *RoleMutation) OldField(ctx context.Context, name string) (ent.Value, 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 uint32, err error)
- func (m *RoleMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *RoleMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoleMutation) Op() Op
- func (c *RoleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *RoleMutation) Remark() (r string, exists bool)
- func (m *RoleMutation) RemoveMenuIDs(ids ...uint64)
- func (m *RoleMutation) RemoveUserIDs(ids ...uuid.UUID)
- func (m *RoleMutation) RemovedEdges() []string
- func (m *RoleMutation) RemovedIDs(name string) []ent.Value
- func (m *RoleMutation) RemovedMenusIDs() (ids []uint64)
- func (m *RoleMutation) RemovedUsersIDs() (ids []uuid.UUID)
- func (m *RoleMutation) ResetCode()
- func (m *RoleMutation) ResetCreatedAt()
- func (m *RoleMutation) ResetDefaultRouter()
- func (m *RoleMutation) ResetEdge(name string) error
- func (m *RoleMutation) ResetField(name string) error
- func (m *RoleMutation) ResetMenus()
- func (m *RoleMutation) ResetName()
- func (m *RoleMutation) ResetRemark()
- func (m *RoleMutation) ResetSort()
- func (m *RoleMutation) ResetStatus()
- func (m *RoleMutation) ResetUpdatedAt()
- func (m *RoleMutation) ResetUsers()
- func (m *RoleMutation) SetCode(s string)
- func (m *RoleMutation) SetCreatedAt(t time.Time)
- func (m *RoleMutation) SetDefaultRouter(s string)
- func (m *RoleMutation) SetField(name string, value ent.Value) error
- func (m *RoleMutation) SetID(id uint64)
- func (m *RoleMutation) SetName(s string)
- func (m *RoleMutation) SetOp(op Op)
- func (m *RoleMutation) SetRemark(s string)
- func (m *RoleMutation) SetSort(u uint32)
- func (m *RoleMutation) SetStatus(u uint8)
- func (m *RoleMutation) SetUpdatedAt(t time.Time)
- func (m *RoleMutation) Sort() (r uint32, exists bool)
- func (m *RoleMutation) Status() (r uint8, exists bool)
- func (m *RoleMutation) StatusCleared() bool
- func (m RoleMutation) Tx() (*Tx, error)
- func (m *RoleMutation) Type() string
- func (m *RoleMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *RoleMutation) UsersCleared() bool
- func (m *RoleMutation) UsersIDs() (ids []uuid.UUID)
- func (m *RoleMutation) Where(ps ...predicate.Role)
- func (m *RoleMutation) WhereP(ps ...func(*sql.Selector))
- type RolePageList
- type RolePager
- type RolePaginateOption
- 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 (c *RoleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (rq *RoleQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RoleQuery) ExistX(ctx context.Context) bool
- func (rq *RoleQuery) First(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) FirstID(ctx context.Context) (id uint64, err error)
- func (rq *RoleQuery) FirstIDX(ctx context.Context) uint64
- 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 []uint64, err error)
- func (rq *RoleQuery) IDsX(ctx context.Context) []uint64
- func (rq *RoleQuery) Limit(limit int) *RoleQuery
- func (rq *RoleQuery) Offset(offset int) *RoleQuery
- func (rq *RoleQuery) Only(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) OnlyID(ctx context.Context) (id uint64, err error)
- func (rq *RoleQuery) OnlyIDX(ctx context.Context) uint64
- func (rq *RoleQuery) OnlyX(ctx context.Context) *Role
- func (rq *RoleQuery) Order(o ...role.OrderOption) *RoleQuery
- func (r *RoleQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*RolePageList, error)
- func (c *RoleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (rq *RoleQuery) QueryMenus() *MenuQuery
- 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) WithMenus(opts ...func(*MenuQuery)) *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 (c RoleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- 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 (c RoleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- 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) AddMenuIDs(ids ...uint64) *RoleUpdate
- func (ru *RoleUpdate) AddMenus(m ...*Menu) *RoleUpdate
- func (ru *RoleUpdate) AddSort(u int32) *RoleUpdate
- func (ru *RoleUpdate) AddStatus(u int8) *RoleUpdate
- func (ru *RoleUpdate) AddUserIDs(ids ...uuid.UUID) *RoleUpdate
- func (ru *RoleUpdate) AddUsers(u ...*User) *RoleUpdate
- func (ru *RoleUpdate) ClearMenus() *RoleUpdate
- func (ru *RoleUpdate) ClearStatus() *RoleUpdate
- func (ru *RoleUpdate) ClearUsers() *RoleUpdate
- func (ru *RoleUpdate) Exec(ctx context.Context) error
- func (c *RoleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ru *RoleUpdate) ExecX(ctx context.Context)
- func (ru *RoleUpdate) Mutation() *RoleMutation
- func (c *RoleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ru *RoleUpdate) RemoveMenuIDs(ids ...uint64) *RoleUpdate
- func (ru *RoleUpdate) RemoveMenus(m ...*Menu) *RoleUpdate
- func (ru *RoleUpdate) RemoveUserIDs(ids ...uuid.UUID) *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) SetCode(s string) *RoleUpdate
- func (ru *RoleUpdate) SetDefaultRouter(s string) *RoleUpdate
- func (ru *RoleUpdate) SetName(s string) *RoleUpdate
- func (ru *RoleUpdate) SetNillableDefaultRouter(s *string) *RoleUpdate
- func (ru *RoleUpdate) SetNillableRemark(s *string) *RoleUpdate
- func (ru *RoleUpdate) SetNillableSort(u *uint32) *RoleUpdate
- func (ru *RoleUpdate) SetNillableStatus(u *uint8) *RoleUpdate
- func (r *RoleUpdate) SetNotEmptyCode(value string) *RoleUpdate
- func (r *RoleUpdate) SetNotEmptyDefaultRouter(value string) *RoleUpdate
- func (r *RoleUpdate) SetNotEmptyName(value string) *RoleUpdate
- func (r *RoleUpdate) SetNotEmptyRemark(value string) *RoleUpdate
- func (r *RoleUpdate) SetNotEmptySort(value uint32) *RoleUpdate
- func (r *RoleUpdate) SetNotEmptyStatus(value uint8) *RoleUpdate
- func (r *RoleUpdate) SetNotNilCode(value *string) *RoleUpdate
- func (r *RoleUpdate) SetNotNilDefaultRouter(value *string) *RoleUpdate
- func (r *RoleUpdate) SetNotNilName(value *string) *RoleUpdate
- func (r *RoleUpdate) SetNotNilRemark(value *string) *RoleUpdate
- func (r *RoleUpdate) SetNotNilSort(value *uint32) *RoleUpdate
- func (r *RoleUpdate) SetNotNilStatus(value *uint8) *RoleUpdate
- func (r *RoleUpdate) SetNotNilUpdatedAt(value *time.Time) *RoleUpdate
- func (ru *RoleUpdate) SetRemark(s string) *RoleUpdate
- func (ru *RoleUpdate) SetSort(u uint32) *RoleUpdate
- func (ru *RoleUpdate) SetStatus(u uint8) *RoleUpdate
- func (ru *RoleUpdate) SetUpdatedAt(t time.Time) *RoleUpdate
- func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
- type RoleUpdateOne
- func (ruo *RoleUpdateOne) AddMenuIDs(ids ...uint64) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddMenus(m ...*Menu) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddSort(u int32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddStatus(u int8) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddUserIDs(ids ...uuid.UUID) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddUsers(u ...*User) *RoleUpdateOne
- func (ruo *RoleUpdateOne) ClearMenus() *RoleUpdateOne
- func (ruo *RoleUpdateOne) ClearStatus() *RoleUpdateOne
- func (ruo *RoleUpdateOne) ClearUsers() *RoleUpdateOne
- func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
- func (c *RoleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
- func (ruo *RoleUpdateOne) Mutation() *RoleMutation
- func (c *RoleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ruo *RoleUpdateOne) RemoveMenuIDs(ids ...uint64) *RoleUpdateOne
- func (ruo *RoleUpdateOne) RemoveMenus(m ...*Menu) *RoleUpdateOne
- func (ruo *RoleUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *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) SetCode(s string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetDefaultRouter(s string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetName(s string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableDefaultRouter(s *string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableRemark(s *string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableSort(u *uint32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableStatus(u *uint8) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotEmptyCode(value string) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotEmptyDefaultRouter(value string) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotEmptyName(value string) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotEmptyRemark(value string) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotEmptySort(value uint32) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotEmptyStatus(value uint8) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotNilCode(value *string) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotNilDefaultRouter(value *string) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotNilName(value *string) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotNilRemark(value *string) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotNilSort(value *uint32) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotNilStatus(value *uint8) *RoleUpdateOne
- func (r *RoleUpdateOne) SetNotNilUpdatedAt(value *time.Time) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetRemark(s string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetSort(u uint32) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetStatus(u uint8) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetUpdatedAt(t time.Time) *RoleUpdateOne
- func (ruo *RoleUpdateOne) Where(ps ...predicate.Role) *RoleUpdateOne
- type Roles
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Token
- func (c *Token) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *Token) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (t *Token) String() string
- func (t *Token) Unwrap() *Token
- func (t *Token) Update() *TokenUpdateOne
- func (t *Token) Value(name string) (ent.Value, error)
- type TokenClient
- func (c *TokenClient) Create() *TokenCreate
- func (c *TokenClient) CreateBulk(builders ...*TokenCreate) *TokenCreateBulk
- func (c *TokenClient) Delete() *TokenDelete
- func (c *TokenClient) DeleteOne(t *Token) *TokenDeleteOne
- func (c *TokenClient) DeleteOneID(id uuid.UUID) *TokenDeleteOne
- func (c *TokenClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *TokenClient) Get(ctx context.Context, id uuid.UUID) (*Token, error)
- func (c *TokenClient) GetX(ctx context.Context, id uuid.UUID) *Token
- func (c *TokenClient) Hooks() []Hook
- func (c *TokenClient) Intercept(interceptors ...Interceptor)
- func (c *TokenClient) Interceptors() []Interceptor
- func (c *TokenClient) Query() *TokenQuery
- func (c *TokenClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *TokenClient) Update() *TokenUpdate
- func (c *TokenClient) UpdateOne(t *Token) *TokenUpdateOne
- func (c *TokenClient) UpdateOneID(id uuid.UUID) *TokenUpdateOne
- func (c *TokenClient) Use(hooks ...Hook)
- type TokenCreate
- func (tc *TokenCreate) Exec(ctx context.Context) error
- func (c *TokenCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tc *TokenCreate) ExecX(ctx context.Context)
- func (tc *TokenCreate) Mutation() *TokenMutation
- func (c *TokenCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tc *TokenCreate) Save(ctx context.Context) (*Token, error)
- func (tc *TokenCreate) SaveX(ctx context.Context) *Token
- func (tc *TokenCreate) SetCreatedAt(t time.Time) *TokenCreate
- func (tc *TokenCreate) SetExpiredAt(t time.Time) *TokenCreate
- func (tc *TokenCreate) SetID(u uuid.UUID) *TokenCreate
- func (tc *TokenCreate) SetNillableCreatedAt(t *time.Time) *TokenCreate
- func (tc *TokenCreate) SetNillableID(u *uuid.UUID) *TokenCreate
- func (tc *TokenCreate) SetNillableStatus(u *uint8) *TokenCreate
- func (tc *TokenCreate) SetNillableUpdatedAt(t *time.Time) *TokenCreate
- func (t *TokenCreate) SetNotNilExpiredAt(value *time.Time) *TokenCreate
- func (t *TokenCreate) SetNotNilSource(value *string) *TokenCreate
- func (t *TokenCreate) SetNotNilStatus(value *uint8) *TokenCreate
- func (t *TokenCreate) SetNotNilToken(value *string) *TokenCreate
- func (t *TokenCreate) SetNotNilUUID(value *uuid.UUID) *TokenCreate
- func (t *TokenCreate) SetNotNilUpdatedAt(value *time.Time) *TokenCreate
- func (tc *TokenCreate) SetSource(s string) *TokenCreate
- func (tc *TokenCreate) SetStatus(u uint8) *TokenCreate
- func (tc *TokenCreate) SetToken(s string) *TokenCreate
- func (tc *TokenCreate) SetUUID(u uuid.UUID) *TokenCreate
- func (tc *TokenCreate) SetUpdatedAt(t time.Time) *TokenCreate
- type TokenCreateBulk
- func (tcb *TokenCreateBulk) Exec(ctx context.Context) error
- func (c *TokenCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tcb *TokenCreateBulk) ExecX(ctx context.Context)
- func (c *TokenCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tcb *TokenCreateBulk) Save(ctx context.Context) ([]*Token, error)
- func (tcb *TokenCreateBulk) SaveX(ctx context.Context) []*Token
- type TokenDelete
- func (td *TokenDelete) Exec(ctx context.Context) (int, error)
- func (c *TokenDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (td *TokenDelete) ExecX(ctx context.Context) int
- func (c *TokenDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (td *TokenDelete) Where(ps ...predicate.Token) *TokenDelete
- type TokenDeleteOne
- type TokenGroupBy
- func (tgb *TokenGroupBy) Aggregate(fns ...AggregateFunc) *TokenGroupBy
- func (s *TokenGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TokenGroupBy) BoolX(ctx context.Context) bool
- func (s *TokenGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TokenGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TokenGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TokenGroupBy) Float64X(ctx context.Context) float64
- func (s *TokenGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TokenGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TokenGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TokenGroupBy) IntX(ctx context.Context) int
- func (s *TokenGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TokenGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TokenGroupBy) Scan(ctx context.Context, v any) error
- func (s *TokenGroupBy) ScanX(ctx context.Context, v any)
- func (s *TokenGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TokenGroupBy) StringX(ctx context.Context) string
- func (s *TokenGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TokenGroupBy) StringsX(ctx context.Context) []string
- type TokenMutation
- func (m *TokenMutation) AddField(name string, value ent.Value) error
- func (m *TokenMutation) AddStatus(u int8)
- func (m *TokenMutation) AddedEdges() []string
- func (m *TokenMutation) AddedField(name string) (ent.Value, bool)
- func (m *TokenMutation) AddedFields() []string
- func (m *TokenMutation) AddedIDs(name string) []ent.Value
- func (m *TokenMutation) AddedStatus() (r int8, exists bool)
- func (m *TokenMutation) ClearEdge(name string) error
- func (m *TokenMutation) ClearField(name string) error
- func (m *TokenMutation) ClearStatus()
- func (m *TokenMutation) ClearedEdges() []string
- func (m *TokenMutation) ClearedFields() []string
- func (m TokenMutation) Client() *Client
- func (m *TokenMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TokenMutation) EdgeCleared(name string) bool
- func (c *TokenMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *TokenMutation) ExpiredAt() (r time.Time, exists bool)
- func (m *TokenMutation) Field(name string) (ent.Value, bool)
- func (m *TokenMutation) FieldCleared(name string) bool
- func (m *TokenMutation) Fields() []string
- func (m *TokenMutation) ID() (id uuid.UUID, exists bool)
- func (m *TokenMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TokenMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TokenMutation) OldExpiredAt(ctx context.Context) (v time.Time, err error)
- func (m *TokenMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TokenMutation) OldSource(ctx context.Context) (v string, err error)
- func (m *TokenMutation) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *TokenMutation) OldToken(ctx context.Context) (v string, err error)
- func (m *TokenMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *TokenMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TokenMutation) Op() Op
- func (c *TokenMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *TokenMutation) RemovedEdges() []string
- func (m *TokenMutation) RemovedIDs(name string) []ent.Value
- func (m *TokenMutation) ResetCreatedAt()
- func (m *TokenMutation) ResetEdge(name string) error
- func (m *TokenMutation) ResetExpiredAt()
- func (m *TokenMutation) ResetField(name string) error
- func (m *TokenMutation) ResetSource()
- func (m *TokenMutation) ResetStatus()
- func (m *TokenMutation) ResetToken()
- func (m *TokenMutation) ResetUUID()
- func (m *TokenMutation) ResetUpdatedAt()
- func (m *TokenMutation) SetCreatedAt(t time.Time)
- func (m *TokenMutation) SetExpiredAt(t time.Time)
- func (m *TokenMutation) SetField(name string, value ent.Value) error
- func (m *TokenMutation) SetID(id uuid.UUID)
- func (m *TokenMutation) SetOp(op Op)
- func (m *TokenMutation) SetSource(s string)
- func (m *TokenMutation) SetStatus(u uint8)
- func (m *TokenMutation) SetToken(s string)
- func (m *TokenMutation) SetUUID(u uuid.UUID)
- func (m *TokenMutation) SetUpdatedAt(t time.Time)
- func (m *TokenMutation) Source() (r string, exists bool)
- func (m *TokenMutation) Status() (r uint8, exists bool)
- func (m *TokenMutation) StatusCleared() bool
- func (m *TokenMutation) Token() (r string, exists bool)
- func (m TokenMutation) Tx() (*Tx, error)
- func (m *TokenMutation) Type() string
- func (m *TokenMutation) UUID() (r uuid.UUID, exists bool)
- func (m *TokenMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *TokenMutation) Where(ps ...predicate.Token)
- func (m *TokenMutation) WhereP(ps ...func(*sql.Selector))
- type TokenPageList
- type TokenPager
- type TokenPaginateOption
- type TokenQuery
- func (tq *TokenQuery) Aggregate(fns ...AggregateFunc) *TokenSelect
- func (tq *TokenQuery) All(ctx context.Context) ([]*Token, error)
- func (tq *TokenQuery) AllX(ctx context.Context) []*Token
- func (tq *TokenQuery) Clone() *TokenQuery
- func (tq *TokenQuery) Count(ctx context.Context) (int, error)
- func (tq *TokenQuery) CountX(ctx context.Context) int
- func (c *TokenQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tq *TokenQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TokenQuery) ExistX(ctx context.Context) bool
- func (tq *TokenQuery) First(ctx context.Context) (*Token, error)
- func (tq *TokenQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TokenQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (tq *TokenQuery) FirstX(ctx context.Context) *Token
- func (tq *TokenQuery) GroupBy(field string, fields ...string) *TokenGroupBy
- func (tq *TokenQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (tq *TokenQuery) IDsX(ctx context.Context) []uuid.UUID
- func (tq *TokenQuery) Limit(limit int) *TokenQuery
- func (tq *TokenQuery) Offset(offset int) *TokenQuery
- func (tq *TokenQuery) Only(ctx context.Context) (*Token, error)
- func (tq *TokenQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (tq *TokenQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (tq *TokenQuery) OnlyX(ctx context.Context) *Token
- func (tq *TokenQuery) Order(o ...token.OrderOption) *TokenQuery
- func (t *TokenQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*TokenPageList, error)
- func (c *TokenQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tq *TokenQuery) Select(fields ...string) *TokenSelect
- func (tq *TokenQuery) Unique(unique bool) *TokenQuery
- func (tq *TokenQuery) Where(ps ...predicate.Token) *TokenQuery
- type TokenSelect
- func (ts *TokenSelect) Aggregate(fns ...AggregateFunc) *TokenSelect
- func (s *TokenSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TokenSelect) BoolX(ctx context.Context) bool
- func (s *TokenSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TokenSelect) BoolsX(ctx context.Context) []bool
- func (c TokenSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *TokenSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TokenSelect) Float64X(ctx context.Context) float64
- func (s *TokenSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TokenSelect) Float64sX(ctx context.Context) []float64
- func (s *TokenSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TokenSelect) IntX(ctx context.Context) int
- func (s *TokenSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TokenSelect) IntsX(ctx context.Context) []int
- func (c TokenSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ts *TokenSelect) Scan(ctx context.Context, v any) error
- func (s *TokenSelect) ScanX(ctx context.Context, v any)
- func (s *TokenSelect) String(ctx context.Context) (_ string, err error)
- func (s *TokenSelect) StringX(ctx context.Context) string
- func (s *TokenSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TokenSelect) StringsX(ctx context.Context) []string
- type TokenUpdate
- func (tu *TokenUpdate) AddStatus(u int8) *TokenUpdate
- func (tu *TokenUpdate) ClearStatus() *TokenUpdate
- func (tu *TokenUpdate) Exec(ctx context.Context) error
- func (c *TokenUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tu *TokenUpdate) ExecX(ctx context.Context)
- func (tu *TokenUpdate) Mutation() *TokenMutation
- func (c *TokenUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tu *TokenUpdate) Save(ctx context.Context) (int, error)
- func (tu *TokenUpdate) SaveX(ctx context.Context) int
- func (tu *TokenUpdate) SetExpiredAt(t time.Time) *TokenUpdate
- func (tu *TokenUpdate) SetNillableStatus(u *uint8) *TokenUpdate
- func (t *TokenUpdate) SetNotEmptySource(value string) *TokenUpdate
- func (t *TokenUpdate) SetNotEmptyStatus(value uint8) *TokenUpdate
- func (t *TokenUpdate) SetNotEmptyToken(value string) *TokenUpdate
- func (t *TokenUpdate) SetNotNilExpiredAt(value *time.Time) *TokenUpdate
- func (t *TokenUpdate) SetNotNilSource(value *string) *TokenUpdate
- func (t *TokenUpdate) SetNotNilStatus(value *uint8) *TokenUpdate
- func (t *TokenUpdate) SetNotNilToken(value *string) *TokenUpdate
- func (t *TokenUpdate) SetNotNilUUID(value *uuid.UUID) *TokenUpdate
- func (t *TokenUpdate) SetNotNilUpdatedAt(value *time.Time) *TokenUpdate
- func (tu *TokenUpdate) SetSource(s string) *TokenUpdate
- func (tu *TokenUpdate) SetStatus(u uint8) *TokenUpdate
- func (tu *TokenUpdate) SetToken(s string) *TokenUpdate
- func (tu *TokenUpdate) SetUUID(u uuid.UUID) *TokenUpdate
- func (tu *TokenUpdate) SetUpdatedAt(t time.Time) *TokenUpdate
- func (tu *TokenUpdate) Where(ps ...predicate.Token) *TokenUpdate
- type TokenUpdateOne
- func (tuo *TokenUpdateOne) AddStatus(u int8) *TokenUpdateOne
- func (tuo *TokenUpdateOne) ClearStatus() *TokenUpdateOne
- func (tuo *TokenUpdateOne) Exec(ctx context.Context) error
- func (c *TokenUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tuo *TokenUpdateOne) ExecX(ctx context.Context)
- func (tuo *TokenUpdateOne) Mutation() *TokenMutation
- func (c *TokenUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tuo *TokenUpdateOne) Save(ctx context.Context) (*Token, error)
- func (tuo *TokenUpdateOne) SaveX(ctx context.Context) *Token
- func (tuo *TokenUpdateOne) Select(field string, fields ...string) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetExpiredAt(t time.Time) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetNillableStatus(u *uint8) *TokenUpdateOne
- func (t *TokenUpdateOne) SetNotEmptySource(value string) *TokenUpdateOne
- func (t *TokenUpdateOne) SetNotEmptyStatus(value uint8) *TokenUpdateOne
- func (t *TokenUpdateOne) SetNotEmptyToken(value string) *TokenUpdateOne
- func (t *TokenUpdateOne) SetNotNilExpiredAt(value *time.Time) *TokenUpdateOne
- func (t *TokenUpdateOne) SetNotNilSource(value *string) *TokenUpdateOne
- func (t *TokenUpdateOne) SetNotNilStatus(value *uint8) *TokenUpdateOne
- func (t *TokenUpdateOne) SetNotNilToken(value *string) *TokenUpdateOne
- func (t *TokenUpdateOne) SetNotNilUUID(value *uuid.UUID) *TokenUpdateOne
- func (t *TokenUpdateOne) SetNotNilUpdatedAt(value *time.Time) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetSource(s string) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetStatus(u uint8) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetToken(s string) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetUUID(u uuid.UUID) *TokenUpdateOne
- func (tuo *TokenUpdateOne) SetUpdatedAt(t time.Time) *TokenUpdateOne
- func (tuo *TokenUpdateOne) Where(ps ...predicate.Token) *TokenUpdateOne
- type Tokens
- type TraverseFunc
- type Traverser
- type Tx
- func (tx *Tx) Client() *Client
- func (tx *Tx) Commit() error
- func (c *Tx) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (tx *Tx) OnCommit(f CommitHook)
- func (tx *Tx) OnRollback(f RollbackHook)
- func (c *Tx) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (tx *Tx) Rollback() error
- type User
- func (c *User) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *User) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (u *User) QueryDepartments() *DepartmentQuery
- func (u *User) QueryPositions() *PositionQuery
- func (u *User) QueryRoles() *RoleQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
- func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (c *UserClient) QueryDepartments(u *User) *DepartmentQuery
- func (c *UserClient) QueryPositions(u *User) *PositionQuery
- func (c *UserClient) QueryRoles(u *User) *RoleQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddPositionIDs(ids ...uint64) *UserCreate
- func (uc *UserCreate) AddPositions(p ...*Position) *UserCreate
- func (uc *UserCreate) AddRoleIDs(ids ...uint64) *UserCreate
- func (uc *UserCreate) AddRoles(r ...*Role) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAvatar(s string) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetDepartmentID(u uint64) *UserCreate
- func (uc *UserCreate) SetDepartments(d *Department) *UserCreate
- func (uc *UserCreate) SetDepartmentsID(id uint64) *UserCreate
- func (uc *UserCreate) SetDescription(s string) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetHomePath(s string) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetMobile(s string) *UserCreate
- func (uc *UserCreate) SetNickname(s string) *UserCreate
- func (uc *UserCreate) SetNillableAvatar(s *string) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableDepartmentID(u *uint64) *UserCreate
- func (uc *UserCreate) SetNillableDepartmentsID(id *uint64) *UserCreate
- func (uc *UserCreate) SetNillableDescription(s *string) *UserCreate
- func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate
- func (uc *UserCreate) SetNillableHomePath(s *string) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableMobile(s *string) *UserCreate
- func (uc *UserCreate) SetNillableStatus(u *uint8) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (u *UserCreate) SetNotNilAvatar(value *string) *UserCreate
- func (u *UserCreate) SetNotNilDeletedAt(value *time.Time) *UserCreate
- func (u *UserCreate) SetNotNilDepartmentID(value *uint64) *UserCreate
- func (u *UserCreate) SetNotNilDescription(value *string) *UserCreate
- func (u *UserCreate) SetNotNilEmail(value *string) *UserCreate
- func (u *UserCreate) SetNotNilHomePath(value *string) *UserCreate
- func (u *UserCreate) SetNotNilMobile(value *string) *UserCreate
- func (u *UserCreate) SetNotNilNickname(value *string) *UserCreate
- func (u *UserCreate) SetNotNilPassword(value *string) *UserCreate
- func (u *UserCreate) SetNotNilStatus(value *uint8) *UserCreate
- func (u *UserCreate) SetNotNilUpdatedAt(value *time.Time) *UserCreate
- func (u *UserCreate) SetNotNilUsername(value *string) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetStatus(u uint8) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- func (ud *UserDelete) Exec(ctx context.Context) (int, error)
- func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (ud *UserDelete) ExecX(ctx context.Context) int
- func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
- type UserDeleteOne
- type UserEdges
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddPositionIDs(ids ...uint64)
- func (m *UserMutation) AddRoleIDs(ids ...uint64)
- func (m *UserMutation) AddStatus(u int8)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedStatus() (r int8, exists bool)
- func (m *UserMutation) Avatar() (r string, exists bool)
- func (m *UserMutation) AvatarCleared() bool
- func (m *UserMutation) ClearAvatar()
- func (m *UserMutation) ClearDeletedAt()
- func (m *UserMutation) ClearDepartmentID()
- func (m *UserMutation) ClearDepartments()
- func (m *UserMutation) ClearDescription()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearEmail()
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearMobile()
- func (m *UserMutation) ClearPositions()
- func (m *UserMutation) ClearRoles()
- func (m *UserMutation) ClearStatus()
- 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) DeletedAt() (r time.Time, exists bool)
- func (m *UserMutation) DeletedAtCleared() bool
- func (m *UserMutation) DepartmentID() (r uint64, exists bool)
- func (m *UserMutation) DepartmentIDCleared() bool
- func (m *UserMutation) DepartmentsCleared() bool
- func (m *UserMutation) DepartmentsID() (id uint64, exists bool)
- func (m *UserMutation) DepartmentsIDs() (ids []uint64)
- func (m *UserMutation) Description() (r string, exists bool)
- func (m *UserMutation) DescriptionCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) EmailCleared() bool
- func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) HomePath() (r string, exists bool)
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) Mobile() (r string, exists bool)
- func (m *UserMutation) MobileCleared() bool
- func (m *UserMutation) Nickname() (r string, exists bool)
- func (m *UserMutation) OldAvatar(ctx context.Context) (v string, 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) OldDepartmentID(ctx context.Context) (v uint64, 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) OldHomePath(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldMobile(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) OldStatus(ctx context.Context) (v uint8, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) PositionsCleared() bool
- func (m *UserMutation) PositionsIDs() (ids []uint64)
- func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (m *UserMutation) RemovePositionIDs(ids ...uint64)
- func (m *UserMutation) RemoveRoleIDs(ids ...uint64)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedPositionsIDs() (ids []uint64)
- func (m *UserMutation) RemovedRolesIDs() (ids []uint64)
- func (m *UserMutation) ResetAvatar()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetDeletedAt()
- func (m *UserMutation) ResetDepartmentID()
- func (m *UserMutation) ResetDepartments()
- 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) ResetHomePath()
- func (m *UserMutation) ResetMobile()
- func (m *UserMutation) ResetNickname()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetPositions()
- func (m *UserMutation) ResetRoles()
- func (m *UserMutation) ResetStatus()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) RolesCleared() bool
- func (m *UserMutation) RolesIDs() (ids []uint64)
- func (m *UserMutation) SetAvatar(s string)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetDeletedAt(t time.Time)
- func (m *UserMutation) SetDepartmentID(u uint64)
- func (m *UserMutation) SetDepartmentsID(id uint64)
- 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) SetHomePath(s string)
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetMobile(s string)
- func (m *UserMutation) SetNickname(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetStatus(u uint8)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m *UserMutation) SetUsername(s string)
- func (m *UserMutation) Status() (r uint8, exists bool)
- func (m *UserMutation) StatusCleared() bool
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserPageList
- type UserPager
- type UserPaginateOption
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- 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 []uuid.UUID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (u *UserQuery) Page(ctx context.Context, pageNum uint64, pageSize uint64, ...) (*UserPageList, error)
- func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uq *UserQuery) QueryDepartments() *DepartmentQuery
- func (uq *UserQuery) QueryPositions() *PositionQuery
- 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) WithDepartments(opts ...func(*DepartmentQuery)) *UserQuery
- func (uq *UserQuery) WithPositions(opts ...func(*PositionQuery)) *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 (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddPositionIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) AddPositions(p ...*Position) *UserUpdate
- func (uu *UserUpdate) AddRoleIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) AddRoles(r ...*Role) *UserUpdate
- func (uu *UserUpdate) AddStatus(u int8) *UserUpdate
- func (uu *UserUpdate) ClearAvatar() *UserUpdate
- func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
- func (uu *UserUpdate) ClearDepartmentID() *UserUpdate
- func (uu *UserUpdate) ClearDepartments() *UserUpdate
- func (uu *UserUpdate) ClearDescription() *UserUpdate
- func (uu *UserUpdate) ClearEmail() *UserUpdate
- func (uu *UserUpdate) ClearMobile() *UserUpdate
- func (uu *UserUpdate) ClearPositions() *UserUpdate
- func (uu *UserUpdate) ClearRoles() *UserUpdate
- func (uu *UserUpdate) ClearStatus() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uu *UserUpdate) RemovePositionIDs(ids ...uint64) *UserUpdate
- func (uu *UserUpdate) RemovePositions(p ...*Position) *UserUpdate
- func (uu *UserUpdate) RemoveRoleIDs(ids ...uint64) *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) SetAvatar(s string) *UserUpdate
- func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetDepartmentID(u uint64) *UserUpdate
- func (uu *UserUpdate) SetDepartments(d *Department) *UserUpdate
- func (uu *UserUpdate) SetDepartmentsID(id uint64) *UserUpdate
- func (uu *UserUpdate) SetDescription(s string) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetHomePath(s string) *UserUpdate
- func (uu *UserUpdate) SetMobile(s string) *UserUpdate
- func (uu *UserUpdate) SetNickname(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableAvatar(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableDepartmentID(u *uint64) *UserUpdate
- func (uu *UserUpdate) SetNillableDepartmentsID(id *uint64) *UserUpdate
- func (uu *UserUpdate) SetNillableDescription(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableHomePath(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableMobile(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableStatus(u *uint8) *UserUpdate
- func (u *UserUpdate) SetNotEmptyAvatar(value string) *UserUpdate
- func (u *UserUpdate) SetNotEmptyDepartmentID(value uint64) *UserUpdate
- func (u *UserUpdate) SetNotEmptyDescription(value string) *UserUpdate
- func (u *UserUpdate) SetNotEmptyEmail(value string) *UserUpdate
- func (u *UserUpdate) SetNotEmptyHomePath(value string) *UserUpdate
- func (u *UserUpdate) SetNotEmptyMobile(value string) *UserUpdate
- func (u *UserUpdate) SetNotEmptyNickname(value string) *UserUpdate
- func (u *UserUpdate) SetNotEmptyPassword(value string) *UserUpdate
- func (u *UserUpdate) SetNotEmptyStatus(value uint8) *UserUpdate
- func (u *UserUpdate) SetNotEmptyUsername(value string) *UserUpdate
- func (u *UserUpdate) SetNotNilAvatar(value *string) *UserUpdate
- func (u *UserUpdate) SetNotNilDeletedAt(value *time.Time) *UserUpdate
- func (u *UserUpdate) SetNotNilDepartmentID(value *uint64) *UserUpdate
- func (u *UserUpdate) SetNotNilDescription(value *string) *UserUpdate
- func (u *UserUpdate) SetNotNilEmail(value *string) *UserUpdate
- func (u *UserUpdate) SetNotNilHomePath(value *string) *UserUpdate
- func (u *UserUpdate) SetNotNilMobile(value *string) *UserUpdate
- func (u *UserUpdate) SetNotNilNickname(value *string) *UserUpdate
- func (u *UserUpdate) SetNotNilPassword(value *string) *UserUpdate
- func (u *UserUpdate) SetNotNilStatus(value *uint8) *UserUpdate
- func (u *UserUpdate) SetNotNilUpdatedAt(value *time.Time) *UserUpdate
- func (u *UserUpdate) SetNotNilUsername(value *string) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetStatus(u uint8) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddPositionIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPositions(p ...*Position) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRoleIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRoles(r ...*Role) *UserUpdateOne
- func (uuo *UserUpdateOne) AddStatus(u int8) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAvatar() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDepartmentID() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDepartments() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearDescription() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearMobile() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPositions() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearStatus() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
- func (uuo *UserUpdateOne) RemovePositionIDs(ids ...uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePositions(p ...*Position) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRoleIDs(ids ...uint64) *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) SetAvatar(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDepartmentID(u uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDepartments(d *Department) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDepartmentsID(id uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDescription(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetHomePath(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetMobile(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNickname(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAvatar(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDepartmentID(u *uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDepartmentsID(id *uint64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDescription(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableHomePath(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableMobile(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableStatus(u *uint8) *UserUpdateOne
- func (u *UserUpdateOne) SetNotEmptyAvatar(value string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotEmptyDepartmentID(value uint64) *UserUpdateOne
- func (u *UserUpdateOne) SetNotEmptyDescription(value string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotEmptyEmail(value string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotEmptyHomePath(value string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotEmptyMobile(value string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotEmptyNickname(value string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotEmptyPassword(value string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotEmptyStatus(value uint8) *UserUpdateOne
- func (u *UserUpdateOne) SetNotEmptyUsername(value string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilAvatar(value *string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilDeletedAt(value *time.Time) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilDepartmentID(value *uint64) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilDescription(value *string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilEmail(value *string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilHomePath(value *string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilMobile(value *string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilNickname(value *string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilPassword(value *string) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilStatus(value *uint8) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilUpdatedAt(value *time.Time) *UserUpdateOne
- func (u *UserUpdateOne) SetNotNilUsername(value *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetStatus(u uint8) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type 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. TypeAPI = "API" TypeDepartment = "Department" TypeDictionary = "Dictionary" TypeDictionaryDetail = "DictionaryDetail" TypeMenu = "Menu" TypeOauthProvider = "OauthProvider" TypePosition = "Position" TypeRole = "Role" TypeToken = "Token" TypeUser = "User" )
Variables ¶
var DefaultAPIOrder = Desc(api.FieldID)
DefaultAPIOrder is the default ordering of API.
var DefaultDepartmentOrder = Desc(department.FieldID)
DefaultDepartmentOrder is the default ordering of Department.
var DefaultDictionaryDetailOrder = Desc(dictionarydetail.FieldID)
DefaultDictionaryDetailOrder is the default ordering of DictionaryDetail.
var DefaultDictionaryOrder = Desc(dictionary.FieldID)
DefaultDictionaryOrder is the default ordering of Dictionary.
var DefaultMenuOrder = Desc(menu.FieldID)
DefaultMenuOrder is the default ordering of Menu.
var DefaultOauthProviderOrder = Desc(oauthprovider.FieldID)
DefaultOauthProviderOrder is the default ordering of OauthProvider.
var DefaultPositionOrder = Desc(position.FieldID)
DefaultPositionOrder is the default ordering of Position.
var DefaultRoleOrder = Desc(role.FieldID)
DefaultRoleOrder is the default ordering of Role.
var DefaultTokenOrder = Desc(token.FieldID)
DefaultTokenOrder is the default ordering of Token.
var DefaultUserOrder = Desc(user.FieldID)
DefaultUserOrder is the default ordering of User.
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 API ¶
type API struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // API path | API 路径 Path string `json:"path,omitempty"` // API description | API 描述 Description string `json:"description,omitempty"` // API group | API 分组 APIGroup string `json:"api_group,omitempty"` // HTTP method | HTTP 请求类型 Method string `json:"method,omitempty"` // Whether is required | 是否必选 IsRequired bool `json:"is_required,omitempty"` // contains filtered or unexported fields }
API is the model entity for the API schema.
func (*API) ExecContext ¶ added in v1.0.9
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*API) QueryContext ¶ added in v1.0.9
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*API) Unwrap ¶
Unwrap unwraps the API 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 (*API) Update ¶
func (a *API) Update() *APIUpdateOne
Update returns a builder for updating this API. Note that you need to call API.Unwrap() before calling this method if this API was returned from a transaction, and the transaction was committed or rolled back.
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
APIClient is a client for the API schema.
func NewAPIClient ¶
func NewAPIClient(c config) *APIClient
NewAPIClient returns a client for the API from the given config.
func (*APIClient) CreateBulk ¶
func (c *APIClient) CreateBulk(builders ...*APICreate) *APICreateBulk
CreateBulk returns a builder for creating a bulk of API entities.
func (*APIClient) DeleteOne ¶
func (c *APIClient) DeleteOne(a *API) *APIDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*APIClient) DeleteOneID ¶
func (c *APIClient) DeleteOneID(id uint64) *APIDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*APIClient) ExecContext ¶ added in v1.0.9
func (c *APIClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*APIClient) Intercept ¶
func (c *APIClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `api.Intercept(f(g(h())))`.
func (*APIClient) Interceptors ¶
func (c *APIClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*APIClient) QueryContext ¶ added in v1.0.9
func (c *APIClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*APIClient) UpdateOne ¶
func (c *APIClient) UpdateOne(a *API) *APIUpdateOne
UpdateOne returns an update builder for the given entity.
func (*APIClient) UpdateOneID ¶
func (c *APIClient) UpdateOneID(id uint64) *APIUpdateOne
UpdateOneID returns an update builder for the given id.
type APICreate ¶
type APICreate struct {
// contains filtered or unexported fields
}
APICreate is the builder for creating a API entity.
func (*APICreate) ExecContext ¶ added in v1.0.9
func (c *APICreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*APICreate) Mutation ¶
func (ac *APICreate) Mutation() *APIMutation
Mutation returns the APIMutation object of the builder.
func (*APICreate) QueryContext ¶ added in v1.0.9
func (c *APICreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*APICreate) SetAPIGroup ¶
SetAPIGroup sets the "api_group" field.
func (*APICreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*APICreate) SetDescription ¶
SetDescription sets the "description" field.
func (*APICreate) SetIsRequired ¶ added in v1.0.14
SetIsRequired sets the "is_required" field.
func (*APICreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*APICreate) SetNillableIsRequired ¶ added in v1.0.14
SetNillableIsRequired sets the "is_required" field if the given value is not nil.
func (*APICreate) SetNillableMethod ¶
SetNillableMethod sets the "method" field if the given value is not nil.
func (*APICreate) SetNillableUpdatedAt ¶
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*APICreate) SetNotNilAPIGroup ¶ added in v1.0.9
set field if value's pointer is not nil.
func (*APICreate) SetNotNilDescription ¶ added in v1.0.9
set field if value's pointer is not nil.
func (*APICreate) SetNotNilIsRequired ¶ added in v1.0.14
set field if value's pointer is not nil.
func (*APICreate) SetNotNilMethod ¶ added in v1.0.9
set field if value's pointer is not nil.
func (*APICreate) SetNotNilPath ¶ added in v1.0.9
set field if value's pointer is not nil.
func (*APICreate) SetNotNilUpdatedAt ¶ added in v1.0.9
set field if value's pointer is not nil.
type APICreateBulk ¶
type APICreateBulk struct {
// contains filtered or unexported fields
}
APICreateBulk is the builder for creating many API entities in bulk.
func (*APICreateBulk) Exec ¶
func (acb *APICreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*APICreateBulk) ExecContext ¶ added in v1.0.9
func (c *APICreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*APICreateBulk) ExecX ¶
func (acb *APICreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*APICreateBulk) QueryContext ¶ added in v1.0.9
func (c *APICreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type APIDelete ¶
type APIDelete struct {
// contains filtered or unexported fields
}
APIDelete is the builder for deleting a API entity.
func (*APIDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
func (*APIDelete) ExecContext ¶ added in v1.0.9
func (c *APIDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*APIDelete) QueryContext ¶ added in v1.0.9
func (c *APIDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type APIDeleteOne ¶
type APIDeleteOne struct {
// contains filtered or unexported fields
}
APIDeleteOne is the builder for deleting a single API entity.
func (*APIDeleteOne) Exec ¶
func (ado *APIDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*APIDeleteOne) ExecX ¶
func (ado *APIDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*APIDeleteOne) Where ¶
func (ado *APIDeleteOne) Where(ps ...predicate.API) *APIDeleteOne
Where appends a list predicates to the APIDelete builder.
type APIGroupBy ¶
type APIGroupBy struct {
// contains filtered or unexported fields
}
APIGroupBy is the group-by builder for API entities.
func (*APIGroupBy) Aggregate ¶
func (agb *APIGroupBy) Aggregate(fns ...AggregateFunc) *APIGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*APIGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*APIGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*APIGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*APIGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*APIGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*APIGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*APIGroupBy) Scan ¶
func (agb *APIGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*APIGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type APIMutation ¶
type APIMutation struct {
// contains filtered or unexported fields
}
APIMutation represents an operation that mutates the API nodes in the graph.
func (*APIMutation) APIGroup ¶
func (m *APIMutation) APIGroup() (r string, exists bool)
APIGroup returns the value of the "api_group" field in the mutation.
func (*APIMutation) AddField ¶
func (m *APIMutation) 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 (*APIMutation) AddedEdges ¶
func (m *APIMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*APIMutation) AddedField ¶
func (m *APIMutation) 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 (*APIMutation) AddedFields ¶
func (m *APIMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*APIMutation) AddedIDs ¶
func (m *APIMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*APIMutation) ClearEdge ¶
func (m *APIMutation) 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 (*APIMutation) ClearField ¶
func (m *APIMutation) 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 (*APIMutation) ClearedEdges ¶
func (m *APIMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*APIMutation) ClearedFields ¶
func (m *APIMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (APIMutation) Client ¶
func (m APIMutation) 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 (*APIMutation) CreatedAt ¶
func (m *APIMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*APIMutation) Description ¶
func (m *APIMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*APIMutation) EdgeCleared ¶
func (m *APIMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*APIMutation) ExecContext ¶ added in v1.0.9
func (c *APIMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*APIMutation) Field ¶
func (m *APIMutation) 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 (*APIMutation) FieldCleared ¶
func (m *APIMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*APIMutation) Fields ¶
func (m *APIMutation) 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 (*APIMutation) ID ¶
func (m *APIMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*APIMutation) IDs ¶
func (m *APIMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*APIMutation) IsRequired ¶ added in v1.0.14
func (m *APIMutation) IsRequired() (r bool, exists bool)
IsRequired returns the value of the "is_required" field in the mutation.
func (*APIMutation) Method ¶
func (m *APIMutation) Method() (r string, exists bool)
Method returns the value of the "method" field in the mutation.
func (*APIMutation) OldAPIGroup ¶
func (m *APIMutation) OldAPIGroup(ctx context.Context) (v string, err error)
OldAPIGroup returns the old "api_group" field's value of the API entity. If the API 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 (*APIMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the API entity. If the API 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 (*APIMutation) OldDescription ¶
func (m *APIMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the API entity. If the API 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 (*APIMutation) 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 (*APIMutation) OldIsRequired ¶ added in v1.0.14
func (m *APIMutation) OldIsRequired(ctx context.Context) (v bool, err error)
OldIsRequired returns the old "is_required" field's value of the API entity. If the API 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 (*APIMutation) OldMethod ¶
func (m *APIMutation) OldMethod(ctx context.Context) (v string, err error)
OldMethod returns the old "method" field's value of the API entity. If the API 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 (*APIMutation) OldPath ¶
func (m *APIMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the API entity. If the API 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 (*APIMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the API entity. If the API 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 (*APIMutation) Path ¶
func (m *APIMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*APIMutation) QueryContext ¶ added in v1.0.9
func (c *APIMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*APIMutation) RemovedEdges ¶
func (m *APIMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*APIMutation) RemovedIDs ¶
func (m *APIMutation) 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 (*APIMutation) ResetAPIGroup ¶
func (m *APIMutation) ResetAPIGroup()
ResetAPIGroup resets all changes to the "api_group" field.
func (*APIMutation) ResetCreatedAt ¶
func (m *APIMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*APIMutation) ResetDescription ¶
func (m *APIMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*APIMutation) ResetEdge ¶
func (m *APIMutation) 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 (*APIMutation) ResetField ¶
func (m *APIMutation) 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 (*APIMutation) ResetIsRequired ¶ added in v1.0.14
func (m *APIMutation) ResetIsRequired()
ResetIsRequired resets all changes to the "is_required" field.
func (*APIMutation) ResetMethod ¶
func (m *APIMutation) ResetMethod()
ResetMethod resets all changes to the "method" field.
func (*APIMutation) ResetPath ¶
func (m *APIMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*APIMutation) ResetUpdatedAt ¶
func (m *APIMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*APIMutation) SetAPIGroup ¶
func (m *APIMutation) SetAPIGroup(s string)
SetAPIGroup sets the "api_group" field.
func (*APIMutation) SetCreatedAt ¶
func (m *APIMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*APIMutation) SetDescription ¶
func (m *APIMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*APIMutation) SetField ¶
func (m *APIMutation) 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 (*APIMutation) SetID ¶
func (m *APIMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of API entities.
func (*APIMutation) SetIsRequired ¶ added in v1.0.14
func (m *APIMutation) SetIsRequired(b bool)
SetIsRequired sets the "is_required" field.
func (*APIMutation) SetMethod ¶
func (m *APIMutation) SetMethod(s string)
SetMethod sets the "method" field.
func (*APIMutation) SetOp ¶
func (m *APIMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*APIMutation) SetPath ¶
func (m *APIMutation) SetPath(s string)
SetPath sets the "path" field.
func (*APIMutation) SetUpdatedAt ¶
func (m *APIMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (APIMutation) Tx ¶
func (m APIMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*APIMutation) Type ¶
func (m *APIMutation) Type() string
Type returns the node type of this mutation (API).
func (*APIMutation) UpdatedAt ¶
func (m *APIMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*APIMutation) Where ¶
func (m *APIMutation) Where(ps ...predicate.API)
Where appends a list predicates to the APIMutation builder.
func (*APIMutation) WhereP ¶
func (m *APIMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the APIMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type APIPageList ¶
type APIPageList struct { List []*API `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
APIPageList is API PageList result.
type APIPager ¶
type APIPager struct { Order api.OrderOption Filter func(*APIQuery) (*APIQuery, error) }
type APIPaginateOption ¶
type APIPaginateOption func(*APIPager)
APIPaginateOption enables pagination customization.
type APIQuery ¶
type APIQuery struct {
// contains filtered or unexported fields
}
APIQuery is the builder for querying API entities.
func (*APIQuery) Aggregate ¶
func (aq *APIQuery) Aggregate(fns ...AggregateFunc) *APISelect
Aggregate returns a APISelect configured with the given aggregations.
func (*APIQuery) Clone ¶
Clone returns a duplicate of the APIQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*APIQuery) ExecContext ¶ added in v1.0.9
func (c *APIQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*APIQuery) First ¶
First returns the first API entity from the query. Returns a *NotFoundError when no API was found.
func (*APIQuery) FirstID ¶
FirstID returns the first API ID from the query. Returns a *NotFoundError when no API ID was found.
func (*APIQuery) GroupBy ¶
func (aq *APIQuery) GroupBy(field string, fields ...string) *APIGroupBy
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.API.Query(). GroupBy(api.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*APIQuery) Only ¶
Only returns a single API entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one API entity is found. Returns a *NotFoundError when no API entities are found.
func (*APIQuery) OnlyID ¶
OnlyID is like Only, but returns the only API ID in the query. Returns a *NotSingularError when more than one API ID is found. Returns a *NotFoundError when no entities are found.
func (*APIQuery) Order ¶
func (aq *APIQuery) Order(o ...api.OrderOption) *APIQuery
Order specifies how the records should be ordered.
func (*APIQuery) Page ¶
func (a *APIQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...APIPaginateOption, ) (*APIPageList, error)
func (*APIQuery) QueryContext ¶ added in v1.0.9
func (c *APIQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*APIQuery) Select ¶
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.API.Query(). Select(api.FieldCreatedAt). Scan(ctx, &v)
type APISelect ¶
type APISelect struct { *APIQuery // contains filtered or unexported fields }
APISelect is the builder for selecting fields of API entities.
func (*APISelect) Aggregate ¶
func (as *APISelect) Aggregate(fns ...AggregateFunc) *APISelect
Aggregate adds the given aggregation functions to the selector query.
func (*APISelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*APISelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (APISelect) ExecContext ¶ added in v1.0.9
func (c APISelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*APISelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*APISelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*APISelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*APISelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (APISelect) QueryContext ¶ added in v1.0.9
func (c APISelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*APISelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type APIUpdate ¶
type APIUpdate struct {
// contains filtered or unexported fields
}
APIUpdate is the builder for updating API entities.
func (*APIUpdate) ExecContext ¶ added in v1.0.9
func (c *APIUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*APIUpdate) Mutation ¶
func (au *APIUpdate) Mutation() *APIMutation
Mutation returns the APIMutation object of the builder.
func (*APIUpdate) QueryContext ¶ added in v1.0.9
func (c *APIUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*APIUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*APIUpdate) SetAPIGroup ¶
SetAPIGroup sets the "api_group" field.
func (*APIUpdate) SetDescription ¶
SetDescription sets the "description" field.
func (*APIUpdate) SetIsRequired ¶ added in v1.0.14
SetIsRequired sets the "is_required" field.
func (*APIUpdate) SetNillableIsRequired ¶ added in v1.0.14
SetNillableIsRequired sets the "is_required" field if the given value is not nil.
func (*APIUpdate) SetNillableMethod ¶
SetNillableMethod sets the "method" field if the given value is not nil.
func (*APIUpdate) SetNotEmptyAPIGroup ¶
set field if value is not empty. e.g. string does not equal to ""
func (*APIUpdate) SetNotEmptyDescription ¶
set field if value is not empty. e.g. string does not equal to ""
func (*APIUpdate) SetNotEmptyMethod ¶
set field if value is not empty. e.g. string does not equal to ""
func (*APIUpdate) SetNotEmptyPath ¶
set field if value is not empty. e.g. string does not equal to ""
func (*APIUpdate) SetNotNilAPIGroup ¶ added in v1.0.9
set field if value's pointer is not nil.
func (*APIUpdate) SetNotNilDescription ¶ added in v1.0.9
set field if value's pointer is not nil.
func (*APIUpdate) SetNotNilIsRequired ¶ added in v1.0.14
set field if value's pointer is not nil.
func (*APIUpdate) SetNotNilMethod ¶ added in v1.0.9
set field if value's pointer is not nil.
func (*APIUpdate) SetNotNilPath ¶ added in v1.0.9
set field if value's pointer is not nil.
func (*APIUpdate) SetNotNilUpdatedAt ¶ added in v1.0.9
set field if value's pointer is not nil.
func (*APIUpdate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type APIUpdateOne ¶
type APIUpdateOne struct {
// contains filtered or unexported fields
}
APIUpdateOne is the builder for updating a single API entity.
func (*APIUpdateOne) Exec ¶
func (auo *APIUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*APIUpdateOne) ExecContext ¶ added in v1.0.9
func (c *APIUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*APIUpdateOne) ExecX ¶
func (auo *APIUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*APIUpdateOne) Mutation ¶
func (auo *APIUpdateOne) Mutation() *APIMutation
Mutation returns the APIMutation object of the builder.
func (*APIUpdateOne) QueryContext ¶ added in v1.0.9
func (c *APIUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*APIUpdateOne) Save ¶
func (auo *APIUpdateOne) Save(ctx context.Context) (*API, error)
Save executes the query and returns the updated API entity.
func (*APIUpdateOne) SaveX ¶
func (auo *APIUpdateOne) SaveX(ctx context.Context) *API
SaveX is like Save, but panics if an error occurs.
func (*APIUpdateOne) Select ¶
func (auo *APIUpdateOne) Select(field string, fields ...string) *APIUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*APIUpdateOne) SetAPIGroup ¶
func (auo *APIUpdateOne) SetAPIGroup(s string) *APIUpdateOne
SetAPIGroup sets the "api_group" field.
func (*APIUpdateOne) SetDescription ¶
func (auo *APIUpdateOne) SetDescription(s string) *APIUpdateOne
SetDescription sets the "description" field.
func (*APIUpdateOne) SetIsRequired ¶ added in v1.0.14
func (auo *APIUpdateOne) SetIsRequired(b bool) *APIUpdateOne
SetIsRequired sets the "is_required" field.
func (*APIUpdateOne) SetMethod ¶
func (auo *APIUpdateOne) SetMethod(s string) *APIUpdateOne
SetMethod sets the "method" field.
func (*APIUpdateOne) SetNillableIsRequired ¶ added in v1.0.14
func (auo *APIUpdateOne) SetNillableIsRequired(b *bool) *APIUpdateOne
SetNillableIsRequired sets the "is_required" field if the given value is not nil.
func (*APIUpdateOne) SetNillableMethod ¶
func (auo *APIUpdateOne) SetNillableMethod(s *string) *APIUpdateOne
SetNillableMethod sets the "method" field if the given value is not nil.
func (*APIUpdateOne) SetNotEmptyAPIGroup ¶
func (a *APIUpdateOne) SetNotEmptyAPIGroup(value string) *APIUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*APIUpdateOne) SetNotEmptyDescription ¶
func (a *APIUpdateOne) SetNotEmptyDescription(value string) *APIUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*APIUpdateOne) SetNotEmptyMethod ¶
func (a *APIUpdateOne) SetNotEmptyMethod(value string) *APIUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*APIUpdateOne) SetNotEmptyPath ¶
func (a *APIUpdateOne) SetNotEmptyPath(value string) *APIUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*APIUpdateOne) SetNotNilAPIGroup ¶ added in v1.0.9
func (a *APIUpdateOne) SetNotNilAPIGroup(value *string) *APIUpdateOne
set field if value's pointer is not nil.
func (*APIUpdateOne) SetNotNilDescription ¶ added in v1.0.9
func (a *APIUpdateOne) SetNotNilDescription(value *string) *APIUpdateOne
set field if value's pointer is not nil.
func (*APIUpdateOne) SetNotNilIsRequired ¶ added in v1.0.14
func (a *APIUpdateOne) SetNotNilIsRequired(value *bool) *APIUpdateOne
set field if value's pointer is not nil.
func (*APIUpdateOne) SetNotNilMethod ¶ added in v1.0.9
func (a *APIUpdateOne) SetNotNilMethod(value *string) *APIUpdateOne
set field if value's pointer is not nil.
func (*APIUpdateOne) SetNotNilPath ¶ added in v1.0.9
func (a *APIUpdateOne) SetNotNilPath(value *string) *APIUpdateOne
set field if value's pointer is not nil.
func (*APIUpdateOne) SetNotNilUpdatedAt ¶ added in v1.0.9
func (a *APIUpdateOne) SetNotNilUpdatedAt(value *time.Time) *APIUpdateOne
set field if value's pointer is not nil.
func (*APIUpdateOne) SetPath ¶
func (auo *APIUpdateOne) SetPath(s string) *APIUpdateOne
SetPath sets the "path" field.
func (*APIUpdateOne) SetUpdatedAt ¶
func (auo *APIUpdateOne) SetUpdatedAt(t time.Time) *APIUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*APIUpdateOne) Where ¶
func (auo *APIUpdateOne) Where(ps ...predicate.API) *APIUpdateOne
Where appends a list predicates to the APIUpdate builder.
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 // API is the client for interacting with the API builders. API *APIClient // Department is the client for interacting with the Department builders. Department *DepartmentClient // Dictionary is the client for interacting with the Dictionary builders. Dictionary *DictionaryClient // DictionaryDetail is the client for interacting with the DictionaryDetail builders. DictionaryDetail *DictionaryDetailClient // Menu is the client for interacting with the Menu builders. Menu *MenuClient // OauthProvider is the client for interacting with the OauthProvider builders. OauthProvider *OauthProviderClient // Position is the client for interacting with the Position builders. Position *PositionClient // Role is the client for interacting with the Role builders. Role *RoleClient // Token is the client for interacting with the Token builders. Token *TokenClient // 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(). API. Query(). Count(ctx)
func (*Client) ExecContext ¶ added in v1.0.9
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
func (*Client) QueryContext ¶ added in v1.0.9
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Department ¶
type Department struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1 : normal 2 : ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Sort Number | 排序编号 Sort uint32 `json:"sort,omitempty"` // Department name | 部门名称 Name string `json:"name,omitempty"` // Parents' IDs | 父级列表 Ancestors string `json:"ancestors,omitempty"` // Department leader | 部门负责人 Leader string `json:"leader,omitempty"` // Leader's phone number | 负责人电话 Phone string `json:"phone,omitempty"` // Leader's email | 部门负责人电子邮箱 Email string `json:"email,omitempty"` // Remark | 备注 Remark string `json:"remark,omitempty"` // Parent department ID | 父级部门ID ParentID uint64 `json:"parent_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DepartmentQuery when eager-loading is set. Edges DepartmentEdges `json:"edges"` // contains filtered or unexported fields }
Department is the model entity for the Department schema.
func (*Department) ExecContext ¶ added in v1.0.9
func (c *Department) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Department) QueryChildren ¶
func (d *Department) QueryChildren() *DepartmentQuery
QueryChildren queries the "children" edge of the Department entity.
func (*Department) QueryContext ¶ added in v1.0.9
func (c *Department) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Department) QueryParent ¶
func (d *Department) QueryParent() *DepartmentQuery
QueryParent queries the "parent" edge of the Department entity.
func (*Department) QueryUsers ¶
func (d *Department) QueryUsers() *UserQuery
QueryUsers queries the "users" edge of the Department entity.
func (*Department) String ¶
func (d *Department) String() string
String implements the fmt.Stringer.
func (*Department) Unwrap ¶
func (d *Department) Unwrap() *Department
Unwrap unwraps the Department 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 (*Department) Update ¶
func (d *Department) Update() *DepartmentUpdateOne
Update returns a builder for updating this Department. Note that you need to call Department.Unwrap() before calling this method if this Department was returned from a transaction, and the transaction was committed or rolled back.
type DepartmentClient ¶
type DepartmentClient struct {
// contains filtered or unexported fields
}
DepartmentClient is a client for the Department schema.
func NewDepartmentClient ¶
func NewDepartmentClient(c config) *DepartmentClient
NewDepartmentClient returns a client for the Department from the given config.
func (*DepartmentClient) Create ¶
func (c *DepartmentClient) Create() *DepartmentCreate
Create returns a builder for creating a Department entity.
func (*DepartmentClient) CreateBulk ¶
func (c *DepartmentClient) CreateBulk(builders ...*DepartmentCreate) *DepartmentCreateBulk
CreateBulk returns a builder for creating a bulk of Department entities.
func (*DepartmentClient) Delete ¶
func (c *DepartmentClient) Delete() *DepartmentDelete
Delete returns a delete builder for Department.
func (*DepartmentClient) DeleteOne ¶
func (c *DepartmentClient) DeleteOne(d *Department) *DepartmentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DepartmentClient) DeleteOneID ¶
func (c *DepartmentClient) DeleteOneID(id uint64) *DepartmentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DepartmentClient) ExecContext ¶ added in v1.0.9
func (c *DepartmentClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DepartmentClient) Get ¶
func (c *DepartmentClient) Get(ctx context.Context, id uint64) (*Department, error)
Get returns a Department entity by its id.
func (*DepartmentClient) GetX ¶
func (c *DepartmentClient) GetX(ctx context.Context, id uint64) *Department
GetX is like Get, but panics if an error occurs.
func (*DepartmentClient) Hooks ¶
func (c *DepartmentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DepartmentClient) Intercept ¶
func (c *DepartmentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `department.Intercept(f(g(h())))`.
func (*DepartmentClient) Interceptors ¶
func (c *DepartmentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DepartmentClient) Query ¶
func (c *DepartmentClient) Query() *DepartmentQuery
Query returns a query builder for Department.
func (*DepartmentClient) QueryChildren ¶
func (c *DepartmentClient) QueryChildren(d *Department) *DepartmentQuery
QueryChildren queries the children edge of a Department.
func (*DepartmentClient) QueryContext ¶ added in v1.0.9
func (c *DepartmentClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DepartmentClient) QueryParent ¶
func (c *DepartmentClient) QueryParent(d *Department) *DepartmentQuery
QueryParent queries the parent edge of a Department.
func (*DepartmentClient) QueryUsers ¶
func (c *DepartmentClient) QueryUsers(d *Department) *UserQuery
QueryUsers queries the users edge of a Department.
func (*DepartmentClient) Update ¶
func (c *DepartmentClient) Update() *DepartmentUpdate
Update returns an update builder for Department.
func (*DepartmentClient) UpdateOne ¶
func (c *DepartmentClient) UpdateOne(d *Department) *DepartmentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DepartmentClient) UpdateOneID ¶
func (c *DepartmentClient) UpdateOneID(id uint64) *DepartmentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DepartmentClient) Use ¶
func (c *DepartmentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `department.Hooks(f(g(h())))`.
type DepartmentCreate ¶
type DepartmentCreate struct {
// contains filtered or unexported fields
}
DepartmentCreate is the builder for creating a Department entity.
func (*DepartmentCreate) AddChildIDs ¶
func (dc *DepartmentCreate) AddChildIDs(ids ...uint64) *DepartmentCreate
AddChildIDs adds the "children" edge to the Department entity by IDs.
func (*DepartmentCreate) AddChildren ¶
func (dc *DepartmentCreate) AddChildren(d ...*Department) *DepartmentCreate
AddChildren adds the "children" edges to the Department entity.
func (*DepartmentCreate) AddUserIDs ¶
func (dc *DepartmentCreate) AddUserIDs(ids ...uuid.UUID) *DepartmentCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*DepartmentCreate) AddUsers ¶
func (dc *DepartmentCreate) AddUsers(u ...*User) *DepartmentCreate
AddUsers adds the "users" edges to the User entity.
func (*DepartmentCreate) Exec ¶
func (dc *DepartmentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DepartmentCreate) ExecContext ¶ added in v1.0.9
func (c *DepartmentCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DepartmentCreate) ExecX ¶
func (dc *DepartmentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DepartmentCreate) Mutation ¶
func (dc *DepartmentCreate) Mutation() *DepartmentMutation
Mutation returns the DepartmentMutation object of the builder.
func (*DepartmentCreate) QueryContext ¶ added in v1.0.9
func (c *DepartmentCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DepartmentCreate) Save ¶
func (dc *DepartmentCreate) Save(ctx context.Context) (*Department, error)
Save creates the Department in the database.
func (*DepartmentCreate) SaveX ¶
func (dc *DepartmentCreate) SaveX(ctx context.Context) *Department
SaveX calls Save and panics if Save returns an error.
func (*DepartmentCreate) SetAncestors ¶
func (dc *DepartmentCreate) SetAncestors(s string) *DepartmentCreate
SetAncestors sets the "ancestors" field.
func (*DepartmentCreate) SetCreatedAt ¶
func (dc *DepartmentCreate) SetCreatedAt(t time.Time) *DepartmentCreate
SetCreatedAt sets the "created_at" field.
func (*DepartmentCreate) SetEmail ¶
func (dc *DepartmentCreate) SetEmail(s string) *DepartmentCreate
SetEmail sets the "email" field.
func (*DepartmentCreate) SetID ¶
func (dc *DepartmentCreate) SetID(u uint64) *DepartmentCreate
SetID sets the "id" field.
func (*DepartmentCreate) SetLeader ¶
func (dc *DepartmentCreate) SetLeader(s string) *DepartmentCreate
SetLeader sets the "leader" field.
func (*DepartmentCreate) SetName ¶
func (dc *DepartmentCreate) SetName(s string) *DepartmentCreate
SetName sets the "name" field.
func (*DepartmentCreate) SetNillableAncestors ¶ added in v1.0.13
func (dc *DepartmentCreate) SetNillableAncestors(s *string) *DepartmentCreate
SetNillableAncestors sets the "ancestors" field if the given value is not nil.
func (*DepartmentCreate) SetNillableCreatedAt ¶
func (dc *DepartmentCreate) SetNillableCreatedAt(t *time.Time) *DepartmentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DepartmentCreate) SetNillableParentID ¶
func (dc *DepartmentCreate) SetNillableParentID(u *uint64) *DepartmentCreate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*DepartmentCreate) SetNillableRemark ¶ added in v1.0.13
func (dc *DepartmentCreate) SetNillableRemark(s *string) *DepartmentCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*DepartmentCreate) SetNillableSort ¶
func (dc *DepartmentCreate) SetNillableSort(u *uint32) *DepartmentCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*DepartmentCreate) SetNillableStatus ¶
func (dc *DepartmentCreate) SetNillableStatus(u *uint8) *DepartmentCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*DepartmentCreate) SetNillableUpdatedAt ¶
func (dc *DepartmentCreate) SetNillableUpdatedAt(t *time.Time) *DepartmentCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DepartmentCreate) SetNotNilAncestors ¶ added in v1.0.9
func (d *DepartmentCreate) SetNotNilAncestors(value *string) *DepartmentCreate
set field if value's pointer is not nil.
func (*DepartmentCreate) SetNotNilEmail ¶ added in v1.0.9
func (d *DepartmentCreate) SetNotNilEmail(value *string) *DepartmentCreate
set field if value's pointer is not nil.
func (*DepartmentCreate) SetNotNilLeader ¶ added in v1.0.9
func (d *DepartmentCreate) SetNotNilLeader(value *string) *DepartmentCreate
set field if value's pointer is not nil.
func (*DepartmentCreate) SetNotNilName ¶ added in v1.0.9
func (d *DepartmentCreate) SetNotNilName(value *string) *DepartmentCreate
set field if value's pointer is not nil.
func (*DepartmentCreate) SetNotNilParentID ¶ added in v1.0.9
func (d *DepartmentCreate) SetNotNilParentID(value *uint64) *DepartmentCreate
set field if value's pointer is not nil.
func (*DepartmentCreate) SetNotNilPhone ¶ added in v1.0.9
func (d *DepartmentCreate) SetNotNilPhone(value *string) *DepartmentCreate
set field if value's pointer is not nil.
func (*DepartmentCreate) SetNotNilRemark ¶ added in v1.0.9
func (d *DepartmentCreate) SetNotNilRemark(value *string) *DepartmentCreate
set field if value's pointer is not nil.
func (*DepartmentCreate) SetNotNilSort ¶ added in v1.0.9
func (d *DepartmentCreate) SetNotNilSort(value *uint32) *DepartmentCreate
set field if value's pointer is not nil.
func (*DepartmentCreate) SetNotNilStatus ¶ added in v1.0.9
func (d *DepartmentCreate) SetNotNilStatus(value *uint8) *DepartmentCreate
set field if value's pointer is not nil.
func (*DepartmentCreate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (d *DepartmentCreate) SetNotNilUpdatedAt(value *time.Time) *DepartmentCreate
set field if value's pointer is not nil.
func (*DepartmentCreate) SetParent ¶
func (dc *DepartmentCreate) SetParent(d *Department) *DepartmentCreate
SetParent sets the "parent" edge to the Department entity.
func (*DepartmentCreate) SetParentID ¶
func (dc *DepartmentCreate) SetParentID(u uint64) *DepartmentCreate
SetParentID sets the "parent_id" field.
func (*DepartmentCreate) SetPhone ¶
func (dc *DepartmentCreate) SetPhone(s string) *DepartmentCreate
SetPhone sets the "phone" field.
func (*DepartmentCreate) SetRemark ¶
func (dc *DepartmentCreate) SetRemark(s string) *DepartmentCreate
SetRemark sets the "remark" field.
func (*DepartmentCreate) SetSort ¶
func (dc *DepartmentCreate) SetSort(u uint32) *DepartmentCreate
SetSort sets the "sort" field.
func (*DepartmentCreate) SetStatus ¶
func (dc *DepartmentCreate) SetStatus(u uint8) *DepartmentCreate
SetStatus sets the "status" field.
func (*DepartmentCreate) SetUpdatedAt ¶
func (dc *DepartmentCreate) SetUpdatedAt(t time.Time) *DepartmentCreate
SetUpdatedAt sets the "updated_at" field.
type DepartmentCreateBulk ¶
type DepartmentCreateBulk struct {
// contains filtered or unexported fields
}
DepartmentCreateBulk is the builder for creating many Department entities in bulk.
func (*DepartmentCreateBulk) Exec ¶
func (dcb *DepartmentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DepartmentCreateBulk) ExecContext ¶ added in v1.0.9
func (c *DepartmentCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DepartmentCreateBulk) ExecX ¶
func (dcb *DepartmentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DepartmentCreateBulk) QueryContext ¶ added in v1.0.9
func (c *DepartmentCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DepartmentCreateBulk) Save ¶
func (dcb *DepartmentCreateBulk) Save(ctx context.Context) ([]*Department, error)
Save creates the Department entities in the database.
func (*DepartmentCreateBulk) SaveX ¶
func (dcb *DepartmentCreateBulk) SaveX(ctx context.Context) []*Department
SaveX is like Save, but panics if an error occurs.
type DepartmentDelete ¶
type DepartmentDelete struct {
// contains filtered or unexported fields
}
DepartmentDelete is the builder for deleting a Department entity.
func (*DepartmentDelete) Exec ¶
func (dd *DepartmentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DepartmentDelete) ExecContext ¶ added in v1.0.9
func (c *DepartmentDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DepartmentDelete) ExecX ¶
func (dd *DepartmentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DepartmentDelete) QueryContext ¶ added in v1.0.9
func (c *DepartmentDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DepartmentDelete) Where ¶
func (dd *DepartmentDelete) Where(ps ...predicate.Department) *DepartmentDelete
Where appends a list predicates to the DepartmentDelete builder.
type DepartmentDeleteOne ¶
type DepartmentDeleteOne struct {
// contains filtered or unexported fields
}
DepartmentDeleteOne is the builder for deleting a single Department entity.
func (*DepartmentDeleteOne) Exec ¶
func (ddo *DepartmentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DepartmentDeleteOne) ExecX ¶
func (ddo *DepartmentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DepartmentDeleteOne) Where ¶
func (ddo *DepartmentDeleteOne) Where(ps ...predicate.Department) *DepartmentDeleteOne
Where appends a list predicates to the DepartmentDelete builder.
type DepartmentEdges ¶
type DepartmentEdges struct { // Parent holds the value of the parent edge. Parent *Department `json:"parent,omitempty"` // Children holds the value of the children edge. Children []*Department `json:"children,omitempty"` // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // contains filtered or unexported fields }
DepartmentEdges holds the relations/edges for other nodes in the graph.
func (DepartmentEdges) ChildrenOrErr ¶
func (e DepartmentEdges) ChildrenOrErr() ([]*Department, error)
ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.
func (DepartmentEdges) ParentOrErr ¶
func (e DepartmentEdges) ParentOrErr() (*Department, error)
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (DepartmentEdges) UsersOrErr ¶
func (e DepartmentEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type DepartmentGroupBy ¶
type DepartmentGroupBy struct {
// contains filtered or unexported fields
}
DepartmentGroupBy is the group-by builder for Department entities.
func (*DepartmentGroupBy) Aggregate ¶
func (dgb *DepartmentGroupBy) Aggregate(fns ...AggregateFunc) *DepartmentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DepartmentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DepartmentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DepartmentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DepartmentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DepartmentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DepartmentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DepartmentGroupBy) Scan ¶
func (dgb *DepartmentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DepartmentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DepartmentMutation ¶
type DepartmentMutation struct {
// contains filtered or unexported fields
}
DepartmentMutation represents an operation that mutates the Department nodes in the graph.
func (*DepartmentMutation) AddChildIDs ¶
func (m *DepartmentMutation) AddChildIDs(ids ...uint64)
AddChildIDs adds the "children" edge to the Department entity by ids.
func (*DepartmentMutation) AddField ¶
func (m *DepartmentMutation) 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 (*DepartmentMutation) AddSort ¶
func (m *DepartmentMutation) AddSort(u int32)
AddSort adds u to the "sort" field.
func (*DepartmentMutation) AddStatus ¶
func (m *DepartmentMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*DepartmentMutation) AddUserIDs ¶
func (m *DepartmentMutation) AddUserIDs(ids ...uuid.UUID)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*DepartmentMutation) AddedEdges ¶
func (m *DepartmentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DepartmentMutation) AddedField ¶
func (m *DepartmentMutation) 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 (*DepartmentMutation) AddedFields ¶
func (m *DepartmentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DepartmentMutation) AddedIDs ¶
func (m *DepartmentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DepartmentMutation) AddedSort ¶
func (m *DepartmentMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*DepartmentMutation) AddedStatus ¶
func (m *DepartmentMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*DepartmentMutation) Ancestors ¶
func (m *DepartmentMutation) Ancestors() (r string, exists bool)
Ancestors returns the value of the "ancestors" field in the mutation.
func (*DepartmentMutation) AncestorsCleared ¶ added in v1.0.13
func (m *DepartmentMutation) AncestorsCleared() bool
AncestorsCleared returns if the "ancestors" field was cleared in this mutation.
func (*DepartmentMutation) ChildrenCleared ¶
func (m *DepartmentMutation) ChildrenCleared() bool
ChildrenCleared reports if the "children" edge to the Department entity was cleared.
func (*DepartmentMutation) ChildrenIDs ¶
func (m *DepartmentMutation) ChildrenIDs() (ids []uint64)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*DepartmentMutation) ClearAncestors ¶ added in v1.0.13
func (m *DepartmentMutation) ClearAncestors()
ClearAncestors clears the value of the "ancestors" field.
func (*DepartmentMutation) ClearChildren ¶
func (m *DepartmentMutation) ClearChildren()
ClearChildren clears the "children" edge to the Department entity.
func (*DepartmentMutation) ClearEdge ¶
func (m *DepartmentMutation) 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 (*DepartmentMutation) ClearField ¶
func (m *DepartmentMutation) 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 (*DepartmentMutation) ClearParent ¶
func (m *DepartmentMutation) ClearParent()
ClearParent clears the "parent" edge to the Department entity.
func (*DepartmentMutation) ClearParentID ¶
func (m *DepartmentMutation) ClearParentID()
ClearParentID clears the value of the "parent_id" field.
func (*DepartmentMutation) ClearRemark ¶ added in v1.0.13
func (m *DepartmentMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*DepartmentMutation) ClearStatus ¶
func (m *DepartmentMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*DepartmentMutation) ClearUsers ¶
func (m *DepartmentMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*DepartmentMutation) ClearedEdges ¶
func (m *DepartmentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DepartmentMutation) ClearedFields ¶
func (m *DepartmentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DepartmentMutation) Client ¶
func (m DepartmentMutation) 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 (*DepartmentMutation) CreatedAt ¶
func (m *DepartmentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DepartmentMutation) EdgeCleared ¶
func (m *DepartmentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DepartmentMutation) Email ¶
func (m *DepartmentMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*DepartmentMutation) ExecContext ¶ added in v1.0.9
func (c *DepartmentMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DepartmentMutation) Field ¶
func (m *DepartmentMutation) 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 (*DepartmentMutation) FieldCleared ¶
func (m *DepartmentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DepartmentMutation) Fields ¶
func (m *DepartmentMutation) 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 (*DepartmentMutation) ID ¶
func (m *DepartmentMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DepartmentMutation) IDs ¶
func (m *DepartmentMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DepartmentMutation) Leader ¶
func (m *DepartmentMutation) Leader() (r string, exists bool)
Leader returns the value of the "leader" field in the mutation.
func (*DepartmentMutation) Name ¶
func (m *DepartmentMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*DepartmentMutation) OldAncestors ¶
func (m *DepartmentMutation) OldAncestors(ctx context.Context) (v string, err error)
OldAncestors returns the old "ancestors" field's value of the Department entity. If the Department 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 (*DepartmentMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Department entity. If the Department 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 (*DepartmentMutation) OldEmail ¶
func (m *DepartmentMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the Department entity. If the Department 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 (*DepartmentMutation) 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 (*DepartmentMutation) OldLeader ¶
func (m *DepartmentMutation) OldLeader(ctx context.Context) (v string, err error)
OldLeader returns the old "leader" field's value of the Department entity. If the Department 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 (*DepartmentMutation) OldName ¶
func (m *DepartmentMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Department entity. If the Department 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 (*DepartmentMutation) OldParentID ¶
func (m *DepartmentMutation) OldParentID(ctx context.Context) (v uint64, err error)
OldParentID returns the old "parent_id" field's value of the Department entity. If the Department 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 (*DepartmentMutation) OldPhone ¶
func (m *DepartmentMutation) OldPhone(ctx context.Context) (v string, err error)
OldPhone returns the old "phone" field's value of the Department entity. If the Department 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 (*DepartmentMutation) OldRemark ¶
func (m *DepartmentMutation) OldRemark(ctx context.Context) (v string, err error)
OldRemark returns the old "remark" field's value of the Department entity. If the Department 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 (*DepartmentMutation) OldSort ¶
func (m *DepartmentMutation) OldSort(ctx context.Context) (v uint32, err error)
OldSort returns the old "sort" field's value of the Department entity. If the Department 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 (*DepartmentMutation) OldStatus ¶
func (m *DepartmentMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Department entity. If the Department 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 (*DepartmentMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Department entity. If the Department 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 (*DepartmentMutation) ParentCleared ¶
func (m *DepartmentMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the Department entity was cleared.
func (*DepartmentMutation) ParentID ¶
func (m *DepartmentMutation) ParentID() (r uint64, exists bool)
ParentID returns the value of the "parent_id" field in the mutation.
func (*DepartmentMutation) ParentIDCleared ¶
func (m *DepartmentMutation) ParentIDCleared() bool
ParentIDCleared returns if the "parent_id" field was cleared in this mutation.
func (*DepartmentMutation) ParentIDs ¶
func (m *DepartmentMutation) ParentIDs() (ids []uint64)
ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.
func (*DepartmentMutation) Phone ¶
func (m *DepartmentMutation) Phone() (r string, exists bool)
Phone returns the value of the "phone" field in the mutation.
func (*DepartmentMutation) QueryContext ¶ added in v1.0.9
func (c *DepartmentMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DepartmentMutation) Remark ¶
func (m *DepartmentMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*DepartmentMutation) RemarkCleared ¶ added in v1.0.13
func (m *DepartmentMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*DepartmentMutation) RemoveChildIDs ¶
func (m *DepartmentMutation) RemoveChildIDs(ids ...uint64)
RemoveChildIDs removes the "children" edge to the Department entity by IDs.
func (*DepartmentMutation) RemoveUserIDs ¶
func (m *DepartmentMutation) RemoveUserIDs(ids ...uuid.UUID)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*DepartmentMutation) RemovedChildrenIDs ¶
func (m *DepartmentMutation) RemovedChildrenIDs() (ids []uint64)
RemovedChildren returns the removed IDs of the "children" edge to the Department entity.
func (*DepartmentMutation) RemovedEdges ¶
func (m *DepartmentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DepartmentMutation) RemovedIDs ¶
func (m *DepartmentMutation) 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 (*DepartmentMutation) RemovedUsersIDs ¶
func (m *DepartmentMutation) RemovedUsersIDs() (ids []uuid.UUID)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*DepartmentMutation) ResetAncestors ¶
func (m *DepartmentMutation) ResetAncestors()
ResetAncestors resets all changes to the "ancestors" field.
func (*DepartmentMutation) ResetChildren ¶
func (m *DepartmentMutation) ResetChildren()
ResetChildren resets all changes to the "children" edge.
func (*DepartmentMutation) ResetCreatedAt ¶
func (m *DepartmentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DepartmentMutation) ResetEdge ¶
func (m *DepartmentMutation) 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 (*DepartmentMutation) ResetEmail ¶
func (m *DepartmentMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*DepartmentMutation) ResetField ¶
func (m *DepartmentMutation) 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 (*DepartmentMutation) ResetLeader ¶
func (m *DepartmentMutation) ResetLeader()
ResetLeader resets all changes to the "leader" field.
func (*DepartmentMutation) ResetName ¶
func (m *DepartmentMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*DepartmentMutation) ResetParent ¶
func (m *DepartmentMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*DepartmentMutation) ResetParentID ¶
func (m *DepartmentMutation) ResetParentID()
ResetParentID resets all changes to the "parent_id" field.
func (*DepartmentMutation) ResetPhone ¶
func (m *DepartmentMutation) ResetPhone()
ResetPhone resets all changes to the "phone" field.
func (*DepartmentMutation) ResetRemark ¶
func (m *DepartmentMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*DepartmentMutation) ResetSort ¶
func (m *DepartmentMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*DepartmentMutation) ResetStatus ¶
func (m *DepartmentMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*DepartmentMutation) ResetUpdatedAt ¶
func (m *DepartmentMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DepartmentMutation) ResetUsers ¶
func (m *DepartmentMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*DepartmentMutation) SetAncestors ¶
func (m *DepartmentMutation) SetAncestors(s string)
SetAncestors sets the "ancestors" field.
func (*DepartmentMutation) SetCreatedAt ¶
func (m *DepartmentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DepartmentMutation) SetEmail ¶
func (m *DepartmentMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*DepartmentMutation) SetField ¶
func (m *DepartmentMutation) 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 (*DepartmentMutation) SetID ¶
func (m *DepartmentMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Department entities.
func (*DepartmentMutation) SetLeader ¶
func (m *DepartmentMutation) SetLeader(s string)
SetLeader sets the "leader" field.
func (*DepartmentMutation) SetName ¶
func (m *DepartmentMutation) SetName(s string)
SetName sets the "name" field.
func (*DepartmentMutation) SetOp ¶
func (m *DepartmentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DepartmentMutation) SetParentID ¶
func (m *DepartmentMutation) SetParentID(u uint64)
SetParentID sets the "parent_id" field.
func (*DepartmentMutation) SetPhone ¶
func (m *DepartmentMutation) SetPhone(s string)
SetPhone sets the "phone" field.
func (*DepartmentMutation) SetRemark ¶
func (m *DepartmentMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*DepartmentMutation) SetSort ¶
func (m *DepartmentMutation) SetSort(u uint32)
SetSort sets the "sort" field.
func (*DepartmentMutation) SetStatus ¶
func (m *DepartmentMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*DepartmentMutation) SetUpdatedAt ¶
func (m *DepartmentMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DepartmentMutation) Sort ¶
func (m *DepartmentMutation) Sort() (r uint32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*DepartmentMutation) Status ¶
func (m *DepartmentMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*DepartmentMutation) StatusCleared ¶
func (m *DepartmentMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (DepartmentMutation) Tx ¶
func (m DepartmentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DepartmentMutation) Type ¶
func (m *DepartmentMutation) Type() string
Type returns the node type of this mutation (Department).
func (*DepartmentMutation) UpdatedAt ¶
func (m *DepartmentMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DepartmentMutation) UsersCleared ¶
func (m *DepartmentMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*DepartmentMutation) UsersIDs ¶
func (m *DepartmentMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the "users" edge IDs in the mutation.
func (*DepartmentMutation) Where ¶
func (m *DepartmentMutation) Where(ps ...predicate.Department)
Where appends a list predicates to the DepartmentMutation builder.
func (*DepartmentMutation) WhereP ¶
func (m *DepartmentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DepartmentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DepartmentPageList ¶
type DepartmentPageList struct { List []*Department `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
DepartmentPageList is Department PageList result.
type DepartmentPager ¶
type DepartmentPager struct { Order department.OrderOption Filter func(*DepartmentQuery) (*DepartmentQuery, error) }
func (*DepartmentPager) ApplyFilter ¶
func (p *DepartmentPager) ApplyFilter(query *DepartmentQuery) (*DepartmentQuery, error)
type DepartmentPaginateOption ¶
type DepartmentPaginateOption func(*DepartmentPager)
DepartmentPaginateOption enables pagination customization.
type DepartmentQuery ¶
type DepartmentQuery struct {
// contains filtered or unexported fields
}
DepartmentQuery is the builder for querying Department entities.
func (*DepartmentQuery) Aggregate ¶
func (dq *DepartmentQuery) Aggregate(fns ...AggregateFunc) *DepartmentSelect
Aggregate returns a DepartmentSelect configured with the given aggregations.
func (*DepartmentQuery) All ¶
func (dq *DepartmentQuery) All(ctx context.Context) ([]*Department, error)
All executes the query and returns a list of Departments.
func (*DepartmentQuery) AllX ¶
func (dq *DepartmentQuery) AllX(ctx context.Context) []*Department
AllX is like All, but panics if an error occurs.
func (*DepartmentQuery) Clone ¶
func (dq *DepartmentQuery) Clone() *DepartmentQuery
Clone returns a duplicate of the DepartmentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DepartmentQuery) Count ¶
func (dq *DepartmentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DepartmentQuery) CountX ¶
func (dq *DepartmentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DepartmentQuery) ExecContext ¶ added in v1.0.9
func (c *DepartmentQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DepartmentQuery) Exist ¶
func (dq *DepartmentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DepartmentQuery) ExistX ¶
func (dq *DepartmentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DepartmentQuery) First ¶
func (dq *DepartmentQuery) First(ctx context.Context) (*Department, error)
First returns the first Department entity from the query. Returns a *NotFoundError when no Department was found.
func (*DepartmentQuery) FirstID ¶
func (dq *DepartmentQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Department ID from the query. Returns a *NotFoundError when no Department ID was found.
func (*DepartmentQuery) FirstIDX ¶
func (dq *DepartmentQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*DepartmentQuery) FirstX ¶
func (dq *DepartmentQuery) FirstX(ctx context.Context) *Department
FirstX is like First, but panics if an error occurs.
func (*DepartmentQuery) GroupBy ¶
func (dq *DepartmentQuery) GroupBy(field string, fields ...string) *DepartmentGroupBy
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.Department.Query(). GroupBy(department.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DepartmentQuery) IDs ¶
func (dq *DepartmentQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Department IDs.
func (*DepartmentQuery) IDsX ¶
func (dq *DepartmentQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*DepartmentQuery) Limit ¶
func (dq *DepartmentQuery) Limit(limit int) *DepartmentQuery
Limit the number of records to be returned by this query.
func (*DepartmentQuery) Offset ¶
func (dq *DepartmentQuery) Offset(offset int) *DepartmentQuery
Offset to start from.
func (*DepartmentQuery) Only ¶
func (dq *DepartmentQuery) Only(ctx context.Context) (*Department, error)
Only returns a single Department entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Department entity is found. Returns a *NotFoundError when no Department entities are found.
func (*DepartmentQuery) OnlyID ¶
func (dq *DepartmentQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Department ID in the query. Returns a *NotSingularError when more than one Department ID is found. Returns a *NotFoundError when no entities are found.
func (*DepartmentQuery) OnlyIDX ¶
func (dq *DepartmentQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DepartmentQuery) OnlyX ¶
func (dq *DepartmentQuery) OnlyX(ctx context.Context) *Department
OnlyX is like Only, but panics if an error occurs.
func (*DepartmentQuery) Order ¶
func (dq *DepartmentQuery) Order(o ...department.OrderOption) *DepartmentQuery
Order specifies how the records should be ordered.
func (*DepartmentQuery) Page ¶
func (d *DepartmentQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...DepartmentPaginateOption, ) (*DepartmentPageList, error)
func (*DepartmentQuery) QueryChildren ¶
func (dq *DepartmentQuery) QueryChildren() *DepartmentQuery
QueryChildren chains the current query on the "children" edge.
func (*DepartmentQuery) QueryContext ¶ added in v1.0.9
func (c *DepartmentQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DepartmentQuery) QueryParent ¶
func (dq *DepartmentQuery) QueryParent() *DepartmentQuery
QueryParent chains the current query on the "parent" edge.
func (*DepartmentQuery) QueryUsers ¶
func (dq *DepartmentQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*DepartmentQuery) Select ¶
func (dq *DepartmentQuery) Select(fields ...string) *DepartmentSelect
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.Department.Query(). Select(department.FieldCreatedAt). Scan(ctx, &v)
func (*DepartmentQuery) Unique ¶
func (dq *DepartmentQuery) Unique(unique bool) *DepartmentQuery
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 (*DepartmentQuery) Where ¶
func (dq *DepartmentQuery) Where(ps ...predicate.Department) *DepartmentQuery
Where adds a new predicate for the DepartmentQuery builder.
func (*DepartmentQuery) WithChildren ¶
func (dq *DepartmentQuery) WithChildren(opts ...func(*DepartmentQuery)) *DepartmentQuery
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 (*DepartmentQuery) WithParent ¶
func (dq *DepartmentQuery) WithParent(opts ...func(*DepartmentQuery)) *DepartmentQuery
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.
func (*DepartmentQuery) WithUsers ¶
func (dq *DepartmentQuery) WithUsers(opts ...func(*UserQuery)) *DepartmentQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type DepartmentSelect ¶
type DepartmentSelect struct { *DepartmentQuery // contains filtered or unexported fields }
DepartmentSelect is the builder for selecting fields of Department entities.
func (*DepartmentSelect) Aggregate ¶
func (ds *DepartmentSelect) Aggregate(fns ...AggregateFunc) *DepartmentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DepartmentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DepartmentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (DepartmentSelect) ExecContext ¶ added in v1.0.9
func (c DepartmentSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DepartmentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DepartmentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DepartmentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DepartmentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (DepartmentSelect) QueryContext ¶ added in v1.0.9
func (c DepartmentSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DepartmentSelect) Scan ¶
func (ds *DepartmentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DepartmentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DepartmentUpdate ¶
type DepartmentUpdate struct {
// contains filtered or unexported fields
}
DepartmentUpdate is the builder for updating Department entities.
func (*DepartmentUpdate) AddChildIDs ¶
func (du *DepartmentUpdate) AddChildIDs(ids ...uint64) *DepartmentUpdate
AddChildIDs adds the "children" edge to the Department entity by IDs.
func (*DepartmentUpdate) AddChildren ¶
func (du *DepartmentUpdate) AddChildren(d ...*Department) *DepartmentUpdate
AddChildren adds the "children" edges to the Department entity.
func (*DepartmentUpdate) AddSort ¶
func (du *DepartmentUpdate) AddSort(u int32) *DepartmentUpdate
AddSort adds u to the "sort" field.
func (*DepartmentUpdate) AddStatus ¶
func (du *DepartmentUpdate) AddStatus(u int8) *DepartmentUpdate
AddStatus adds u to the "status" field.
func (*DepartmentUpdate) AddUserIDs ¶
func (du *DepartmentUpdate) AddUserIDs(ids ...uuid.UUID) *DepartmentUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*DepartmentUpdate) AddUsers ¶
func (du *DepartmentUpdate) AddUsers(u ...*User) *DepartmentUpdate
AddUsers adds the "users" edges to the User entity.
func (*DepartmentUpdate) ClearAncestors ¶ added in v1.0.13
func (du *DepartmentUpdate) ClearAncestors() *DepartmentUpdate
ClearAncestors clears the value of the "ancestors" field.
func (*DepartmentUpdate) ClearChildren ¶
func (du *DepartmentUpdate) ClearChildren() *DepartmentUpdate
ClearChildren clears all "children" edges to the Department entity.
func (*DepartmentUpdate) ClearParent ¶
func (du *DepartmentUpdate) ClearParent() *DepartmentUpdate
ClearParent clears the "parent" edge to the Department entity.
func (*DepartmentUpdate) ClearParentID ¶
func (du *DepartmentUpdate) ClearParentID() *DepartmentUpdate
ClearParentID clears the value of the "parent_id" field.
func (*DepartmentUpdate) ClearRemark ¶ added in v1.0.13
func (du *DepartmentUpdate) ClearRemark() *DepartmentUpdate
ClearRemark clears the value of the "remark" field.
func (*DepartmentUpdate) ClearStatus ¶
func (du *DepartmentUpdate) ClearStatus() *DepartmentUpdate
ClearStatus clears the value of the "status" field.
func (*DepartmentUpdate) ClearUsers ¶
func (du *DepartmentUpdate) ClearUsers() *DepartmentUpdate
ClearUsers clears all "users" edges to the User entity.
func (*DepartmentUpdate) Exec ¶
func (du *DepartmentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DepartmentUpdate) ExecContext ¶ added in v1.0.9
func (c *DepartmentUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DepartmentUpdate) ExecX ¶
func (du *DepartmentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DepartmentUpdate) Mutation ¶
func (du *DepartmentUpdate) Mutation() *DepartmentMutation
Mutation returns the DepartmentMutation object of the builder.
func (*DepartmentUpdate) QueryContext ¶ added in v1.0.9
func (c *DepartmentUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DepartmentUpdate) RemoveChildIDs ¶
func (du *DepartmentUpdate) RemoveChildIDs(ids ...uint64) *DepartmentUpdate
RemoveChildIDs removes the "children" edge to Department entities by IDs.
func (*DepartmentUpdate) RemoveChildren ¶
func (du *DepartmentUpdate) RemoveChildren(d ...*Department) *DepartmentUpdate
RemoveChildren removes "children" edges to Department entities.
func (*DepartmentUpdate) RemoveUserIDs ¶
func (du *DepartmentUpdate) RemoveUserIDs(ids ...uuid.UUID) *DepartmentUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*DepartmentUpdate) RemoveUsers ¶
func (du *DepartmentUpdate) RemoveUsers(u ...*User) *DepartmentUpdate
RemoveUsers removes "users" edges to User entities.
func (*DepartmentUpdate) Save ¶
func (du *DepartmentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DepartmentUpdate) SaveX ¶
func (du *DepartmentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DepartmentUpdate) SetAncestors ¶
func (du *DepartmentUpdate) SetAncestors(s string) *DepartmentUpdate
SetAncestors sets the "ancestors" field.
func (*DepartmentUpdate) SetEmail ¶
func (du *DepartmentUpdate) SetEmail(s string) *DepartmentUpdate
SetEmail sets the "email" field.
func (*DepartmentUpdate) SetLeader ¶
func (du *DepartmentUpdate) SetLeader(s string) *DepartmentUpdate
SetLeader sets the "leader" field.
func (*DepartmentUpdate) SetName ¶
func (du *DepartmentUpdate) SetName(s string) *DepartmentUpdate
SetName sets the "name" field.
func (*DepartmentUpdate) SetNillableAncestors ¶ added in v1.0.13
func (du *DepartmentUpdate) SetNillableAncestors(s *string) *DepartmentUpdate
SetNillableAncestors sets the "ancestors" field if the given value is not nil.
func (*DepartmentUpdate) SetNillableParentID ¶
func (du *DepartmentUpdate) SetNillableParentID(u *uint64) *DepartmentUpdate
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*DepartmentUpdate) SetNillableRemark ¶ added in v1.0.13
func (du *DepartmentUpdate) SetNillableRemark(s *string) *DepartmentUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*DepartmentUpdate) SetNillableSort ¶
func (du *DepartmentUpdate) SetNillableSort(u *uint32) *DepartmentUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*DepartmentUpdate) SetNillableStatus ¶
func (du *DepartmentUpdate) SetNillableStatus(u *uint8) *DepartmentUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*DepartmentUpdate) SetNotEmptyAncestors ¶
func (d *DepartmentUpdate) SetNotEmptyAncestors(value string) *DepartmentUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdate) SetNotEmptyEmail ¶
func (d *DepartmentUpdate) SetNotEmptyEmail(value string) *DepartmentUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdate) SetNotEmptyLeader ¶
func (d *DepartmentUpdate) SetNotEmptyLeader(value string) *DepartmentUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdate) SetNotEmptyName ¶
func (d *DepartmentUpdate) SetNotEmptyName(value string) *DepartmentUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdate) SetNotEmptyParentID ¶
func (d *DepartmentUpdate) SetNotEmptyParentID(value uint64) *DepartmentUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdate) SetNotEmptyPhone ¶
func (d *DepartmentUpdate) SetNotEmptyPhone(value string) *DepartmentUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdate) SetNotEmptyRemark ¶
func (d *DepartmentUpdate) SetNotEmptyRemark(value string) *DepartmentUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdate) SetNotEmptySort ¶
func (d *DepartmentUpdate) SetNotEmptySort(value uint32) *DepartmentUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdate) SetNotEmptyStatus ¶
func (d *DepartmentUpdate) SetNotEmptyStatus(value uint8) *DepartmentUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdate) SetNotNilAncestors ¶ added in v1.0.9
func (d *DepartmentUpdate) SetNotNilAncestors(value *string) *DepartmentUpdate
set field if value's pointer is not nil.
func (*DepartmentUpdate) SetNotNilEmail ¶ added in v1.0.9
func (d *DepartmentUpdate) SetNotNilEmail(value *string) *DepartmentUpdate
set field if value's pointer is not nil.
func (*DepartmentUpdate) SetNotNilLeader ¶ added in v1.0.9
func (d *DepartmentUpdate) SetNotNilLeader(value *string) *DepartmentUpdate
set field if value's pointer is not nil.
func (*DepartmentUpdate) SetNotNilName ¶ added in v1.0.9
func (d *DepartmentUpdate) SetNotNilName(value *string) *DepartmentUpdate
set field if value's pointer is not nil.
func (*DepartmentUpdate) SetNotNilParentID ¶ added in v1.0.9
func (d *DepartmentUpdate) SetNotNilParentID(value *uint64) *DepartmentUpdate
set field if value's pointer is not nil.
func (*DepartmentUpdate) SetNotNilPhone ¶ added in v1.0.9
func (d *DepartmentUpdate) SetNotNilPhone(value *string) *DepartmentUpdate
set field if value's pointer is not nil.
func (*DepartmentUpdate) SetNotNilRemark ¶ added in v1.0.9
func (d *DepartmentUpdate) SetNotNilRemark(value *string) *DepartmentUpdate
set field if value's pointer is not nil.
func (*DepartmentUpdate) SetNotNilSort ¶ added in v1.0.9
func (d *DepartmentUpdate) SetNotNilSort(value *uint32) *DepartmentUpdate
set field if value's pointer is not nil.
func (*DepartmentUpdate) SetNotNilStatus ¶ added in v1.0.9
func (d *DepartmentUpdate) SetNotNilStatus(value *uint8) *DepartmentUpdate
set field if value's pointer is not nil.
func (*DepartmentUpdate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (d *DepartmentUpdate) SetNotNilUpdatedAt(value *time.Time) *DepartmentUpdate
set field if value's pointer is not nil.
func (*DepartmentUpdate) SetParent ¶
func (du *DepartmentUpdate) SetParent(d *Department) *DepartmentUpdate
SetParent sets the "parent" edge to the Department entity.
func (*DepartmentUpdate) SetParentID ¶
func (du *DepartmentUpdate) SetParentID(u uint64) *DepartmentUpdate
SetParentID sets the "parent_id" field.
func (*DepartmentUpdate) SetPhone ¶
func (du *DepartmentUpdate) SetPhone(s string) *DepartmentUpdate
SetPhone sets the "phone" field.
func (*DepartmentUpdate) SetRemark ¶
func (du *DepartmentUpdate) SetRemark(s string) *DepartmentUpdate
SetRemark sets the "remark" field.
func (*DepartmentUpdate) SetSort ¶
func (du *DepartmentUpdate) SetSort(u uint32) *DepartmentUpdate
SetSort sets the "sort" field.
func (*DepartmentUpdate) SetStatus ¶
func (du *DepartmentUpdate) SetStatus(u uint8) *DepartmentUpdate
SetStatus sets the "status" field.
func (*DepartmentUpdate) SetUpdatedAt ¶
func (du *DepartmentUpdate) SetUpdatedAt(t time.Time) *DepartmentUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DepartmentUpdate) Where ¶
func (du *DepartmentUpdate) Where(ps ...predicate.Department) *DepartmentUpdate
Where appends a list predicates to the DepartmentUpdate builder.
type DepartmentUpdateOne ¶
type DepartmentUpdateOne struct {
// contains filtered or unexported fields
}
DepartmentUpdateOne is the builder for updating a single Department entity.
func (*DepartmentUpdateOne) AddChildIDs ¶
func (duo *DepartmentUpdateOne) AddChildIDs(ids ...uint64) *DepartmentUpdateOne
AddChildIDs adds the "children" edge to the Department entity by IDs.
func (*DepartmentUpdateOne) AddChildren ¶
func (duo *DepartmentUpdateOne) AddChildren(d ...*Department) *DepartmentUpdateOne
AddChildren adds the "children" edges to the Department entity.
func (*DepartmentUpdateOne) AddSort ¶
func (duo *DepartmentUpdateOne) AddSort(u int32) *DepartmentUpdateOne
AddSort adds u to the "sort" field.
func (*DepartmentUpdateOne) AddStatus ¶
func (duo *DepartmentUpdateOne) AddStatus(u int8) *DepartmentUpdateOne
AddStatus adds u to the "status" field.
func (*DepartmentUpdateOne) AddUserIDs ¶
func (duo *DepartmentUpdateOne) AddUserIDs(ids ...uuid.UUID) *DepartmentUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*DepartmentUpdateOne) AddUsers ¶
func (duo *DepartmentUpdateOne) AddUsers(u ...*User) *DepartmentUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*DepartmentUpdateOne) ClearAncestors ¶ added in v1.0.13
func (duo *DepartmentUpdateOne) ClearAncestors() *DepartmentUpdateOne
ClearAncestors clears the value of the "ancestors" field.
func (*DepartmentUpdateOne) ClearChildren ¶
func (duo *DepartmentUpdateOne) ClearChildren() *DepartmentUpdateOne
ClearChildren clears all "children" edges to the Department entity.
func (*DepartmentUpdateOne) ClearParent ¶
func (duo *DepartmentUpdateOne) ClearParent() *DepartmentUpdateOne
ClearParent clears the "parent" edge to the Department entity.
func (*DepartmentUpdateOne) ClearParentID ¶
func (duo *DepartmentUpdateOne) ClearParentID() *DepartmentUpdateOne
ClearParentID clears the value of the "parent_id" field.
func (*DepartmentUpdateOne) ClearRemark ¶ added in v1.0.13
func (duo *DepartmentUpdateOne) ClearRemark() *DepartmentUpdateOne
ClearRemark clears the value of the "remark" field.
func (*DepartmentUpdateOne) ClearStatus ¶
func (duo *DepartmentUpdateOne) ClearStatus() *DepartmentUpdateOne
ClearStatus clears the value of the "status" field.
func (*DepartmentUpdateOne) ClearUsers ¶
func (duo *DepartmentUpdateOne) ClearUsers() *DepartmentUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*DepartmentUpdateOne) Exec ¶
func (duo *DepartmentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DepartmentUpdateOne) ExecContext ¶ added in v1.0.9
func (c *DepartmentUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DepartmentUpdateOne) ExecX ¶
func (duo *DepartmentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DepartmentUpdateOne) Mutation ¶
func (duo *DepartmentUpdateOne) Mutation() *DepartmentMutation
Mutation returns the DepartmentMutation object of the builder.
func (*DepartmentUpdateOne) QueryContext ¶ added in v1.0.9
func (c *DepartmentUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DepartmentUpdateOne) RemoveChildIDs ¶
func (duo *DepartmentUpdateOne) RemoveChildIDs(ids ...uint64) *DepartmentUpdateOne
RemoveChildIDs removes the "children" edge to Department entities by IDs.
func (*DepartmentUpdateOne) RemoveChildren ¶
func (duo *DepartmentUpdateOne) RemoveChildren(d ...*Department) *DepartmentUpdateOne
RemoveChildren removes "children" edges to Department entities.
func (*DepartmentUpdateOne) RemoveUserIDs ¶
func (duo *DepartmentUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *DepartmentUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*DepartmentUpdateOne) RemoveUsers ¶
func (duo *DepartmentUpdateOne) RemoveUsers(u ...*User) *DepartmentUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*DepartmentUpdateOne) Save ¶
func (duo *DepartmentUpdateOne) Save(ctx context.Context) (*Department, error)
Save executes the query and returns the updated Department entity.
func (*DepartmentUpdateOne) SaveX ¶
func (duo *DepartmentUpdateOne) SaveX(ctx context.Context) *Department
SaveX is like Save, but panics if an error occurs.
func (*DepartmentUpdateOne) Select ¶
func (duo *DepartmentUpdateOne) Select(field string, fields ...string) *DepartmentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DepartmentUpdateOne) SetAncestors ¶
func (duo *DepartmentUpdateOne) SetAncestors(s string) *DepartmentUpdateOne
SetAncestors sets the "ancestors" field.
func (*DepartmentUpdateOne) SetEmail ¶
func (duo *DepartmentUpdateOne) SetEmail(s string) *DepartmentUpdateOne
SetEmail sets the "email" field.
func (*DepartmentUpdateOne) SetLeader ¶
func (duo *DepartmentUpdateOne) SetLeader(s string) *DepartmentUpdateOne
SetLeader sets the "leader" field.
func (*DepartmentUpdateOne) SetName ¶
func (duo *DepartmentUpdateOne) SetName(s string) *DepartmentUpdateOne
SetName sets the "name" field.
func (*DepartmentUpdateOne) SetNillableAncestors ¶ added in v1.0.13
func (duo *DepartmentUpdateOne) SetNillableAncestors(s *string) *DepartmentUpdateOne
SetNillableAncestors sets the "ancestors" field if the given value is not nil.
func (*DepartmentUpdateOne) SetNillableParentID ¶
func (duo *DepartmentUpdateOne) SetNillableParentID(u *uint64) *DepartmentUpdateOne
SetNillableParentID sets the "parent_id" field if the given value is not nil.
func (*DepartmentUpdateOne) SetNillableRemark ¶ added in v1.0.13
func (duo *DepartmentUpdateOne) SetNillableRemark(s *string) *DepartmentUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*DepartmentUpdateOne) SetNillableSort ¶
func (duo *DepartmentUpdateOne) SetNillableSort(u *uint32) *DepartmentUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*DepartmentUpdateOne) SetNillableStatus ¶
func (duo *DepartmentUpdateOne) SetNillableStatus(u *uint8) *DepartmentUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*DepartmentUpdateOne) SetNotEmptyAncestors ¶
func (d *DepartmentUpdateOne) SetNotEmptyAncestors(value string) *DepartmentUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdateOne) SetNotEmptyEmail ¶
func (d *DepartmentUpdateOne) SetNotEmptyEmail(value string) *DepartmentUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdateOne) SetNotEmptyLeader ¶
func (d *DepartmentUpdateOne) SetNotEmptyLeader(value string) *DepartmentUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdateOne) SetNotEmptyName ¶
func (d *DepartmentUpdateOne) SetNotEmptyName(value string) *DepartmentUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdateOne) SetNotEmptyParentID ¶
func (d *DepartmentUpdateOne) SetNotEmptyParentID(value uint64) *DepartmentUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdateOne) SetNotEmptyPhone ¶
func (d *DepartmentUpdateOne) SetNotEmptyPhone(value string) *DepartmentUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdateOne) SetNotEmptyRemark ¶
func (d *DepartmentUpdateOne) SetNotEmptyRemark(value string) *DepartmentUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdateOne) SetNotEmptySort ¶
func (d *DepartmentUpdateOne) SetNotEmptySort(value uint32) *DepartmentUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdateOne) SetNotEmptyStatus ¶
func (d *DepartmentUpdateOne) SetNotEmptyStatus(value uint8) *DepartmentUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DepartmentUpdateOne) SetNotNilAncestors ¶ added in v1.0.9
func (d *DepartmentUpdateOne) SetNotNilAncestors(value *string) *DepartmentUpdateOne
set field if value's pointer is not nil.
func (*DepartmentUpdateOne) SetNotNilEmail ¶ added in v1.0.9
func (d *DepartmentUpdateOne) SetNotNilEmail(value *string) *DepartmentUpdateOne
set field if value's pointer is not nil.
func (*DepartmentUpdateOne) SetNotNilLeader ¶ added in v1.0.9
func (d *DepartmentUpdateOne) SetNotNilLeader(value *string) *DepartmentUpdateOne
set field if value's pointer is not nil.
func (*DepartmentUpdateOne) SetNotNilName ¶ added in v1.0.9
func (d *DepartmentUpdateOne) SetNotNilName(value *string) *DepartmentUpdateOne
set field if value's pointer is not nil.
func (*DepartmentUpdateOne) SetNotNilParentID ¶ added in v1.0.9
func (d *DepartmentUpdateOne) SetNotNilParentID(value *uint64) *DepartmentUpdateOne
set field if value's pointer is not nil.
func (*DepartmentUpdateOne) SetNotNilPhone ¶ added in v1.0.9
func (d *DepartmentUpdateOne) SetNotNilPhone(value *string) *DepartmentUpdateOne
set field if value's pointer is not nil.
func (*DepartmentUpdateOne) SetNotNilRemark ¶ added in v1.0.9
func (d *DepartmentUpdateOne) SetNotNilRemark(value *string) *DepartmentUpdateOne
set field if value's pointer is not nil.
func (*DepartmentUpdateOne) SetNotNilSort ¶ added in v1.0.9
func (d *DepartmentUpdateOne) SetNotNilSort(value *uint32) *DepartmentUpdateOne
set field if value's pointer is not nil.
func (*DepartmentUpdateOne) SetNotNilStatus ¶ added in v1.0.9
func (d *DepartmentUpdateOne) SetNotNilStatus(value *uint8) *DepartmentUpdateOne
set field if value's pointer is not nil.
func (*DepartmentUpdateOne) SetNotNilUpdatedAt ¶ added in v1.0.9
func (d *DepartmentUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DepartmentUpdateOne
set field if value's pointer is not nil.
func (*DepartmentUpdateOne) SetParent ¶
func (duo *DepartmentUpdateOne) SetParent(d *Department) *DepartmentUpdateOne
SetParent sets the "parent" edge to the Department entity.
func (*DepartmentUpdateOne) SetParentID ¶
func (duo *DepartmentUpdateOne) SetParentID(u uint64) *DepartmentUpdateOne
SetParentID sets the "parent_id" field.
func (*DepartmentUpdateOne) SetPhone ¶
func (duo *DepartmentUpdateOne) SetPhone(s string) *DepartmentUpdateOne
SetPhone sets the "phone" field.
func (*DepartmentUpdateOne) SetRemark ¶
func (duo *DepartmentUpdateOne) SetRemark(s string) *DepartmentUpdateOne
SetRemark sets the "remark" field.
func (*DepartmentUpdateOne) SetSort ¶
func (duo *DepartmentUpdateOne) SetSort(u uint32) *DepartmentUpdateOne
SetSort sets the "sort" field.
func (*DepartmentUpdateOne) SetStatus ¶
func (duo *DepartmentUpdateOne) SetStatus(u uint8) *DepartmentUpdateOne
SetStatus sets the "status" field.
func (*DepartmentUpdateOne) SetUpdatedAt ¶
func (duo *DepartmentUpdateOne) SetUpdatedAt(t time.Time) *DepartmentUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DepartmentUpdateOne) Where ¶
func (duo *DepartmentUpdateOne) Where(ps ...predicate.Department) *DepartmentUpdateOne
Where appends a list predicates to the DepartmentUpdate builder.
type Dictionary ¶
type Dictionary struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1 : normal 2 : ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // The title shown in the ui | 展示名称 (建议配合i18n) Title string `json:"title,omitempty"` // The name of dictionary for search | 字典搜索名称 Name string `json:"name,omitempty"` // The description of dictionary | 字典的描述 Desc string `json:"desc,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DictionaryQuery when eager-loading is set. Edges DictionaryEdges `json:"edges"` // contains filtered or unexported fields }
Dictionary is the model entity for the Dictionary schema.
func (*Dictionary) ExecContext ¶ added in v1.0.9
func (c *Dictionary) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Dictionary) QueryContext ¶ added in v1.0.9
func (c *Dictionary) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Dictionary) QueryDictionaryDetails ¶
func (d *Dictionary) QueryDictionaryDetails() *DictionaryDetailQuery
QueryDictionaryDetails queries the "dictionary_details" edge of the Dictionary entity.
func (*Dictionary) String ¶
func (d *Dictionary) String() string
String implements the fmt.Stringer.
func (*Dictionary) Unwrap ¶
func (d *Dictionary) Unwrap() *Dictionary
Unwrap unwraps the Dictionary 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 (*Dictionary) Update ¶
func (d *Dictionary) Update() *DictionaryUpdateOne
Update returns a builder for updating this Dictionary. Note that you need to call Dictionary.Unwrap() before calling this method if this Dictionary was returned from a transaction, and the transaction was committed or rolled back.
type DictionaryClient ¶
type DictionaryClient struct {
// contains filtered or unexported fields
}
DictionaryClient is a client for the Dictionary schema.
func NewDictionaryClient ¶
func NewDictionaryClient(c config) *DictionaryClient
NewDictionaryClient returns a client for the Dictionary from the given config.
func (*DictionaryClient) Create ¶
func (c *DictionaryClient) Create() *DictionaryCreate
Create returns a builder for creating a Dictionary entity.
func (*DictionaryClient) CreateBulk ¶
func (c *DictionaryClient) CreateBulk(builders ...*DictionaryCreate) *DictionaryCreateBulk
CreateBulk returns a builder for creating a bulk of Dictionary entities.
func (*DictionaryClient) Delete ¶
func (c *DictionaryClient) Delete() *DictionaryDelete
Delete returns a delete builder for Dictionary.
func (*DictionaryClient) DeleteOne ¶
func (c *DictionaryClient) DeleteOne(d *Dictionary) *DictionaryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DictionaryClient) DeleteOneID ¶
func (c *DictionaryClient) DeleteOneID(id uint64) *DictionaryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DictionaryClient) ExecContext ¶ added in v1.0.9
func (c *DictionaryClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryClient) Get ¶
func (c *DictionaryClient) Get(ctx context.Context, id uint64) (*Dictionary, error)
Get returns a Dictionary entity by its id.
func (*DictionaryClient) GetX ¶
func (c *DictionaryClient) GetX(ctx context.Context, id uint64) *Dictionary
GetX is like Get, but panics if an error occurs.
func (*DictionaryClient) Hooks ¶
func (c *DictionaryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DictionaryClient) Intercept ¶
func (c *DictionaryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `dictionary.Intercept(f(g(h())))`.
func (*DictionaryClient) Interceptors ¶
func (c *DictionaryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DictionaryClient) Query ¶
func (c *DictionaryClient) Query() *DictionaryQuery
Query returns a query builder for Dictionary.
func (*DictionaryClient) QueryContext ¶ added in v1.0.9
func (c *DictionaryClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryClient) QueryDictionaryDetails ¶
func (c *DictionaryClient) QueryDictionaryDetails(d *Dictionary) *DictionaryDetailQuery
QueryDictionaryDetails queries the dictionary_details edge of a Dictionary.
func (*DictionaryClient) Update ¶
func (c *DictionaryClient) Update() *DictionaryUpdate
Update returns an update builder for Dictionary.
func (*DictionaryClient) UpdateOne ¶
func (c *DictionaryClient) UpdateOne(d *Dictionary) *DictionaryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DictionaryClient) UpdateOneID ¶
func (c *DictionaryClient) UpdateOneID(id uint64) *DictionaryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DictionaryClient) Use ¶
func (c *DictionaryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dictionary.Hooks(f(g(h())))`.
type DictionaryCreate ¶
type DictionaryCreate struct {
// contains filtered or unexported fields
}
DictionaryCreate is the builder for creating a Dictionary entity.
func (*DictionaryCreate) AddDictionaryDetailIDs ¶
func (dc *DictionaryCreate) AddDictionaryDetailIDs(ids ...uint64) *DictionaryCreate
AddDictionaryDetailIDs adds the "dictionary_details" edge to the DictionaryDetail entity by IDs.
func (*DictionaryCreate) AddDictionaryDetails ¶
func (dc *DictionaryCreate) AddDictionaryDetails(d ...*DictionaryDetail) *DictionaryCreate
AddDictionaryDetails adds the "dictionary_details" edges to the DictionaryDetail entity.
func (*DictionaryCreate) Exec ¶
func (dc *DictionaryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DictionaryCreate) ExecContext ¶ added in v1.0.9
func (c *DictionaryCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryCreate) ExecX ¶
func (dc *DictionaryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryCreate) Mutation ¶
func (dc *DictionaryCreate) Mutation() *DictionaryMutation
Mutation returns the DictionaryMutation object of the builder.
func (*DictionaryCreate) QueryContext ¶ added in v1.0.9
func (c *DictionaryCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryCreate) Save ¶
func (dc *DictionaryCreate) Save(ctx context.Context) (*Dictionary, error)
Save creates the Dictionary in the database.
func (*DictionaryCreate) SaveX ¶
func (dc *DictionaryCreate) SaveX(ctx context.Context) *Dictionary
SaveX calls Save and panics if Save returns an error.
func (*DictionaryCreate) SetCreatedAt ¶
func (dc *DictionaryCreate) SetCreatedAt(t time.Time) *DictionaryCreate
SetCreatedAt sets the "created_at" field.
func (*DictionaryCreate) SetDesc ¶
func (dc *DictionaryCreate) SetDesc(s string) *DictionaryCreate
SetDesc sets the "desc" field.
func (*DictionaryCreate) SetID ¶
func (dc *DictionaryCreate) SetID(u uint64) *DictionaryCreate
SetID sets the "id" field.
func (*DictionaryCreate) SetName ¶
func (dc *DictionaryCreate) SetName(s string) *DictionaryCreate
SetName sets the "name" field.
func (*DictionaryCreate) SetNillableCreatedAt ¶
func (dc *DictionaryCreate) SetNillableCreatedAt(t *time.Time) *DictionaryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DictionaryCreate) SetNillableDesc ¶ added in v1.0.10
func (dc *DictionaryCreate) SetNillableDesc(s *string) *DictionaryCreate
SetNillableDesc sets the "desc" field if the given value is not nil.
func (*DictionaryCreate) SetNillableStatus ¶
func (dc *DictionaryCreate) SetNillableStatus(u *uint8) *DictionaryCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*DictionaryCreate) SetNillableUpdatedAt ¶
func (dc *DictionaryCreate) SetNillableUpdatedAt(t *time.Time) *DictionaryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DictionaryCreate) SetNotNilDesc ¶ added in v1.0.9
func (d *DictionaryCreate) SetNotNilDesc(value *string) *DictionaryCreate
set field if value's pointer is not nil.
func (*DictionaryCreate) SetNotNilName ¶ added in v1.0.9
func (d *DictionaryCreate) SetNotNilName(value *string) *DictionaryCreate
set field if value's pointer is not nil.
func (*DictionaryCreate) SetNotNilStatus ¶ added in v1.0.9
func (d *DictionaryCreate) SetNotNilStatus(value *uint8) *DictionaryCreate
set field if value's pointer is not nil.
func (*DictionaryCreate) SetNotNilTitle ¶ added in v1.0.9
func (d *DictionaryCreate) SetNotNilTitle(value *string) *DictionaryCreate
set field if value's pointer is not nil.
func (*DictionaryCreate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (d *DictionaryCreate) SetNotNilUpdatedAt(value *time.Time) *DictionaryCreate
set field if value's pointer is not nil.
func (*DictionaryCreate) SetStatus ¶
func (dc *DictionaryCreate) SetStatus(u uint8) *DictionaryCreate
SetStatus sets the "status" field.
func (*DictionaryCreate) SetTitle ¶
func (dc *DictionaryCreate) SetTitle(s string) *DictionaryCreate
SetTitle sets the "title" field.
func (*DictionaryCreate) SetUpdatedAt ¶
func (dc *DictionaryCreate) SetUpdatedAt(t time.Time) *DictionaryCreate
SetUpdatedAt sets the "updated_at" field.
type DictionaryCreateBulk ¶
type DictionaryCreateBulk struct {
// contains filtered or unexported fields
}
DictionaryCreateBulk is the builder for creating many Dictionary entities in bulk.
func (*DictionaryCreateBulk) Exec ¶
func (dcb *DictionaryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DictionaryCreateBulk) ExecContext ¶ added in v1.0.9
func (c *DictionaryCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryCreateBulk) ExecX ¶
func (dcb *DictionaryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryCreateBulk) QueryContext ¶ added in v1.0.9
func (c *DictionaryCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryCreateBulk) Save ¶
func (dcb *DictionaryCreateBulk) Save(ctx context.Context) ([]*Dictionary, error)
Save creates the Dictionary entities in the database.
func (*DictionaryCreateBulk) SaveX ¶
func (dcb *DictionaryCreateBulk) SaveX(ctx context.Context) []*Dictionary
SaveX is like Save, but panics if an error occurs.
type DictionaryDelete ¶
type DictionaryDelete struct {
// contains filtered or unexported fields
}
DictionaryDelete is the builder for deleting a Dictionary entity.
func (*DictionaryDelete) Exec ¶
func (dd *DictionaryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DictionaryDelete) ExecContext ¶ added in v1.0.9
func (c *DictionaryDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDelete) ExecX ¶
func (dd *DictionaryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryDelete) QueryContext ¶ added in v1.0.9
func (c *DictionaryDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDelete) Where ¶
func (dd *DictionaryDelete) Where(ps ...predicate.Dictionary) *DictionaryDelete
Where appends a list predicates to the DictionaryDelete builder.
type DictionaryDeleteOne ¶
type DictionaryDeleteOne struct {
// contains filtered or unexported fields
}
DictionaryDeleteOne is the builder for deleting a single Dictionary entity.
func (*DictionaryDeleteOne) Exec ¶
func (ddo *DictionaryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DictionaryDeleteOne) ExecX ¶
func (ddo *DictionaryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryDeleteOne) Where ¶
func (ddo *DictionaryDeleteOne) Where(ps ...predicate.Dictionary) *DictionaryDeleteOne
Where appends a list predicates to the DictionaryDelete builder.
type DictionaryDetail ¶
type DictionaryDetail struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1 : normal 2 : ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Sort Number | 排序编号 Sort uint32 `json:"sort,omitempty"` // The title shown in the ui | 展示名称 (建议配合i18n) Title string `json:"title,omitempty"` // key | 键 Key string `json:"key,omitempty"` // value | 值 Value string `json:"value,omitempty"` // Dictionary ID | 字典ID DictionaryID uint64 `json:"dictionary_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DictionaryDetailQuery when eager-loading is set. Edges DictionaryDetailEdges `json:"edges"` // contains filtered or unexported fields }
DictionaryDetail is the model entity for the DictionaryDetail schema.
func (*DictionaryDetail) ExecContext ¶ added in v1.0.9
func (c *DictionaryDetail) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDetail) GetValue ¶ added in v1.0.0
func (dd *DictionaryDetail) GetValue(name string) (ent.Value, error)
GetValue returns the ent.Value that was dynamically selected and assigned to the DictionaryDetail. This includes values selected through modifiers, order, etc.
func (*DictionaryDetail) QueryContext ¶ added in v1.0.9
func (c *DictionaryDetail) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDetail) QueryDictionaries ¶
func (dd *DictionaryDetail) QueryDictionaries() *DictionaryQuery
QueryDictionaries queries the "dictionaries" edge of the DictionaryDetail entity.
func (*DictionaryDetail) String ¶
func (dd *DictionaryDetail) String() string
String implements the fmt.Stringer.
func (*DictionaryDetail) Unwrap ¶
func (dd *DictionaryDetail) Unwrap() *DictionaryDetail
Unwrap unwraps the DictionaryDetail 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 (*DictionaryDetail) Update ¶
func (dd *DictionaryDetail) Update() *DictionaryDetailUpdateOne
Update returns a builder for updating this DictionaryDetail. Note that you need to call DictionaryDetail.Unwrap() before calling this method if this DictionaryDetail was returned from a transaction, and the transaction was committed or rolled back.
type DictionaryDetailClient ¶
type DictionaryDetailClient struct {
// contains filtered or unexported fields
}
DictionaryDetailClient is a client for the DictionaryDetail schema.
func NewDictionaryDetailClient ¶
func NewDictionaryDetailClient(c config) *DictionaryDetailClient
NewDictionaryDetailClient returns a client for the DictionaryDetail from the given config.
func (*DictionaryDetailClient) Create ¶
func (c *DictionaryDetailClient) Create() *DictionaryDetailCreate
Create returns a builder for creating a DictionaryDetail entity.
func (*DictionaryDetailClient) CreateBulk ¶
func (c *DictionaryDetailClient) CreateBulk(builders ...*DictionaryDetailCreate) *DictionaryDetailCreateBulk
CreateBulk returns a builder for creating a bulk of DictionaryDetail entities.
func (*DictionaryDetailClient) Delete ¶
func (c *DictionaryDetailClient) Delete() *DictionaryDetailDelete
Delete returns a delete builder for DictionaryDetail.
func (*DictionaryDetailClient) DeleteOne ¶
func (c *DictionaryDetailClient) DeleteOne(dd *DictionaryDetail) *DictionaryDetailDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DictionaryDetailClient) DeleteOneID ¶
func (c *DictionaryDetailClient) DeleteOneID(id uint64) *DictionaryDetailDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DictionaryDetailClient) ExecContext ¶ added in v1.0.9
func (c *DictionaryDetailClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDetailClient) Get ¶
func (c *DictionaryDetailClient) Get(ctx context.Context, id uint64) (*DictionaryDetail, error)
Get returns a DictionaryDetail entity by its id.
func (*DictionaryDetailClient) GetX ¶
func (c *DictionaryDetailClient) GetX(ctx context.Context, id uint64) *DictionaryDetail
GetX is like Get, but panics if an error occurs.
func (*DictionaryDetailClient) Hooks ¶
func (c *DictionaryDetailClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DictionaryDetailClient) Intercept ¶
func (c *DictionaryDetailClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `dictionarydetail.Intercept(f(g(h())))`.
func (*DictionaryDetailClient) Interceptors ¶
func (c *DictionaryDetailClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DictionaryDetailClient) Query ¶
func (c *DictionaryDetailClient) Query() *DictionaryDetailQuery
Query returns a query builder for DictionaryDetail.
func (*DictionaryDetailClient) QueryContext ¶ added in v1.0.9
func (c *DictionaryDetailClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDetailClient) QueryDictionaries ¶
func (c *DictionaryDetailClient) QueryDictionaries(dd *DictionaryDetail) *DictionaryQuery
QueryDictionaries queries the dictionaries edge of a DictionaryDetail.
func (*DictionaryDetailClient) Update ¶
func (c *DictionaryDetailClient) Update() *DictionaryDetailUpdate
Update returns an update builder for DictionaryDetail.
func (*DictionaryDetailClient) UpdateOne ¶
func (c *DictionaryDetailClient) UpdateOne(dd *DictionaryDetail) *DictionaryDetailUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DictionaryDetailClient) UpdateOneID ¶
func (c *DictionaryDetailClient) UpdateOneID(id uint64) *DictionaryDetailUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DictionaryDetailClient) Use ¶
func (c *DictionaryDetailClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `dictionarydetail.Hooks(f(g(h())))`.
type DictionaryDetailCreate ¶
type DictionaryDetailCreate struct {
// contains filtered or unexported fields
}
DictionaryDetailCreate is the builder for creating a DictionaryDetail entity.
func (*DictionaryDetailCreate) Exec ¶
func (ddc *DictionaryDetailCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DictionaryDetailCreate) ExecContext ¶ added in v1.0.9
func (c *DictionaryDetailCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDetailCreate) ExecX ¶
func (ddc *DictionaryDetailCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryDetailCreate) Mutation ¶
func (ddc *DictionaryDetailCreate) Mutation() *DictionaryDetailMutation
Mutation returns the DictionaryDetailMutation object of the builder.
func (*DictionaryDetailCreate) QueryContext ¶ added in v1.0.9
func (c *DictionaryDetailCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDetailCreate) Save ¶
func (ddc *DictionaryDetailCreate) Save(ctx context.Context) (*DictionaryDetail, error)
Save creates the DictionaryDetail in the database.
func (*DictionaryDetailCreate) SaveX ¶
func (ddc *DictionaryDetailCreate) SaveX(ctx context.Context) *DictionaryDetail
SaveX calls Save and panics if Save returns an error.
func (*DictionaryDetailCreate) SetCreatedAt ¶
func (ddc *DictionaryDetailCreate) SetCreatedAt(t time.Time) *DictionaryDetailCreate
SetCreatedAt sets the "created_at" field.
func (*DictionaryDetailCreate) SetDictionaries ¶
func (ddc *DictionaryDetailCreate) SetDictionaries(d *Dictionary) *DictionaryDetailCreate
SetDictionaries sets the "dictionaries" edge to the Dictionary entity.
func (*DictionaryDetailCreate) SetDictionariesID ¶
func (ddc *DictionaryDetailCreate) SetDictionariesID(id uint64) *DictionaryDetailCreate
SetDictionariesID sets the "dictionaries" edge to the Dictionary entity by ID.
func (*DictionaryDetailCreate) SetDictionaryID ¶
func (ddc *DictionaryDetailCreate) SetDictionaryID(u uint64) *DictionaryDetailCreate
SetDictionaryID sets the "dictionary_id" field.
func (*DictionaryDetailCreate) SetID ¶
func (ddc *DictionaryDetailCreate) SetID(u uint64) *DictionaryDetailCreate
SetID sets the "id" field.
func (*DictionaryDetailCreate) SetKey ¶
func (ddc *DictionaryDetailCreate) SetKey(s string) *DictionaryDetailCreate
SetKey sets the "key" field.
func (*DictionaryDetailCreate) SetNillableCreatedAt ¶
func (ddc *DictionaryDetailCreate) SetNillableCreatedAt(t *time.Time) *DictionaryDetailCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DictionaryDetailCreate) SetNillableDictionariesID ¶
func (ddc *DictionaryDetailCreate) SetNillableDictionariesID(id *uint64) *DictionaryDetailCreate
SetNillableDictionariesID sets the "dictionaries" edge to the Dictionary entity by ID if the given value is not nil.
func (*DictionaryDetailCreate) SetNillableDictionaryID ¶
func (ddc *DictionaryDetailCreate) SetNillableDictionaryID(u *uint64) *DictionaryDetailCreate
SetNillableDictionaryID sets the "dictionary_id" field if the given value is not nil.
func (*DictionaryDetailCreate) SetNillableSort ¶
func (ddc *DictionaryDetailCreate) SetNillableSort(u *uint32) *DictionaryDetailCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*DictionaryDetailCreate) SetNillableStatus ¶
func (ddc *DictionaryDetailCreate) SetNillableStatus(u *uint8) *DictionaryDetailCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*DictionaryDetailCreate) SetNillableUpdatedAt ¶
func (ddc *DictionaryDetailCreate) SetNillableUpdatedAt(t *time.Time) *DictionaryDetailCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DictionaryDetailCreate) SetNotNilDictionaryID ¶ added in v1.0.9
func (dd *DictionaryDetailCreate) SetNotNilDictionaryID(value *uint64) *DictionaryDetailCreate
set field if value's pointer is not nil.
func (*DictionaryDetailCreate) SetNotNilKey ¶ added in v1.0.9
func (dd *DictionaryDetailCreate) SetNotNilKey(value *string) *DictionaryDetailCreate
set field if value's pointer is not nil.
func (*DictionaryDetailCreate) SetNotNilSort ¶ added in v1.0.9
func (dd *DictionaryDetailCreate) SetNotNilSort(value *uint32) *DictionaryDetailCreate
set field if value's pointer is not nil.
func (*DictionaryDetailCreate) SetNotNilStatus ¶ added in v1.0.9
func (dd *DictionaryDetailCreate) SetNotNilStatus(value *uint8) *DictionaryDetailCreate
set field if value's pointer is not nil.
func (*DictionaryDetailCreate) SetNotNilTitle ¶ added in v1.0.9
func (dd *DictionaryDetailCreate) SetNotNilTitle(value *string) *DictionaryDetailCreate
set field if value's pointer is not nil.
func (*DictionaryDetailCreate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (dd *DictionaryDetailCreate) SetNotNilUpdatedAt(value *time.Time) *DictionaryDetailCreate
set field if value's pointer is not nil.
func (*DictionaryDetailCreate) SetNotNilValue ¶ added in v1.0.9
func (dd *DictionaryDetailCreate) SetNotNilValue(value *string) *DictionaryDetailCreate
set field if value's pointer is not nil.
func (*DictionaryDetailCreate) SetSort ¶
func (ddc *DictionaryDetailCreate) SetSort(u uint32) *DictionaryDetailCreate
SetSort sets the "sort" field.
func (*DictionaryDetailCreate) SetStatus ¶
func (ddc *DictionaryDetailCreate) SetStatus(u uint8) *DictionaryDetailCreate
SetStatus sets the "status" field.
func (*DictionaryDetailCreate) SetTitle ¶
func (ddc *DictionaryDetailCreate) SetTitle(s string) *DictionaryDetailCreate
SetTitle sets the "title" field.
func (*DictionaryDetailCreate) SetUpdatedAt ¶
func (ddc *DictionaryDetailCreate) SetUpdatedAt(t time.Time) *DictionaryDetailCreate
SetUpdatedAt sets the "updated_at" field.
func (*DictionaryDetailCreate) SetValue ¶
func (ddc *DictionaryDetailCreate) SetValue(s string) *DictionaryDetailCreate
SetValue sets the "value" field.
type DictionaryDetailCreateBulk ¶
type DictionaryDetailCreateBulk struct {
// contains filtered or unexported fields
}
DictionaryDetailCreateBulk is the builder for creating many DictionaryDetail entities in bulk.
func (*DictionaryDetailCreateBulk) Exec ¶
func (ddcb *DictionaryDetailCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DictionaryDetailCreateBulk) ExecContext ¶ added in v1.0.9
func (c *DictionaryDetailCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDetailCreateBulk) ExecX ¶
func (ddcb *DictionaryDetailCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryDetailCreateBulk) QueryContext ¶ added in v1.0.9
func (c *DictionaryDetailCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDetailCreateBulk) Save ¶
func (ddcb *DictionaryDetailCreateBulk) Save(ctx context.Context) ([]*DictionaryDetail, error)
Save creates the DictionaryDetail entities in the database.
func (*DictionaryDetailCreateBulk) SaveX ¶
func (ddcb *DictionaryDetailCreateBulk) SaveX(ctx context.Context) []*DictionaryDetail
SaveX is like Save, but panics if an error occurs.
type DictionaryDetailDelete ¶
type DictionaryDetailDelete struct {
// contains filtered or unexported fields
}
DictionaryDetailDelete is the builder for deleting a DictionaryDetail entity.
func (*DictionaryDetailDelete) Exec ¶
func (ddd *DictionaryDetailDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DictionaryDetailDelete) ExecContext ¶ added in v1.0.9
func (c *DictionaryDetailDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDetailDelete) ExecX ¶
func (ddd *DictionaryDetailDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryDetailDelete) QueryContext ¶ added in v1.0.9
func (c *DictionaryDetailDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDetailDelete) Where ¶
func (ddd *DictionaryDetailDelete) Where(ps ...predicate.DictionaryDetail) *DictionaryDetailDelete
Where appends a list predicates to the DictionaryDetailDelete builder.
type DictionaryDetailDeleteOne ¶
type DictionaryDetailDeleteOne struct {
// contains filtered or unexported fields
}
DictionaryDetailDeleteOne is the builder for deleting a single DictionaryDetail entity.
func (*DictionaryDetailDeleteOne) Exec ¶
func (dddo *DictionaryDetailDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DictionaryDetailDeleteOne) ExecX ¶
func (dddo *DictionaryDetailDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryDetailDeleteOne) Where ¶
func (dddo *DictionaryDetailDeleteOne) Where(ps ...predicate.DictionaryDetail) *DictionaryDetailDeleteOne
Where appends a list predicates to the DictionaryDetailDelete builder.
type DictionaryDetailEdges ¶
type DictionaryDetailEdges struct { // Dictionaries holds the value of the dictionaries edge. Dictionaries *Dictionary `json:"dictionaries,omitempty"` // contains filtered or unexported fields }
DictionaryDetailEdges holds the relations/edges for other nodes in the graph.
func (DictionaryDetailEdges) DictionariesOrErr ¶
func (e DictionaryDetailEdges) DictionariesOrErr() (*Dictionary, error)
DictionariesOrErr returns the Dictionaries value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DictionaryDetailGroupBy ¶
type DictionaryDetailGroupBy struct {
// contains filtered or unexported fields
}
DictionaryDetailGroupBy is the group-by builder for DictionaryDetail entities.
func (*DictionaryDetailGroupBy) Aggregate ¶
func (ddgb *DictionaryDetailGroupBy) Aggregate(fns ...AggregateFunc) *DictionaryDetailGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DictionaryDetailGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DictionaryDetailGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DictionaryDetailGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DictionaryDetailGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DictionaryDetailGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*DictionaryDetailGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DictionaryDetailGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DictionaryDetailGroupBy) Scan ¶
func (ddgb *DictionaryDetailGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DictionaryDetailGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DictionaryDetailMutation ¶
type DictionaryDetailMutation struct {
// contains filtered or unexported fields
}
DictionaryDetailMutation represents an operation that mutates the DictionaryDetail nodes in the graph.
func (*DictionaryDetailMutation) AddField ¶
func (m *DictionaryDetailMutation) 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 (*DictionaryDetailMutation) AddSort ¶
func (m *DictionaryDetailMutation) AddSort(u int32)
AddSort adds u to the "sort" field.
func (*DictionaryDetailMutation) AddStatus ¶
func (m *DictionaryDetailMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*DictionaryDetailMutation) AddedEdges ¶
func (m *DictionaryDetailMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DictionaryDetailMutation) AddedField ¶
func (m *DictionaryDetailMutation) 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 (*DictionaryDetailMutation) AddedFields ¶
func (m *DictionaryDetailMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DictionaryDetailMutation) AddedIDs ¶
func (m *DictionaryDetailMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DictionaryDetailMutation) AddedSort ¶
func (m *DictionaryDetailMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*DictionaryDetailMutation) AddedStatus ¶
func (m *DictionaryDetailMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*DictionaryDetailMutation) ClearDictionaries ¶
func (m *DictionaryDetailMutation) ClearDictionaries()
ClearDictionaries clears the "dictionaries" edge to the Dictionary entity.
func (*DictionaryDetailMutation) ClearDictionaryID ¶
func (m *DictionaryDetailMutation) ClearDictionaryID()
ClearDictionaryID clears the value of the "dictionary_id" field.
func (*DictionaryDetailMutation) ClearEdge ¶
func (m *DictionaryDetailMutation) 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 (*DictionaryDetailMutation) ClearField ¶
func (m *DictionaryDetailMutation) 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 (*DictionaryDetailMutation) ClearStatus ¶
func (m *DictionaryDetailMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*DictionaryDetailMutation) ClearedEdges ¶
func (m *DictionaryDetailMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DictionaryDetailMutation) ClearedFields ¶
func (m *DictionaryDetailMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DictionaryDetailMutation) Client ¶
func (m DictionaryDetailMutation) 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 (*DictionaryDetailMutation) CreatedAt ¶
func (m *DictionaryDetailMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DictionaryDetailMutation) DictionariesCleared ¶
func (m *DictionaryDetailMutation) DictionariesCleared() bool
DictionariesCleared reports if the "dictionaries" edge to the Dictionary entity was cleared.
func (*DictionaryDetailMutation) DictionariesID ¶
func (m *DictionaryDetailMutation) DictionariesID() (id uint64, exists bool)
DictionariesID returns the "dictionaries" edge ID in the mutation.
func (*DictionaryDetailMutation) DictionariesIDs ¶
func (m *DictionaryDetailMutation) DictionariesIDs() (ids []uint64)
DictionariesIDs returns the "dictionaries" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DictionariesID instead. It exists only for internal usage by the builders.
func (*DictionaryDetailMutation) DictionaryID ¶
func (m *DictionaryDetailMutation) DictionaryID() (r uint64, exists bool)
DictionaryID returns the value of the "dictionary_id" field in the mutation.
func (*DictionaryDetailMutation) DictionaryIDCleared ¶
func (m *DictionaryDetailMutation) DictionaryIDCleared() bool
DictionaryIDCleared returns if the "dictionary_id" field was cleared in this mutation.
func (*DictionaryDetailMutation) EdgeCleared ¶
func (m *DictionaryDetailMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DictionaryDetailMutation) ExecContext ¶ added in v1.0.9
func (c *DictionaryDetailMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDetailMutation) Field ¶
func (m *DictionaryDetailMutation) 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 (*DictionaryDetailMutation) FieldCleared ¶
func (m *DictionaryDetailMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DictionaryDetailMutation) Fields ¶
func (m *DictionaryDetailMutation) 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 (*DictionaryDetailMutation) ID ¶
func (m *DictionaryDetailMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DictionaryDetailMutation) IDs ¶
func (m *DictionaryDetailMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DictionaryDetailMutation) Key ¶
func (m *DictionaryDetailMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*DictionaryDetailMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the DictionaryDetail entity. If the DictionaryDetail 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 (*DictionaryDetailMutation) OldDictionaryID ¶
func (m *DictionaryDetailMutation) OldDictionaryID(ctx context.Context) (v uint64, err error)
OldDictionaryID returns the old "dictionary_id" field's value of the DictionaryDetail entity. If the DictionaryDetail 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 (*DictionaryDetailMutation) 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 (*DictionaryDetailMutation) OldKey ¶
func (m *DictionaryDetailMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the DictionaryDetail entity. If the DictionaryDetail 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 (*DictionaryDetailMutation) OldSort ¶
func (m *DictionaryDetailMutation) OldSort(ctx context.Context) (v uint32, err error)
OldSort returns the old "sort" field's value of the DictionaryDetail entity. If the DictionaryDetail 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 (*DictionaryDetailMutation) OldStatus ¶
func (m *DictionaryDetailMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the DictionaryDetail entity. If the DictionaryDetail 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 (*DictionaryDetailMutation) OldTitle ¶
func (m *DictionaryDetailMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the DictionaryDetail entity. If the DictionaryDetail 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 (*DictionaryDetailMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the DictionaryDetail entity. If the DictionaryDetail 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 (*DictionaryDetailMutation) OldValue ¶
func (m *DictionaryDetailMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the DictionaryDetail entity. If the DictionaryDetail 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 (*DictionaryDetailMutation) Op ¶
func (m *DictionaryDetailMutation) Op() Op
Op returns the operation name.
func (*DictionaryDetailMutation) QueryContext ¶ added in v1.0.9
func (c *DictionaryDetailMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDetailMutation) RemovedEdges ¶
func (m *DictionaryDetailMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DictionaryDetailMutation) RemovedIDs ¶
func (m *DictionaryDetailMutation) 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 (*DictionaryDetailMutation) ResetCreatedAt ¶
func (m *DictionaryDetailMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DictionaryDetailMutation) ResetDictionaries ¶
func (m *DictionaryDetailMutation) ResetDictionaries()
ResetDictionaries resets all changes to the "dictionaries" edge.
func (*DictionaryDetailMutation) ResetDictionaryID ¶
func (m *DictionaryDetailMutation) ResetDictionaryID()
ResetDictionaryID resets all changes to the "dictionary_id" field.
func (*DictionaryDetailMutation) ResetEdge ¶
func (m *DictionaryDetailMutation) 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 (*DictionaryDetailMutation) ResetField ¶
func (m *DictionaryDetailMutation) 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 (*DictionaryDetailMutation) ResetKey ¶
func (m *DictionaryDetailMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*DictionaryDetailMutation) ResetSort ¶
func (m *DictionaryDetailMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*DictionaryDetailMutation) ResetStatus ¶
func (m *DictionaryDetailMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*DictionaryDetailMutation) ResetTitle ¶
func (m *DictionaryDetailMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*DictionaryDetailMutation) ResetUpdatedAt ¶
func (m *DictionaryDetailMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DictionaryDetailMutation) ResetValue ¶
func (m *DictionaryDetailMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*DictionaryDetailMutation) SetCreatedAt ¶
func (m *DictionaryDetailMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DictionaryDetailMutation) SetDictionariesID ¶
func (m *DictionaryDetailMutation) SetDictionariesID(id uint64)
SetDictionariesID sets the "dictionaries" edge to the Dictionary entity by id.
func (*DictionaryDetailMutation) SetDictionaryID ¶
func (m *DictionaryDetailMutation) SetDictionaryID(u uint64)
SetDictionaryID sets the "dictionary_id" field.
func (*DictionaryDetailMutation) SetField ¶
func (m *DictionaryDetailMutation) 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 (*DictionaryDetailMutation) SetID ¶
func (m *DictionaryDetailMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of DictionaryDetail entities.
func (*DictionaryDetailMutation) SetKey ¶
func (m *DictionaryDetailMutation) SetKey(s string)
SetKey sets the "key" field.
func (*DictionaryDetailMutation) SetOp ¶
func (m *DictionaryDetailMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DictionaryDetailMutation) SetSort ¶
func (m *DictionaryDetailMutation) SetSort(u uint32)
SetSort sets the "sort" field.
func (*DictionaryDetailMutation) SetStatus ¶
func (m *DictionaryDetailMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*DictionaryDetailMutation) SetTitle ¶
func (m *DictionaryDetailMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*DictionaryDetailMutation) SetUpdatedAt ¶
func (m *DictionaryDetailMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DictionaryDetailMutation) SetValue ¶
func (m *DictionaryDetailMutation) SetValue(s string)
SetValue sets the "value" field.
func (*DictionaryDetailMutation) Sort ¶
func (m *DictionaryDetailMutation) Sort() (r uint32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*DictionaryDetailMutation) Status ¶
func (m *DictionaryDetailMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*DictionaryDetailMutation) StatusCleared ¶
func (m *DictionaryDetailMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (*DictionaryDetailMutation) Title ¶
func (m *DictionaryDetailMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (DictionaryDetailMutation) Tx ¶
func (m DictionaryDetailMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DictionaryDetailMutation) Type ¶
func (m *DictionaryDetailMutation) Type() string
Type returns the node type of this mutation (DictionaryDetail).
func (*DictionaryDetailMutation) UpdatedAt ¶
func (m *DictionaryDetailMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DictionaryDetailMutation) Value ¶
func (m *DictionaryDetailMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*DictionaryDetailMutation) Where ¶
func (m *DictionaryDetailMutation) Where(ps ...predicate.DictionaryDetail)
Where appends a list predicates to the DictionaryDetailMutation builder.
func (*DictionaryDetailMutation) WhereP ¶
func (m *DictionaryDetailMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DictionaryDetailMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DictionaryDetailPageList ¶
type DictionaryDetailPageList struct { List []*DictionaryDetail `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
DictionaryDetailPageList is DictionaryDetail PageList result.
type DictionaryDetailPager ¶
type DictionaryDetailPager struct { Order dictionarydetail.OrderOption Filter func(*DictionaryDetailQuery) (*DictionaryDetailQuery, error) }
func (*DictionaryDetailPager) ApplyFilter ¶
func (p *DictionaryDetailPager) ApplyFilter(query *DictionaryDetailQuery) (*DictionaryDetailQuery, error)
type DictionaryDetailPaginateOption ¶
type DictionaryDetailPaginateOption func(*DictionaryDetailPager)
DictionaryDetailPaginateOption enables pagination customization.
type DictionaryDetailQuery ¶
type DictionaryDetailQuery struct {
// contains filtered or unexported fields
}
DictionaryDetailQuery is the builder for querying DictionaryDetail entities.
func (*DictionaryDetailQuery) Aggregate ¶
func (ddq *DictionaryDetailQuery) Aggregate(fns ...AggregateFunc) *DictionaryDetailSelect
Aggregate returns a DictionaryDetailSelect configured with the given aggregations.
func (*DictionaryDetailQuery) All ¶
func (ddq *DictionaryDetailQuery) All(ctx context.Context) ([]*DictionaryDetail, error)
All executes the query and returns a list of DictionaryDetails.
func (*DictionaryDetailQuery) AllX ¶
func (ddq *DictionaryDetailQuery) AllX(ctx context.Context) []*DictionaryDetail
AllX is like All, but panics if an error occurs.
func (*DictionaryDetailQuery) Clone ¶
func (ddq *DictionaryDetailQuery) Clone() *DictionaryDetailQuery
Clone returns a duplicate of the DictionaryDetailQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DictionaryDetailQuery) Count ¶
func (ddq *DictionaryDetailQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DictionaryDetailQuery) CountX ¶
func (ddq *DictionaryDetailQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DictionaryDetailQuery) ExecContext ¶ added in v1.0.9
func (c *DictionaryDetailQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDetailQuery) Exist ¶
func (ddq *DictionaryDetailQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DictionaryDetailQuery) ExistX ¶
func (ddq *DictionaryDetailQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DictionaryDetailQuery) First ¶
func (ddq *DictionaryDetailQuery) First(ctx context.Context) (*DictionaryDetail, error)
First returns the first DictionaryDetail entity from the query. Returns a *NotFoundError when no DictionaryDetail was found.
func (*DictionaryDetailQuery) FirstID ¶
func (ddq *DictionaryDetailQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first DictionaryDetail ID from the query. Returns a *NotFoundError when no DictionaryDetail ID was found.
func (*DictionaryDetailQuery) FirstIDX ¶
func (ddq *DictionaryDetailQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*DictionaryDetailQuery) FirstX ¶
func (ddq *DictionaryDetailQuery) FirstX(ctx context.Context) *DictionaryDetail
FirstX is like First, but panics if an error occurs.
func (*DictionaryDetailQuery) GroupBy ¶
func (ddq *DictionaryDetailQuery) GroupBy(field string, fields ...string) *DictionaryDetailGroupBy
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.DictionaryDetail.Query(). GroupBy(dictionarydetail.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DictionaryDetailQuery) IDs ¶
func (ddq *DictionaryDetailQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of DictionaryDetail IDs.
func (*DictionaryDetailQuery) IDsX ¶
func (ddq *DictionaryDetailQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*DictionaryDetailQuery) Limit ¶
func (ddq *DictionaryDetailQuery) Limit(limit int) *DictionaryDetailQuery
Limit the number of records to be returned by this query.
func (*DictionaryDetailQuery) Offset ¶
func (ddq *DictionaryDetailQuery) Offset(offset int) *DictionaryDetailQuery
Offset to start from.
func (*DictionaryDetailQuery) Only ¶
func (ddq *DictionaryDetailQuery) Only(ctx context.Context) (*DictionaryDetail, error)
Only returns a single DictionaryDetail entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DictionaryDetail entity is found. Returns a *NotFoundError when no DictionaryDetail entities are found.
func (*DictionaryDetailQuery) OnlyID ¶
func (ddq *DictionaryDetailQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only DictionaryDetail ID in the query. Returns a *NotSingularError when more than one DictionaryDetail ID is found. Returns a *NotFoundError when no entities are found.
func (*DictionaryDetailQuery) OnlyIDX ¶
func (ddq *DictionaryDetailQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DictionaryDetailQuery) OnlyX ¶
func (ddq *DictionaryDetailQuery) OnlyX(ctx context.Context) *DictionaryDetail
OnlyX is like Only, but panics if an error occurs.
func (*DictionaryDetailQuery) Order ¶
func (ddq *DictionaryDetailQuery) Order(o ...dictionarydetail.OrderOption) *DictionaryDetailQuery
Order specifies how the records should be ordered.
func (*DictionaryDetailQuery) Page ¶
func (dd *DictionaryDetailQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...DictionaryDetailPaginateOption, ) (*DictionaryDetailPageList, error)
func (*DictionaryDetailQuery) QueryContext ¶ added in v1.0.9
func (c *DictionaryDetailQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDetailQuery) QueryDictionaries ¶
func (ddq *DictionaryDetailQuery) QueryDictionaries() *DictionaryQuery
QueryDictionaries chains the current query on the "dictionaries" edge.
func (*DictionaryDetailQuery) Select ¶
func (ddq *DictionaryDetailQuery) Select(fields ...string) *DictionaryDetailSelect
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.DictionaryDetail.Query(). Select(dictionarydetail.FieldCreatedAt). Scan(ctx, &v)
func (*DictionaryDetailQuery) Unique ¶
func (ddq *DictionaryDetailQuery) Unique(unique bool) *DictionaryDetailQuery
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 (*DictionaryDetailQuery) Where ¶
func (ddq *DictionaryDetailQuery) Where(ps ...predicate.DictionaryDetail) *DictionaryDetailQuery
Where adds a new predicate for the DictionaryDetailQuery builder.
func (*DictionaryDetailQuery) WithDictionaries ¶
func (ddq *DictionaryDetailQuery) WithDictionaries(opts ...func(*DictionaryQuery)) *DictionaryDetailQuery
WithDictionaries tells the query-builder to eager-load the nodes that are connected to the "dictionaries" edge. The optional arguments are used to configure the query builder of the edge.
type DictionaryDetailSelect ¶
type DictionaryDetailSelect struct { *DictionaryDetailQuery // contains filtered or unexported fields }
DictionaryDetailSelect is the builder for selecting fields of DictionaryDetail entities.
func (*DictionaryDetailSelect) Aggregate ¶
func (dds *DictionaryDetailSelect) Aggregate(fns ...AggregateFunc) *DictionaryDetailSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DictionaryDetailSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DictionaryDetailSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (DictionaryDetailSelect) ExecContext ¶ added in v1.0.9
func (c DictionaryDetailSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDetailSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DictionaryDetailSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DictionaryDetailSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*DictionaryDetailSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DictionaryDetailSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (DictionaryDetailSelect) QueryContext ¶ added in v1.0.9
func (c DictionaryDetailSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDetailSelect) Scan ¶
func (dds *DictionaryDetailSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DictionaryDetailSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DictionaryDetailUpdate ¶
type DictionaryDetailUpdate struct {
// contains filtered or unexported fields
}
DictionaryDetailUpdate is the builder for updating DictionaryDetail entities.
func (*DictionaryDetailUpdate) AddSort ¶
func (ddu *DictionaryDetailUpdate) AddSort(u int32) *DictionaryDetailUpdate
AddSort adds u to the "sort" field.
func (*DictionaryDetailUpdate) AddStatus ¶
func (ddu *DictionaryDetailUpdate) AddStatus(u int8) *DictionaryDetailUpdate
AddStatus adds u to the "status" field.
func (*DictionaryDetailUpdate) ClearDictionaries ¶
func (ddu *DictionaryDetailUpdate) ClearDictionaries() *DictionaryDetailUpdate
ClearDictionaries clears the "dictionaries" edge to the Dictionary entity.
func (*DictionaryDetailUpdate) ClearDictionaryID ¶
func (ddu *DictionaryDetailUpdate) ClearDictionaryID() *DictionaryDetailUpdate
ClearDictionaryID clears the value of the "dictionary_id" field.
func (*DictionaryDetailUpdate) ClearStatus ¶
func (ddu *DictionaryDetailUpdate) ClearStatus() *DictionaryDetailUpdate
ClearStatus clears the value of the "status" field.
func (*DictionaryDetailUpdate) Exec ¶
func (ddu *DictionaryDetailUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DictionaryDetailUpdate) ExecContext ¶ added in v1.0.9
func (c *DictionaryDetailUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDetailUpdate) ExecX ¶
func (ddu *DictionaryDetailUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryDetailUpdate) Mutation ¶
func (ddu *DictionaryDetailUpdate) Mutation() *DictionaryDetailMutation
Mutation returns the DictionaryDetailMutation object of the builder.
func (*DictionaryDetailUpdate) QueryContext ¶ added in v1.0.9
func (c *DictionaryDetailUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDetailUpdate) Save ¶
func (ddu *DictionaryDetailUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DictionaryDetailUpdate) SaveX ¶
func (ddu *DictionaryDetailUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DictionaryDetailUpdate) SetDictionaries ¶
func (ddu *DictionaryDetailUpdate) SetDictionaries(d *Dictionary) *DictionaryDetailUpdate
SetDictionaries sets the "dictionaries" edge to the Dictionary entity.
func (*DictionaryDetailUpdate) SetDictionariesID ¶
func (ddu *DictionaryDetailUpdate) SetDictionariesID(id uint64) *DictionaryDetailUpdate
SetDictionariesID sets the "dictionaries" edge to the Dictionary entity by ID.
func (*DictionaryDetailUpdate) SetDictionaryID ¶
func (ddu *DictionaryDetailUpdate) SetDictionaryID(u uint64) *DictionaryDetailUpdate
SetDictionaryID sets the "dictionary_id" field.
func (*DictionaryDetailUpdate) SetKey ¶
func (ddu *DictionaryDetailUpdate) SetKey(s string) *DictionaryDetailUpdate
SetKey sets the "key" field.
func (*DictionaryDetailUpdate) SetNillableDictionariesID ¶
func (ddu *DictionaryDetailUpdate) SetNillableDictionariesID(id *uint64) *DictionaryDetailUpdate
SetNillableDictionariesID sets the "dictionaries" edge to the Dictionary entity by ID if the given value is not nil.
func (*DictionaryDetailUpdate) SetNillableDictionaryID ¶
func (ddu *DictionaryDetailUpdate) SetNillableDictionaryID(u *uint64) *DictionaryDetailUpdate
SetNillableDictionaryID sets the "dictionary_id" field if the given value is not nil.
func (*DictionaryDetailUpdate) SetNillableSort ¶
func (ddu *DictionaryDetailUpdate) SetNillableSort(u *uint32) *DictionaryDetailUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*DictionaryDetailUpdate) SetNillableStatus ¶
func (ddu *DictionaryDetailUpdate) SetNillableStatus(u *uint8) *DictionaryDetailUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*DictionaryDetailUpdate) SetNotEmptyDictionaryID ¶
func (dd *DictionaryDetailUpdate) SetNotEmptyDictionaryID(value uint64) *DictionaryDetailUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdate) SetNotEmptyKey ¶
func (dd *DictionaryDetailUpdate) SetNotEmptyKey(value string) *DictionaryDetailUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdate) SetNotEmptySort ¶
func (dd *DictionaryDetailUpdate) SetNotEmptySort(value uint32) *DictionaryDetailUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdate) SetNotEmptyStatus ¶
func (dd *DictionaryDetailUpdate) SetNotEmptyStatus(value uint8) *DictionaryDetailUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdate) SetNotEmptyTitle ¶
func (dd *DictionaryDetailUpdate) SetNotEmptyTitle(value string) *DictionaryDetailUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdate) SetNotEmptyValue ¶
func (dd *DictionaryDetailUpdate) SetNotEmptyValue(value string) *DictionaryDetailUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdate) SetNotNilDictionaryID ¶ added in v1.0.9
func (dd *DictionaryDetailUpdate) SetNotNilDictionaryID(value *uint64) *DictionaryDetailUpdate
set field if value's pointer is not nil.
func (*DictionaryDetailUpdate) SetNotNilKey ¶ added in v1.0.9
func (dd *DictionaryDetailUpdate) SetNotNilKey(value *string) *DictionaryDetailUpdate
set field if value's pointer is not nil.
func (*DictionaryDetailUpdate) SetNotNilSort ¶ added in v1.0.9
func (dd *DictionaryDetailUpdate) SetNotNilSort(value *uint32) *DictionaryDetailUpdate
set field if value's pointer is not nil.
func (*DictionaryDetailUpdate) SetNotNilStatus ¶ added in v1.0.9
func (dd *DictionaryDetailUpdate) SetNotNilStatus(value *uint8) *DictionaryDetailUpdate
set field if value's pointer is not nil.
func (*DictionaryDetailUpdate) SetNotNilTitle ¶ added in v1.0.9
func (dd *DictionaryDetailUpdate) SetNotNilTitle(value *string) *DictionaryDetailUpdate
set field if value's pointer is not nil.
func (*DictionaryDetailUpdate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (dd *DictionaryDetailUpdate) SetNotNilUpdatedAt(value *time.Time) *DictionaryDetailUpdate
set field if value's pointer is not nil.
func (*DictionaryDetailUpdate) SetNotNilValue ¶ added in v1.0.9
func (dd *DictionaryDetailUpdate) SetNotNilValue(value *string) *DictionaryDetailUpdate
set field if value's pointer is not nil.
func (*DictionaryDetailUpdate) SetSort ¶
func (ddu *DictionaryDetailUpdate) SetSort(u uint32) *DictionaryDetailUpdate
SetSort sets the "sort" field.
func (*DictionaryDetailUpdate) SetStatus ¶
func (ddu *DictionaryDetailUpdate) SetStatus(u uint8) *DictionaryDetailUpdate
SetStatus sets the "status" field.
func (*DictionaryDetailUpdate) SetTitle ¶
func (ddu *DictionaryDetailUpdate) SetTitle(s string) *DictionaryDetailUpdate
SetTitle sets the "title" field.
func (*DictionaryDetailUpdate) SetUpdatedAt ¶
func (ddu *DictionaryDetailUpdate) SetUpdatedAt(t time.Time) *DictionaryDetailUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DictionaryDetailUpdate) SetValue ¶
func (ddu *DictionaryDetailUpdate) SetValue(s string) *DictionaryDetailUpdate
SetValue sets the "value" field.
func (*DictionaryDetailUpdate) Where ¶
func (ddu *DictionaryDetailUpdate) Where(ps ...predicate.DictionaryDetail) *DictionaryDetailUpdate
Where appends a list predicates to the DictionaryDetailUpdate builder.
type DictionaryDetailUpdateOne ¶
type DictionaryDetailUpdateOne struct {
// contains filtered or unexported fields
}
DictionaryDetailUpdateOne is the builder for updating a single DictionaryDetail entity.
func (*DictionaryDetailUpdateOne) AddSort ¶
func (dduo *DictionaryDetailUpdateOne) AddSort(u int32) *DictionaryDetailUpdateOne
AddSort adds u to the "sort" field.
func (*DictionaryDetailUpdateOne) AddStatus ¶
func (dduo *DictionaryDetailUpdateOne) AddStatus(u int8) *DictionaryDetailUpdateOne
AddStatus adds u to the "status" field.
func (*DictionaryDetailUpdateOne) ClearDictionaries ¶
func (dduo *DictionaryDetailUpdateOne) ClearDictionaries() *DictionaryDetailUpdateOne
ClearDictionaries clears the "dictionaries" edge to the Dictionary entity.
func (*DictionaryDetailUpdateOne) ClearDictionaryID ¶
func (dduo *DictionaryDetailUpdateOne) ClearDictionaryID() *DictionaryDetailUpdateOne
ClearDictionaryID clears the value of the "dictionary_id" field.
func (*DictionaryDetailUpdateOne) ClearStatus ¶
func (dduo *DictionaryDetailUpdateOne) ClearStatus() *DictionaryDetailUpdateOne
ClearStatus clears the value of the "status" field.
func (*DictionaryDetailUpdateOne) Exec ¶
func (dduo *DictionaryDetailUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DictionaryDetailUpdateOne) ExecContext ¶ added in v1.0.9
func (c *DictionaryDetailUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryDetailUpdateOne) ExecX ¶
func (dduo *DictionaryDetailUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryDetailUpdateOne) Mutation ¶
func (dduo *DictionaryDetailUpdateOne) Mutation() *DictionaryDetailMutation
Mutation returns the DictionaryDetailMutation object of the builder.
func (*DictionaryDetailUpdateOne) QueryContext ¶ added in v1.0.9
func (c *DictionaryDetailUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryDetailUpdateOne) Save ¶
func (dduo *DictionaryDetailUpdateOne) Save(ctx context.Context) (*DictionaryDetail, error)
Save executes the query and returns the updated DictionaryDetail entity.
func (*DictionaryDetailUpdateOne) SaveX ¶
func (dduo *DictionaryDetailUpdateOne) SaveX(ctx context.Context) *DictionaryDetail
SaveX is like Save, but panics if an error occurs.
func (*DictionaryDetailUpdateOne) Select ¶
func (dduo *DictionaryDetailUpdateOne) Select(field string, fields ...string) *DictionaryDetailUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DictionaryDetailUpdateOne) SetDictionaries ¶
func (dduo *DictionaryDetailUpdateOne) SetDictionaries(d *Dictionary) *DictionaryDetailUpdateOne
SetDictionaries sets the "dictionaries" edge to the Dictionary entity.
func (*DictionaryDetailUpdateOne) SetDictionariesID ¶
func (dduo *DictionaryDetailUpdateOne) SetDictionariesID(id uint64) *DictionaryDetailUpdateOne
SetDictionariesID sets the "dictionaries" edge to the Dictionary entity by ID.
func (*DictionaryDetailUpdateOne) SetDictionaryID ¶
func (dduo *DictionaryDetailUpdateOne) SetDictionaryID(u uint64) *DictionaryDetailUpdateOne
SetDictionaryID sets the "dictionary_id" field.
func (*DictionaryDetailUpdateOne) SetKey ¶
func (dduo *DictionaryDetailUpdateOne) SetKey(s string) *DictionaryDetailUpdateOne
SetKey sets the "key" field.
func (*DictionaryDetailUpdateOne) SetNillableDictionariesID ¶
func (dduo *DictionaryDetailUpdateOne) SetNillableDictionariesID(id *uint64) *DictionaryDetailUpdateOne
SetNillableDictionariesID sets the "dictionaries" edge to the Dictionary entity by ID if the given value is not nil.
func (*DictionaryDetailUpdateOne) SetNillableDictionaryID ¶
func (dduo *DictionaryDetailUpdateOne) SetNillableDictionaryID(u *uint64) *DictionaryDetailUpdateOne
SetNillableDictionaryID sets the "dictionary_id" field if the given value is not nil.
func (*DictionaryDetailUpdateOne) SetNillableSort ¶
func (dduo *DictionaryDetailUpdateOne) SetNillableSort(u *uint32) *DictionaryDetailUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*DictionaryDetailUpdateOne) SetNillableStatus ¶
func (dduo *DictionaryDetailUpdateOne) SetNillableStatus(u *uint8) *DictionaryDetailUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*DictionaryDetailUpdateOne) SetNotEmptyDictionaryID ¶
func (dd *DictionaryDetailUpdateOne) SetNotEmptyDictionaryID(value uint64) *DictionaryDetailUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdateOne) SetNotEmptyKey ¶
func (dd *DictionaryDetailUpdateOne) SetNotEmptyKey(value string) *DictionaryDetailUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdateOne) SetNotEmptySort ¶
func (dd *DictionaryDetailUpdateOne) SetNotEmptySort(value uint32) *DictionaryDetailUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdateOne) SetNotEmptyStatus ¶
func (dd *DictionaryDetailUpdateOne) SetNotEmptyStatus(value uint8) *DictionaryDetailUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdateOne) SetNotEmptyTitle ¶
func (dd *DictionaryDetailUpdateOne) SetNotEmptyTitle(value string) *DictionaryDetailUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdateOne) SetNotEmptyValue ¶
func (dd *DictionaryDetailUpdateOne) SetNotEmptyValue(value string) *DictionaryDetailUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryDetailUpdateOne) SetNotNilDictionaryID ¶ added in v1.0.9
func (dd *DictionaryDetailUpdateOne) SetNotNilDictionaryID(value *uint64) *DictionaryDetailUpdateOne
set field if value's pointer is not nil.
func (*DictionaryDetailUpdateOne) SetNotNilKey ¶ added in v1.0.9
func (dd *DictionaryDetailUpdateOne) SetNotNilKey(value *string) *DictionaryDetailUpdateOne
set field if value's pointer is not nil.
func (*DictionaryDetailUpdateOne) SetNotNilSort ¶ added in v1.0.9
func (dd *DictionaryDetailUpdateOne) SetNotNilSort(value *uint32) *DictionaryDetailUpdateOne
set field if value's pointer is not nil.
func (*DictionaryDetailUpdateOne) SetNotNilStatus ¶ added in v1.0.9
func (dd *DictionaryDetailUpdateOne) SetNotNilStatus(value *uint8) *DictionaryDetailUpdateOne
set field if value's pointer is not nil.
func (*DictionaryDetailUpdateOne) SetNotNilTitle ¶ added in v1.0.9
func (dd *DictionaryDetailUpdateOne) SetNotNilTitle(value *string) *DictionaryDetailUpdateOne
set field if value's pointer is not nil.
func (*DictionaryDetailUpdateOne) SetNotNilUpdatedAt ¶ added in v1.0.9
func (dd *DictionaryDetailUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DictionaryDetailUpdateOne
set field if value's pointer is not nil.
func (*DictionaryDetailUpdateOne) SetNotNilValue ¶ added in v1.0.9
func (dd *DictionaryDetailUpdateOne) SetNotNilValue(value *string) *DictionaryDetailUpdateOne
set field if value's pointer is not nil.
func (*DictionaryDetailUpdateOne) SetSort ¶
func (dduo *DictionaryDetailUpdateOne) SetSort(u uint32) *DictionaryDetailUpdateOne
SetSort sets the "sort" field.
func (*DictionaryDetailUpdateOne) SetStatus ¶
func (dduo *DictionaryDetailUpdateOne) SetStatus(u uint8) *DictionaryDetailUpdateOne
SetStatus sets the "status" field.
func (*DictionaryDetailUpdateOne) SetTitle ¶
func (dduo *DictionaryDetailUpdateOne) SetTitle(s string) *DictionaryDetailUpdateOne
SetTitle sets the "title" field.
func (*DictionaryDetailUpdateOne) SetUpdatedAt ¶
func (dduo *DictionaryDetailUpdateOne) SetUpdatedAt(t time.Time) *DictionaryDetailUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DictionaryDetailUpdateOne) SetValue ¶
func (dduo *DictionaryDetailUpdateOne) SetValue(s string) *DictionaryDetailUpdateOne
SetValue sets the "value" field.
func (*DictionaryDetailUpdateOne) Where ¶
func (dduo *DictionaryDetailUpdateOne) Where(ps ...predicate.DictionaryDetail) *DictionaryDetailUpdateOne
Where appends a list predicates to the DictionaryDetailUpdate builder.
type DictionaryDetails ¶
type DictionaryDetails []*DictionaryDetail
DictionaryDetails is a parsable slice of DictionaryDetail.
type DictionaryEdges ¶
type DictionaryEdges struct { // DictionaryDetails holds the value of the dictionary_details edge. DictionaryDetails []*DictionaryDetail `json:"dictionary_details,omitempty"` // contains filtered or unexported fields }
DictionaryEdges holds the relations/edges for other nodes in the graph.
func (DictionaryEdges) DictionaryDetailsOrErr ¶
func (e DictionaryEdges) DictionaryDetailsOrErr() ([]*DictionaryDetail, error)
DictionaryDetailsOrErr returns the DictionaryDetails value or an error if the edge was not loaded in eager-loading.
type DictionaryGroupBy ¶
type DictionaryGroupBy struct {
// contains filtered or unexported fields
}
DictionaryGroupBy is the group-by builder for Dictionary entities.
func (*DictionaryGroupBy) Aggregate ¶
func (dgb *DictionaryGroupBy) Aggregate(fns ...AggregateFunc) *DictionaryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DictionaryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DictionaryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DictionaryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DictionaryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DictionaryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DictionaryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DictionaryGroupBy) Scan ¶
func (dgb *DictionaryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DictionaryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DictionaryMutation ¶
type DictionaryMutation struct {
// contains filtered or unexported fields
}
DictionaryMutation represents an operation that mutates the Dictionary nodes in the graph.
func (*DictionaryMutation) AddDictionaryDetailIDs ¶
func (m *DictionaryMutation) AddDictionaryDetailIDs(ids ...uint64)
AddDictionaryDetailIDs adds the "dictionary_details" edge to the DictionaryDetail entity by ids.
func (*DictionaryMutation) AddField ¶
func (m *DictionaryMutation) 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 (*DictionaryMutation) AddStatus ¶
func (m *DictionaryMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*DictionaryMutation) AddedEdges ¶
func (m *DictionaryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DictionaryMutation) AddedField ¶
func (m *DictionaryMutation) 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 (*DictionaryMutation) AddedFields ¶
func (m *DictionaryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DictionaryMutation) AddedIDs ¶
func (m *DictionaryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DictionaryMutation) AddedStatus ¶
func (m *DictionaryMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*DictionaryMutation) ClearDesc ¶ added in v1.0.10
func (m *DictionaryMutation) ClearDesc()
ClearDesc clears the value of the "desc" field.
func (*DictionaryMutation) ClearDictionaryDetails ¶
func (m *DictionaryMutation) ClearDictionaryDetails()
ClearDictionaryDetails clears the "dictionary_details" edge to the DictionaryDetail entity.
func (*DictionaryMutation) ClearEdge ¶
func (m *DictionaryMutation) 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 (*DictionaryMutation) ClearField ¶
func (m *DictionaryMutation) 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 (*DictionaryMutation) ClearStatus ¶
func (m *DictionaryMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*DictionaryMutation) ClearedEdges ¶
func (m *DictionaryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DictionaryMutation) ClearedFields ¶
func (m *DictionaryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DictionaryMutation) Client ¶
func (m DictionaryMutation) 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 (*DictionaryMutation) CreatedAt ¶
func (m *DictionaryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DictionaryMutation) Desc ¶
func (m *DictionaryMutation) Desc() (r string, exists bool)
Desc returns the value of the "desc" field in the mutation.
func (*DictionaryMutation) DescCleared ¶ added in v1.0.10
func (m *DictionaryMutation) DescCleared() bool
DescCleared returns if the "desc" field was cleared in this mutation.
func (*DictionaryMutation) DictionaryDetailsCleared ¶
func (m *DictionaryMutation) DictionaryDetailsCleared() bool
DictionaryDetailsCleared reports if the "dictionary_details" edge to the DictionaryDetail entity was cleared.
func (*DictionaryMutation) DictionaryDetailsIDs ¶
func (m *DictionaryMutation) DictionaryDetailsIDs() (ids []uint64)
DictionaryDetailsIDs returns the "dictionary_details" edge IDs in the mutation.
func (*DictionaryMutation) EdgeCleared ¶
func (m *DictionaryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DictionaryMutation) ExecContext ¶ added in v1.0.9
func (c *DictionaryMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryMutation) Field ¶
func (m *DictionaryMutation) 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 (*DictionaryMutation) FieldCleared ¶
func (m *DictionaryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DictionaryMutation) Fields ¶
func (m *DictionaryMutation) 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 (*DictionaryMutation) ID ¶
func (m *DictionaryMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DictionaryMutation) IDs ¶
func (m *DictionaryMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DictionaryMutation) Name ¶
func (m *DictionaryMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*DictionaryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Dictionary entity. If the Dictionary 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 (*DictionaryMutation) OldDesc ¶
func (m *DictionaryMutation) OldDesc(ctx context.Context) (v string, err error)
OldDesc returns the old "desc" field's value of the Dictionary entity. If the Dictionary 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 (*DictionaryMutation) 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 (*DictionaryMutation) OldName ¶
func (m *DictionaryMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Dictionary entity. If the Dictionary 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 (*DictionaryMutation) OldStatus ¶
func (m *DictionaryMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Dictionary entity. If the Dictionary 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 (*DictionaryMutation) OldTitle ¶
func (m *DictionaryMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Dictionary entity. If the Dictionary 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 (*DictionaryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Dictionary entity. If the Dictionary 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 (*DictionaryMutation) QueryContext ¶ added in v1.0.9
func (c *DictionaryMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryMutation) RemoveDictionaryDetailIDs ¶
func (m *DictionaryMutation) RemoveDictionaryDetailIDs(ids ...uint64)
RemoveDictionaryDetailIDs removes the "dictionary_details" edge to the DictionaryDetail entity by IDs.
func (*DictionaryMutation) RemovedDictionaryDetailsIDs ¶
func (m *DictionaryMutation) RemovedDictionaryDetailsIDs() (ids []uint64)
RemovedDictionaryDetails returns the removed IDs of the "dictionary_details" edge to the DictionaryDetail entity.
func (*DictionaryMutation) RemovedEdges ¶
func (m *DictionaryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DictionaryMutation) RemovedIDs ¶
func (m *DictionaryMutation) 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 (*DictionaryMutation) ResetCreatedAt ¶
func (m *DictionaryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DictionaryMutation) ResetDesc ¶
func (m *DictionaryMutation) ResetDesc()
ResetDesc resets all changes to the "desc" field.
func (*DictionaryMutation) ResetDictionaryDetails ¶
func (m *DictionaryMutation) ResetDictionaryDetails()
ResetDictionaryDetails resets all changes to the "dictionary_details" edge.
func (*DictionaryMutation) ResetEdge ¶
func (m *DictionaryMutation) 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 (*DictionaryMutation) ResetField ¶
func (m *DictionaryMutation) 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 (*DictionaryMutation) ResetName ¶
func (m *DictionaryMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*DictionaryMutation) ResetStatus ¶
func (m *DictionaryMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*DictionaryMutation) ResetTitle ¶
func (m *DictionaryMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*DictionaryMutation) ResetUpdatedAt ¶
func (m *DictionaryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DictionaryMutation) SetCreatedAt ¶
func (m *DictionaryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DictionaryMutation) SetDesc ¶
func (m *DictionaryMutation) SetDesc(s string)
SetDesc sets the "desc" field.
func (*DictionaryMutation) SetField ¶
func (m *DictionaryMutation) 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 (*DictionaryMutation) SetID ¶
func (m *DictionaryMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Dictionary entities.
func (*DictionaryMutation) SetName ¶
func (m *DictionaryMutation) SetName(s string)
SetName sets the "name" field.
func (*DictionaryMutation) SetOp ¶
func (m *DictionaryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DictionaryMutation) SetStatus ¶
func (m *DictionaryMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*DictionaryMutation) SetTitle ¶
func (m *DictionaryMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*DictionaryMutation) SetUpdatedAt ¶
func (m *DictionaryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DictionaryMutation) Status ¶
func (m *DictionaryMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*DictionaryMutation) StatusCleared ¶
func (m *DictionaryMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (*DictionaryMutation) Title ¶
func (m *DictionaryMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (DictionaryMutation) Tx ¶
func (m DictionaryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DictionaryMutation) Type ¶
func (m *DictionaryMutation) Type() string
Type returns the node type of this mutation (Dictionary).
func (*DictionaryMutation) UpdatedAt ¶
func (m *DictionaryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DictionaryMutation) Where ¶
func (m *DictionaryMutation) Where(ps ...predicate.Dictionary)
Where appends a list predicates to the DictionaryMutation builder.
func (*DictionaryMutation) WhereP ¶
func (m *DictionaryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DictionaryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DictionaryPageList ¶
type DictionaryPageList struct { List []*Dictionary `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
DictionaryPageList is Dictionary PageList result.
type DictionaryPager ¶
type DictionaryPager struct { Order dictionary.OrderOption Filter func(*DictionaryQuery) (*DictionaryQuery, error) }
func (*DictionaryPager) ApplyFilter ¶
func (p *DictionaryPager) ApplyFilter(query *DictionaryQuery) (*DictionaryQuery, error)
type DictionaryPaginateOption ¶
type DictionaryPaginateOption func(*DictionaryPager)
DictionaryPaginateOption enables pagination customization.
type DictionaryQuery ¶
type DictionaryQuery struct {
// contains filtered or unexported fields
}
DictionaryQuery is the builder for querying Dictionary entities.
func (*DictionaryQuery) Aggregate ¶
func (dq *DictionaryQuery) Aggregate(fns ...AggregateFunc) *DictionarySelect
Aggregate returns a DictionarySelect configured with the given aggregations.
func (*DictionaryQuery) All ¶
func (dq *DictionaryQuery) All(ctx context.Context) ([]*Dictionary, error)
All executes the query and returns a list of Dictionaries.
func (*DictionaryQuery) AllX ¶
func (dq *DictionaryQuery) AllX(ctx context.Context) []*Dictionary
AllX is like All, but panics if an error occurs.
func (*DictionaryQuery) Clone ¶
func (dq *DictionaryQuery) Clone() *DictionaryQuery
Clone returns a duplicate of the DictionaryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DictionaryQuery) Count ¶
func (dq *DictionaryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DictionaryQuery) CountX ¶
func (dq *DictionaryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DictionaryQuery) ExecContext ¶ added in v1.0.9
func (c *DictionaryQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryQuery) Exist ¶
func (dq *DictionaryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DictionaryQuery) ExistX ¶
func (dq *DictionaryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DictionaryQuery) First ¶
func (dq *DictionaryQuery) First(ctx context.Context) (*Dictionary, error)
First returns the first Dictionary entity from the query. Returns a *NotFoundError when no Dictionary was found.
func (*DictionaryQuery) FirstID ¶
func (dq *DictionaryQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Dictionary ID from the query. Returns a *NotFoundError when no Dictionary ID was found.
func (*DictionaryQuery) FirstIDX ¶
func (dq *DictionaryQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*DictionaryQuery) FirstX ¶
func (dq *DictionaryQuery) FirstX(ctx context.Context) *Dictionary
FirstX is like First, but panics if an error occurs.
func (*DictionaryQuery) GroupBy ¶
func (dq *DictionaryQuery) GroupBy(field string, fields ...string) *DictionaryGroupBy
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.Dictionary.Query(). GroupBy(dictionary.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DictionaryQuery) IDs ¶
func (dq *DictionaryQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Dictionary IDs.
func (*DictionaryQuery) IDsX ¶
func (dq *DictionaryQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*DictionaryQuery) Limit ¶
func (dq *DictionaryQuery) Limit(limit int) *DictionaryQuery
Limit the number of records to be returned by this query.
func (*DictionaryQuery) Offset ¶
func (dq *DictionaryQuery) Offset(offset int) *DictionaryQuery
Offset to start from.
func (*DictionaryQuery) Only ¶
func (dq *DictionaryQuery) Only(ctx context.Context) (*Dictionary, error)
Only returns a single Dictionary entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Dictionary entity is found. Returns a *NotFoundError when no Dictionary entities are found.
func (*DictionaryQuery) OnlyID ¶
func (dq *DictionaryQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Dictionary ID in the query. Returns a *NotSingularError when more than one Dictionary ID is found. Returns a *NotFoundError when no entities are found.
func (*DictionaryQuery) OnlyIDX ¶
func (dq *DictionaryQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DictionaryQuery) OnlyX ¶
func (dq *DictionaryQuery) OnlyX(ctx context.Context) *Dictionary
OnlyX is like Only, but panics if an error occurs.
func (*DictionaryQuery) Order ¶
func (dq *DictionaryQuery) Order(o ...dictionary.OrderOption) *DictionaryQuery
Order specifies how the records should be ordered.
func (*DictionaryQuery) Page ¶
func (d *DictionaryQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...DictionaryPaginateOption, ) (*DictionaryPageList, error)
func (*DictionaryQuery) QueryContext ¶ added in v1.0.9
func (c *DictionaryQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryQuery) QueryDictionaryDetails ¶
func (dq *DictionaryQuery) QueryDictionaryDetails() *DictionaryDetailQuery
QueryDictionaryDetails chains the current query on the "dictionary_details" edge.
func (*DictionaryQuery) Select ¶
func (dq *DictionaryQuery) Select(fields ...string) *DictionarySelect
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.Dictionary.Query(). Select(dictionary.FieldCreatedAt). Scan(ctx, &v)
func (*DictionaryQuery) Unique ¶
func (dq *DictionaryQuery) Unique(unique bool) *DictionaryQuery
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 (*DictionaryQuery) Where ¶
func (dq *DictionaryQuery) Where(ps ...predicate.Dictionary) *DictionaryQuery
Where adds a new predicate for the DictionaryQuery builder.
func (*DictionaryQuery) WithDictionaryDetails ¶
func (dq *DictionaryQuery) WithDictionaryDetails(opts ...func(*DictionaryDetailQuery)) *DictionaryQuery
WithDictionaryDetails tells the query-builder to eager-load the nodes that are connected to the "dictionary_details" edge. The optional arguments are used to configure the query builder of the edge.
type DictionarySelect ¶
type DictionarySelect struct { *DictionaryQuery // contains filtered or unexported fields }
DictionarySelect is the builder for selecting fields of Dictionary entities.
func (*DictionarySelect) Aggregate ¶
func (ds *DictionarySelect) Aggregate(fns ...AggregateFunc) *DictionarySelect
Aggregate adds the given aggregation functions to the selector query.
func (*DictionarySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (DictionarySelect) ExecContext ¶ added in v1.0.9
func (c DictionarySelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionarySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DictionarySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (DictionarySelect) QueryContext ¶ added in v1.0.9
func (c DictionarySelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionarySelect) Scan ¶
func (ds *DictionarySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DictionarySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DictionaryUpdate ¶
type DictionaryUpdate struct {
// contains filtered or unexported fields
}
DictionaryUpdate is the builder for updating Dictionary entities.
func (*DictionaryUpdate) AddDictionaryDetailIDs ¶
func (du *DictionaryUpdate) AddDictionaryDetailIDs(ids ...uint64) *DictionaryUpdate
AddDictionaryDetailIDs adds the "dictionary_details" edge to the DictionaryDetail entity by IDs.
func (*DictionaryUpdate) AddDictionaryDetails ¶
func (du *DictionaryUpdate) AddDictionaryDetails(d ...*DictionaryDetail) *DictionaryUpdate
AddDictionaryDetails adds the "dictionary_details" edges to the DictionaryDetail entity.
func (*DictionaryUpdate) AddStatus ¶
func (du *DictionaryUpdate) AddStatus(u int8) *DictionaryUpdate
AddStatus adds u to the "status" field.
func (*DictionaryUpdate) ClearDesc ¶ added in v1.0.10
func (du *DictionaryUpdate) ClearDesc() *DictionaryUpdate
ClearDesc clears the value of the "desc" field.
func (*DictionaryUpdate) ClearDictionaryDetails ¶
func (du *DictionaryUpdate) ClearDictionaryDetails() *DictionaryUpdate
ClearDictionaryDetails clears all "dictionary_details" edges to the DictionaryDetail entity.
func (*DictionaryUpdate) ClearStatus ¶
func (du *DictionaryUpdate) ClearStatus() *DictionaryUpdate
ClearStatus clears the value of the "status" field.
func (*DictionaryUpdate) Exec ¶
func (du *DictionaryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DictionaryUpdate) ExecContext ¶ added in v1.0.9
func (c *DictionaryUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryUpdate) ExecX ¶
func (du *DictionaryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryUpdate) Mutation ¶
func (du *DictionaryUpdate) Mutation() *DictionaryMutation
Mutation returns the DictionaryMutation object of the builder.
func (*DictionaryUpdate) QueryContext ¶ added in v1.0.9
func (c *DictionaryUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryUpdate) RemoveDictionaryDetailIDs ¶
func (du *DictionaryUpdate) RemoveDictionaryDetailIDs(ids ...uint64) *DictionaryUpdate
RemoveDictionaryDetailIDs removes the "dictionary_details" edge to DictionaryDetail entities by IDs.
func (*DictionaryUpdate) RemoveDictionaryDetails ¶
func (du *DictionaryUpdate) RemoveDictionaryDetails(d ...*DictionaryDetail) *DictionaryUpdate
RemoveDictionaryDetails removes "dictionary_details" edges to DictionaryDetail entities.
func (*DictionaryUpdate) Save ¶
func (du *DictionaryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DictionaryUpdate) SaveX ¶
func (du *DictionaryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DictionaryUpdate) SetDesc ¶
func (du *DictionaryUpdate) SetDesc(s string) *DictionaryUpdate
SetDesc sets the "desc" field.
func (*DictionaryUpdate) SetName ¶
func (du *DictionaryUpdate) SetName(s string) *DictionaryUpdate
SetName sets the "name" field.
func (*DictionaryUpdate) SetNillableDesc ¶ added in v1.0.10
func (du *DictionaryUpdate) SetNillableDesc(s *string) *DictionaryUpdate
SetNillableDesc sets the "desc" field if the given value is not nil.
func (*DictionaryUpdate) SetNillableStatus ¶
func (du *DictionaryUpdate) SetNillableStatus(u *uint8) *DictionaryUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*DictionaryUpdate) SetNotEmptyDesc ¶
func (d *DictionaryUpdate) SetNotEmptyDesc(value string) *DictionaryUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryUpdate) SetNotEmptyName ¶
func (d *DictionaryUpdate) SetNotEmptyName(value string) *DictionaryUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryUpdate) SetNotEmptyStatus ¶
func (d *DictionaryUpdate) SetNotEmptyStatus(value uint8) *DictionaryUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryUpdate) SetNotEmptyTitle ¶
func (d *DictionaryUpdate) SetNotEmptyTitle(value string) *DictionaryUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryUpdate) SetNotNilDesc ¶ added in v1.0.9
func (d *DictionaryUpdate) SetNotNilDesc(value *string) *DictionaryUpdate
set field if value's pointer is not nil.
func (*DictionaryUpdate) SetNotNilName ¶ added in v1.0.9
func (d *DictionaryUpdate) SetNotNilName(value *string) *DictionaryUpdate
set field if value's pointer is not nil.
func (*DictionaryUpdate) SetNotNilStatus ¶ added in v1.0.9
func (d *DictionaryUpdate) SetNotNilStatus(value *uint8) *DictionaryUpdate
set field if value's pointer is not nil.
func (*DictionaryUpdate) SetNotNilTitle ¶ added in v1.0.9
func (d *DictionaryUpdate) SetNotNilTitle(value *string) *DictionaryUpdate
set field if value's pointer is not nil.
func (*DictionaryUpdate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (d *DictionaryUpdate) SetNotNilUpdatedAt(value *time.Time) *DictionaryUpdate
set field if value's pointer is not nil.
func (*DictionaryUpdate) SetStatus ¶
func (du *DictionaryUpdate) SetStatus(u uint8) *DictionaryUpdate
SetStatus sets the "status" field.
func (*DictionaryUpdate) SetTitle ¶
func (du *DictionaryUpdate) SetTitle(s string) *DictionaryUpdate
SetTitle sets the "title" field.
func (*DictionaryUpdate) SetUpdatedAt ¶
func (du *DictionaryUpdate) SetUpdatedAt(t time.Time) *DictionaryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DictionaryUpdate) Where ¶
func (du *DictionaryUpdate) Where(ps ...predicate.Dictionary) *DictionaryUpdate
Where appends a list predicates to the DictionaryUpdate builder.
type DictionaryUpdateOne ¶
type DictionaryUpdateOne struct {
// contains filtered or unexported fields
}
DictionaryUpdateOne is the builder for updating a single Dictionary entity.
func (*DictionaryUpdateOne) AddDictionaryDetailIDs ¶
func (duo *DictionaryUpdateOne) AddDictionaryDetailIDs(ids ...uint64) *DictionaryUpdateOne
AddDictionaryDetailIDs adds the "dictionary_details" edge to the DictionaryDetail entity by IDs.
func (*DictionaryUpdateOne) AddDictionaryDetails ¶
func (duo *DictionaryUpdateOne) AddDictionaryDetails(d ...*DictionaryDetail) *DictionaryUpdateOne
AddDictionaryDetails adds the "dictionary_details" edges to the DictionaryDetail entity.
func (*DictionaryUpdateOne) AddStatus ¶
func (duo *DictionaryUpdateOne) AddStatus(u int8) *DictionaryUpdateOne
AddStatus adds u to the "status" field.
func (*DictionaryUpdateOne) ClearDesc ¶ added in v1.0.10
func (duo *DictionaryUpdateOne) ClearDesc() *DictionaryUpdateOne
ClearDesc clears the value of the "desc" field.
func (*DictionaryUpdateOne) ClearDictionaryDetails ¶
func (duo *DictionaryUpdateOne) ClearDictionaryDetails() *DictionaryUpdateOne
ClearDictionaryDetails clears all "dictionary_details" edges to the DictionaryDetail entity.
func (*DictionaryUpdateOne) ClearStatus ¶
func (duo *DictionaryUpdateOne) ClearStatus() *DictionaryUpdateOne
ClearStatus clears the value of the "status" field.
func (*DictionaryUpdateOne) Exec ¶
func (duo *DictionaryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DictionaryUpdateOne) ExecContext ¶ added in v1.0.9
func (c *DictionaryUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*DictionaryUpdateOne) ExecX ¶
func (duo *DictionaryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DictionaryUpdateOne) Mutation ¶
func (duo *DictionaryUpdateOne) Mutation() *DictionaryMutation
Mutation returns the DictionaryMutation object of the builder.
func (*DictionaryUpdateOne) QueryContext ¶ added in v1.0.9
func (c *DictionaryUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*DictionaryUpdateOne) RemoveDictionaryDetailIDs ¶
func (duo *DictionaryUpdateOne) RemoveDictionaryDetailIDs(ids ...uint64) *DictionaryUpdateOne
RemoveDictionaryDetailIDs removes the "dictionary_details" edge to DictionaryDetail entities by IDs.
func (*DictionaryUpdateOne) RemoveDictionaryDetails ¶
func (duo *DictionaryUpdateOne) RemoveDictionaryDetails(d ...*DictionaryDetail) *DictionaryUpdateOne
RemoveDictionaryDetails removes "dictionary_details" edges to DictionaryDetail entities.
func (*DictionaryUpdateOne) Save ¶
func (duo *DictionaryUpdateOne) Save(ctx context.Context) (*Dictionary, error)
Save executes the query and returns the updated Dictionary entity.
func (*DictionaryUpdateOne) SaveX ¶
func (duo *DictionaryUpdateOne) SaveX(ctx context.Context) *Dictionary
SaveX is like Save, but panics if an error occurs.
func (*DictionaryUpdateOne) Select ¶
func (duo *DictionaryUpdateOne) Select(field string, fields ...string) *DictionaryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DictionaryUpdateOne) SetDesc ¶
func (duo *DictionaryUpdateOne) SetDesc(s string) *DictionaryUpdateOne
SetDesc sets the "desc" field.
func (*DictionaryUpdateOne) SetName ¶
func (duo *DictionaryUpdateOne) SetName(s string) *DictionaryUpdateOne
SetName sets the "name" field.
func (*DictionaryUpdateOne) SetNillableDesc ¶ added in v1.0.10
func (duo *DictionaryUpdateOne) SetNillableDesc(s *string) *DictionaryUpdateOne
SetNillableDesc sets the "desc" field if the given value is not nil.
func (*DictionaryUpdateOne) SetNillableStatus ¶
func (duo *DictionaryUpdateOne) SetNillableStatus(u *uint8) *DictionaryUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*DictionaryUpdateOne) SetNotEmptyDesc ¶
func (d *DictionaryUpdateOne) SetNotEmptyDesc(value string) *DictionaryUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryUpdateOne) SetNotEmptyName ¶
func (d *DictionaryUpdateOne) SetNotEmptyName(value string) *DictionaryUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryUpdateOne) SetNotEmptyStatus ¶
func (d *DictionaryUpdateOne) SetNotEmptyStatus(value uint8) *DictionaryUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryUpdateOne) SetNotEmptyTitle ¶
func (d *DictionaryUpdateOne) SetNotEmptyTitle(value string) *DictionaryUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*DictionaryUpdateOne) SetNotNilDesc ¶ added in v1.0.9
func (d *DictionaryUpdateOne) SetNotNilDesc(value *string) *DictionaryUpdateOne
set field if value's pointer is not nil.
func (*DictionaryUpdateOne) SetNotNilName ¶ added in v1.0.9
func (d *DictionaryUpdateOne) SetNotNilName(value *string) *DictionaryUpdateOne
set field if value's pointer is not nil.
func (*DictionaryUpdateOne) SetNotNilStatus ¶ added in v1.0.9
func (d *DictionaryUpdateOne) SetNotNilStatus(value *uint8) *DictionaryUpdateOne
set field if value's pointer is not nil.
func (*DictionaryUpdateOne) SetNotNilTitle ¶ added in v1.0.9
func (d *DictionaryUpdateOne) SetNotNilTitle(value *string) *DictionaryUpdateOne
set field if value's pointer is not nil.
func (*DictionaryUpdateOne) SetNotNilUpdatedAt ¶ added in v1.0.9
func (d *DictionaryUpdateOne) SetNotNilUpdatedAt(value *time.Time) *DictionaryUpdateOne
set field if value's pointer is not nil.
func (*DictionaryUpdateOne) SetStatus ¶
func (duo *DictionaryUpdateOne) SetStatus(u uint8) *DictionaryUpdateOne
SetStatus sets the "status" field.
func (*DictionaryUpdateOne) SetTitle ¶
func (duo *DictionaryUpdateOne) SetTitle(s string) *DictionaryUpdateOne
SetTitle sets the "title" field.
func (*DictionaryUpdateOne) SetUpdatedAt ¶
func (duo *DictionaryUpdateOne) SetUpdatedAt(t time.Time) *DictionaryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DictionaryUpdateOne) Where ¶
func (duo *DictionaryUpdateOne) Where(ps ...predicate.Dictionary) *DictionaryUpdateOne
Where appends a list predicates to the DictionaryUpdate builder.
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 Menu ¶
type Menu struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Sort Number | 排序编号 Sort uint32 `json:"sort,omitempty"` // Parent menu ID | 父菜单ID ParentID uint64 `json:"parent_id,omitempty"` // Menu level | 菜单层级 MenuLevel uint32 `json:"menu_level,omitempty"` // Menu type | 菜单类型 (菜单或目录)0 目录 1 菜单 MenuType uint32 `json:"menu_type,omitempty"` // Index path | 菜单路由路径 Path string `json:"path,omitempty"` // Index name | 菜单名称 Name string `json:"name,omitempty"` // Redirect path | 跳转路径 (外链) Redirect string `json:"redirect,omitempty"` // The path of vue file | 组件路径 Component string `json:"component,omitempty"` // Disable status | 是否停用 Disabled bool `json:"disabled,omitempty"` // Menu name | 菜单显示标题 Title string `json:"title,omitempty"` // Menu icon | 菜单图标 Icon string `json:"icon,omitempty"` // Hide menu | 是否隐藏菜单 HideMenu bool `json:"hide_menu,omitempty"` // Hide the breadcrumb | 隐藏面包屑 HideBreadcrumb bool `json:"hide_breadcrumb,omitempty"` // Do not keep alive the tab | 取消页面缓存 IgnoreKeepAlive bool `json:"ignore_keep_alive,omitempty"` // Hide the tab header | 隐藏页头 HideTab bool `json:"hide_tab,omitempty"` // Show iframe | 内嵌 iframe FrameSrc string `json:"frame_src,omitempty"` // The route carries parameters or not | 携带参数 CarryParam bool `json:"carry_param,omitempty"` // Hide children menu or not | 隐藏所有子菜单 HideChildrenInMenu bool `json:"hide_children_in_menu,omitempty"` // Affix tab | Tab 固定 Affix bool `json:"affix,omitempty"` // The maximum number of pages the router can open | 能打开的子TAB数 DynamicLevel uint32 `json:"dynamic_level,omitempty"` // The real path of the route without dynamic part | 菜单路由不包含参数部分 RealPath string `json:"real_path,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 }
Menu is the model entity for the Menu schema.
func (*Menu) ExecContext ¶ added in v1.0.9
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Menu) QueryChildren ¶
QueryChildren queries the "children" edge of the Menu entity.
func (*Menu) QueryContext ¶ added in v1.0.9
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Menu) QueryParent ¶
QueryParent queries the "parent" edge of the Menu entity.
func (*Menu) QueryRoles ¶
QueryRoles queries the "roles" 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 uint64) *MenuDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MenuClient) ExecContext ¶ added in v1.0.9
func (c *MenuClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MenuClient) GetX ¶
func (c *MenuClient) GetX(ctx context.Context, id uint64) *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) 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) QueryContext ¶ added in v1.0.9
func (c *MenuClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MenuClient) QueryParent ¶
func (c *MenuClient) QueryParent(m *Menu) *MenuQuery
QueryParent queries the parent edge of a Menu.
func (*MenuClient) QueryRoles ¶
func (c *MenuClient) QueryRoles(m *Menu) *RoleQuery
QueryRoles queries the roles 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 uint64) *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 ...uint64) *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) AddRoleIDs ¶
func (mc *MenuCreate) AddRoleIDs(ids ...uint64) *MenuCreate
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*MenuCreate) AddRoles ¶
func (mc *MenuCreate) AddRoles(r ...*Role) *MenuCreate
AddRoles adds the "roles" edges to the Role entity.
func (*MenuCreate) Exec ¶
func (mc *MenuCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MenuCreate) ExecContext ¶ added in v1.0.9
func (c *MenuCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*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) QueryContext ¶ added in v1.0.9
func (c *MenuCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*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) SetAffix ¶
func (mc *MenuCreate) SetAffix(b bool) *MenuCreate
SetAffix sets the "affix" field.
func (*MenuCreate) SetCarryParam ¶
func (mc *MenuCreate) SetCarryParam(b bool) *MenuCreate
SetCarryParam sets the "carry_param" field.
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) SetDisabled ¶
func (mc *MenuCreate) SetDisabled(b bool) *MenuCreate
SetDisabled sets the "disabled" field.
func (*MenuCreate) SetDynamicLevel ¶
func (mc *MenuCreate) SetDynamicLevel(u uint32) *MenuCreate
SetDynamicLevel sets the "dynamic_level" field.
func (*MenuCreate) SetFrameSrc ¶
func (mc *MenuCreate) SetFrameSrc(s string) *MenuCreate
SetFrameSrc sets the "frame_src" field.
func (*MenuCreate) SetHideBreadcrumb ¶
func (mc *MenuCreate) SetHideBreadcrumb(b bool) *MenuCreate
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuCreate) SetHideChildrenInMenu ¶
func (mc *MenuCreate) SetHideChildrenInMenu(b bool) *MenuCreate
SetHideChildrenInMenu sets the "hide_children_in_menu" 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 uint64) *MenuCreate
SetID sets the "id" field.
func (*MenuCreate) SetIcon ¶
func (mc *MenuCreate) SetIcon(s string) *MenuCreate
SetIcon sets the "icon" field.
func (*MenuCreate) SetIgnoreKeepAlive ¶
func (mc *MenuCreate) SetIgnoreKeepAlive(b bool) *MenuCreate
SetIgnoreKeepAlive sets the "ignore_keep_alive" field.
func (*MenuCreate) SetMenuLevel ¶
func (mc *MenuCreate) SetMenuLevel(u uint32) *MenuCreate
SetMenuLevel sets the "menu_level" field.
func (*MenuCreate) SetMenuType ¶
func (mc *MenuCreate) SetMenuType(u uint32) *MenuCreate
SetMenuType sets the "menu_type" field.
func (*MenuCreate) SetName ¶
func (mc *MenuCreate) SetName(s string) *MenuCreate
SetName sets the "name" field.
func (*MenuCreate) SetNillableAffix ¶
func (mc *MenuCreate) SetNillableAffix(b *bool) *MenuCreate
SetNillableAffix sets the "affix" field if the given value is not nil.
func (*MenuCreate) SetNillableCarryParam ¶
func (mc *MenuCreate) SetNillableCarryParam(b *bool) *MenuCreate
SetNillableCarryParam sets the "carry_param" field if the given value is not nil.
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) SetNillableDisabled ¶
func (mc *MenuCreate) SetNillableDisabled(b *bool) *MenuCreate
SetNillableDisabled sets the "disabled" field if the given value is not nil.
func (*MenuCreate) SetNillableDynamicLevel ¶
func (mc *MenuCreate) SetNillableDynamicLevel(u *uint32) *MenuCreate
SetNillableDynamicLevel sets the "dynamic_level" field if the given value is not nil.
func (*MenuCreate) SetNillableFrameSrc ¶
func (mc *MenuCreate) SetNillableFrameSrc(s *string) *MenuCreate
SetNillableFrameSrc sets the "frame_src" 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) SetNillableHideChildrenInMenu ¶
func (mc *MenuCreate) SetNillableHideChildrenInMenu(b *bool) *MenuCreate
SetNillableHideChildrenInMenu sets the "hide_children_in_menu" 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) SetNillableIgnoreKeepAlive ¶
func (mc *MenuCreate) SetNillableIgnoreKeepAlive(b *bool) *MenuCreate
SetNillableIgnoreKeepAlive sets the "ignore_keep_alive" field if the given value is not nil.
func (*MenuCreate) SetNillableParentID ¶
func (mc *MenuCreate) SetNillableParentID(u *uint64) *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) SetNillableRealPath ¶
func (mc *MenuCreate) SetNillableRealPath(s *string) *MenuCreate
SetNillableRealPath sets the "real_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) SetNillableSort ¶
func (mc *MenuCreate) SetNillableSort(u *uint32) *MenuCreate
SetNillableSort sets the "sort" 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) SetNotNilAffix ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilAffix(value *bool) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilCarryParam ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilCarryParam(value *bool) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilComponent ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilComponent(value *string) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilDisabled ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilDisabled(value *bool) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilDynamicLevel ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilDynamicLevel(value *uint32) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilFrameSrc ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilFrameSrc(value *string) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilHideBreadcrumb ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilHideBreadcrumb(value *bool) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilHideChildrenInMenu ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilHideChildrenInMenu(value *bool) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilHideMenu ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilHideMenu(value *bool) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilHideTab ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilHideTab(value *bool) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilIcon ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilIcon(value *string) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilIgnoreKeepAlive ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilIgnoreKeepAlive(value *bool) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilMenuLevel ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilMenuLevel(value *uint32) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilMenuType ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilMenuType(value *uint32) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilName ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilName(value *string) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilParentID ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilParentID(value *uint64) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilPath ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilPath(value *string) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilRealPath ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilRealPath(value *string) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilRedirect ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilRedirect(value *string) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilSort ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilSort(value *uint32) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilTitle ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilTitle(value *string) *MenuCreate
set field if value's pointer is not nil.
func (*MenuCreate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (m *MenuCreate) SetNotNilUpdatedAt(value *time.Time) *MenuCreate
set field if value's pointer 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 uint64) *MenuCreate
SetParentID sets the "parent_id" field.
func (*MenuCreate) SetPath ¶
func (mc *MenuCreate) SetPath(s string) *MenuCreate
SetPath sets the "path" field.
func (*MenuCreate) SetRealPath ¶
func (mc *MenuCreate) SetRealPath(s string) *MenuCreate
SetRealPath sets the "real_path" field.
func (*MenuCreate) SetRedirect ¶
func (mc *MenuCreate) SetRedirect(s string) *MenuCreate
SetRedirect sets the "redirect" field.
func (*MenuCreate) SetSort ¶
func (mc *MenuCreate) SetSort(u uint32) *MenuCreate
SetSort sets the "sort" field.
func (*MenuCreate) SetTitle ¶
func (mc *MenuCreate) SetTitle(s string) *MenuCreate
SetTitle sets the "title" field.
func (*MenuCreate) SetUpdatedAt ¶
func (mc *MenuCreate) SetUpdatedAt(t time.Time) *MenuCreate
SetUpdatedAt sets the "updated_at" 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) ExecContext ¶ added in v1.0.9
func (c *MenuCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MenuCreateBulk) ExecX ¶
func (mcb *MenuCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuCreateBulk) QueryContext ¶ added in v1.0.9
func (c *MenuCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type 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) ExecContext ¶ added in v1.0.9
func (c *MenuDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MenuDelete) ExecX ¶
func (md *MenuDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MenuDelete) QueryContext ¶ added in v1.0.9
func (c *MenuDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*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 { // Roles holds the value of the roles edge. Roles []*Role `json:"roles,omitempty"` // 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.
func (MenuEdges) RolesOrErr ¶
RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.
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 ...uint64)
AddChildIDs adds the "children" edge to the Menu entity by ids.
func (*MenuMutation) AddDynamicLevel ¶
func (m *MenuMutation) AddDynamicLevel(u int32)
AddDynamicLevel adds u to the "dynamic_level" field.
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) AddMenuLevel ¶
func (m *MenuMutation) AddMenuLevel(u int32)
AddMenuLevel adds u to the "menu_level" field.
func (*MenuMutation) AddMenuType ¶
func (m *MenuMutation) AddMenuType(u int32)
AddMenuType adds u to the "menu_type" field.
func (*MenuMutation) AddRoleIDs ¶
func (m *MenuMutation) AddRoleIDs(ids ...uint64)
AddRoleIDs adds the "roles" edge to the Role entity by ids.
func (*MenuMutation) AddSort ¶
func (m *MenuMutation) AddSort(u int32)
AddSort adds u to the "sort" field.
func (*MenuMutation) AddedDynamicLevel ¶
func (m *MenuMutation) AddedDynamicLevel() (r int32, exists bool)
AddedDynamicLevel returns the value that was added to the "dynamic_level" field in this mutation.
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) AddedMenuLevel ¶
func (m *MenuMutation) AddedMenuLevel() (r int32, exists bool)
AddedMenuLevel returns the value that was added to the "menu_level" field in this mutation.
func (*MenuMutation) AddedMenuType ¶
func (m *MenuMutation) AddedMenuType() (r int32, exists bool)
AddedMenuType returns the value that was added to the "menu_type" field 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) Affix ¶
func (m *MenuMutation) Affix() (r bool, exists bool)
Affix returns the value of the "affix" field in the mutation.
func (*MenuMutation) AffixCleared ¶
func (m *MenuMutation) AffixCleared() bool
AffixCleared returns if the "affix" field was cleared in this mutation.
func (*MenuMutation) CarryParam ¶
func (m *MenuMutation) CarryParam() (r bool, exists bool)
CarryParam returns the value of the "carry_param" field in the mutation.
func (*MenuMutation) CarryParamCleared ¶
func (m *MenuMutation) CarryParamCleared() bool
CarryParamCleared returns if the "carry_param" field was cleared 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 []uint64)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*MenuMutation) ClearAffix ¶
func (m *MenuMutation) ClearAffix()
ClearAffix clears the value of the "affix" field.
func (*MenuMutation) ClearCarryParam ¶
func (m *MenuMutation) ClearCarryParam()
ClearCarryParam clears the value of the "carry_param" field.
func (*MenuMutation) ClearChildren ¶
func (m *MenuMutation) ClearChildren()
ClearChildren clears the "children" edge to the Menu entity.
func (*MenuMutation) ClearComponent ¶
func (m *MenuMutation) ClearComponent()
ClearComponent clears the value of the "component" field.
func (*MenuMutation) ClearDisabled ¶
func (m *MenuMutation) ClearDisabled()
ClearDisabled clears the value of the "disabled" field.
func (*MenuMutation) ClearDynamicLevel ¶
func (m *MenuMutation) ClearDynamicLevel()
ClearDynamicLevel clears the value of the "dynamic_level" 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) ClearFrameSrc ¶
func (m *MenuMutation) ClearFrameSrc()
ClearFrameSrc clears the value of the "frame_src" field.
func (*MenuMutation) ClearHideBreadcrumb ¶
func (m *MenuMutation) ClearHideBreadcrumb()
ClearHideBreadcrumb clears the value of the "hide_breadcrumb" field.
func (*MenuMutation) ClearHideChildrenInMenu ¶
func (m *MenuMutation) ClearHideChildrenInMenu()
ClearHideChildrenInMenu clears the value of the "hide_children_in_menu" field.
func (*MenuMutation) ClearHideMenu ¶
func (m *MenuMutation) ClearHideMenu()
ClearHideMenu clears the value of the "hide_menu" field.
func (*MenuMutation) ClearHideTab ¶
func (m *MenuMutation) ClearHideTab()
ClearHideTab clears the value of the "hide_tab" field.
func (*MenuMutation) ClearIgnoreKeepAlive ¶
func (m *MenuMutation) ClearIgnoreKeepAlive()
ClearIgnoreKeepAlive clears the value of the "ignore_keep_alive" field.
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) ClearPath ¶
func (m *MenuMutation) ClearPath()
ClearPath clears the value of the "path" field.
func (*MenuMutation) ClearRealPath ¶
func (m *MenuMutation) ClearRealPath()
ClearRealPath clears the value of the "real_path" field.
func (*MenuMutation) ClearRedirect ¶
func (m *MenuMutation) ClearRedirect()
ClearRedirect clears the value of the "redirect" field.
func (*MenuMutation) ClearRoles ¶
func (m *MenuMutation) ClearRoles()
ClearRoles clears the "roles" edge to the Role entity.
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) ComponentCleared ¶
func (m *MenuMutation) ComponentCleared() bool
ComponentCleared returns if the "component" field was cleared in this 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) Disabled ¶
func (m *MenuMutation) Disabled() (r bool, exists bool)
Disabled returns the value of the "disabled" field in the mutation.
func (*MenuMutation) DisabledCleared ¶
func (m *MenuMutation) DisabledCleared() bool
DisabledCleared returns if the "disabled" field was cleared in this mutation.
func (*MenuMutation) DynamicLevel ¶
func (m *MenuMutation) DynamicLevel() (r uint32, exists bool)
DynamicLevel returns the value of the "dynamic_level" field in the mutation.
func (*MenuMutation) DynamicLevelCleared ¶
func (m *MenuMutation) DynamicLevelCleared() bool
DynamicLevelCleared returns if the "dynamic_level" 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) ExecContext ¶ added in v1.0.9
func (c *MenuMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*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) FrameSrc ¶
func (m *MenuMutation) FrameSrc() (r string, exists bool)
FrameSrc returns the value of the "frame_src" field in the mutation.
func (*MenuMutation) FrameSrcCleared ¶
func (m *MenuMutation) FrameSrcCleared() bool
FrameSrcCleared returns if the "frame_src" field was cleared in this 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) HideBreadcrumbCleared ¶
func (m *MenuMutation) HideBreadcrumbCleared() bool
HideBreadcrumbCleared returns if the "hide_breadcrumb" field was cleared in this mutation.
func (*MenuMutation) HideChildrenInMenu ¶
func (m *MenuMutation) HideChildrenInMenu() (r bool, exists bool)
HideChildrenInMenu returns the value of the "hide_children_in_menu" field in the mutation.
func (*MenuMutation) HideChildrenInMenuCleared ¶
func (m *MenuMutation) HideChildrenInMenuCleared() bool
HideChildrenInMenuCleared returns if the "hide_children_in_menu" field was cleared in this 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) HideMenuCleared ¶
func (m *MenuMutation) HideMenuCleared() bool
HideMenuCleared returns if the "hide_menu" field was cleared in this 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) HideTabCleared ¶
func (m *MenuMutation) HideTabCleared() bool
HideTabCleared returns if the "hide_tab" field was cleared in this mutation.
func (*MenuMutation) ID ¶
func (m *MenuMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MenuMutation) IDs ¶
func (m *MenuMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MenuMutation) Icon ¶
func (m *MenuMutation) Icon() (r string, exists bool)
Icon returns the value of the "icon" field in the mutation.
func (*MenuMutation) IgnoreKeepAlive ¶
func (m *MenuMutation) IgnoreKeepAlive() (r bool, exists bool)
IgnoreKeepAlive returns the value of the "ignore_keep_alive" field in the mutation.
func (*MenuMutation) IgnoreKeepAliveCleared ¶
func (m *MenuMutation) IgnoreKeepAliveCleared() bool
IgnoreKeepAliveCleared returns if the "ignore_keep_alive" field was cleared in this mutation.
func (*MenuMutation) MenuLevel ¶
func (m *MenuMutation) MenuLevel() (r uint32, exists bool)
MenuLevel returns the value of the "menu_level" field in the mutation.
func (*MenuMutation) MenuType ¶
func (m *MenuMutation) MenuType() (r uint32, exists bool)
MenuType returns the value of the "menu_type" 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) OldAffix ¶
func (m *MenuMutation) OldAffix(ctx context.Context) (v bool, err error)
OldAffix returns the old "affix" 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) OldCarryParam ¶
func (m *MenuMutation) OldCarryParam(ctx context.Context) (v bool, err error)
OldCarryParam returns the old "carry_param" 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) 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) OldDisabled ¶
func (m *MenuMutation) OldDisabled(ctx context.Context) (v bool, err error)
OldDisabled returns the old "disabled" 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) OldDynamicLevel ¶
func (m *MenuMutation) OldDynamicLevel(ctx context.Context) (v uint32, err error)
OldDynamicLevel returns the old "dynamic_level" 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) OldFrameSrc ¶
func (m *MenuMutation) OldFrameSrc(ctx context.Context) (v string, err error)
OldFrameSrc returns the old "frame_src" 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) 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) OldHideChildrenInMenu ¶
func (m *MenuMutation) OldHideChildrenInMenu(ctx context.Context) (v bool, err error)
OldHideChildrenInMenu returns the old "hide_children_in_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) 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) OldIgnoreKeepAlive ¶
func (m *MenuMutation) OldIgnoreKeepAlive(ctx context.Context) (v bool, err error)
OldIgnoreKeepAlive returns the old "ignore_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) OldMenuLevel ¶
func (m *MenuMutation) OldMenuLevel(ctx context.Context) (v uint32, err error)
OldMenuLevel returns the old "menu_level" 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) OldMenuType ¶
func (m *MenuMutation) OldMenuType(ctx context.Context) (v uint32, err error)
OldMenuType returns the old "menu_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) 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 uint64, 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) OldRealPath ¶
func (m *MenuMutation) OldRealPath(ctx context.Context) (v string, err error)
OldRealPath returns the old "real_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) 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) OldSort ¶
func (m *MenuMutation) OldSort(ctx context.Context) (v uint32, 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) 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) 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) 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 uint64, 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 []uint64)
ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.
func (*MenuMutation) Path ¶
func (m *MenuMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*MenuMutation) PathCleared ¶
func (m *MenuMutation) PathCleared() bool
PathCleared returns if the "path" field was cleared in this mutation.
func (*MenuMutation) QueryContext ¶ added in v1.0.9
func (c *MenuMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MenuMutation) RealPath ¶
func (m *MenuMutation) RealPath() (r string, exists bool)
RealPath returns the value of the "real_path" field in the mutation.
func (*MenuMutation) RealPathCleared ¶
func (m *MenuMutation) RealPathCleared() bool
RealPathCleared returns if the "real_path" 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) RedirectCleared ¶
func (m *MenuMutation) RedirectCleared() bool
RedirectCleared returns if the "redirect" field was cleared in this mutation.
func (*MenuMutation) RemoveChildIDs ¶
func (m *MenuMutation) RemoveChildIDs(ids ...uint64)
RemoveChildIDs removes the "children" edge to the Menu entity by IDs.
func (*MenuMutation) RemoveRoleIDs ¶
func (m *MenuMutation) RemoveRoleIDs(ids ...uint64)
RemoveRoleIDs removes the "roles" edge to the Role entity by IDs.
func (*MenuMutation) RemovedChildrenIDs ¶
func (m *MenuMutation) RemovedChildrenIDs() (ids []uint64)
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) RemovedRolesIDs ¶
func (m *MenuMutation) RemovedRolesIDs() (ids []uint64)
RemovedRoles returns the removed IDs of the "roles" edge to the Role entity.
func (*MenuMutation) ResetAffix ¶
func (m *MenuMutation) ResetAffix()
ResetAffix resets all changes to the "affix" field.
func (*MenuMutation) ResetCarryParam ¶
func (m *MenuMutation) ResetCarryParam()
ResetCarryParam resets all changes to the "carry_param" field.
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) ResetDisabled ¶
func (m *MenuMutation) ResetDisabled()
ResetDisabled resets all changes to the "disabled" field.
func (*MenuMutation) ResetDynamicLevel ¶
func (m *MenuMutation) ResetDynamicLevel()
ResetDynamicLevel resets all changes to the "dynamic_level" 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) 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) ResetFrameSrc ¶
func (m *MenuMutation) ResetFrameSrc()
ResetFrameSrc resets all changes to the "frame_src" field.
func (*MenuMutation) ResetHideBreadcrumb ¶
func (m *MenuMutation) ResetHideBreadcrumb()
ResetHideBreadcrumb resets all changes to the "hide_breadcrumb" field.
func (*MenuMutation) ResetHideChildrenInMenu ¶
func (m *MenuMutation) ResetHideChildrenInMenu()
ResetHideChildrenInMenu resets all changes to the "hide_children_in_menu" 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) ResetIgnoreKeepAlive ¶
func (m *MenuMutation) ResetIgnoreKeepAlive()
ResetIgnoreKeepAlive resets all changes to the "ignore_keep_alive" field.
func (*MenuMutation) ResetMenuLevel ¶
func (m *MenuMutation) ResetMenuLevel()
ResetMenuLevel resets all changes to the "menu_level" field.
func (*MenuMutation) ResetMenuType ¶
func (m *MenuMutation) ResetMenuType()
ResetMenuType resets all changes to the "menu_type" 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) ResetRealPath ¶
func (m *MenuMutation) ResetRealPath()
ResetRealPath resets all changes to the "real_path" field.
func (*MenuMutation) ResetRedirect ¶
func (m *MenuMutation) ResetRedirect()
ResetRedirect resets all changes to the "redirect" field.
func (*MenuMutation) ResetRoles ¶
func (m *MenuMutation) ResetRoles()
ResetRoles resets all changes to the "roles" edge.
func (*MenuMutation) ResetSort ¶
func (m *MenuMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*MenuMutation) ResetTitle ¶
func (m *MenuMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*MenuMutation) ResetUpdatedAt ¶
func (m *MenuMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MenuMutation) RolesCleared ¶
func (m *MenuMutation) RolesCleared() bool
RolesCleared reports if the "roles" edge to the Role entity was cleared.
func (*MenuMutation) RolesIDs ¶
func (m *MenuMutation) RolesIDs() (ids []uint64)
RolesIDs returns the "roles" edge IDs in the mutation.
func (*MenuMutation) SetAffix ¶
func (m *MenuMutation) SetAffix(b bool)
SetAffix sets the "affix" field.
func (*MenuMutation) SetCarryParam ¶
func (m *MenuMutation) SetCarryParam(b bool)
SetCarryParam sets the "carry_param" 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) SetDisabled ¶
func (m *MenuMutation) SetDisabled(b bool)
SetDisabled sets the "disabled" field.
func (*MenuMutation) SetDynamicLevel ¶
func (m *MenuMutation) SetDynamicLevel(u uint32)
SetDynamicLevel sets the "dynamic_level" 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) SetFrameSrc ¶
func (m *MenuMutation) SetFrameSrc(s string)
SetFrameSrc sets the "frame_src" field.
func (*MenuMutation) SetHideBreadcrumb ¶
func (m *MenuMutation) SetHideBreadcrumb(b bool)
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuMutation) SetHideChildrenInMenu ¶
func (m *MenuMutation) SetHideChildrenInMenu(b bool)
SetHideChildrenInMenu sets the "hide_children_in_menu" 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 uint64)
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) SetIgnoreKeepAlive ¶
func (m *MenuMutation) SetIgnoreKeepAlive(b bool)
SetIgnoreKeepAlive sets the "ignore_keep_alive" field.
func (*MenuMutation) SetMenuLevel ¶
func (m *MenuMutation) SetMenuLevel(u uint32)
SetMenuLevel sets the "menu_level" field.
func (*MenuMutation) SetMenuType ¶
func (m *MenuMutation) SetMenuType(u uint32)
SetMenuType sets the "menu_type" 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 uint64)
SetParentID sets the "parent_id" field.
func (*MenuMutation) SetPath ¶
func (m *MenuMutation) SetPath(s string)
SetPath sets the "path" field.
func (*MenuMutation) SetRealPath ¶
func (m *MenuMutation) SetRealPath(s string)
SetRealPath sets the "real_path" field.
func (*MenuMutation) SetRedirect ¶
func (m *MenuMutation) SetRedirect(s string)
SetRedirect sets the "redirect" field.
func (*MenuMutation) SetSort ¶
func (m *MenuMutation) SetSort(u uint32)
SetSort sets the "sort" field.
func (*MenuMutation) SetTitle ¶
func (m *MenuMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*MenuMutation) SetUpdatedAt ¶
func (m *MenuMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MenuMutation) Sort ¶
func (m *MenuMutation) Sort() (r uint32, exists bool)
Sort returns the value of the "sort" 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) 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 MenuPageList ¶
type MenuPageList struct { List []*Menu `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
MenuPageList is Menu PageList result.
type MenuPager ¶
type MenuPager struct { Order menu.OrderOption Filter func(*MenuQuery) (*MenuQuery, error) }
type MenuPaginateOption ¶
type MenuPaginateOption func(*MenuPager)
MenuPaginateOption enables pagination customization.
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) ExecContext ¶ added in v1.0.9
func (c *MenuQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*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) 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) Page ¶
func (m *MenuQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...MenuPaginateOption, ) (*MenuPageList, error)
func (*MenuQuery) QueryChildren ¶
QueryChildren chains the current query on the "children" edge.
func (*MenuQuery) QueryContext ¶ added in v1.0.9
func (c *MenuQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MenuQuery) QueryParent ¶
QueryParent chains the current query on the "parent" edge.
func (*MenuQuery) QueryRoles ¶
QueryRoles chains the current query on the "roles" 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) ExecContext ¶ added in v1.0.9
func (c MenuSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*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) QueryContext ¶ added in v1.0.9
func (c MenuSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*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 ...uint64) *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) AddDynamicLevel ¶
func (mu *MenuUpdate) AddDynamicLevel(u int32) *MenuUpdate
AddDynamicLevel adds u to the "dynamic_level" field.
func (*MenuUpdate) AddMenuLevel ¶
func (mu *MenuUpdate) AddMenuLevel(u int32) *MenuUpdate
AddMenuLevel adds u to the "menu_level" field.
func (*MenuUpdate) AddMenuType ¶
func (mu *MenuUpdate) AddMenuType(u int32) *MenuUpdate
AddMenuType adds u to the "menu_type" field.
func (*MenuUpdate) AddRoleIDs ¶
func (mu *MenuUpdate) AddRoleIDs(ids ...uint64) *MenuUpdate
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*MenuUpdate) AddRoles ¶
func (mu *MenuUpdate) AddRoles(r ...*Role) *MenuUpdate
AddRoles adds the "roles" edges to the Role entity.
func (*MenuUpdate) AddSort ¶
func (mu *MenuUpdate) AddSort(u int32) *MenuUpdate
AddSort adds u to the "sort" field.
func (*MenuUpdate) ClearAffix ¶
func (mu *MenuUpdate) ClearAffix() *MenuUpdate
ClearAffix clears the value of the "affix" field.
func (*MenuUpdate) ClearCarryParam ¶
func (mu *MenuUpdate) ClearCarryParam() *MenuUpdate
ClearCarryParam clears the value of the "carry_param" field.
func (*MenuUpdate) ClearChildren ¶
func (mu *MenuUpdate) ClearChildren() *MenuUpdate
ClearChildren clears all "children" edges to the Menu entity.
func (*MenuUpdate) ClearComponent ¶
func (mu *MenuUpdate) ClearComponent() *MenuUpdate
ClearComponent clears the value of the "component" field.
func (*MenuUpdate) ClearDisabled ¶
func (mu *MenuUpdate) ClearDisabled() *MenuUpdate
ClearDisabled clears the value of the "disabled" field.
func (*MenuUpdate) ClearDynamicLevel ¶
func (mu *MenuUpdate) ClearDynamicLevel() *MenuUpdate
ClearDynamicLevel clears the value of the "dynamic_level" field.
func (*MenuUpdate) ClearFrameSrc ¶
func (mu *MenuUpdate) ClearFrameSrc() *MenuUpdate
ClearFrameSrc clears the value of the "frame_src" field.
func (*MenuUpdate) ClearHideBreadcrumb ¶
func (mu *MenuUpdate) ClearHideBreadcrumb() *MenuUpdate
ClearHideBreadcrumb clears the value of the "hide_breadcrumb" field.
func (*MenuUpdate) ClearHideChildrenInMenu ¶
func (mu *MenuUpdate) ClearHideChildrenInMenu() *MenuUpdate
ClearHideChildrenInMenu clears the value of the "hide_children_in_menu" field.
func (*MenuUpdate) ClearHideMenu ¶
func (mu *MenuUpdate) ClearHideMenu() *MenuUpdate
ClearHideMenu clears the value of the "hide_menu" field.
func (*MenuUpdate) ClearHideTab ¶
func (mu *MenuUpdate) ClearHideTab() *MenuUpdate
ClearHideTab clears the value of the "hide_tab" field.
func (*MenuUpdate) ClearIgnoreKeepAlive ¶
func (mu *MenuUpdate) ClearIgnoreKeepAlive() *MenuUpdate
ClearIgnoreKeepAlive clears the value of the "ignore_keep_alive" 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) ClearPath ¶
func (mu *MenuUpdate) ClearPath() *MenuUpdate
ClearPath clears the value of the "path" field.
func (*MenuUpdate) ClearRealPath ¶
func (mu *MenuUpdate) ClearRealPath() *MenuUpdate
ClearRealPath clears the value of the "real_path" field.
func (*MenuUpdate) ClearRedirect ¶
func (mu *MenuUpdate) ClearRedirect() *MenuUpdate
ClearRedirect clears the value of the "redirect" field.
func (*MenuUpdate) ClearRoles ¶
func (mu *MenuUpdate) ClearRoles() *MenuUpdate
ClearRoles clears all "roles" edges to the Role entity.
func (*MenuUpdate) Exec ¶
func (mu *MenuUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MenuUpdate) ExecContext ¶ added in v1.0.9
func (c *MenuUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MenuUpdate) ExecX ¶
func (mu *MenuUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuUpdate) Mutation ¶
func (mu *MenuUpdate) Mutation() *MenuMutation
Mutation returns the MenuMutation object of the builder.
func (*MenuUpdate) QueryContext ¶ added in v1.0.9
func (c *MenuUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MenuUpdate) RemoveChildIDs ¶
func (mu *MenuUpdate) RemoveChildIDs(ids ...uint64) *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) RemoveRoleIDs ¶
func (mu *MenuUpdate) RemoveRoleIDs(ids ...uint64) *MenuUpdate
RemoveRoleIDs removes the "roles" edge to Role entities by IDs.
func (*MenuUpdate) RemoveRoles ¶
func (mu *MenuUpdate) RemoveRoles(r ...*Role) *MenuUpdate
RemoveRoles removes "roles" edges to Role 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) SetAffix ¶
func (mu *MenuUpdate) SetAffix(b bool) *MenuUpdate
SetAffix sets the "affix" field.
func (*MenuUpdate) SetCarryParam ¶
func (mu *MenuUpdate) SetCarryParam(b bool) *MenuUpdate
SetCarryParam sets the "carry_param" field.
func (*MenuUpdate) SetComponent ¶
func (mu *MenuUpdate) SetComponent(s string) *MenuUpdate
SetComponent sets the "component" field.
func (*MenuUpdate) SetDisabled ¶
func (mu *MenuUpdate) SetDisabled(b bool) *MenuUpdate
SetDisabled sets the "disabled" field.
func (*MenuUpdate) SetDynamicLevel ¶
func (mu *MenuUpdate) SetDynamicLevel(u uint32) *MenuUpdate
SetDynamicLevel sets the "dynamic_level" field.
func (*MenuUpdate) SetFrameSrc ¶
func (mu *MenuUpdate) SetFrameSrc(s string) *MenuUpdate
SetFrameSrc sets the "frame_src" field.
func (*MenuUpdate) SetHideBreadcrumb ¶
func (mu *MenuUpdate) SetHideBreadcrumb(b bool) *MenuUpdate
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuUpdate) SetHideChildrenInMenu ¶
func (mu *MenuUpdate) SetHideChildrenInMenu(b bool) *MenuUpdate
SetHideChildrenInMenu sets the "hide_children_in_menu" 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) SetIgnoreKeepAlive ¶
func (mu *MenuUpdate) SetIgnoreKeepAlive(b bool) *MenuUpdate
SetIgnoreKeepAlive sets the "ignore_keep_alive" field.
func (*MenuUpdate) SetMenuLevel ¶
func (mu *MenuUpdate) SetMenuLevel(u uint32) *MenuUpdate
SetMenuLevel sets the "menu_level" field.
func (*MenuUpdate) SetMenuType ¶
func (mu *MenuUpdate) SetMenuType(u uint32) *MenuUpdate
SetMenuType sets the "menu_type" field.
func (*MenuUpdate) SetName ¶
func (mu *MenuUpdate) SetName(s string) *MenuUpdate
SetName sets the "name" field.
func (*MenuUpdate) SetNillableAffix ¶
func (mu *MenuUpdate) SetNillableAffix(b *bool) *MenuUpdate
SetNillableAffix sets the "affix" field if the given value is not nil.
func (*MenuUpdate) SetNillableCarryParam ¶
func (mu *MenuUpdate) SetNillableCarryParam(b *bool) *MenuUpdate
SetNillableCarryParam sets the "carry_param" field if the given value is not nil.
func (*MenuUpdate) SetNillableComponent ¶
func (mu *MenuUpdate) SetNillableComponent(s *string) *MenuUpdate
SetNillableComponent sets the "component" field if the given value is not nil.
func (*MenuUpdate) SetNillableDisabled ¶
func (mu *MenuUpdate) SetNillableDisabled(b *bool) *MenuUpdate
SetNillableDisabled sets the "disabled" field if the given value is not nil.
func (*MenuUpdate) SetNillableDynamicLevel ¶
func (mu *MenuUpdate) SetNillableDynamicLevel(u *uint32) *MenuUpdate
SetNillableDynamicLevel sets the "dynamic_level" field if the given value is not nil.
func (*MenuUpdate) SetNillableFrameSrc ¶
func (mu *MenuUpdate) SetNillableFrameSrc(s *string) *MenuUpdate
SetNillableFrameSrc sets the "frame_src" 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) SetNillableHideChildrenInMenu ¶
func (mu *MenuUpdate) SetNillableHideChildrenInMenu(b *bool) *MenuUpdate
SetNillableHideChildrenInMenu sets the "hide_children_in_menu" 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) SetNillableIgnoreKeepAlive ¶
func (mu *MenuUpdate) SetNillableIgnoreKeepAlive(b *bool) *MenuUpdate
SetNillableIgnoreKeepAlive sets the "ignore_keep_alive" field if the given value is not nil.
func (*MenuUpdate) SetNillableParentID ¶
func (mu *MenuUpdate) SetNillableParentID(u *uint64) *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) SetNillableRealPath ¶
func (mu *MenuUpdate) SetNillableRealPath(s *string) *MenuUpdate
SetNillableRealPath sets the "real_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) SetNillableSort ¶
func (mu *MenuUpdate) SetNillableSort(u *uint32) *MenuUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*MenuUpdate) SetNotEmptyComponent ¶
func (m *MenuUpdate) SetNotEmptyComponent(value string) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyDynamicLevel ¶
func (m *MenuUpdate) SetNotEmptyDynamicLevel(value uint32) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyFrameSrc ¶
func (m *MenuUpdate) SetNotEmptyFrameSrc(value string) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyIcon ¶
func (m *MenuUpdate) SetNotEmptyIcon(value string) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyMenuLevel ¶
func (m *MenuUpdate) SetNotEmptyMenuLevel(value uint32) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyMenuType ¶
func (m *MenuUpdate) SetNotEmptyMenuType(value uint32) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyName ¶
func (m *MenuUpdate) SetNotEmptyName(value string) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyParentID ¶
func (m *MenuUpdate) SetNotEmptyParentID(value uint64) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyPath ¶
func (m *MenuUpdate) SetNotEmptyPath(value string) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyRealPath ¶
func (m *MenuUpdate) SetNotEmptyRealPath(value string) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyRedirect ¶
func (m *MenuUpdate) SetNotEmptyRedirect(value string) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptySort ¶
func (m *MenuUpdate) SetNotEmptySort(value uint32) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotEmptyTitle ¶
func (m *MenuUpdate) SetNotEmptyTitle(value string) *MenuUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdate) SetNotNilAffix ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilAffix(value *bool) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilCarryParam ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilCarryParam(value *bool) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilComponent ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilComponent(value *string) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilDisabled ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilDisabled(value *bool) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilDynamicLevel ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilDynamicLevel(value *uint32) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilFrameSrc ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilFrameSrc(value *string) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilHideBreadcrumb ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilHideBreadcrumb(value *bool) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilHideChildrenInMenu ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilHideChildrenInMenu(value *bool) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilHideMenu ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilHideMenu(value *bool) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilHideTab ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilHideTab(value *bool) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilIcon ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilIcon(value *string) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilIgnoreKeepAlive ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilIgnoreKeepAlive(value *bool) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilMenuLevel ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilMenuLevel(value *uint32) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilMenuType ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilMenuType(value *uint32) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilName ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilName(value *string) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilParentID ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilParentID(value *uint64) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilPath ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilPath(value *string) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilRealPath ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilRealPath(value *string) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilRedirect ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilRedirect(value *string) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilSort ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilSort(value *uint32) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilTitle ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilTitle(value *string) *MenuUpdate
set field if value's pointer is not nil.
func (*MenuUpdate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (m *MenuUpdate) SetNotNilUpdatedAt(value *time.Time) *MenuUpdate
set field if value's pointer 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 uint64) *MenuUpdate
SetParentID sets the "parent_id" field.
func (*MenuUpdate) SetPath ¶
func (mu *MenuUpdate) SetPath(s string) *MenuUpdate
SetPath sets the "path" field.
func (*MenuUpdate) SetRealPath ¶
func (mu *MenuUpdate) SetRealPath(s string) *MenuUpdate
SetRealPath sets the "real_path" field.
func (*MenuUpdate) SetRedirect ¶
func (mu *MenuUpdate) SetRedirect(s string) *MenuUpdate
SetRedirect sets the "redirect" field.
func (*MenuUpdate) SetSort ¶
func (mu *MenuUpdate) SetSort(u uint32) *MenuUpdate
SetSort sets the "sort" field.
func (*MenuUpdate) SetTitle ¶
func (mu *MenuUpdate) SetTitle(s string) *MenuUpdate
SetTitle sets the "title" field.
func (*MenuUpdate) SetUpdatedAt ¶
func (mu *MenuUpdate) SetUpdatedAt(t time.Time) *MenuUpdate
SetUpdatedAt sets the "updated_at" 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 ...uint64) *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) AddDynamicLevel ¶
func (muo *MenuUpdateOne) AddDynamicLevel(u int32) *MenuUpdateOne
AddDynamicLevel adds u to the "dynamic_level" field.
func (*MenuUpdateOne) AddMenuLevel ¶
func (muo *MenuUpdateOne) AddMenuLevel(u int32) *MenuUpdateOne
AddMenuLevel adds u to the "menu_level" field.
func (*MenuUpdateOne) AddMenuType ¶
func (muo *MenuUpdateOne) AddMenuType(u int32) *MenuUpdateOne
AddMenuType adds u to the "menu_type" field.
func (*MenuUpdateOne) AddRoleIDs ¶
func (muo *MenuUpdateOne) AddRoleIDs(ids ...uint64) *MenuUpdateOne
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*MenuUpdateOne) AddRoles ¶
func (muo *MenuUpdateOne) AddRoles(r ...*Role) *MenuUpdateOne
AddRoles adds the "roles" edges to the Role entity.
func (*MenuUpdateOne) AddSort ¶
func (muo *MenuUpdateOne) AddSort(u int32) *MenuUpdateOne
AddSort adds u to the "sort" field.
func (*MenuUpdateOne) ClearAffix ¶
func (muo *MenuUpdateOne) ClearAffix() *MenuUpdateOne
ClearAffix clears the value of the "affix" field.
func (*MenuUpdateOne) ClearCarryParam ¶
func (muo *MenuUpdateOne) ClearCarryParam() *MenuUpdateOne
ClearCarryParam clears the value of the "carry_param" field.
func (*MenuUpdateOne) ClearChildren ¶
func (muo *MenuUpdateOne) ClearChildren() *MenuUpdateOne
ClearChildren clears all "children" edges to the Menu entity.
func (*MenuUpdateOne) ClearComponent ¶
func (muo *MenuUpdateOne) ClearComponent() *MenuUpdateOne
ClearComponent clears the value of the "component" field.
func (*MenuUpdateOne) ClearDisabled ¶
func (muo *MenuUpdateOne) ClearDisabled() *MenuUpdateOne
ClearDisabled clears the value of the "disabled" field.
func (*MenuUpdateOne) ClearDynamicLevel ¶
func (muo *MenuUpdateOne) ClearDynamicLevel() *MenuUpdateOne
ClearDynamicLevel clears the value of the "dynamic_level" field.
func (*MenuUpdateOne) ClearFrameSrc ¶
func (muo *MenuUpdateOne) ClearFrameSrc() *MenuUpdateOne
ClearFrameSrc clears the value of the "frame_src" field.
func (*MenuUpdateOne) ClearHideBreadcrumb ¶
func (muo *MenuUpdateOne) ClearHideBreadcrumb() *MenuUpdateOne
ClearHideBreadcrumb clears the value of the "hide_breadcrumb" field.
func (*MenuUpdateOne) ClearHideChildrenInMenu ¶
func (muo *MenuUpdateOne) ClearHideChildrenInMenu() *MenuUpdateOne
ClearHideChildrenInMenu clears the value of the "hide_children_in_menu" field.
func (*MenuUpdateOne) ClearHideMenu ¶
func (muo *MenuUpdateOne) ClearHideMenu() *MenuUpdateOne
ClearHideMenu clears the value of the "hide_menu" field.
func (*MenuUpdateOne) ClearHideTab ¶
func (muo *MenuUpdateOne) ClearHideTab() *MenuUpdateOne
ClearHideTab clears the value of the "hide_tab" field.
func (*MenuUpdateOne) ClearIgnoreKeepAlive ¶
func (muo *MenuUpdateOne) ClearIgnoreKeepAlive() *MenuUpdateOne
ClearIgnoreKeepAlive clears the value of the "ignore_keep_alive" 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) ClearPath ¶
func (muo *MenuUpdateOne) ClearPath() *MenuUpdateOne
ClearPath clears the value of the "path" field.
func (*MenuUpdateOne) ClearRealPath ¶
func (muo *MenuUpdateOne) ClearRealPath() *MenuUpdateOne
ClearRealPath clears the value of the "real_path" field.
func (*MenuUpdateOne) ClearRedirect ¶
func (muo *MenuUpdateOne) ClearRedirect() *MenuUpdateOne
ClearRedirect clears the value of the "redirect" field.
func (*MenuUpdateOne) ClearRoles ¶
func (muo *MenuUpdateOne) ClearRoles() *MenuUpdateOne
ClearRoles clears all "roles" edges to the Role entity.
func (*MenuUpdateOne) Exec ¶
func (muo *MenuUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MenuUpdateOne) ExecContext ¶ added in v1.0.9
func (c *MenuUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*MenuUpdateOne) ExecX ¶
func (muo *MenuUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MenuUpdateOne) Mutation ¶
func (muo *MenuUpdateOne) Mutation() *MenuMutation
Mutation returns the MenuMutation object of the builder.
func (*MenuUpdateOne) QueryContext ¶ added in v1.0.9
func (c *MenuUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*MenuUpdateOne) RemoveChildIDs ¶
func (muo *MenuUpdateOne) RemoveChildIDs(ids ...uint64) *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) RemoveRoleIDs ¶
func (muo *MenuUpdateOne) RemoveRoleIDs(ids ...uint64) *MenuUpdateOne
RemoveRoleIDs removes the "roles" edge to Role entities by IDs.
func (*MenuUpdateOne) RemoveRoles ¶
func (muo *MenuUpdateOne) RemoveRoles(r ...*Role) *MenuUpdateOne
RemoveRoles removes "roles" edges to Role 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) SetAffix ¶
func (muo *MenuUpdateOne) SetAffix(b bool) *MenuUpdateOne
SetAffix sets the "affix" field.
func (*MenuUpdateOne) SetCarryParam ¶
func (muo *MenuUpdateOne) SetCarryParam(b bool) *MenuUpdateOne
SetCarryParam sets the "carry_param" field.
func (*MenuUpdateOne) SetComponent ¶
func (muo *MenuUpdateOne) SetComponent(s string) *MenuUpdateOne
SetComponent sets the "component" field.
func (*MenuUpdateOne) SetDisabled ¶
func (muo *MenuUpdateOne) SetDisabled(b bool) *MenuUpdateOne
SetDisabled sets the "disabled" field.
func (*MenuUpdateOne) SetDynamicLevel ¶
func (muo *MenuUpdateOne) SetDynamicLevel(u uint32) *MenuUpdateOne
SetDynamicLevel sets the "dynamic_level" field.
func (*MenuUpdateOne) SetFrameSrc ¶
func (muo *MenuUpdateOne) SetFrameSrc(s string) *MenuUpdateOne
SetFrameSrc sets the "frame_src" field.
func (*MenuUpdateOne) SetHideBreadcrumb ¶
func (muo *MenuUpdateOne) SetHideBreadcrumb(b bool) *MenuUpdateOne
SetHideBreadcrumb sets the "hide_breadcrumb" field.
func (*MenuUpdateOne) SetHideChildrenInMenu ¶
func (muo *MenuUpdateOne) SetHideChildrenInMenu(b bool) *MenuUpdateOne
SetHideChildrenInMenu sets the "hide_children_in_menu" 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) SetIgnoreKeepAlive ¶
func (muo *MenuUpdateOne) SetIgnoreKeepAlive(b bool) *MenuUpdateOne
SetIgnoreKeepAlive sets the "ignore_keep_alive" field.
func (*MenuUpdateOne) SetMenuLevel ¶
func (muo *MenuUpdateOne) SetMenuLevel(u uint32) *MenuUpdateOne
SetMenuLevel sets the "menu_level" field.
func (*MenuUpdateOne) SetMenuType ¶
func (muo *MenuUpdateOne) SetMenuType(u uint32) *MenuUpdateOne
SetMenuType sets the "menu_type" field.
func (*MenuUpdateOne) SetName ¶
func (muo *MenuUpdateOne) SetName(s string) *MenuUpdateOne
SetName sets the "name" field.
func (*MenuUpdateOne) SetNillableAffix ¶
func (muo *MenuUpdateOne) SetNillableAffix(b *bool) *MenuUpdateOne
SetNillableAffix sets the "affix" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableCarryParam ¶
func (muo *MenuUpdateOne) SetNillableCarryParam(b *bool) *MenuUpdateOne
SetNillableCarryParam sets the "carry_param" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableComponent ¶
func (muo *MenuUpdateOne) SetNillableComponent(s *string) *MenuUpdateOne
SetNillableComponent sets the "component" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableDisabled ¶
func (muo *MenuUpdateOne) SetNillableDisabled(b *bool) *MenuUpdateOne
SetNillableDisabled sets the "disabled" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableDynamicLevel ¶
func (muo *MenuUpdateOne) SetNillableDynamicLevel(u *uint32) *MenuUpdateOne
SetNillableDynamicLevel sets the "dynamic_level" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableFrameSrc ¶
func (muo *MenuUpdateOne) SetNillableFrameSrc(s *string) *MenuUpdateOne
SetNillableFrameSrc sets the "frame_src" 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) SetNillableHideChildrenInMenu ¶
func (muo *MenuUpdateOne) SetNillableHideChildrenInMenu(b *bool) *MenuUpdateOne
SetNillableHideChildrenInMenu sets the "hide_children_in_menu" 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) SetNillableIgnoreKeepAlive ¶
func (muo *MenuUpdateOne) SetNillableIgnoreKeepAlive(b *bool) *MenuUpdateOne
SetNillableIgnoreKeepAlive sets the "ignore_keep_alive" field if the given value is not nil.
func (*MenuUpdateOne) SetNillableParentID ¶
func (muo *MenuUpdateOne) SetNillableParentID(u *uint64) *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) SetNillableRealPath ¶
func (muo *MenuUpdateOne) SetNillableRealPath(s *string) *MenuUpdateOne
SetNillableRealPath sets the "real_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) SetNillableSort ¶
func (muo *MenuUpdateOne) SetNillableSort(u *uint32) *MenuUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*MenuUpdateOne) SetNotEmptyComponent ¶
func (m *MenuUpdateOne) SetNotEmptyComponent(value string) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyDynamicLevel ¶
func (m *MenuUpdateOne) SetNotEmptyDynamicLevel(value uint32) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyFrameSrc ¶
func (m *MenuUpdateOne) SetNotEmptyFrameSrc(value string) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyIcon ¶
func (m *MenuUpdateOne) SetNotEmptyIcon(value string) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyMenuLevel ¶
func (m *MenuUpdateOne) SetNotEmptyMenuLevel(value uint32) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyMenuType ¶
func (m *MenuUpdateOne) SetNotEmptyMenuType(value uint32) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyName ¶
func (m *MenuUpdateOne) SetNotEmptyName(value string) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyParentID ¶
func (m *MenuUpdateOne) SetNotEmptyParentID(value uint64) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyPath ¶
func (m *MenuUpdateOne) SetNotEmptyPath(value string) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyRealPath ¶
func (m *MenuUpdateOne) SetNotEmptyRealPath(value string) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyRedirect ¶
func (m *MenuUpdateOne) SetNotEmptyRedirect(value string) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptySort ¶
func (m *MenuUpdateOne) SetNotEmptySort(value uint32) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotEmptyTitle ¶
func (m *MenuUpdateOne) SetNotEmptyTitle(value string) *MenuUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*MenuUpdateOne) SetNotNilAffix ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilAffix(value *bool) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilCarryParam ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilCarryParam(value *bool) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilComponent ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilComponent(value *string) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilDisabled ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilDisabled(value *bool) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilDynamicLevel ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilDynamicLevel(value *uint32) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilFrameSrc ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilFrameSrc(value *string) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilHideBreadcrumb ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilHideBreadcrumb(value *bool) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilHideChildrenInMenu ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilHideChildrenInMenu(value *bool) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilHideMenu ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilHideMenu(value *bool) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilHideTab ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilHideTab(value *bool) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilIcon ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilIcon(value *string) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilIgnoreKeepAlive ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilIgnoreKeepAlive(value *bool) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilMenuLevel ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilMenuLevel(value *uint32) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilMenuType ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilMenuType(value *uint32) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilName ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilName(value *string) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilParentID ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilParentID(value *uint64) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilPath ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilPath(value *string) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilRealPath ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilRealPath(value *string) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilRedirect ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilRedirect(value *string) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilSort ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilSort(value *uint32) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilTitle ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilTitle(value *string) *MenuUpdateOne
set field if value's pointer is not nil.
func (*MenuUpdateOne) SetNotNilUpdatedAt ¶ added in v1.0.9
func (m *MenuUpdateOne) SetNotNilUpdatedAt(value *time.Time) *MenuUpdateOne
set field if value's pointer 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 uint64) *MenuUpdateOne
SetParentID sets the "parent_id" field.
func (*MenuUpdateOne) SetPath ¶
func (muo *MenuUpdateOne) SetPath(s string) *MenuUpdateOne
SetPath sets the "path" field.
func (*MenuUpdateOne) SetRealPath ¶
func (muo *MenuUpdateOne) SetRealPath(s string) *MenuUpdateOne
SetRealPath sets the "real_path" field.
func (*MenuUpdateOne) SetRedirect ¶
func (muo *MenuUpdateOne) SetRedirect(s string) *MenuUpdateOne
SetRedirect sets the "redirect" field.
func (*MenuUpdateOne) SetSort ¶
func (muo *MenuUpdateOne) SetSort(u uint32) *MenuUpdateOne
SetSort sets the "sort" field.
func (*MenuUpdateOne) SetTitle ¶
func (muo *MenuUpdateOne) SetTitle(s string) *MenuUpdateOne
SetTitle sets the "title" field.
func (*MenuUpdateOne) SetUpdatedAt ¶
func (muo *MenuUpdateOne) SetUpdatedAt(t time.Time) *MenuUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MenuUpdateOne) Where ¶
func (muo *MenuUpdateOne) Where(ps ...predicate.Menu) *MenuUpdateOne
Where appends a list predicates to the MenuUpdate builder.
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 OauthProvider ¶
type OauthProvider struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // The provider's name | 提供商名称 Name string `json:"name,omitempty"` // The client id | 客户端 id ClientID string `json:"client_id,omitempty"` // The client secret | 客户端密钥 ClientSecret string `json:"client_secret,omitempty"` // The redirect url | 跳转地址 RedirectURL string `json:"redirect_url,omitempty"` // The scopes | 权限范围 Scopes string `json:"scopes,omitempty"` // The auth url of the provider | 认证地址 AuthURL string `json:"auth_url,omitempty"` // The token url of the provider | 获取 token地址 TokenURL string `json:"token_url,omitempty"` // The auth style, 0: auto detect 1: third party log in 2: log in with username and password | 鉴权方式 0 自动 1 第三方登录 2 使用用户名密码 AuthStyle uint64 `json:"auth_style,omitempty"` // The URL to request user information by token | 用户信息请求地址 InfoURL string `json:"info_url,omitempty"` // contains filtered or unexported fields }
OauthProvider is the model entity for the OauthProvider schema.
func (*OauthProvider) ExecContext ¶ added in v1.0.9
func (c *OauthProvider) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OauthProvider) QueryContext ¶ added in v1.0.9
func (c *OauthProvider) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OauthProvider) String ¶
func (op *OauthProvider) String() string
String implements the fmt.Stringer.
func (*OauthProvider) Unwrap ¶
func (op *OauthProvider) Unwrap() *OauthProvider
Unwrap unwraps the OauthProvider 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 (*OauthProvider) Update ¶
func (op *OauthProvider) Update() *OauthProviderUpdateOne
Update returns a builder for updating this OauthProvider. Note that you need to call OauthProvider.Unwrap() before calling this method if this OauthProvider was returned from a transaction, and the transaction was committed or rolled back.
type OauthProviderClient ¶
type OauthProviderClient struct {
// contains filtered or unexported fields
}
OauthProviderClient is a client for the OauthProvider schema.
func NewOauthProviderClient ¶
func NewOauthProviderClient(c config) *OauthProviderClient
NewOauthProviderClient returns a client for the OauthProvider from the given config.
func (*OauthProviderClient) Create ¶
func (c *OauthProviderClient) Create() *OauthProviderCreate
Create returns a builder for creating a OauthProvider entity.
func (*OauthProviderClient) CreateBulk ¶
func (c *OauthProviderClient) CreateBulk(builders ...*OauthProviderCreate) *OauthProviderCreateBulk
CreateBulk returns a builder for creating a bulk of OauthProvider entities.
func (*OauthProviderClient) Delete ¶
func (c *OauthProviderClient) Delete() *OauthProviderDelete
Delete returns a delete builder for OauthProvider.
func (*OauthProviderClient) DeleteOne ¶
func (c *OauthProviderClient) DeleteOne(op *OauthProvider) *OauthProviderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*OauthProviderClient) DeleteOneID ¶
func (c *OauthProviderClient) DeleteOneID(id uint64) *OauthProviderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*OauthProviderClient) ExecContext ¶ added in v1.0.9
func (c *OauthProviderClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OauthProviderClient) Get ¶
func (c *OauthProviderClient) Get(ctx context.Context, id uint64) (*OauthProvider, error)
Get returns a OauthProvider entity by its id.
func (*OauthProviderClient) GetX ¶
func (c *OauthProviderClient) GetX(ctx context.Context, id uint64) *OauthProvider
GetX is like Get, but panics if an error occurs.
func (*OauthProviderClient) Hooks ¶
func (c *OauthProviderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OauthProviderClient) Intercept ¶
func (c *OauthProviderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `oauthprovider.Intercept(f(g(h())))`.
func (*OauthProviderClient) Interceptors ¶
func (c *OauthProviderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*OauthProviderClient) Query ¶
func (c *OauthProviderClient) Query() *OauthProviderQuery
Query returns a query builder for OauthProvider.
func (*OauthProviderClient) QueryContext ¶ added in v1.0.9
func (c *OauthProviderClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OauthProviderClient) Update ¶
func (c *OauthProviderClient) Update() *OauthProviderUpdate
Update returns an update builder for OauthProvider.
func (*OauthProviderClient) UpdateOne ¶
func (c *OauthProviderClient) UpdateOne(op *OauthProvider) *OauthProviderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OauthProviderClient) UpdateOneID ¶
func (c *OauthProviderClient) UpdateOneID(id uint64) *OauthProviderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OauthProviderClient) Use ¶
func (c *OauthProviderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `oauthprovider.Hooks(f(g(h())))`.
type OauthProviderCreate ¶
type OauthProviderCreate struct {
// contains filtered or unexported fields
}
OauthProviderCreate is the builder for creating a OauthProvider entity.
func (*OauthProviderCreate) Exec ¶
func (opc *OauthProviderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OauthProviderCreate) ExecContext ¶ added in v1.0.9
func (c *OauthProviderCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OauthProviderCreate) ExecX ¶
func (opc *OauthProviderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OauthProviderCreate) Mutation ¶
func (opc *OauthProviderCreate) Mutation() *OauthProviderMutation
Mutation returns the OauthProviderMutation object of the builder.
func (*OauthProviderCreate) QueryContext ¶ added in v1.0.9
func (c *OauthProviderCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OauthProviderCreate) Save ¶
func (opc *OauthProviderCreate) Save(ctx context.Context) (*OauthProvider, error)
Save creates the OauthProvider in the database.
func (*OauthProviderCreate) SaveX ¶
func (opc *OauthProviderCreate) SaveX(ctx context.Context) *OauthProvider
SaveX calls Save and panics if Save returns an error.
func (*OauthProviderCreate) SetAuthStyle ¶
func (opc *OauthProviderCreate) SetAuthStyle(u uint64) *OauthProviderCreate
SetAuthStyle sets the "auth_style" field.
func (*OauthProviderCreate) SetAuthURL ¶
func (opc *OauthProviderCreate) SetAuthURL(s string) *OauthProviderCreate
SetAuthURL sets the "auth_url" field.
func (*OauthProviderCreate) SetClientID ¶
func (opc *OauthProviderCreate) SetClientID(s string) *OauthProviderCreate
SetClientID sets the "client_id" field.
func (*OauthProviderCreate) SetClientSecret ¶
func (opc *OauthProviderCreate) SetClientSecret(s string) *OauthProviderCreate
SetClientSecret sets the "client_secret" field.
func (*OauthProviderCreate) SetCreatedAt ¶
func (opc *OauthProviderCreate) SetCreatedAt(t time.Time) *OauthProviderCreate
SetCreatedAt sets the "created_at" field.
func (*OauthProviderCreate) SetID ¶
func (opc *OauthProviderCreate) SetID(u uint64) *OauthProviderCreate
SetID sets the "id" field.
func (*OauthProviderCreate) SetInfoURL ¶
func (opc *OauthProviderCreate) SetInfoURL(s string) *OauthProviderCreate
SetInfoURL sets the "info_url" field.
func (*OauthProviderCreate) SetName ¶
func (opc *OauthProviderCreate) SetName(s string) *OauthProviderCreate
SetName sets the "name" field.
func (*OauthProviderCreate) SetNillableCreatedAt ¶
func (opc *OauthProviderCreate) SetNillableCreatedAt(t *time.Time) *OauthProviderCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*OauthProviderCreate) SetNillableUpdatedAt ¶
func (opc *OauthProviderCreate) SetNillableUpdatedAt(t *time.Time) *OauthProviderCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*OauthProviderCreate) SetNotNilAuthStyle ¶ added in v1.0.9
func (op *OauthProviderCreate) SetNotNilAuthStyle(value *uint64) *OauthProviderCreate
set field if value's pointer is not nil.
func (*OauthProviderCreate) SetNotNilAuthURL ¶ added in v1.0.9
func (op *OauthProviderCreate) SetNotNilAuthURL(value *string) *OauthProviderCreate
set field if value's pointer is not nil.
func (*OauthProviderCreate) SetNotNilClientID ¶ added in v1.0.9
func (op *OauthProviderCreate) SetNotNilClientID(value *string) *OauthProviderCreate
set field if value's pointer is not nil.
func (*OauthProviderCreate) SetNotNilClientSecret ¶ added in v1.0.9
func (op *OauthProviderCreate) SetNotNilClientSecret(value *string) *OauthProviderCreate
set field if value's pointer is not nil.
func (*OauthProviderCreate) SetNotNilInfoURL ¶ added in v1.0.9
func (op *OauthProviderCreate) SetNotNilInfoURL(value *string) *OauthProviderCreate
set field if value's pointer is not nil.
func (*OauthProviderCreate) SetNotNilName ¶ added in v1.0.9
func (op *OauthProviderCreate) SetNotNilName(value *string) *OauthProviderCreate
set field if value's pointer is not nil.
func (*OauthProviderCreate) SetNotNilRedirectURL ¶ added in v1.0.9
func (op *OauthProviderCreate) SetNotNilRedirectURL(value *string) *OauthProviderCreate
set field if value's pointer is not nil.
func (*OauthProviderCreate) SetNotNilScopes ¶ added in v1.0.9
func (op *OauthProviderCreate) SetNotNilScopes(value *string) *OauthProviderCreate
set field if value's pointer is not nil.
func (*OauthProviderCreate) SetNotNilTokenURL ¶ added in v1.0.9
func (op *OauthProviderCreate) SetNotNilTokenURL(value *string) *OauthProviderCreate
set field if value's pointer is not nil.
func (*OauthProviderCreate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (op *OauthProviderCreate) SetNotNilUpdatedAt(value *time.Time) *OauthProviderCreate
set field if value's pointer is not nil.
func (*OauthProviderCreate) SetRedirectURL ¶
func (opc *OauthProviderCreate) SetRedirectURL(s string) *OauthProviderCreate
SetRedirectURL sets the "redirect_url" field.
func (*OauthProviderCreate) SetScopes ¶
func (opc *OauthProviderCreate) SetScopes(s string) *OauthProviderCreate
SetScopes sets the "scopes" field.
func (*OauthProviderCreate) SetTokenURL ¶
func (opc *OauthProviderCreate) SetTokenURL(s string) *OauthProviderCreate
SetTokenURL sets the "token_url" field.
func (*OauthProviderCreate) SetUpdatedAt ¶
func (opc *OauthProviderCreate) SetUpdatedAt(t time.Time) *OauthProviderCreate
SetUpdatedAt sets the "updated_at" field.
type OauthProviderCreateBulk ¶
type OauthProviderCreateBulk struct {
// contains filtered or unexported fields
}
OauthProviderCreateBulk is the builder for creating many OauthProvider entities in bulk.
func (*OauthProviderCreateBulk) Exec ¶
func (opcb *OauthProviderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OauthProviderCreateBulk) ExecContext ¶ added in v1.0.9
func (c *OauthProviderCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OauthProviderCreateBulk) ExecX ¶
func (opcb *OauthProviderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OauthProviderCreateBulk) QueryContext ¶ added in v1.0.9
func (c *OauthProviderCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OauthProviderCreateBulk) Save ¶
func (opcb *OauthProviderCreateBulk) Save(ctx context.Context) ([]*OauthProvider, error)
Save creates the OauthProvider entities in the database.
func (*OauthProviderCreateBulk) SaveX ¶
func (opcb *OauthProviderCreateBulk) SaveX(ctx context.Context) []*OauthProvider
SaveX is like Save, but panics if an error occurs.
type OauthProviderDelete ¶
type OauthProviderDelete struct {
// contains filtered or unexported fields
}
OauthProviderDelete is the builder for deleting a OauthProvider entity.
func (*OauthProviderDelete) Exec ¶
func (opd *OauthProviderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OauthProviderDelete) ExecContext ¶ added in v1.0.9
func (c *OauthProviderDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OauthProviderDelete) ExecX ¶
func (opd *OauthProviderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OauthProviderDelete) QueryContext ¶ added in v1.0.9
func (c *OauthProviderDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OauthProviderDelete) Where ¶
func (opd *OauthProviderDelete) Where(ps ...predicate.OauthProvider) *OauthProviderDelete
Where appends a list predicates to the OauthProviderDelete builder.
type OauthProviderDeleteOne ¶
type OauthProviderDeleteOne struct {
// contains filtered or unexported fields
}
OauthProviderDeleteOne is the builder for deleting a single OauthProvider entity.
func (*OauthProviderDeleteOne) Exec ¶
func (opdo *OauthProviderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OauthProviderDeleteOne) ExecX ¶
func (opdo *OauthProviderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OauthProviderDeleteOne) Where ¶
func (opdo *OauthProviderDeleteOne) Where(ps ...predicate.OauthProvider) *OauthProviderDeleteOne
Where appends a list predicates to the OauthProviderDelete builder.
type OauthProviderGroupBy ¶
type OauthProviderGroupBy struct {
// contains filtered or unexported fields
}
OauthProviderGroupBy is the group-by builder for OauthProvider entities.
func (*OauthProviderGroupBy) Aggregate ¶
func (opgb *OauthProviderGroupBy) Aggregate(fns ...AggregateFunc) *OauthProviderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OauthProviderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OauthProviderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OauthProviderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OauthProviderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OauthProviderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OauthProviderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OauthProviderGroupBy) Scan ¶
func (opgb *OauthProviderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OauthProviderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OauthProviderMutation ¶
type OauthProviderMutation struct {
// contains filtered or unexported fields
}
OauthProviderMutation represents an operation that mutates the OauthProvider nodes in the graph.
func (*OauthProviderMutation) AddAuthStyle ¶
func (m *OauthProviderMutation) AddAuthStyle(u int64)
AddAuthStyle adds u to the "auth_style" field.
func (*OauthProviderMutation) AddField ¶
func (m *OauthProviderMutation) 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 (*OauthProviderMutation) AddedAuthStyle ¶
func (m *OauthProviderMutation) AddedAuthStyle() (r int64, exists bool)
AddedAuthStyle returns the value that was added to the "auth_style" field in this mutation.
func (*OauthProviderMutation) AddedEdges ¶
func (m *OauthProviderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OauthProviderMutation) AddedField ¶
func (m *OauthProviderMutation) 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 (*OauthProviderMutation) AddedFields ¶
func (m *OauthProviderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OauthProviderMutation) AddedIDs ¶
func (m *OauthProviderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OauthProviderMutation) AuthStyle ¶
func (m *OauthProviderMutation) AuthStyle() (r uint64, exists bool)
AuthStyle returns the value of the "auth_style" field in the mutation.
func (*OauthProviderMutation) AuthURL ¶
func (m *OauthProviderMutation) AuthURL() (r string, exists bool)
AuthURL returns the value of the "auth_url" field in the mutation.
func (*OauthProviderMutation) ClearEdge ¶
func (m *OauthProviderMutation) 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 (*OauthProviderMutation) ClearField ¶
func (m *OauthProviderMutation) 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 (*OauthProviderMutation) ClearedEdges ¶
func (m *OauthProviderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OauthProviderMutation) ClearedFields ¶
func (m *OauthProviderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OauthProviderMutation) Client ¶
func (m OauthProviderMutation) 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 (*OauthProviderMutation) ClientID ¶
func (m *OauthProviderMutation) ClientID() (r string, exists bool)
ClientID returns the value of the "client_id" field in the mutation.
func (*OauthProviderMutation) ClientSecret ¶
func (m *OauthProviderMutation) ClientSecret() (r string, exists bool)
ClientSecret returns the value of the "client_secret" field in the mutation.
func (*OauthProviderMutation) CreatedAt ¶
func (m *OauthProviderMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*OauthProviderMutation) EdgeCleared ¶
func (m *OauthProviderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OauthProviderMutation) ExecContext ¶ added in v1.0.9
func (c *OauthProviderMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OauthProviderMutation) Field ¶
func (m *OauthProviderMutation) 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 (*OauthProviderMutation) FieldCleared ¶
func (m *OauthProviderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OauthProviderMutation) Fields ¶
func (m *OauthProviderMutation) 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 (*OauthProviderMutation) ID ¶
func (m *OauthProviderMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*OauthProviderMutation) IDs ¶
func (m *OauthProviderMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*OauthProviderMutation) InfoURL ¶
func (m *OauthProviderMutation) InfoURL() (r string, exists bool)
InfoURL returns the value of the "info_url" field in the mutation.
func (*OauthProviderMutation) Name ¶
func (m *OauthProviderMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*OauthProviderMutation) OldAuthStyle ¶
func (m *OauthProviderMutation) OldAuthStyle(ctx context.Context) (v uint64, err error)
OldAuthStyle returns the old "auth_style" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) OldAuthURL ¶
func (m *OauthProviderMutation) OldAuthURL(ctx context.Context) (v string, err error)
OldAuthURL returns the old "auth_url" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) OldClientID ¶
func (m *OauthProviderMutation) OldClientID(ctx context.Context) (v string, err error)
OldClientID returns the old "client_id" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) OldClientSecret ¶
func (m *OauthProviderMutation) OldClientSecret(ctx context.Context) (v string, err error)
OldClientSecret returns the old "client_secret" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) 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 (*OauthProviderMutation) OldInfoURL ¶
func (m *OauthProviderMutation) OldInfoURL(ctx context.Context) (v string, err error)
OldInfoURL returns the old "info_url" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) OldName ¶
func (m *OauthProviderMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) OldRedirectURL ¶
func (m *OauthProviderMutation) OldRedirectURL(ctx context.Context) (v string, err error)
OldRedirectURL returns the old "redirect_url" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) OldScopes ¶
func (m *OauthProviderMutation) OldScopes(ctx context.Context) (v string, err error)
OldScopes returns the old "scopes" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) OldTokenURL ¶
func (m *OauthProviderMutation) OldTokenURL(ctx context.Context) (v string, err error)
OldTokenURL returns the old "token_url" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the OauthProvider entity. If the OauthProvider 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 (*OauthProviderMutation) Op ¶
func (m *OauthProviderMutation) Op() Op
Op returns the operation name.
func (*OauthProviderMutation) QueryContext ¶ added in v1.0.9
func (c *OauthProviderMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OauthProviderMutation) RedirectURL ¶
func (m *OauthProviderMutation) RedirectURL() (r string, exists bool)
RedirectURL returns the value of the "redirect_url" field in the mutation.
func (*OauthProviderMutation) RemovedEdges ¶
func (m *OauthProviderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OauthProviderMutation) RemovedIDs ¶
func (m *OauthProviderMutation) 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 (*OauthProviderMutation) ResetAuthStyle ¶
func (m *OauthProviderMutation) ResetAuthStyle()
ResetAuthStyle resets all changes to the "auth_style" field.
func (*OauthProviderMutation) ResetAuthURL ¶
func (m *OauthProviderMutation) ResetAuthURL()
ResetAuthURL resets all changes to the "auth_url" field.
func (*OauthProviderMutation) ResetClientID ¶
func (m *OauthProviderMutation) ResetClientID()
ResetClientID resets all changes to the "client_id" field.
func (*OauthProviderMutation) ResetClientSecret ¶
func (m *OauthProviderMutation) ResetClientSecret()
ResetClientSecret resets all changes to the "client_secret" field.
func (*OauthProviderMutation) ResetCreatedAt ¶
func (m *OauthProviderMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*OauthProviderMutation) ResetEdge ¶
func (m *OauthProviderMutation) 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 (*OauthProviderMutation) ResetField ¶
func (m *OauthProviderMutation) 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 (*OauthProviderMutation) ResetInfoURL ¶
func (m *OauthProviderMutation) ResetInfoURL()
ResetInfoURL resets all changes to the "info_url" field.
func (*OauthProviderMutation) ResetName ¶
func (m *OauthProviderMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*OauthProviderMutation) ResetRedirectURL ¶
func (m *OauthProviderMutation) ResetRedirectURL()
ResetRedirectURL resets all changes to the "redirect_url" field.
func (*OauthProviderMutation) ResetScopes ¶
func (m *OauthProviderMutation) ResetScopes()
ResetScopes resets all changes to the "scopes" field.
func (*OauthProviderMutation) ResetTokenURL ¶
func (m *OauthProviderMutation) ResetTokenURL()
ResetTokenURL resets all changes to the "token_url" field.
func (*OauthProviderMutation) ResetUpdatedAt ¶
func (m *OauthProviderMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*OauthProviderMutation) Scopes ¶
func (m *OauthProviderMutation) Scopes() (r string, exists bool)
Scopes returns the value of the "scopes" field in the mutation.
func (*OauthProviderMutation) SetAuthStyle ¶
func (m *OauthProviderMutation) SetAuthStyle(u uint64)
SetAuthStyle sets the "auth_style" field.
func (*OauthProviderMutation) SetAuthURL ¶
func (m *OauthProviderMutation) SetAuthURL(s string)
SetAuthURL sets the "auth_url" field.
func (*OauthProviderMutation) SetClientID ¶
func (m *OauthProviderMutation) SetClientID(s string)
SetClientID sets the "client_id" field.
func (*OauthProviderMutation) SetClientSecret ¶
func (m *OauthProviderMutation) SetClientSecret(s string)
SetClientSecret sets the "client_secret" field.
func (*OauthProviderMutation) SetCreatedAt ¶
func (m *OauthProviderMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*OauthProviderMutation) SetField ¶
func (m *OauthProviderMutation) 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 (*OauthProviderMutation) SetID ¶
func (m *OauthProviderMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of OauthProvider entities.
func (*OauthProviderMutation) SetInfoURL ¶
func (m *OauthProviderMutation) SetInfoURL(s string)
SetInfoURL sets the "info_url" field.
func (*OauthProviderMutation) SetName ¶
func (m *OauthProviderMutation) SetName(s string)
SetName sets the "name" field.
func (*OauthProviderMutation) SetOp ¶
func (m *OauthProviderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*OauthProviderMutation) SetRedirectURL ¶
func (m *OauthProviderMutation) SetRedirectURL(s string)
SetRedirectURL sets the "redirect_url" field.
func (*OauthProviderMutation) SetScopes ¶
func (m *OauthProviderMutation) SetScopes(s string)
SetScopes sets the "scopes" field.
func (*OauthProviderMutation) SetTokenURL ¶
func (m *OauthProviderMutation) SetTokenURL(s string)
SetTokenURL sets the "token_url" field.
func (*OauthProviderMutation) SetUpdatedAt ¶
func (m *OauthProviderMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*OauthProviderMutation) TokenURL ¶
func (m *OauthProviderMutation) TokenURL() (r string, exists bool)
TokenURL returns the value of the "token_url" field in the mutation.
func (OauthProviderMutation) Tx ¶
func (m OauthProviderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OauthProviderMutation) Type ¶
func (m *OauthProviderMutation) Type() string
Type returns the node type of this mutation (OauthProvider).
func (*OauthProviderMutation) UpdatedAt ¶
func (m *OauthProviderMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*OauthProviderMutation) Where ¶
func (m *OauthProviderMutation) Where(ps ...predicate.OauthProvider)
Where appends a list predicates to the OauthProviderMutation builder.
func (*OauthProviderMutation) WhereP ¶
func (m *OauthProviderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the OauthProviderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type OauthProviderPageList ¶
type OauthProviderPageList struct { List []*OauthProvider `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
OauthProviderPageList is OauthProvider PageList result.
type OauthProviderPager ¶
type OauthProviderPager struct { Order oauthprovider.OrderOption Filter func(*OauthProviderQuery) (*OauthProviderQuery, error) }
func (*OauthProviderPager) ApplyFilter ¶
func (p *OauthProviderPager) ApplyFilter(query *OauthProviderQuery) (*OauthProviderQuery, error)
type OauthProviderPaginateOption ¶
type OauthProviderPaginateOption func(*OauthProviderPager)
OauthProviderPaginateOption enables pagination customization.
type OauthProviderQuery ¶
type OauthProviderQuery struct {
// contains filtered or unexported fields
}
OauthProviderQuery is the builder for querying OauthProvider entities.
func (*OauthProviderQuery) Aggregate ¶
func (opq *OauthProviderQuery) Aggregate(fns ...AggregateFunc) *OauthProviderSelect
Aggregate returns a OauthProviderSelect configured with the given aggregations.
func (*OauthProviderQuery) All ¶
func (opq *OauthProviderQuery) All(ctx context.Context) ([]*OauthProvider, error)
All executes the query and returns a list of OauthProviders.
func (*OauthProviderQuery) AllX ¶
func (opq *OauthProviderQuery) AllX(ctx context.Context) []*OauthProvider
AllX is like All, but panics if an error occurs.
func (*OauthProviderQuery) Clone ¶
func (opq *OauthProviderQuery) Clone() *OauthProviderQuery
Clone returns a duplicate of the OauthProviderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OauthProviderQuery) Count ¶
func (opq *OauthProviderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OauthProviderQuery) CountX ¶
func (opq *OauthProviderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OauthProviderQuery) ExecContext ¶ added in v1.0.9
func (c *OauthProviderQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OauthProviderQuery) Exist ¶
func (opq *OauthProviderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OauthProviderQuery) ExistX ¶
func (opq *OauthProviderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OauthProviderQuery) First ¶
func (opq *OauthProviderQuery) First(ctx context.Context) (*OauthProvider, error)
First returns the first OauthProvider entity from the query. Returns a *NotFoundError when no OauthProvider was found.
func (*OauthProviderQuery) FirstID ¶
func (opq *OauthProviderQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first OauthProvider ID from the query. Returns a *NotFoundError when no OauthProvider ID was found.
func (*OauthProviderQuery) FirstIDX ¶
func (opq *OauthProviderQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*OauthProviderQuery) FirstX ¶
func (opq *OauthProviderQuery) FirstX(ctx context.Context) *OauthProvider
FirstX is like First, but panics if an error occurs.
func (*OauthProviderQuery) GroupBy ¶
func (opq *OauthProviderQuery) GroupBy(field string, fields ...string) *OauthProviderGroupBy
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.OauthProvider.Query(). GroupBy(oauthprovider.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OauthProviderQuery) IDs ¶
func (opq *OauthProviderQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of OauthProvider IDs.
func (*OauthProviderQuery) IDsX ¶
func (opq *OauthProviderQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*OauthProviderQuery) Limit ¶
func (opq *OauthProviderQuery) Limit(limit int) *OauthProviderQuery
Limit the number of records to be returned by this query.
func (*OauthProviderQuery) Offset ¶
func (opq *OauthProviderQuery) Offset(offset int) *OauthProviderQuery
Offset to start from.
func (*OauthProviderQuery) Only ¶
func (opq *OauthProviderQuery) Only(ctx context.Context) (*OauthProvider, error)
Only returns a single OauthProvider entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one OauthProvider entity is found. Returns a *NotFoundError when no OauthProvider entities are found.
func (*OauthProviderQuery) OnlyID ¶
func (opq *OauthProviderQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only OauthProvider ID in the query. Returns a *NotSingularError when more than one OauthProvider ID is found. Returns a *NotFoundError when no entities are found.
func (*OauthProviderQuery) OnlyIDX ¶
func (opq *OauthProviderQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OauthProviderQuery) OnlyX ¶
func (opq *OauthProviderQuery) OnlyX(ctx context.Context) *OauthProvider
OnlyX is like Only, but panics if an error occurs.
func (*OauthProviderQuery) Order ¶
func (opq *OauthProviderQuery) Order(o ...oauthprovider.OrderOption) *OauthProviderQuery
Order specifies how the records should be ordered.
func (*OauthProviderQuery) Page ¶
func (op *OauthProviderQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...OauthProviderPaginateOption, ) (*OauthProviderPageList, error)
func (*OauthProviderQuery) QueryContext ¶ added in v1.0.9
func (c *OauthProviderQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OauthProviderQuery) Select ¶
func (opq *OauthProviderQuery) Select(fields ...string) *OauthProviderSelect
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.OauthProvider.Query(). Select(oauthprovider.FieldCreatedAt). Scan(ctx, &v)
func (*OauthProviderQuery) Unique ¶
func (opq *OauthProviderQuery) Unique(unique bool) *OauthProviderQuery
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 (*OauthProviderQuery) Where ¶
func (opq *OauthProviderQuery) Where(ps ...predicate.OauthProvider) *OauthProviderQuery
Where adds a new predicate for the OauthProviderQuery builder.
type OauthProviderSelect ¶
type OauthProviderSelect struct { *OauthProviderQuery // contains filtered or unexported fields }
OauthProviderSelect is the builder for selecting fields of OauthProvider entities.
func (*OauthProviderSelect) Aggregate ¶
func (ops *OauthProviderSelect) Aggregate(fns ...AggregateFunc) *OauthProviderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*OauthProviderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OauthProviderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (OauthProviderSelect) ExecContext ¶ added in v1.0.9
func (c OauthProviderSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OauthProviderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OauthProviderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OauthProviderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OauthProviderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (OauthProviderSelect) QueryContext ¶ added in v1.0.9
func (c OauthProviderSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OauthProviderSelect) Scan ¶
func (ops *OauthProviderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*OauthProviderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type OauthProviderUpdate ¶
type OauthProviderUpdate struct {
// contains filtered or unexported fields
}
OauthProviderUpdate is the builder for updating OauthProvider entities.
func (*OauthProviderUpdate) AddAuthStyle ¶
func (opu *OauthProviderUpdate) AddAuthStyle(u int64) *OauthProviderUpdate
AddAuthStyle adds u to the "auth_style" field.
func (*OauthProviderUpdate) Exec ¶
func (opu *OauthProviderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OauthProviderUpdate) ExecContext ¶ added in v1.0.9
func (c *OauthProviderUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OauthProviderUpdate) ExecX ¶
func (opu *OauthProviderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OauthProviderUpdate) Mutation ¶
func (opu *OauthProviderUpdate) Mutation() *OauthProviderMutation
Mutation returns the OauthProviderMutation object of the builder.
func (*OauthProviderUpdate) QueryContext ¶ added in v1.0.9
func (c *OauthProviderUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OauthProviderUpdate) Save ¶
func (opu *OauthProviderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OauthProviderUpdate) SaveX ¶
func (opu *OauthProviderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OauthProviderUpdate) SetAuthStyle ¶
func (opu *OauthProviderUpdate) SetAuthStyle(u uint64) *OauthProviderUpdate
SetAuthStyle sets the "auth_style" field.
func (*OauthProviderUpdate) SetAuthURL ¶
func (opu *OauthProviderUpdate) SetAuthURL(s string) *OauthProviderUpdate
SetAuthURL sets the "auth_url" field.
func (*OauthProviderUpdate) SetClientID ¶
func (opu *OauthProviderUpdate) SetClientID(s string) *OauthProviderUpdate
SetClientID sets the "client_id" field.
func (*OauthProviderUpdate) SetClientSecret ¶
func (opu *OauthProviderUpdate) SetClientSecret(s string) *OauthProviderUpdate
SetClientSecret sets the "client_secret" field.
func (*OauthProviderUpdate) SetInfoURL ¶
func (opu *OauthProviderUpdate) SetInfoURL(s string) *OauthProviderUpdate
SetInfoURL sets the "info_url" field.
func (*OauthProviderUpdate) SetName ¶
func (opu *OauthProviderUpdate) SetName(s string) *OauthProviderUpdate
SetName sets the "name" field.
func (*OauthProviderUpdate) SetNotEmptyAuthStyle ¶
func (op *OauthProviderUpdate) SetNotEmptyAuthStyle(value uint64) *OauthProviderUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdate) SetNotEmptyAuthURL ¶
func (op *OauthProviderUpdate) SetNotEmptyAuthURL(value string) *OauthProviderUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdate) SetNotEmptyClientID ¶
func (op *OauthProviderUpdate) SetNotEmptyClientID(value string) *OauthProviderUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdate) SetNotEmptyClientSecret ¶
func (op *OauthProviderUpdate) SetNotEmptyClientSecret(value string) *OauthProviderUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdate) SetNotEmptyInfoURL ¶
func (op *OauthProviderUpdate) SetNotEmptyInfoURL(value string) *OauthProviderUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdate) SetNotEmptyName ¶
func (op *OauthProviderUpdate) SetNotEmptyName(value string) *OauthProviderUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdate) SetNotEmptyRedirectURL ¶
func (op *OauthProviderUpdate) SetNotEmptyRedirectURL(value string) *OauthProviderUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdate) SetNotEmptyScopes ¶
func (op *OauthProviderUpdate) SetNotEmptyScopes(value string) *OauthProviderUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdate) SetNotEmptyTokenURL ¶
func (op *OauthProviderUpdate) SetNotEmptyTokenURL(value string) *OauthProviderUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdate) SetNotNilAuthStyle ¶ added in v1.0.9
func (op *OauthProviderUpdate) SetNotNilAuthStyle(value *uint64) *OauthProviderUpdate
set field if value's pointer is not nil.
func (*OauthProviderUpdate) SetNotNilAuthURL ¶ added in v1.0.9
func (op *OauthProviderUpdate) SetNotNilAuthURL(value *string) *OauthProviderUpdate
set field if value's pointer is not nil.
func (*OauthProviderUpdate) SetNotNilClientID ¶ added in v1.0.9
func (op *OauthProviderUpdate) SetNotNilClientID(value *string) *OauthProviderUpdate
set field if value's pointer is not nil.
func (*OauthProviderUpdate) SetNotNilClientSecret ¶ added in v1.0.9
func (op *OauthProviderUpdate) SetNotNilClientSecret(value *string) *OauthProviderUpdate
set field if value's pointer is not nil.
func (*OauthProviderUpdate) SetNotNilInfoURL ¶ added in v1.0.9
func (op *OauthProviderUpdate) SetNotNilInfoURL(value *string) *OauthProviderUpdate
set field if value's pointer is not nil.
func (*OauthProviderUpdate) SetNotNilName ¶ added in v1.0.9
func (op *OauthProviderUpdate) SetNotNilName(value *string) *OauthProviderUpdate
set field if value's pointer is not nil.
func (*OauthProviderUpdate) SetNotNilRedirectURL ¶ added in v1.0.9
func (op *OauthProviderUpdate) SetNotNilRedirectURL(value *string) *OauthProviderUpdate
set field if value's pointer is not nil.
func (*OauthProviderUpdate) SetNotNilScopes ¶ added in v1.0.9
func (op *OauthProviderUpdate) SetNotNilScopes(value *string) *OauthProviderUpdate
set field if value's pointer is not nil.
func (*OauthProviderUpdate) SetNotNilTokenURL ¶ added in v1.0.9
func (op *OauthProviderUpdate) SetNotNilTokenURL(value *string) *OauthProviderUpdate
set field if value's pointer is not nil.
func (*OauthProviderUpdate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (op *OauthProviderUpdate) SetNotNilUpdatedAt(value *time.Time) *OauthProviderUpdate
set field if value's pointer is not nil.
func (*OauthProviderUpdate) SetRedirectURL ¶
func (opu *OauthProviderUpdate) SetRedirectURL(s string) *OauthProviderUpdate
SetRedirectURL sets the "redirect_url" field.
func (*OauthProviderUpdate) SetScopes ¶
func (opu *OauthProviderUpdate) SetScopes(s string) *OauthProviderUpdate
SetScopes sets the "scopes" field.
func (*OauthProviderUpdate) SetTokenURL ¶
func (opu *OauthProviderUpdate) SetTokenURL(s string) *OauthProviderUpdate
SetTokenURL sets the "token_url" field.
func (*OauthProviderUpdate) SetUpdatedAt ¶
func (opu *OauthProviderUpdate) SetUpdatedAt(t time.Time) *OauthProviderUpdate
SetUpdatedAt sets the "updated_at" field.
func (*OauthProviderUpdate) Where ¶
func (opu *OauthProviderUpdate) Where(ps ...predicate.OauthProvider) *OauthProviderUpdate
Where appends a list predicates to the OauthProviderUpdate builder.
type OauthProviderUpdateOne ¶
type OauthProviderUpdateOne struct {
// contains filtered or unexported fields
}
OauthProviderUpdateOne is the builder for updating a single OauthProvider entity.
func (*OauthProviderUpdateOne) AddAuthStyle ¶
func (opuo *OauthProviderUpdateOne) AddAuthStyle(u int64) *OauthProviderUpdateOne
AddAuthStyle adds u to the "auth_style" field.
func (*OauthProviderUpdateOne) Exec ¶
func (opuo *OauthProviderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OauthProviderUpdateOne) ExecContext ¶ added in v1.0.9
func (c *OauthProviderUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*OauthProviderUpdateOne) ExecX ¶
func (opuo *OauthProviderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OauthProviderUpdateOne) Mutation ¶
func (opuo *OauthProviderUpdateOne) Mutation() *OauthProviderMutation
Mutation returns the OauthProviderMutation object of the builder.
func (*OauthProviderUpdateOne) QueryContext ¶ added in v1.0.9
func (c *OauthProviderUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*OauthProviderUpdateOne) Save ¶
func (opuo *OauthProviderUpdateOne) Save(ctx context.Context) (*OauthProvider, error)
Save executes the query and returns the updated OauthProvider entity.
func (*OauthProviderUpdateOne) SaveX ¶
func (opuo *OauthProviderUpdateOne) SaveX(ctx context.Context) *OauthProvider
SaveX is like Save, but panics if an error occurs.
func (*OauthProviderUpdateOne) Select ¶
func (opuo *OauthProviderUpdateOne) Select(field string, fields ...string) *OauthProviderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OauthProviderUpdateOne) SetAuthStyle ¶
func (opuo *OauthProviderUpdateOne) SetAuthStyle(u uint64) *OauthProviderUpdateOne
SetAuthStyle sets the "auth_style" field.
func (*OauthProviderUpdateOne) SetAuthURL ¶
func (opuo *OauthProviderUpdateOne) SetAuthURL(s string) *OauthProviderUpdateOne
SetAuthURL sets the "auth_url" field.
func (*OauthProviderUpdateOne) SetClientID ¶
func (opuo *OauthProviderUpdateOne) SetClientID(s string) *OauthProviderUpdateOne
SetClientID sets the "client_id" field.
func (*OauthProviderUpdateOne) SetClientSecret ¶
func (opuo *OauthProviderUpdateOne) SetClientSecret(s string) *OauthProviderUpdateOne
SetClientSecret sets the "client_secret" field.
func (*OauthProviderUpdateOne) SetInfoURL ¶
func (opuo *OauthProviderUpdateOne) SetInfoURL(s string) *OauthProviderUpdateOne
SetInfoURL sets the "info_url" field.
func (*OauthProviderUpdateOne) SetName ¶
func (opuo *OauthProviderUpdateOne) SetName(s string) *OauthProviderUpdateOne
SetName sets the "name" field.
func (*OauthProviderUpdateOne) SetNotEmptyAuthStyle ¶
func (op *OauthProviderUpdateOne) SetNotEmptyAuthStyle(value uint64) *OauthProviderUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdateOne) SetNotEmptyAuthURL ¶
func (op *OauthProviderUpdateOne) SetNotEmptyAuthURL(value string) *OauthProviderUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdateOne) SetNotEmptyClientID ¶
func (op *OauthProviderUpdateOne) SetNotEmptyClientID(value string) *OauthProviderUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdateOne) SetNotEmptyClientSecret ¶
func (op *OauthProviderUpdateOne) SetNotEmptyClientSecret(value string) *OauthProviderUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdateOne) SetNotEmptyInfoURL ¶
func (op *OauthProviderUpdateOne) SetNotEmptyInfoURL(value string) *OauthProviderUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdateOne) SetNotEmptyName ¶
func (op *OauthProviderUpdateOne) SetNotEmptyName(value string) *OauthProviderUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdateOne) SetNotEmptyRedirectURL ¶
func (op *OauthProviderUpdateOne) SetNotEmptyRedirectURL(value string) *OauthProviderUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdateOne) SetNotEmptyScopes ¶
func (op *OauthProviderUpdateOne) SetNotEmptyScopes(value string) *OauthProviderUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdateOne) SetNotEmptyTokenURL ¶
func (op *OauthProviderUpdateOne) SetNotEmptyTokenURL(value string) *OauthProviderUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*OauthProviderUpdateOne) SetNotNilAuthStyle ¶ added in v1.0.9
func (op *OauthProviderUpdateOne) SetNotNilAuthStyle(value *uint64) *OauthProviderUpdateOne
set field if value's pointer is not nil.
func (*OauthProviderUpdateOne) SetNotNilAuthURL ¶ added in v1.0.9
func (op *OauthProviderUpdateOne) SetNotNilAuthURL(value *string) *OauthProviderUpdateOne
set field if value's pointer is not nil.
func (*OauthProviderUpdateOne) SetNotNilClientID ¶ added in v1.0.9
func (op *OauthProviderUpdateOne) SetNotNilClientID(value *string) *OauthProviderUpdateOne
set field if value's pointer is not nil.
func (*OauthProviderUpdateOne) SetNotNilClientSecret ¶ added in v1.0.9
func (op *OauthProviderUpdateOne) SetNotNilClientSecret(value *string) *OauthProviderUpdateOne
set field if value's pointer is not nil.
func (*OauthProviderUpdateOne) SetNotNilInfoURL ¶ added in v1.0.9
func (op *OauthProviderUpdateOne) SetNotNilInfoURL(value *string) *OauthProviderUpdateOne
set field if value's pointer is not nil.
func (*OauthProviderUpdateOne) SetNotNilName ¶ added in v1.0.9
func (op *OauthProviderUpdateOne) SetNotNilName(value *string) *OauthProviderUpdateOne
set field if value's pointer is not nil.
func (*OauthProviderUpdateOne) SetNotNilRedirectURL ¶ added in v1.0.9
func (op *OauthProviderUpdateOne) SetNotNilRedirectURL(value *string) *OauthProviderUpdateOne
set field if value's pointer is not nil.
func (*OauthProviderUpdateOne) SetNotNilScopes ¶ added in v1.0.9
func (op *OauthProviderUpdateOne) SetNotNilScopes(value *string) *OauthProviderUpdateOne
set field if value's pointer is not nil.
func (*OauthProviderUpdateOne) SetNotNilTokenURL ¶ added in v1.0.9
func (op *OauthProviderUpdateOne) SetNotNilTokenURL(value *string) *OauthProviderUpdateOne
set field if value's pointer is not nil.
func (*OauthProviderUpdateOne) SetNotNilUpdatedAt ¶ added in v1.0.9
func (op *OauthProviderUpdateOne) SetNotNilUpdatedAt(value *time.Time) *OauthProviderUpdateOne
set field if value's pointer is not nil.
func (*OauthProviderUpdateOne) SetRedirectURL ¶
func (opuo *OauthProviderUpdateOne) SetRedirectURL(s string) *OauthProviderUpdateOne
SetRedirectURL sets the "redirect_url" field.
func (*OauthProviderUpdateOne) SetScopes ¶
func (opuo *OauthProviderUpdateOne) SetScopes(s string) *OauthProviderUpdateOne
SetScopes sets the "scopes" field.
func (*OauthProviderUpdateOne) SetTokenURL ¶
func (opuo *OauthProviderUpdateOne) SetTokenURL(s string) *OauthProviderUpdateOne
SetTokenURL sets the "token_url" field.
func (*OauthProviderUpdateOne) SetUpdatedAt ¶
func (opuo *OauthProviderUpdateOne) SetUpdatedAt(t time.Time) *OauthProviderUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*OauthProviderUpdateOne) Where ¶
func (opuo *OauthProviderUpdateOne) Where(ps ...predicate.OauthProvider) *OauthProviderUpdateOne
Where appends a list predicates to the OauthProviderUpdate builder.
type OauthProviders ¶
type OauthProviders []*OauthProvider
OauthProviders is a parsable slice of OauthProvider.
type OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type PageDetails ¶
type Position ¶
type Position struct { // ID of the ent. ID uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1 : normal 2 : ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Sort Number | 排序编号 Sort uint32 `json:"sort,omitempty"` // Position Name | 职位名称 Name string `json:"name,omitempty"` // The code of position | 职位编码 Code string `json:"code,omitempty"` // Remark | 备注 Remark string `json:"remark,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PositionQuery when eager-loading is set. Edges PositionEdges `json:"edges"` // contains filtered or unexported fields }
Position is the model entity for the Position schema.
func (*Position) ExecContext ¶ added in v1.0.9
func (c *Position) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Position) QueryContext ¶ added in v1.0.9
func (c *Position) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Position) QueryUsers ¶
QueryUsers queries the "users" edge of the Position entity.
func (*Position) Unwrap ¶
Unwrap unwraps the Position 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 (*Position) Update ¶
func (po *Position) Update() *PositionUpdateOne
Update returns a builder for updating this Position. Note that you need to call Position.Unwrap() before calling this method if this Position was returned from a transaction, and the transaction was committed or rolled back.
type PositionClient ¶
type PositionClient struct {
// contains filtered or unexported fields
}
PositionClient is a client for the Position schema.
func NewPositionClient ¶
func NewPositionClient(c config) *PositionClient
NewPositionClient returns a client for the Position from the given config.
func (*PositionClient) Create ¶
func (c *PositionClient) Create() *PositionCreate
Create returns a builder for creating a Position entity.
func (*PositionClient) CreateBulk ¶
func (c *PositionClient) CreateBulk(builders ...*PositionCreate) *PositionCreateBulk
CreateBulk returns a builder for creating a bulk of Position entities.
func (*PositionClient) Delete ¶
func (c *PositionClient) Delete() *PositionDelete
Delete returns a delete builder for Position.
func (*PositionClient) DeleteOne ¶
func (c *PositionClient) DeleteOne(po *Position) *PositionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PositionClient) DeleteOneID ¶
func (c *PositionClient) DeleteOneID(id uint64) *PositionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PositionClient) ExecContext ¶ added in v1.0.9
func (c *PositionClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PositionClient) GetX ¶
func (c *PositionClient) GetX(ctx context.Context, id uint64) *Position
GetX is like Get, but panics if an error occurs.
func (*PositionClient) Hooks ¶
func (c *PositionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*PositionClient) Intercept ¶
func (c *PositionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `position.Intercept(f(g(h())))`.
func (*PositionClient) Interceptors ¶
func (c *PositionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PositionClient) Query ¶
func (c *PositionClient) Query() *PositionQuery
Query returns a query builder for Position.
func (*PositionClient) QueryContext ¶ added in v1.0.9
func (c *PositionClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PositionClient) QueryUsers ¶
func (c *PositionClient) QueryUsers(po *Position) *UserQuery
QueryUsers queries the users edge of a Position.
func (*PositionClient) Update ¶
func (c *PositionClient) Update() *PositionUpdate
Update returns an update builder for Position.
func (*PositionClient) UpdateOne ¶
func (c *PositionClient) UpdateOne(po *Position) *PositionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PositionClient) UpdateOneID ¶
func (c *PositionClient) UpdateOneID(id uint64) *PositionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PositionClient) Use ¶
func (c *PositionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `position.Hooks(f(g(h())))`.
type PositionCreate ¶
type PositionCreate struct {
// contains filtered or unexported fields
}
PositionCreate is the builder for creating a Position entity.
func (*PositionCreate) AddUserIDs ¶
func (pc *PositionCreate) AddUserIDs(ids ...uuid.UUID) *PositionCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*PositionCreate) AddUsers ¶
func (pc *PositionCreate) AddUsers(u ...*User) *PositionCreate
AddUsers adds the "users" edges to the User entity.
func (*PositionCreate) Exec ¶
func (pc *PositionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PositionCreate) ExecContext ¶ added in v1.0.9
func (c *PositionCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PositionCreate) ExecX ¶
func (pc *PositionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PositionCreate) Mutation ¶
func (pc *PositionCreate) Mutation() *PositionMutation
Mutation returns the PositionMutation object of the builder.
func (*PositionCreate) QueryContext ¶ added in v1.0.9
func (c *PositionCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PositionCreate) Save ¶
func (pc *PositionCreate) Save(ctx context.Context) (*Position, error)
Save creates the Position in the database.
func (*PositionCreate) SaveX ¶
func (pc *PositionCreate) SaveX(ctx context.Context) *Position
SaveX calls Save and panics if Save returns an error.
func (*PositionCreate) SetCode ¶
func (pc *PositionCreate) SetCode(s string) *PositionCreate
SetCode sets the "code" field.
func (*PositionCreate) SetCreatedAt ¶
func (pc *PositionCreate) SetCreatedAt(t time.Time) *PositionCreate
SetCreatedAt sets the "created_at" field.
func (*PositionCreate) SetID ¶
func (pc *PositionCreate) SetID(u uint64) *PositionCreate
SetID sets the "id" field.
func (*PositionCreate) SetName ¶
func (pc *PositionCreate) SetName(s string) *PositionCreate
SetName sets the "name" field.
func (*PositionCreate) SetNillableCreatedAt ¶
func (pc *PositionCreate) SetNillableCreatedAt(t *time.Time) *PositionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PositionCreate) SetNillableRemark ¶ added in v1.0.13
func (pc *PositionCreate) SetNillableRemark(s *string) *PositionCreate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PositionCreate) SetNillableSort ¶
func (pc *PositionCreate) SetNillableSort(u *uint32) *PositionCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*PositionCreate) SetNillableStatus ¶
func (pc *PositionCreate) SetNillableStatus(u *uint8) *PositionCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PositionCreate) SetNillableUpdatedAt ¶
func (pc *PositionCreate) SetNillableUpdatedAt(t *time.Time) *PositionCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PositionCreate) SetNotNilCode ¶ added in v1.0.9
func (po *PositionCreate) SetNotNilCode(value *string) *PositionCreate
set field if value's pointer is not nil.
func (*PositionCreate) SetNotNilName ¶ added in v1.0.9
func (po *PositionCreate) SetNotNilName(value *string) *PositionCreate
set field if value's pointer is not nil.
func (*PositionCreate) SetNotNilRemark ¶ added in v1.0.9
func (po *PositionCreate) SetNotNilRemark(value *string) *PositionCreate
set field if value's pointer is not nil.
func (*PositionCreate) SetNotNilSort ¶ added in v1.0.9
func (po *PositionCreate) SetNotNilSort(value *uint32) *PositionCreate
set field if value's pointer is not nil.
func (*PositionCreate) SetNotNilStatus ¶ added in v1.0.9
func (po *PositionCreate) SetNotNilStatus(value *uint8) *PositionCreate
set field if value's pointer is not nil.
func (*PositionCreate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (po *PositionCreate) SetNotNilUpdatedAt(value *time.Time) *PositionCreate
set field if value's pointer is not nil.
func (*PositionCreate) SetRemark ¶
func (pc *PositionCreate) SetRemark(s string) *PositionCreate
SetRemark sets the "remark" field.
func (*PositionCreate) SetSort ¶
func (pc *PositionCreate) SetSort(u uint32) *PositionCreate
SetSort sets the "sort" field.
func (*PositionCreate) SetStatus ¶
func (pc *PositionCreate) SetStatus(u uint8) *PositionCreate
SetStatus sets the "status" field.
func (*PositionCreate) SetUpdatedAt ¶
func (pc *PositionCreate) SetUpdatedAt(t time.Time) *PositionCreate
SetUpdatedAt sets the "updated_at" field.
type PositionCreateBulk ¶
type PositionCreateBulk struct {
// contains filtered or unexported fields
}
PositionCreateBulk is the builder for creating many Position entities in bulk.
func (*PositionCreateBulk) Exec ¶
func (pcb *PositionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PositionCreateBulk) ExecContext ¶ added in v1.0.9
func (c *PositionCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PositionCreateBulk) ExecX ¶
func (pcb *PositionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PositionCreateBulk) QueryContext ¶ added in v1.0.9
func (c *PositionCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type PositionDelete ¶
type PositionDelete struct {
// contains filtered or unexported fields
}
PositionDelete is the builder for deleting a Position entity.
func (*PositionDelete) Exec ¶
func (pd *PositionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PositionDelete) ExecContext ¶ added in v1.0.9
func (c *PositionDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PositionDelete) ExecX ¶
func (pd *PositionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PositionDelete) QueryContext ¶ added in v1.0.9
func (c *PositionDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PositionDelete) Where ¶
func (pd *PositionDelete) Where(ps ...predicate.Position) *PositionDelete
Where appends a list predicates to the PositionDelete builder.
type PositionDeleteOne ¶
type PositionDeleteOne struct {
// contains filtered or unexported fields
}
PositionDeleteOne is the builder for deleting a single Position entity.
func (*PositionDeleteOne) Exec ¶
func (pdo *PositionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PositionDeleteOne) ExecX ¶
func (pdo *PositionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PositionDeleteOne) Where ¶
func (pdo *PositionDeleteOne) Where(ps ...predicate.Position) *PositionDeleteOne
Where appends a list predicates to the PositionDelete builder.
type PositionEdges ¶
type PositionEdges struct { // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // contains filtered or unexported fields }
PositionEdges holds the relations/edges for other nodes in the graph.
func (PositionEdges) UsersOrErr ¶
func (e PositionEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type PositionGroupBy ¶
type PositionGroupBy struct {
// contains filtered or unexported fields
}
PositionGroupBy is the group-by builder for Position entities.
func (*PositionGroupBy) Aggregate ¶
func (pgb *PositionGroupBy) Aggregate(fns ...AggregateFunc) *PositionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PositionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PositionGroupBy) Scan ¶
func (pgb *PositionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PositionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PositionMutation ¶
type PositionMutation struct {
// contains filtered or unexported fields
}
PositionMutation represents an operation that mutates the Position nodes in the graph.
func (*PositionMutation) AddField ¶
func (m *PositionMutation) 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 (*PositionMutation) AddSort ¶
func (m *PositionMutation) AddSort(u int32)
AddSort adds u to the "sort" field.
func (*PositionMutation) AddStatus ¶
func (m *PositionMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*PositionMutation) AddUserIDs ¶
func (m *PositionMutation) AddUserIDs(ids ...uuid.UUID)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*PositionMutation) AddedEdges ¶
func (m *PositionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PositionMutation) AddedField ¶
func (m *PositionMutation) 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 (*PositionMutation) AddedFields ¶
func (m *PositionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PositionMutation) AddedIDs ¶
func (m *PositionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PositionMutation) AddedSort ¶
func (m *PositionMutation) AddedSort() (r int32, exists bool)
AddedSort returns the value that was added to the "sort" field in this mutation.
func (*PositionMutation) AddedStatus ¶
func (m *PositionMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*PositionMutation) ClearEdge ¶
func (m *PositionMutation) 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 (*PositionMutation) ClearField ¶
func (m *PositionMutation) 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 (*PositionMutation) ClearRemark ¶ added in v1.0.13
func (m *PositionMutation) ClearRemark()
ClearRemark clears the value of the "remark" field.
func (*PositionMutation) ClearStatus ¶
func (m *PositionMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*PositionMutation) ClearUsers ¶
func (m *PositionMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*PositionMutation) ClearedEdges ¶
func (m *PositionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PositionMutation) ClearedFields ¶
func (m *PositionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PositionMutation) Client ¶
func (m PositionMutation) 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 (*PositionMutation) Code ¶
func (m *PositionMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*PositionMutation) CreatedAt ¶
func (m *PositionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PositionMutation) EdgeCleared ¶
func (m *PositionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PositionMutation) ExecContext ¶ added in v1.0.9
func (c *PositionMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PositionMutation) Field ¶
func (m *PositionMutation) 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 (*PositionMutation) FieldCleared ¶
func (m *PositionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PositionMutation) Fields ¶
func (m *PositionMutation) 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 (*PositionMutation) ID ¶
func (m *PositionMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*PositionMutation) IDs ¶
func (m *PositionMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PositionMutation) Name ¶
func (m *PositionMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PositionMutation) OldCode ¶
func (m *PositionMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the Position entity. If the Position 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 (*PositionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Position entity. If the Position 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 (*PositionMutation) 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 (*PositionMutation) OldName ¶
func (m *PositionMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Position entity. If the Position 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 (*PositionMutation) OldRemark ¶
func (m *PositionMutation) OldRemark(ctx context.Context) (v string, err error)
OldRemark returns the old "remark" field's value of the Position entity. If the Position 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 (*PositionMutation) OldSort ¶
func (m *PositionMutation) OldSort(ctx context.Context) (v uint32, err error)
OldSort returns the old "sort" field's value of the Position entity. If the Position 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 (*PositionMutation) OldStatus ¶
func (m *PositionMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Position entity. If the Position 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 (*PositionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Position entity. If the Position 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 (*PositionMutation) QueryContext ¶ added in v1.0.9
func (c *PositionMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PositionMutation) Remark ¶
func (m *PositionMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*PositionMutation) RemarkCleared ¶ added in v1.0.13
func (m *PositionMutation) RemarkCleared() bool
RemarkCleared returns if the "remark" field was cleared in this mutation.
func (*PositionMutation) RemoveUserIDs ¶
func (m *PositionMutation) RemoveUserIDs(ids ...uuid.UUID)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*PositionMutation) RemovedEdges ¶
func (m *PositionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PositionMutation) RemovedIDs ¶
func (m *PositionMutation) 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 (*PositionMutation) RemovedUsersIDs ¶
func (m *PositionMutation) RemovedUsersIDs() (ids []uuid.UUID)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*PositionMutation) ResetCode ¶
func (m *PositionMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*PositionMutation) ResetCreatedAt ¶
func (m *PositionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PositionMutation) ResetEdge ¶
func (m *PositionMutation) 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 (*PositionMutation) ResetField ¶
func (m *PositionMutation) 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 (*PositionMutation) ResetName ¶
func (m *PositionMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PositionMutation) ResetRemark ¶
func (m *PositionMutation) ResetRemark()
ResetRemark resets all changes to the "remark" field.
func (*PositionMutation) ResetSort ¶
func (m *PositionMutation) ResetSort()
ResetSort resets all changes to the "sort" field.
func (*PositionMutation) ResetStatus ¶
func (m *PositionMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*PositionMutation) ResetUpdatedAt ¶
func (m *PositionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PositionMutation) ResetUsers ¶
func (m *PositionMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*PositionMutation) SetCode ¶
func (m *PositionMutation) SetCode(s string)
SetCode sets the "code" field.
func (*PositionMutation) SetCreatedAt ¶
func (m *PositionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*PositionMutation) SetField ¶
func (m *PositionMutation) 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 (*PositionMutation) SetID ¶
func (m *PositionMutation) SetID(id uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Position entities.
func (*PositionMutation) SetName ¶
func (m *PositionMutation) SetName(s string)
SetName sets the "name" field.
func (*PositionMutation) SetOp ¶
func (m *PositionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PositionMutation) SetRemark ¶
func (m *PositionMutation) SetRemark(s string)
SetRemark sets the "remark" field.
func (*PositionMutation) SetSort ¶
func (m *PositionMutation) SetSort(u uint32)
SetSort sets the "sort" field.
func (*PositionMutation) SetStatus ¶
func (m *PositionMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*PositionMutation) SetUpdatedAt ¶
func (m *PositionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*PositionMutation) Sort ¶
func (m *PositionMutation) Sort() (r uint32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*PositionMutation) Status ¶
func (m *PositionMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*PositionMutation) StatusCleared ¶
func (m *PositionMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (PositionMutation) Tx ¶
func (m PositionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PositionMutation) Type ¶
func (m *PositionMutation) Type() string
Type returns the node type of this mutation (Position).
func (*PositionMutation) UpdatedAt ¶
func (m *PositionMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PositionMutation) UsersCleared ¶
func (m *PositionMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*PositionMutation) UsersIDs ¶
func (m *PositionMutation) UsersIDs() (ids []uuid.UUID)
UsersIDs returns the "users" edge IDs in the mutation.
func (*PositionMutation) Where ¶
func (m *PositionMutation) Where(ps ...predicate.Position)
Where appends a list predicates to the PositionMutation builder.
func (*PositionMutation) WhereP ¶
func (m *PositionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PositionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PositionPageList ¶
type PositionPageList struct { List []*Position `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
PositionPageList is Position PageList result.
type PositionPager ¶
type PositionPager struct { Order position.OrderOption Filter func(*PositionQuery) (*PositionQuery, error) }
func (*PositionPager) ApplyFilter ¶
func (p *PositionPager) ApplyFilter(query *PositionQuery) (*PositionQuery, error)
type PositionPaginateOption ¶
type PositionPaginateOption func(*PositionPager)
PositionPaginateOption enables pagination customization.
type PositionQuery ¶
type PositionQuery struct {
// contains filtered or unexported fields
}
PositionQuery is the builder for querying Position entities.
func (*PositionQuery) Aggregate ¶
func (pq *PositionQuery) Aggregate(fns ...AggregateFunc) *PositionSelect
Aggregate returns a PositionSelect configured with the given aggregations.
func (*PositionQuery) All ¶
func (pq *PositionQuery) All(ctx context.Context) ([]*Position, error)
All executes the query and returns a list of Positions.
func (*PositionQuery) AllX ¶
func (pq *PositionQuery) AllX(ctx context.Context) []*Position
AllX is like All, but panics if an error occurs.
func (*PositionQuery) Clone ¶
func (pq *PositionQuery) Clone() *PositionQuery
Clone returns a duplicate of the PositionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PositionQuery) Count ¶
func (pq *PositionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*PositionQuery) CountX ¶
func (pq *PositionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*PositionQuery) ExecContext ¶ added in v1.0.9
func (c *PositionQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PositionQuery) Exist ¶
func (pq *PositionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*PositionQuery) ExistX ¶
func (pq *PositionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*PositionQuery) First ¶
func (pq *PositionQuery) First(ctx context.Context) (*Position, error)
First returns the first Position entity from the query. Returns a *NotFoundError when no Position was found.
func (*PositionQuery) FirstID ¶
func (pq *PositionQuery) FirstID(ctx context.Context) (id uint64, err error)
FirstID returns the first Position ID from the query. Returns a *NotFoundError when no Position ID was found.
func (*PositionQuery) FirstIDX ¶
func (pq *PositionQuery) FirstIDX(ctx context.Context) uint64
FirstIDX is like FirstID, but panics if an error occurs.
func (*PositionQuery) FirstX ¶
func (pq *PositionQuery) FirstX(ctx context.Context) *Position
FirstX is like First, but panics if an error occurs.
func (*PositionQuery) GroupBy ¶
func (pq *PositionQuery) GroupBy(field string, fields ...string) *PositionGroupBy
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.Position.Query(). GroupBy(position.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PositionQuery) IDs ¶
func (pq *PositionQuery) IDs(ctx context.Context) (ids []uint64, err error)
IDs executes the query and returns a list of Position IDs.
func (*PositionQuery) IDsX ¶
func (pq *PositionQuery) IDsX(ctx context.Context) []uint64
IDsX is like IDs, but panics if an error occurs.
func (*PositionQuery) Limit ¶
func (pq *PositionQuery) Limit(limit int) *PositionQuery
Limit the number of records to be returned by this query.
func (*PositionQuery) Offset ¶
func (pq *PositionQuery) Offset(offset int) *PositionQuery
Offset to start from.
func (*PositionQuery) Only ¶
func (pq *PositionQuery) Only(ctx context.Context) (*Position, error)
Only returns a single Position entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Position entity is found. Returns a *NotFoundError when no Position entities are found.
func (*PositionQuery) OnlyID ¶
func (pq *PositionQuery) OnlyID(ctx context.Context) (id uint64, err error)
OnlyID is like Only, but returns the only Position ID in the query. Returns a *NotSingularError when more than one Position ID is found. Returns a *NotFoundError when no entities are found.
func (*PositionQuery) OnlyIDX ¶
func (pq *PositionQuery) OnlyIDX(ctx context.Context) uint64
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*PositionQuery) OnlyX ¶
func (pq *PositionQuery) OnlyX(ctx context.Context) *Position
OnlyX is like Only, but panics if an error occurs.
func (*PositionQuery) Order ¶
func (pq *PositionQuery) Order(o ...position.OrderOption) *PositionQuery
Order specifies how the records should be ordered.
func (*PositionQuery) Page ¶
func (po *PositionQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...PositionPaginateOption, ) (*PositionPageList, error)
func (*PositionQuery) QueryContext ¶ added in v1.0.9
func (c *PositionQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PositionQuery) QueryUsers ¶
func (pq *PositionQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*PositionQuery) Select ¶
func (pq *PositionQuery) Select(fields ...string) *PositionSelect
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.Position.Query(). Select(position.FieldCreatedAt). Scan(ctx, &v)
func (*PositionQuery) Unique ¶
func (pq *PositionQuery) Unique(unique bool) *PositionQuery
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 (*PositionQuery) Where ¶
func (pq *PositionQuery) Where(ps ...predicate.Position) *PositionQuery
Where adds a new predicate for the PositionQuery builder.
func (*PositionQuery) WithUsers ¶
func (pq *PositionQuery) WithUsers(opts ...func(*UserQuery)) *PositionQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type PositionSelect ¶
type PositionSelect struct { *PositionQuery // contains filtered or unexported fields }
PositionSelect is the builder for selecting fields of Position entities.
func (*PositionSelect) Aggregate ¶
func (ps *PositionSelect) Aggregate(fns ...AggregateFunc) *PositionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PositionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PositionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (PositionSelect) ExecContext ¶ added in v1.0.9
func (c PositionSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PositionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PositionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PositionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PositionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (PositionSelect) QueryContext ¶ added in v1.0.9
func (c PositionSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PositionSelect) Scan ¶
func (ps *PositionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PositionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PositionUpdate ¶
type PositionUpdate struct {
// contains filtered or unexported fields
}
PositionUpdate is the builder for updating Position entities.
func (*PositionUpdate) AddSort ¶
func (pu *PositionUpdate) AddSort(u int32) *PositionUpdate
AddSort adds u to the "sort" field.
func (*PositionUpdate) AddStatus ¶
func (pu *PositionUpdate) AddStatus(u int8) *PositionUpdate
AddStatus adds u to the "status" field.
func (*PositionUpdate) AddUserIDs ¶
func (pu *PositionUpdate) AddUserIDs(ids ...uuid.UUID) *PositionUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*PositionUpdate) AddUsers ¶
func (pu *PositionUpdate) AddUsers(u ...*User) *PositionUpdate
AddUsers adds the "users" edges to the User entity.
func (*PositionUpdate) ClearRemark ¶ added in v1.0.13
func (pu *PositionUpdate) ClearRemark() *PositionUpdate
ClearRemark clears the value of the "remark" field.
func (*PositionUpdate) ClearStatus ¶
func (pu *PositionUpdate) ClearStatus() *PositionUpdate
ClearStatus clears the value of the "status" field.
func (*PositionUpdate) ClearUsers ¶
func (pu *PositionUpdate) ClearUsers() *PositionUpdate
ClearUsers clears all "users" edges to the User entity.
func (*PositionUpdate) Exec ¶
func (pu *PositionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PositionUpdate) ExecContext ¶ added in v1.0.9
func (c *PositionUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PositionUpdate) ExecX ¶
func (pu *PositionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PositionUpdate) Mutation ¶
func (pu *PositionUpdate) Mutation() *PositionMutation
Mutation returns the PositionMutation object of the builder.
func (*PositionUpdate) QueryContext ¶ added in v1.0.9
func (c *PositionUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PositionUpdate) RemoveUserIDs ¶
func (pu *PositionUpdate) RemoveUserIDs(ids ...uuid.UUID) *PositionUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*PositionUpdate) RemoveUsers ¶
func (pu *PositionUpdate) RemoveUsers(u ...*User) *PositionUpdate
RemoveUsers removes "users" edges to User entities.
func (*PositionUpdate) Save ¶
func (pu *PositionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PositionUpdate) SaveX ¶
func (pu *PositionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PositionUpdate) SetCode ¶
func (pu *PositionUpdate) SetCode(s string) *PositionUpdate
SetCode sets the "code" field.
func (*PositionUpdate) SetName ¶
func (pu *PositionUpdate) SetName(s string) *PositionUpdate
SetName sets the "name" field.
func (*PositionUpdate) SetNillableRemark ¶ added in v1.0.13
func (pu *PositionUpdate) SetNillableRemark(s *string) *PositionUpdate
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PositionUpdate) SetNillableSort ¶
func (pu *PositionUpdate) SetNillableSort(u *uint32) *PositionUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*PositionUpdate) SetNillableStatus ¶
func (pu *PositionUpdate) SetNillableStatus(u *uint8) *PositionUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PositionUpdate) SetNotEmptyCode ¶
func (po *PositionUpdate) SetNotEmptyCode(value string) *PositionUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*PositionUpdate) SetNotEmptyName ¶
func (po *PositionUpdate) SetNotEmptyName(value string) *PositionUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*PositionUpdate) SetNotEmptyRemark ¶
func (po *PositionUpdate) SetNotEmptyRemark(value string) *PositionUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*PositionUpdate) SetNotEmptySort ¶
func (po *PositionUpdate) SetNotEmptySort(value uint32) *PositionUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*PositionUpdate) SetNotEmptyStatus ¶
func (po *PositionUpdate) SetNotEmptyStatus(value uint8) *PositionUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*PositionUpdate) SetNotNilCode ¶ added in v1.0.9
func (po *PositionUpdate) SetNotNilCode(value *string) *PositionUpdate
set field if value's pointer is not nil.
func (*PositionUpdate) SetNotNilName ¶ added in v1.0.9
func (po *PositionUpdate) SetNotNilName(value *string) *PositionUpdate
set field if value's pointer is not nil.
func (*PositionUpdate) SetNotNilRemark ¶ added in v1.0.9
func (po *PositionUpdate) SetNotNilRemark(value *string) *PositionUpdate
set field if value's pointer is not nil.
func (*PositionUpdate) SetNotNilSort ¶ added in v1.0.9
func (po *PositionUpdate) SetNotNilSort(value *uint32) *PositionUpdate
set field if value's pointer is not nil.
func (*PositionUpdate) SetNotNilStatus ¶ added in v1.0.9
func (po *PositionUpdate) SetNotNilStatus(value *uint8) *PositionUpdate
set field if value's pointer is not nil.
func (*PositionUpdate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (po *PositionUpdate) SetNotNilUpdatedAt(value *time.Time) *PositionUpdate
set field if value's pointer is not nil.
func (*PositionUpdate) SetRemark ¶
func (pu *PositionUpdate) SetRemark(s string) *PositionUpdate
SetRemark sets the "remark" field.
func (*PositionUpdate) SetSort ¶
func (pu *PositionUpdate) SetSort(u uint32) *PositionUpdate
SetSort sets the "sort" field.
func (*PositionUpdate) SetStatus ¶
func (pu *PositionUpdate) SetStatus(u uint8) *PositionUpdate
SetStatus sets the "status" field.
func (*PositionUpdate) SetUpdatedAt ¶
func (pu *PositionUpdate) SetUpdatedAt(t time.Time) *PositionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PositionUpdate) Where ¶
func (pu *PositionUpdate) Where(ps ...predicate.Position) *PositionUpdate
Where appends a list predicates to the PositionUpdate builder.
type PositionUpdateOne ¶
type PositionUpdateOne struct {
// contains filtered or unexported fields
}
PositionUpdateOne is the builder for updating a single Position entity.
func (*PositionUpdateOne) AddSort ¶
func (puo *PositionUpdateOne) AddSort(u int32) *PositionUpdateOne
AddSort adds u to the "sort" field.
func (*PositionUpdateOne) AddStatus ¶
func (puo *PositionUpdateOne) AddStatus(u int8) *PositionUpdateOne
AddStatus adds u to the "status" field.
func (*PositionUpdateOne) AddUserIDs ¶
func (puo *PositionUpdateOne) AddUserIDs(ids ...uuid.UUID) *PositionUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*PositionUpdateOne) AddUsers ¶
func (puo *PositionUpdateOne) AddUsers(u ...*User) *PositionUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*PositionUpdateOne) ClearRemark ¶ added in v1.0.13
func (puo *PositionUpdateOne) ClearRemark() *PositionUpdateOne
ClearRemark clears the value of the "remark" field.
func (*PositionUpdateOne) ClearStatus ¶
func (puo *PositionUpdateOne) ClearStatus() *PositionUpdateOne
ClearStatus clears the value of the "status" field.
func (*PositionUpdateOne) ClearUsers ¶
func (puo *PositionUpdateOne) ClearUsers() *PositionUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*PositionUpdateOne) Exec ¶
func (puo *PositionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PositionUpdateOne) ExecContext ¶ added in v1.0.9
func (c *PositionUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*PositionUpdateOne) ExecX ¶
func (puo *PositionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PositionUpdateOne) Mutation ¶
func (puo *PositionUpdateOne) Mutation() *PositionMutation
Mutation returns the PositionMutation object of the builder.
func (*PositionUpdateOne) QueryContext ¶ added in v1.0.9
func (c *PositionUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*PositionUpdateOne) RemoveUserIDs ¶
func (puo *PositionUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *PositionUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*PositionUpdateOne) RemoveUsers ¶
func (puo *PositionUpdateOne) RemoveUsers(u ...*User) *PositionUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*PositionUpdateOne) Save ¶
func (puo *PositionUpdateOne) Save(ctx context.Context) (*Position, error)
Save executes the query and returns the updated Position entity.
func (*PositionUpdateOne) SaveX ¶
func (puo *PositionUpdateOne) SaveX(ctx context.Context) *Position
SaveX is like Save, but panics if an error occurs.
func (*PositionUpdateOne) Select ¶
func (puo *PositionUpdateOne) Select(field string, fields ...string) *PositionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PositionUpdateOne) SetCode ¶
func (puo *PositionUpdateOne) SetCode(s string) *PositionUpdateOne
SetCode sets the "code" field.
func (*PositionUpdateOne) SetName ¶
func (puo *PositionUpdateOne) SetName(s string) *PositionUpdateOne
SetName sets the "name" field.
func (*PositionUpdateOne) SetNillableRemark ¶ added in v1.0.13
func (puo *PositionUpdateOne) SetNillableRemark(s *string) *PositionUpdateOne
SetNillableRemark sets the "remark" field if the given value is not nil.
func (*PositionUpdateOne) SetNillableSort ¶
func (puo *PositionUpdateOne) SetNillableSort(u *uint32) *PositionUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*PositionUpdateOne) SetNillableStatus ¶
func (puo *PositionUpdateOne) SetNillableStatus(u *uint8) *PositionUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*PositionUpdateOne) SetNotEmptyCode ¶
func (po *PositionUpdateOne) SetNotEmptyCode(value string) *PositionUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*PositionUpdateOne) SetNotEmptyName ¶
func (po *PositionUpdateOne) SetNotEmptyName(value string) *PositionUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*PositionUpdateOne) SetNotEmptyRemark ¶
func (po *PositionUpdateOne) SetNotEmptyRemark(value string) *PositionUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*PositionUpdateOne) SetNotEmptySort ¶
func (po *PositionUpdateOne) SetNotEmptySort(value uint32) *PositionUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*PositionUpdateOne) SetNotEmptyStatus ¶
func (po *PositionUpdateOne) SetNotEmptyStatus(value uint8) *PositionUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*PositionUpdateOne) SetNotNilCode ¶ added in v1.0.9
func (po *PositionUpdateOne) SetNotNilCode(value *string) *PositionUpdateOne
set field if value's pointer is not nil.
func (*PositionUpdateOne) SetNotNilName ¶ added in v1.0.9
func (po *PositionUpdateOne) SetNotNilName(value *string) *PositionUpdateOne
set field if value's pointer is not nil.
func (*PositionUpdateOne) SetNotNilRemark ¶ added in v1.0.9
func (po *PositionUpdateOne) SetNotNilRemark(value *string) *PositionUpdateOne
set field if value's pointer is not nil.
func (*PositionUpdateOne) SetNotNilSort ¶ added in v1.0.9
func (po *PositionUpdateOne) SetNotNilSort(value *uint32) *PositionUpdateOne
set field if value's pointer is not nil.
func (*PositionUpdateOne) SetNotNilStatus ¶ added in v1.0.9
func (po *PositionUpdateOne) SetNotNilStatus(value *uint8) *PositionUpdateOne
set field if value's pointer is not nil.
func (*PositionUpdateOne) SetNotNilUpdatedAt ¶ added in v1.0.9
func (po *PositionUpdateOne) SetNotNilUpdatedAt(value *time.Time) *PositionUpdateOne
set field if value's pointer is not nil.
func (*PositionUpdateOne) SetRemark ¶
func (puo *PositionUpdateOne) SetRemark(s string) *PositionUpdateOne
SetRemark sets the "remark" field.
func (*PositionUpdateOne) SetSort ¶
func (puo *PositionUpdateOne) SetSort(u uint32) *PositionUpdateOne
SetSort sets the "sort" field.
func (*PositionUpdateOne) SetStatus ¶
func (puo *PositionUpdateOne) SetStatus(u uint8) *PositionUpdateOne
SetStatus sets the "status" field.
func (*PositionUpdateOne) SetUpdatedAt ¶
func (puo *PositionUpdateOne) SetUpdatedAt(t time.Time) *PositionUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PositionUpdateOne) Where ¶
func (puo *PositionUpdateOne) Where(ps ...predicate.Position) *PositionUpdateOne
Where appends a list predicates to the PositionUpdate builder.
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 uint64 `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1 : normal 2 : ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Role name | 角色名 Name string `json:"name,omitempty"` // Role code for permission control in front end | 角色码,用于前端权限控制 Code string `json:"code,omitempty"` // Default menu : dashboard | 默认登录页面 DefaultRouter string `json:"default_router,omitempty"` // Remark | 备注 Remark string `json:"remark,omitempty"` // Order number | 排序编号 Sort uint32 `json:"sort,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 }
Role is the model entity for the Role schema.
func (*Role) ExecContext ¶ added in v1.0.9
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Role) QueryContext ¶ added in v1.0.9
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Role) QueryMenus ¶
QueryMenus queries the "menus" edge of the Role entity.
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 uint64) *RoleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RoleClient) ExecContext ¶ added in v1.0.9
func (c *RoleClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RoleClient) GetX ¶
func (c *RoleClient) GetX(ctx context.Context, id uint64) *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) Query ¶
func (c *RoleClient) Query() *RoleQuery
Query returns a query builder for Role.
func (*RoleClient) QueryContext ¶ added in v1.0.9
func (c *RoleClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RoleClient) QueryMenus ¶
func (c *RoleClient) QueryMenus(r *Role) *MenuQuery
QueryMenus queries the menus edge of a 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 uint64) *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) AddMenuIDs ¶
func (rc *RoleCreate) AddMenuIDs(ids ...uint64) *RoleCreate
AddMenuIDs adds the "menus" edge to the Menu entity by IDs.
func (*RoleCreate) AddMenus ¶
func (rc *RoleCreate) AddMenus(m ...*Menu) *RoleCreate
AddMenus adds the "menus" edges to the Menu entity.
func (*RoleCreate) AddUserIDs ¶
func (rc *RoleCreate) AddUserIDs(ids ...uuid.UUID) *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) ExecContext ¶ added in v1.0.9
func (c *RoleCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*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) QueryContext ¶ added in v1.0.9
func (c *RoleCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*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) SetCode ¶
func (rc *RoleCreate) SetCode(s string) *RoleCreate
SetCode sets the "code" field.
func (*RoleCreate) SetCreatedAt ¶
func (rc *RoleCreate) SetCreatedAt(t time.Time) *RoleCreate
SetCreatedAt sets the "created_at" field.
func (*RoleCreate) SetDefaultRouter ¶
func (rc *RoleCreate) SetDefaultRouter(s string) *RoleCreate
SetDefaultRouter sets the "default_router" field.
func (*RoleCreate) SetID ¶
func (rc *RoleCreate) SetID(u uint64) *RoleCreate
SetID sets the "id" 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) SetNillableDefaultRouter ¶
func (rc *RoleCreate) SetNillableDefaultRouter(s *string) *RoleCreate
SetNillableDefaultRouter sets the "default_router" 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(u *uint32) *RoleCreate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*RoleCreate) SetNillableStatus ¶
func (rc *RoleCreate) SetNillableStatus(u *uint8) *RoleCreate
SetNillableStatus sets the "status" 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) SetNotNilCode ¶ added in v1.0.9
func (r *RoleCreate) SetNotNilCode(value *string) *RoleCreate
set field if value's pointer is not nil.
func (*RoleCreate) SetNotNilDefaultRouter ¶ added in v1.0.9
func (r *RoleCreate) SetNotNilDefaultRouter(value *string) *RoleCreate
set field if value's pointer is not nil.
func (*RoleCreate) SetNotNilName ¶ added in v1.0.9
func (r *RoleCreate) SetNotNilName(value *string) *RoleCreate
set field if value's pointer is not nil.
func (*RoleCreate) SetNotNilRemark ¶ added in v1.0.9
func (r *RoleCreate) SetNotNilRemark(value *string) *RoleCreate
set field if value's pointer is not nil.
func (*RoleCreate) SetNotNilSort ¶ added in v1.0.9
func (r *RoleCreate) SetNotNilSort(value *uint32) *RoleCreate
set field if value's pointer is not nil.
func (*RoleCreate) SetNotNilStatus ¶ added in v1.0.9
func (r *RoleCreate) SetNotNilStatus(value *uint8) *RoleCreate
set field if value's pointer is not nil.
func (*RoleCreate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (r *RoleCreate) SetNotNilUpdatedAt(value *time.Time) *RoleCreate
set field if value's pointer 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(u uint32) *RoleCreate
SetSort sets the "sort" field.
func (*RoleCreate) SetStatus ¶
func (rc *RoleCreate) SetStatus(u uint8) *RoleCreate
SetStatus sets the "status" 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) ExecContext ¶ added in v1.0.9
func (c *RoleCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RoleCreateBulk) ExecX ¶
func (rcb *RoleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleCreateBulk) QueryContext ¶ added in v1.0.9
func (c *RoleCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type 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) ExecContext ¶ added in v1.0.9
func (c *RoleDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RoleDelete) ExecX ¶
func (rd *RoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoleDelete) QueryContext ¶ added in v1.0.9
func (c *RoleDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*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 { // Menus holds the value of the menus edge. Menus []*Menu `json:"menus,omitempty"` // 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) MenusOrErr ¶
MenusOrErr returns the Menus value or an error if the edge was not loaded in eager-loading.
func (RoleEdges) UsersOrErr ¶
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
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) 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) AddMenuIDs ¶
func (m *RoleMutation) AddMenuIDs(ids ...uint64)
AddMenuIDs adds the "menus" edge to the Menu entity by ids.
func (*RoleMutation) AddSort ¶
func (m *RoleMutation) AddSort(u int32)
AddSort adds u to the "sort" field.
func (*RoleMutation) AddStatus ¶
func (m *RoleMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*RoleMutation) AddUserIDs ¶
func (m *RoleMutation) AddUserIDs(ids ...uuid.UUID)
AddUserIDs adds the "users" edge to the User entity by ids.
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) 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) AddedStatus ¶
func (m *RoleMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
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) ClearMenus ¶
func (m *RoleMutation) ClearMenus()
ClearMenus clears the "menus" edge to the Menu entity.
func (*RoleMutation) ClearStatus ¶
func (m *RoleMutation) ClearStatus()
ClearStatus clears the value of the "status" 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) Code ¶
func (m *RoleMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
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) DefaultRouter ¶
func (m *RoleMutation) DefaultRouter() (r string, exists bool)
DefaultRouter returns the value of the "default_router" 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) ExecContext ¶ added in v1.0.9
func (c *RoleMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*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) ID ¶
func (m *RoleMutation) ID() (id uint64, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RoleMutation) IDs ¶
func (m *RoleMutation) IDs(ctx context.Context) ([]uint64, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RoleMutation) MenusCleared ¶
func (m *RoleMutation) MenusCleared() bool
MenusCleared reports if the "menus" edge to the Menu entity was cleared.
func (*RoleMutation) MenusIDs ¶
func (m *RoleMutation) MenusIDs() (ids []uint64)
MenusIDs returns the "menus" edge IDs 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) OldCode ¶
func (m *RoleMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" 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) 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) 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) 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) 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 uint32, 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) OldStatus ¶
func (m *RoleMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" 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) QueryContext ¶ added in v1.0.9
func (c *RoleMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RoleMutation) Remark ¶
func (m *RoleMutation) Remark() (r string, exists bool)
Remark returns the value of the "remark" field in the mutation.
func (*RoleMutation) RemoveMenuIDs ¶
func (m *RoleMutation) RemoveMenuIDs(ids ...uint64)
RemoveMenuIDs removes the "menus" edge to the Menu entity by IDs.
func (*RoleMutation) RemoveUserIDs ¶
func (m *RoleMutation) RemoveUserIDs(ids ...uuid.UUID)
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) RemovedMenusIDs ¶
func (m *RoleMutation) RemovedMenusIDs() (ids []uint64)
RemovedMenus returns the removed IDs of the "menus" edge to the Menu entity.
func (*RoleMutation) RemovedUsersIDs ¶
func (m *RoleMutation) RemovedUsersIDs() (ids []uuid.UUID)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*RoleMutation) ResetCode ¶
func (m *RoleMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*RoleMutation) ResetCreatedAt ¶
func (m *RoleMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RoleMutation) ResetDefaultRouter ¶
func (m *RoleMutation) ResetDefaultRouter()
ResetDefaultRouter resets all changes to the "default_router" 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) ResetMenus ¶
func (m *RoleMutation) ResetMenus()
ResetMenus resets all changes to the "menus" edge.
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) ResetStatus ¶
func (m *RoleMutation) ResetStatus()
ResetStatus resets all changes to the "status" 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) SetCode ¶
func (m *RoleMutation) SetCode(s string)
SetCode sets the "code" field.
func (*RoleMutation) SetCreatedAt ¶
func (m *RoleMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RoleMutation) SetDefaultRouter ¶
func (m *RoleMutation) SetDefaultRouter(s string)
SetDefaultRouter sets the "default_router" 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 uint64)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Role entities.
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(u uint32)
SetSort sets the "sort" field.
func (*RoleMutation) SetStatus ¶
func (m *RoleMutation) SetStatus(u uint8)
SetStatus sets the "status" 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 uint32, exists bool)
Sort returns the value of the "sort" field in the mutation.
func (*RoleMutation) Status ¶
func (m *RoleMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*RoleMutation) StatusCleared ¶
func (m *RoleMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this 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) 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 []uuid.UUID)
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 RolePageList ¶
type RolePageList struct { List []*Role `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
RolePageList is Role PageList result.
type RolePager ¶
type RolePager struct { Order role.OrderOption Filter func(*RoleQuery) (*RoleQuery, error) }
type RolePaginateOption ¶
type RolePaginateOption func(*RolePager)
RolePaginateOption enables pagination customization.
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) ExecContext ¶ added in v1.0.9
func (c *RoleQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*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) 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) Page ¶
func (r *RoleQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...RolePaginateOption, ) (*RolePageList, error)
func (*RoleQuery) QueryContext ¶ added in v1.0.9
func (c *RoleQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RoleQuery) QueryMenus ¶
QueryMenus chains the current query on the "menus" edge.
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) ExecContext ¶ added in v1.0.9
func (c RoleSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*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) QueryContext ¶ added in v1.0.9
func (c RoleSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*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) AddMenuIDs ¶
func (ru *RoleUpdate) AddMenuIDs(ids ...uint64) *RoleUpdate
AddMenuIDs adds the "menus" edge to the Menu entity by IDs.
func (*RoleUpdate) AddMenus ¶
func (ru *RoleUpdate) AddMenus(m ...*Menu) *RoleUpdate
AddMenus adds the "menus" edges to the Menu entity.
func (*RoleUpdate) AddSort ¶
func (ru *RoleUpdate) AddSort(u int32) *RoleUpdate
AddSort adds u to the "sort" field.
func (*RoleUpdate) AddStatus ¶
func (ru *RoleUpdate) AddStatus(u int8) *RoleUpdate
AddStatus adds u to the "status" field.
func (*RoleUpdate) AddUserIDs ¶
func (ru *RoleUpdate) AddUserIDs(ids ...uuid.UUID) *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) ClearMenus ¶
func (ru *RoleUpdate) ClearMenus() *RoleUpdate
ClearMenus clears all "menus" edges to the Menu entity.
func (*RoleUpdate) ClearStatus ¶
func (ru *RoleUpdate) ClearStatus() *RoleUpdate
ClearStatus clears the value of the "status" 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) ExecContext ¶ added in v1.0.9
func (c *RoleUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RoleUpdate) ExecX ¶
func (ru *RoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdate) Mutation ¶
func (ru *RoleUpdate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdate) QueryContext ¶ added in v1.0.9
func (c *RoleUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RoleUpdate) RemoveMenuIDs ¶
func (ru *RoleUpdate) RemoveMenuIDs(ids ...uint64) *RoleUpdate
RemoveMenuIDs removes the "menus" edge to Menu entities by IDs.
func (*RoleUpdate) RemoveMenus ¶
func (ru *RoleUpdate) RemoveMenus(m ...*Menu) *RoleUpdate
RemoveMenus removes "menus" edges to Menu entities.
func (*RoleUpdate) RemoveUserIDs ¶
func (ru *RoleUpdate) RemoveUserIDs(ids ...uuid.UUID) *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) SetCode ¶
func (ru *RoleUpdate) SetCode(s string) *RoleUpdate
SetCode sets the "code" field.
func (*RoleUpdate) SetDefaultRouter ¶
func (ru *RoleUpdate) SetDefaultRouter(s string) *RoleUpdate
SetDefaultRouter sets the "default_router" field.
func (*RoleUpdate) SetName ¶
func (ru *RoleUpdate) SetName(s string) *RoleUpdate
SetName sets the "name" field.
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) 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(u *uint32) *RoleUpdate
SetNillableSort sets the "sort" field if the given value is not nil.
func (*RoleUpdate) SetNillableStatus ¶
func (ru *RoleUpdate) SetNillableStatus(u *uint8) *RoleUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RoleUpdate) SetNotEmptyCode ¶
func (r *RoleUpdate) SetNotEmptyCode(value string) *RoleUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdate) SetNotEmptyDefaultRouter ¶
func (r *RoleUpdate) SetNotEmptyDefaultRouter(value string) *RoleUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdate) SetNotEmptyName ¶
func (r *RoleUpdate) SetNotEmptyName(value string) *RoleUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdate) SetNotEmptyRemark ¶
func (r *RoleUpdate) SetNotEmptyRemark(value string) *RoleUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdate) SetNotEmptySort ¶
func (r *RoleUpdate) SetNotEmptySort(value uint32) *RoleUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdate) SetNotEmptyStatus ¶
func (r *RoleUpdate) SetNotEmptyStatus(value uint8) *RoleUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdate) SetNotNilCode ¶ added in v1.0.9
func (r *RoleUpdate) SetNotNilCode(value *string) *RoleUpdate
set field if value's pointer is not nil.
func (*RoleUpdate) SetNotNilDefaultRouter ¶ added in v1.0.9
func (r *RoleUpdate) SetNotNilDefaultRouter(value *string) *RoleUpdate
set field if value's pointer is not nil.
func (*RoleUpdate) SetNotNilName ¶ added in v1.0.9
func (r *RoleUpdate) SetNotNilName(value *string) *RoleUpdate
set field if value's pointer is not nil.
func (*RoleUpdate) SetNotNilRemark ¶ added in v1.0.9
func (r *RoleUpdate) SetNotNilRemark(value *string) *RoleUpdate
set field if value's pointer is not nil.
func (*RoleUpdate) SetNotNilSort ¶ added in v1.0.9
func (r *RoleUpdate) SetNotNilSort(value *uint32) *RoleUpdate
set field if value's pointer is not nil.
func (*RoleUpdate) SetNotNilStatus ¶ added in v1.0.9
func (r *RoleUpdate) SetNotNilStatus(value *uint8) *RoleUpdate
set field if value's pointer is not nil.
func (*RoleUpdate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (r *RoleUpdate) SetNotNilUpdatedAt(value *time.Time) *RoleUpdate
set field if value's pointer 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(u uint32) *RoleUpdate
SetSort sets the "sort" field.
func (*RoleUpdate) SetStatus ¶
func (ru *RoleUpdate) SetStatus(u uint8) *RoleUpdate
SetStatus sets the "status" 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) AddMenuIDs ¶
func (ruo *RoleUpdateOne) AddMenuIDs(ids ...uint64) *RoleUpdateOne
AddMenuIDs adds the "menus" edge to the Menu entity by IDs.
func (*RoleUpdateOne) AddMenus ¶
func (ruo *RoleUpdateOne) AddMenus(m ...*Menu) *RoleUpdateOne
AddMenus adds the "menus" edges to the Menu entity.
func (*RoleUpdateOne) AddSort ¶
func (ruo *RoleUpdateOne) AddSort(u int32) *RoleUpdateOne
AddSort adds u to the "sort" field.
func (*RoleUpdateOne) AddStatus ¶
func (ruo *RoleUpdateOne) AddStatus(u int8) *RoleUpdateOne
AddStatus adds u to the "status" field.
func (*RoleUpdateOne) AddUserIDs ¶
func (ruo *RoleUpdateOne) AddUserIDs(ids ...uuid.UUID) *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) ClearMenus ¶
func (ruo *RoleUpdateOne) ClearMenus() *RoleUpdateOne
ClearMenus clears all "menus" edges to the Menu entity.
func (*RoleUpdateOne) ClearStatus ¶
func (ruo *RoleUpdateOne) ClearStatus() *RoleUpdateOne
ClearStatus clears the value of the "status" 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) ExecContext ¶ added in v1.0.9
func (c *RoleUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*RoleUpdateOne) ExecX ¶
func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdateOne) Mutation ¶
func (ruo *RoleUpdateOne) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdateOne) QueryContext ¶ added in v1.0.9
func (c *RoleUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*RoleUpdateOne) RemoveMenuIDs ¶
func (ruo *RoleUpdateOne) RemoveMenuIDs(ids ...uint64) *RoleUpdateOne
RemoveMenuIDs removes the "menus" edge to Menu entities by IDs.
func (*RoleUpdateOne) RemoveMenus ¶
func (ruo *RoleUpdateOne) RemoveMenus(m ...*Menu) *RoleUpdateOne
RemoveMenus removes "menus" edges to Menu entities.
func (*RoleUpdateOne) RemoveUserIDs ¶
func (ruo *RoleUpdateOne) RemoveUserIDs(ids ...uuid.UUID) *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) SetCode ¶
func (ruo *RoleUpdateOne) SetCode(s string) *RoleUpdateOne
SetCode sets the "code" field.
func (*RoleUpdateOne) SetDefaultRouter ¶
func (ruo *RoleUpdateOne) SetDefaultRouter(s string) *RoleUpdateOne
SetDefaultRouter sets the "default_router" field.
func (*RoleUpdateOne) SetName ¶
func (ruo *RoleUpdateOne) SetName(s string) *RoleUpdateOne
SetName sets the "name" field.
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) 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(u *uint32) *RoleUpdateOne
SetNillableSort sets the "sort" field if the given value is not nil.
func (*RoleUpdateOne) SetNillableStatus ¶
func (ruo *RoleUpdateOne) SetNillableStatus(u *uint8) *RoleUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*RoleUpdateOne) SetNotEmptyCode ¶
func (r *RoleUpdateOne) SetNotEmptyCode(value string) *RoleUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdateOne) SetNotEmptyDefaultRouter ¶
func (r *RoleUpdateOne) SetNotEmptyDefaultRouter(value string) *RoleUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdateOne) SetNotEmptyName ¶
func (r *RoleUpdateOne) SetNotEmptyName(value string) *RoleUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdateOne) SetNotEmptyRemark ¶
func (r *RoleUpdateOne) SetNotEmptyRemark(value string) *RoleUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdateOne) SetNotEmptySort ¶
func (r *RoleUpdateOne) SetNotEmptySort(value uint32) *RoleUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdateOne) SetNotEmptyStatus ¶
func (r *RoleUpdateOne) SetNotEmptyStatus(value uint8) *RoleUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*RoleUpdateOne) SetNotNilCode ¶ added in v1.0.9
func (r *RoleUpdateOne) SetNotNilCode(value *string) *RoleUpdateOne
set field if value's pointer is not nil.
func (*RoleUpdateOne) SetNotNilDefaultRouter ¶ added in v1.0.9
func (r *RoleUpdateOne) SetNotNilDefaultRouter(value *string) *RoleUpdateOne
set field if value's pointer is not nil.
func (*RoleUpdateOne) SetNotNilName ¶ added in v1.0.9
func (r *RoleUpdateOne) SetNotNilName(value *string) *RoleUpdateOne
set field if value's pointer is not nil.
func (*RoleUpdateOne) SetNotNilRemark ¶ added in v1.0.9
func (r *RoleUpdateOne) SetNotNilRemark(value *string) *RoleUpdateOne
set field if value's pointer is not nil.
func (*RoleUpdateOne) SetNotNilSort ¶ added in v1.0.9
func (r *RoleUpdateOne) SetNotNilSort(value *uint32) *RoleUpdateOne
set field if value's pointer is not nil.
func (*RoleUpdateOne) SetNotNilStatus ¶ added in v1.0.9
func (r *RoleUpdateOne) SetNotNilStatus(value *uint8) *RoleUpdateOne
set field if value's pointer is not nil.
func (*RoleUpdateOne) SetNotNilUpdatedAt ¶ added in v1.0.9
func (r *RoleUpdateOne) SetNotNilUpdatedAt(value *time.Time) *RoleUpdateOne
set field if value's pointer 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(u uint32) *RoleUpdateOne
SetSort sets the "sort" field.
func (*RoleUpdateOne) SetStatus ¶
func (ruo *RoleUpdateOne) SetStatus(u uint8) *RoleUpdateOne
SetStatus sets the "status" 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 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 Token ¶
type Token struct { // ID of the ent. // UUID ID uuid.UUID `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1 : normal 2 : ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // User's UUID | 用户的UUID UUID uuid.UUID `json:"uuid,omitempty"` // Token string | Token 字符串 Token string `json:"token,omitempty"` // Log in source such as GitHub | Token 来源 (本地为core, 第三方如github等) Source string `json:"source,omitempty"` // Expire time | 过期时间 ExpiredAt time.Time `json:"expired_at,omitempty"` // contains filtered or unexported fields }
Token is the model entity for the Token schema.
func (*Token) ExecContext ¶ added in v1.0.9
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Token) QueryContext ¶ added in v1.0.9
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*Token) Unwrap ¶
Unwrap unwraps the Token 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 (*Token) Update ¶
func (t *Token) Update() *TokenUpdateOne
Update returns a builder for updating this Token. Note that you need to call Token.Unwrap() before calling this method if this Token was returned from a transaction, and the transaction was committed or rolled back.
type TokenClient ¶
type TokenClient struct {
// contains filtered or unexported fields
}
TokenClient is a client for the Token schema.
func NewTokenClient ¶
func NewTokenClient(c config) *TokenClient
NewTokenClient returns a client for the Token from the given config.
func (*TokenClient) Create ¶
func (c *TokenClient) Create() *TokenCreate
Create returns a builder for creating a Token entity.
func (*TokenClient) CreateBulk ¶
func (c *TokenClient) CreateBulk(builders ...*TokenCreate) *TokenCreateBulk
CreateBulk returns a builder for creating a bulk of Token entities.
func (*TokenClient) Delete ¶
func (c *TokenClient) Delete() *TokenDelete
Delete returns a delete builder for Token.
func (*TokenClient) DeleteOne ¶
func (c *TokenClient) DeleteOne(t *Token) *TokenDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TokenClient) DeleteOneID ¶
func (c *TokenClient) DeleteOneID(id uuid.UUID) *TokenDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TokenClient) ExecContext ¶ added in v1.0.9
func (c *TokenClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TokenClient) Intercept ¶
func (c *TokenClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `token.Intercept(f(g(h())))`.
func (*TokenClient) Interceptors ¶
func (c *TokenClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TokenClient) Query ¶
func (c *TokenClient) Query() *TokenQuery
Query returns a query builder for Token.
func (*TokenClient) QueryContext ¶ added in v1.0.9
func (c *TokenClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TokenClient) Update ¶
func (c *TokenClient) Update() *TokenUpdate
Update returns an update builder for Token.
func (*TokenClient) UpdateOne ¶
func (c *TokenClient) UpdateOne(t *Token) *TokenUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TokenClient) UpdateOneID ¶
func (c *TokenClient) UpdateOneID(id uuid.UUID) *TokenUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TokenClient) Use ¶
func (c *TokenClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `token.Hooks(f(g(h())))`.
type TokenCreate ¶
type TokenCreate struct {
// contains filtered or unexported fields
}
TokenCreate is the builder for creating a Token entity.
func (*TokenCreate) Exec ¶
func (tc *TokenCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TokenCreate) ExecContext ¶ added in v1.0.9
func (c *TokenCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TokenCreate) ExecX ¶
func (tc *TokenCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenCreate) Mutation ¶
func (tc *TokenCreate) Mutation() *TokenMutation
Mutation returns the TokenMutation object of the builder.
func (*TokenCreate) QueryContext ¶ added in v1.0.9
func (c *TokenCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TokenCreate) Save ¶
func (tc *TokenCreate) Save(ctx context.Context) (*Token, error)
Save creates the Token in the database.
func (*TokenCreate) SaveX ¶
func (tc *TokenCreate) SaveX(ctx context.Context) *Token
SaveX calls Save and panics if Save returns an error.
func (*TokenCreate) SetCreatedAt ¶
func (tc *TokenCreate) SetCreatedAt(t time.Time) *TokenCreate
SetCreatedAt sets the "created_at" field.
func (*TokenCreate) SetExpiredAt ¶
func (tc *TokenCreate) SetExpiredAt(t time.Time) *TokenCreate
SetExpiredAt sets the "expired_at" field.
func (*TokenCreate) SetID ¶
func (tc *TokenCreate) SetID(u uuid.UUID) *TokenCreate
SetID sets the "id" field.
func (*TokenCreate) SetNillableCreatedAt ¶
func (tc *TokenCreate) SetNillableCreatedAt(t *time.Time) *TokenCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TokenCreate) SetNillableID ¶
func (tc *TokenCreate) SetNillableID(u *uuid.UUID) *TokenCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TokenCreate) SetNillableStatus ¶
func (tc *TokenCreate) SetNillableStatus(u *uint8) *TokenCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TokenCreate) SetNillableUpdatedAt ¶
func (tc *TokenCreate) SetNillableUpdatedAt(t *time.Time) *TokenCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*TokenCreate) SetNotNilExpiredAt ¶ added in v1.0.9
func (t *TokenCreate) SetNotNilExpiredAt(value *time.Time) *TokenCreate
set field if value's pointer is not nil.
func (*TokenCreate) SetNotNilSource ¶ added in v1.0.9
func (t *TokenCreate) SetNotNilSource(value *string) *TokenCreate
set field if value's pointer is not nil.
func (*TokenCreate) SetNotNilStatus ¶ added in v1.0.9
func (t *TokenCreate) SetNotNilStatus(value *uint8) *TokenCreate
set field if value's pointer is not nil.
func (*TokenCreate) SetNotNilToken ¶ added in v1.0.9
func (t *TokenCreate) SetNotNilToken(value *string) *TokenCreate
set field if value's pointer is not nil.
func (*TokenCreate) SetNotNilUUID ¶ added in v1.0.9
func (t *TokenCreate) SetNotNilUUID(value *uuid.UUID) *TokenCreate
set field if value's pointer is not nil.
func (*TokenCreate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (t *TokenCreate) SetNotNilUpdatedAt(value *time.Time) *TokenCreate
set field if value's pointer is not nil.
func (*TokenCreate) SetSource ¶
func (tc *TokenCreate) SetSource(s string) *TokenCreate
SetSource sets the "source" field.
func (*TokenCreate) SetStatus ¶
func (tc *TokenCreate) SetStatus(u uint8) *TokenCreate
SetStatus sets the "status" field.
func (*TokenCreate) SetToken ¶
func (tc *TokenCreate) SetToken(s string) *TokenCreate
SetToken sets the "token" field.
func (*TokenCreate) SetUUID ¶
func (tc *TokenCreate) SetUUID(u uuid.UUID) *TokenCreate
SetUUID sets the "uuid" field.
func (*TokenCreate) SetUpdatedAt ¶
func (tc *TokenCreate) SetUpdatedAt(t time.Time) *TokenCreate
SetUpdatedAt sets the "updated_at" field.
type TokenCreateBulk ¶
type TokenCreateBulk struct {
// contains filtered or unexported fields
}
TokenCreateBulk is the builder for creating many Token entities in bulk.
func (*TokenCreateBulk) Exec ¶
func (tcb *TokenCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TokenCreateBulk) ExecContext ¶ added in v1.0.9
func (c *TokenCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TokenCreateBulk) ExecX ¶
func (tcb *TokenCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenCreateBulk) QueryContext ¶ added in v1.0.9
func (c *TokenCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type TokenDelete ¶
type TokenDelete struct {
// contains filtered or unexported fields
}
TokenDelete is the builder for deleting a Token entity.
func (*TokenDelete) Exec ¶
func (td *TokenDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TokenDelete) ExecContext ¶ added in v1.0.9
func (c *TokenDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TokenDelete) ExecX ¶
func (td *TokenDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TokenDelete) QueryContext ¶ added in v1.0.9
func (c *TokenDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TokenDelete) Where ¶
func (td *TokenDelete) Where(ps ...predicate.Token) *TokenDelete
Where appends a list predicates to the TokenDelete builder.
type TokenDeleteOne ¶
type TokenDeleteOne struct {
// contains filtered or unexported fields
}
TokenDeleteOne is the builder for deleting a single Token entity.
func (*TokenDeleteOne) Exec ¶
func (tdo *TokenDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TokenDeleteOne) ExecX ¶
func (tdo *TokenDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenDeleteOne) Where ¶
func (tdo *TokenDeleteOne) Where(ps ...predicate.Token) *TokenDeleteOne
Where appends a list predicates to the TokenDelete builder.
type TokenGroupBy ¶
type TokenGroupBy struct {
// contains filtered or unexported fields
}
TokenGroupBy is the group-by builder for Token entities.
func (*TokenGroupBy) Aggregate ¶
func (tgb *TokenGroupBy) Aggregate(fns ...AggregateFunc) *TokenGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TokenGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TokenGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TokenGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TokenGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TokenGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TokenGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TokenGroupBy) Scan ¶
func (tgb *TokenGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TokenGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TokenMutation ¶
type TokenMutation struct {
// contains filtered or unexported fields
}
TokenMutation represents an operation that mutates the Token nodes in the graph.
func (*TokenMutation) AddField ¶
func (m *TokenMutation) 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 (*TokenMutation) AddStatus ¶
func (m *TokenMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*TokenMutation) AddedEdges ¶
func (m *TokenMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TokenMutation) AddedField ¶
func (m *TokenMutation) 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 (*TokenMutation) AddedFields ¶
func (m *TokenMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TokenMutation) AddedIDs ¶
func (m *TokenMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TokenMutation) AddedStatus ¶
func (m *TokenMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*TokenMutation) ClearEdge ¶
func (m *TokenMutation) 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 (*TokenMutation) ClearField ¶
func (m *TokenMutation) 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 (*TokenMutation) ClearStatus ¶
func (m *TokenMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*TokenMutation) ClearedEdges ¶
func (m *TokenMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TokenMutation) ClearedFields ¶
func (m *TokenMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TokenMutation) Client ¶
func (m TokenMutation) 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 (*TokenMutation) CreatedAt ¶
func (m *TokenMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TokenMutation) EdgeCleared ¶
func (m *TokenMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TokenMutation) ExecContext ¶ added in v1.0.9
func (c *TokenMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TokenMutation) ExpiredAt ¶
func (m *TokenMutation) ExpiredAt() (r time.Time, exists bool)
ExpiredAt returns the value of the "expired_at" field in the mutation.
func (*TokenMutation) Field ¶
func (m *TokenMutation) 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 (*TokenMutation) FieldCleared ¶
func (m *TokenMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TokenMutation) Fields ¶
func (m *TokenMutation) 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 (*TokenMutation) ID ¶
func (m *TokenMutation) ID() (id uuid.UUID, 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 (*TokenMutation) IDs ¶
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 (*TokenMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Token entity. If the Token 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 (*TokenMutation) OldExpiredAt ¶
OldExpiredAt returns the old "expired_at" field's value of the Token entity. If the Token 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 (*TokenMutation) 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 (*TokenMutation) OldSource ¶
func (m *TokenMutation) OldSource(ctx context.Context) (v string, err error)
OldSource returns the old "source" field's value of the Token entity. If the Token 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 (*TokenMutation) OldStatus ¶
func (m *TokenMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the Token entity. If the Token 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 (*TokenMutation) OldToken ¶
func (m *TokenMutation) OldToken(ctx context.Context) (v string, err error)
OldToken returns the old "token" field's value of the Token entity. If the Token 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 (*TokenMutation) OldUUID ¶
OldUUID returns the old "uuid" field's value of the Token entity. If the Token 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 (*TokenMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Token entity. If the Token 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 (*TokenMutation) QueryContext ¶ added in v1.0.9
func (c *TokenMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TokenMutation) RemovedEdges ¶
func (m *TokenMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TokenMutation) RemovedIDs ¶
func (m *TokenMutation) 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 (*TokenMutation) ResetCreatedAt ¶
func (m *TokenMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TokenMutation) ResetEdge ¶
func (m *TokenMutation) 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 (*TokenMutation) ResetExpiredAt ¶
func (m *TokenMutation) ResetExpiredAt()
ResetExpiredAt resets all changes to the "expired_at" field.
func (*TokenMutation) ResetField ¶
func (m *TokenMutation) 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 (*TokenMutation) ResetSource ¶
func (m *TokenMutation) ResetSource()
ResetSource resets all changes to the "source" field.
func (*TokenMutation) ResetStatus ¶
func (m *TokenMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*TokenMutation) ResetToken ¶
func (m *TokenMutation) ResetToken()
ResetToken resets all changes to the "token" field.
func (*TokenMutation) ResetUUID ¶
func (m *TokenMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*TokenMutation) ResetUpdatedAt ¶
func (m *TokenMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*TokenMutation) SetCreatedAt ¶
func (m *TokenMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TokenMutation) SetExpiredAt ¶
func (m *TokenMutation) SetExpiredAt(t time.Time)
SetExpiredAt sets the "expired_at" field.
func (*TokenMutation) SetField ¶
func (m *TokenMutation) 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 (*TokenMutation) SetID ¶
func (m *TokenMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Token entities.
func (*TokenMutation) SetOp ¶
func (m *TokenMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TokenMutation) SetSource ¶
func (m *TokenMutation) SetSource(s string)
SetSource sets the "source" field.
func (*TokenMutation) SetStatus ¶
func (m *TokenMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*TokenMutation) SetToken ¶
func (m *TokenMutation) SetToken(s string)
SetToken sets the "token" field.
func (*TokenMutation) SetUUID ¶
func (m *TokenMutation) SetUUID(u uuid.UUID)
SetUUID sets the "uuid" field.
func (*TokenMutation) SetUpdatedAt ¶
func (m *TokenMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*TokenMutation) Source ¶
func (m *TokenMutation) Source() (r string, exists bool)
Source returns the value of the "source" field in the mutation.
func (*TokenMutation) Status ¶
func (m *TokenMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*TokenMutation) StatusCleared ¶
func (m *TokenMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (*TokenMutation) Token ¶
func (m *TokenMutation) Token() (r string, exists bool)
Token returns the value of the "token" field in the mutation.
func (TokenMutation) Tx ¶
func (m TokenMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TokenMutation) Type ¶
func (m *TokenMutation) Type() string
Type returns the node type of this mutation (Token).
func (*TokenMutation) UUID ¶
func (m *TokenMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*TokenMutation) UpdatedAt ¶
func (m *TokenMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*TokenMutation) Where ¶
func (m *TokenMutation) Where(ps ...predicate.Token)
Where appends a list predicates to the TokenMutation builder.
func (*TokenMutation) WhereP ¶
func (m *TokenMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TokenMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TokenPageList ¶
type TokenPageList struct { List []*Token `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
TokenPageList is Token PageList result.
type TokenPager ¶
type TokenPager struct { Order token.OrderOption Filter func(*TokenQuery) (*TokenQuery, error) }
func (*TokenPager) ApplyFilter ¶
func (p *TokenPager) ApplyFilter(query *TokenQuery) (*TokenQuery, error)
type TokenPaginateOption ¶
type TokenPaginateOption func(*TokenPager)
TokenPaginateOption enables pagination customization.
type TokenQuery ¶
type TokenQuery struct {
// contains filtered or unexported fields
}
TokenQuery is the builder for querying Token entities.
func (*TokenQuery) Aggregate ¶
func (tq *TokenQuery) Aggregate(fns ...AggregateFunc) *TokenSelect
Aggregate returns a TokenSelect configured with the given aggregations.
func (*TokenQuery) All ¶
func (tq *TokenQuery) All(ctx context.Context) ([]*Token, error)
All executes the query and returns a list of Tokens.
func (*TokenQuery) AllX ¶
func (tq *TokenQuery) AllX(ctx context.Context) []*Token
AllX is like All, but panics if an error occurs.
func (*TokenQuery) Clone ¶
func (tq *TokenQuery) Clone() *TokenQuery
Clone returns a duplicate of the TokenQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TokenQuery) Count ¶
func (tq *TokenQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TokenQuery) CountX ¶
func (tq *TokenQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TokenQuery) ExecContext ¶ added in v1.0.9
func (c *TokenQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TokenQuery) Exist ¶
func (tq *TokenQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TokenQuery) ExistX ¶
func (tq *TokenQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TokenQuery) First ¶
func (tq *TokenQuery) First(ctx context.Context) (*Token, error)
First returns the first Token entity from the query. Returns a *NotFoundError when no Token was found.
func (*TokenQuery) FirstID ¶
FirstID returns the first Token ID from the query. Returns a *NotFoundError when no Token ID was found.
func (*TokenQuery) FirstIDX ¶
func (tq *TokenQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*TokenQuery) FirstX ¶
func (tq *TokenQuery) FirstX(ctx context.Context) *Token
FirstX is like First, but panics if an error occurs.
func (*TokenQuery) GroupBy ¶
func (tq *TokenQuery) GroupBy(field string, fields ...string) *TokenGroupBy
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.Token.Query(). GroupBy(token.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TokenQuery) IDsX ¶
func (tq *TokenQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*TokenQuery) Limit ¶
func (tq *TokenQuery) Limit(limit int) *TokenQuery
Limit the number of records to be returned by this query.
func (*TokenQuery) Offset ¶
func (tq *TokenQuery) Offset(offset int) *TokenQuery
Offset to start from.
func (*TokenQuery) Only ¶
func (tq *TokenQuery) Only(ctx context.Context) (*Token, error)
Only returns a single Token entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Token entity is found. Returns a *NotFoundError when no Token entities are found.
func (*TokenQuery) OnlyID ¶
OnlyID is like Only, but returns the only Token ID in the query. Returns a *NotSingularError when more than one Token ID is found. Returns a *NotFoundError when no entities are found.
func (*TokenQuery) OnlyIDX ¶
func (tq *TokenQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TokenQuery) OnlyX ¶
func (tq *TokenQuery) OnlyX(ctx context.Context) *Token
OnlyX is like Only, but panics if an error occurs.
func (*TokenQuery) Order ¶
func (tq *TokenQuery) Order(o ...token.OrderOption) *TokenQuery
Order specifies how the records should be ordered.
func (*TokenQuery) Page ¶
func (t *TokenQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...TokenPaginateOption, ) (*TokenPageList, error)
func (*TokenQuery) QueryContext ¶ added in v1.0.9
func (c *TokenQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TokenQuery) Select ¶
func (tq *TokenQuery) Select(fields ...string) *TokenSelect
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.Token.Query(). Select(token.FieldCreatedAt). Scan(ctx, &v)
func (*TokenQuery) Unique ¶
func (tq *TokenQuery) Unique(unique bool) *TokenQuery
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 (*TokenQuery) Where ¶
func (tq *TokenQuery) Where(ps ...predicate.Token) *TokenQuery
Where adds a new predicate for the TokenQuery builder.
type TokenSelect ¶
type TokenSelect struct { *TokenQuery // contains filtered or unexported fields }
TokenSelect is the builder for selecting fields of Token entities.
func (*TokenSelect) Aggregate ¶
func (ts *TokenSelect) Aggregate(fns ...AggregateFunc) *TokenSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TokenSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TokenSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (TokenSelect) ExecContext ¶ added in v1.0.9
func (c TokenSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TokenSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TokenSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TokenSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TokenSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (TokenSelect) QueryContext ¶ added in v1.0.9
func (c TokenSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TokenSelect) Scan ¶
func (ts *TokenSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TokenSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TokenUpdate ¶
type TokenUpdate struct {
// contains filtered or unexported fields
}
TokenUpdate is the builder for updating Token entities.
func (*TokenUpdate) AddStatus ¶
func (tu *TokenUpdate) AddStatus(u int8) *TokenUpdate
AddStatus adds u to the "status" field.
func (*TokenUpdate) ClearStatus ¶
func (tu *TokenUpdate) ClearStatus() *TokenUpdate
ClearStatus clears the value of the "status" field.
func (*TokenUpdate) Exec ¶
func (tu *TokenUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TokenUpdate) ExecContext ¶ added in v1.0.9
func (c *TokenUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TokenUpdate) ExecX ¶
func (tu *TokenUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenUpdate) Mutation ¶
func (tu *TokenUpdate) Mutation() *TokenMutation
Mutation returns the TokenMutation object of the builder.
func (*TokenUpdate) QueryContext ¶ added in v1.0.9
func (c *TokenUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TokenUpdate) Save ¶
func (tu *TokenUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TokenUpdate) SaveX ¶
func (tu *TokenUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TokenUpdate) SetExpiredAt ¶
func (tu *TokenUpdate) SetExpiredAt(t time.Time) *TokenUpdate
SetExpiredAt sets the "expired_at" field.
func (*TokenUpdate) SetNillableStatus ¶
func (tu *TokenUpdate) SetNillableStatus(u *uint8) *TokenUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TokenUpdate) SetNotEmptySource ¶
func (t *TokenUpdate) SetNotEmptySource(value string) *TokenUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*TokenUpdate) SetNotEmptyStatus ¶
func (t *TokenUpdate) SetNotEmptyStatus(value uint8) *TokenUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*TokenUpdate) SetNotEmptyToken ¶
func (t *TokenUpdate) SetNotEmptyToken(value string) *TokenUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*TokenUpdate) SetNotNilExpiredAt ¶ added in v1.0.9
func (t *TokenUpdate) SetNotNilExpiredAt(value *time.Time) *TokenUpdate
set field if value's pointer is not nil.
func (*TokenUpdate) SetNotNilSource ¶ added in v1.0.9
func (t *TokenUpdate) SetNotNilSource(value *string) *TokenUpdate
set field if value's pointer is not nil.
func (*TokenUpdate) SetNotNilStatus ¶ added in v1.0.9
func (t *TokenUpdate) SetNotNilStatus(value *uint8) *TokenUpdate
set field if value's pointer is not nil.
func (*TokenUpdate) SetNotNilToken ¶ added in v1.0.9
func (t *TokenUpdate) SetNotNilToken(value *string) *TokenUpdate
set field if value's pointer is not nil.
func (*TokenUpdate) SetNotNilUUID ¶ added in v1.0.9
func (t *TokenUpdate) SetNotNilUUID(value *uuid.UUID) *TokenUpdate
set field if value's pointer is not nil.
func (*TokenUpdate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (t *TokenUpdate) SetNotNilUpdatedAt(value *time.Time) *TokenUpdate
set field if value's pointer is not nil.
func (*TokenUpdate) SetSource ¶
func (tu *TokenUpdate) SetSource(s string) *TokenUpdate
SetSource sets the "source" field.
func (*TokenUpdate) SetStatus ¶
func (tu *TokenUpdate) SetStatus(u uint8) *TokenUpdate
SetStatus sets the "status" field.
func (*TokenUpdate) SetToken ¶
func (tu *TokenUpdate) SetToken(s string) *TokenUpdate
SetToken sets the "token" field.
func (*TokenUpdate) SetUUID ¶
func (tu *TokenUpdate) SetUUID(u uuid.UUID) *TokenUpdate
SetUUID sets the "uuid" field.
func (*TokenUpdate) SetUpdatedAt ¶
func (tu *TokenUpdate) SetUpdatedAt(t time.Time) *TokenUpdate
SetUpdatedAt sets the "updated_at" field.
func (*TokenUpdate) Where ¶
func (tu *TokenUpdate) Where(ps ...predicate.Token) *TokenUpdate
Where appends a list predicates to the TokenUpdate builder.
type TokenUpdateOne ¶
type TokenUpdateOne struct {
// contains filtered or unexported fields
}
TokenUpdateOne is the builder for updating a single Token entity.
func (*TokenUpdateOne) AddStatus ¶
func (tuo *TokenUpdateOne) AddStatus(u int8) *TokenUpdateOne
AddStatus adds u to the "status" field.
func (*TokenUpdateOne) ClearStatus ¶
func (tuo *TokenUpdateOne) ClearStatus() *TokenUpdateOne
ClearStatus clears the value of the "status" field.
func (*TokenUpdateOne) Exec ¶
func (tuo *TokenUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TokenUpdateOne) ExecContext ¶ added in v1.0.9
func (c *TokenUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*TokenUpdateOne) ExecX ¶
func (tuo *TokenUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TokenUpdateOne) Mutation ¶
func (tuo *TokenUpdateOne) Mutation() *TokenMutation
Mutation returns the TokenMutation object of the builder.
func (*TokenUpdateOne) QueryContext ¶ added in v1.0.9
func (c *TokenUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*TokenUpdateOne) Save ¶
func (tuo *TokenUpdateOne) Save(ctx context.Context) (*Token, error)
Save executes the query and returns the updated Token entity.
func (*TokenUpdateOne) SaveX ¶
func (tuo *TokenUpdateOne) SaveX(ctx context.Context) *Token
SaveX is like Save, but panics if an error occurs.
func (*TokenUpdateOne) Select ¶
func (tuo *TokenUpdateOne) Select(field string, fields ...string) *TokenUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TokenUpdateOne) SetExpiredAt ¶
func (tuo *TokenUpdateOne) SetExpiredAt(t time.Time) *TokenUpdateOne
SetExpiredAt sets the "expired_at" field.
func (*TokenUpdateOne) SetNillableStatus ¶
func (tuo *TokenUpdateOne) SetNillableStatus(u *uint8) *TokenUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*TokenUpdateOne) SetNotEmptySource ¶
func (t *TokenUpdateOne) SetNotEmptySource(value string) *TokenUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*TokenUpdateOne) SetNotEmptyStatus ¶
func (t *TokenUpdateOne) SetNotEmptyStatus(value uint8) *TokenUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*TokenUpdateOne) SetNotEmptyToken ¶
func (t *TokenUpdateOne) SetNotEmptyToken(value string) *TokenUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*TokenUpdateOne) SetNotNilExpiredAt ¶ added in v1.0.9
func (t *TokenUpdateOne) SetNotNilExpiredAt(value *time.Time) *TokenUpdateOne
set field if value's pointer is not nil.
func (*TokenUpdateOne) SetNotNilSource ¶ added in v1.0.9
func (t *TokenUpdateOne) SetNotNilSource(value *string) *TokenUpdateOne
set field if value's pointer is not nil.
func (*TokenUpdateOne) SetNotNilStatus ¶ added in v1.0.9
func (t *TokenUpdateOne) SetNotNilStatus(value *uint8) *TokenUpdateOne
set field if value's pointer is not nil.
func (*TokenUpdateOne) SetNotNilToken ¶ added in v1.0.9
func (t *TokenUpdateOne) SetNotNilToken(value *string) *TokenUpdateOne
set field if value's pointer is not nil.
func (*TokenUpdateOne) SetNotNilUUID ¶ added in v1.0.9
func (t *TokenUpdateOne) SetNotNilUUID(value *uuid.UUID) *TokenUpdateOne
set field if value's pointer is not nil.
func (*TokenUpdateOne) SetNotNilUpdatedAt ¶ added in v1.0.9
func (t *TokenUpdateOne) SetNotNilUpdatedAt(value *time.Time) *TokenUpdateOne
set field if value's pointer is not nil.
func (*TokenUpdateOne) SetSource ¶
func (tuo *TokenUpdateOne) SetSource(s string) *TokenUpdateOne
SetSource sets the "source" field.
func (*TokenUpdateOne) SetStatus ¶
func (tuo *TokenUpdateOne) SetStatus(u uint8) *TokenUpdateOne
SetStatus sets the "status" field.
func (*TokenUpdateOne) SetToken ¶
func (tuo *TokenUpdateOne) SetToken(s string) *TokenUpdateOne
SetToken sets the "token" field.
func (*TokenUpdateOne) SetUUID ¶
func (tuo *TokenUpdateOne) SetUUID(u uuid.UUID) *TokenUpdateOne
SetUUID sets the "uuid" field.
func (*TokenUpdateOne) SetUpdatedAt ¶
func (tuo *TokenUpdateOne) SetUpdatedAt(t time.Time) *TokenUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*TokenUpdateOne) Where ¶
func (tuo *TokenUpdateOne) Where(ps ...predicate.Token) *TokenUpdateOne
Where appends a list predicates to the TokenUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // API is the client for interacting with the API builders. API *APIClient // Department is the client for interacting with the Department builders. Department *DepartmentClient // Dictionary is the client for interacting with the Dictionary builders. Dictionary *DictionaryClient // DictionaryDetail is the client for interacting with the DictionaryDetail builders. DictionaryDetail *DictionaryDetailClient // Menu is the client for interacting with the Menu builders. Menu *MenuClient // OauthProvider is the client for interacting with the OauthProvider builders. OauthProvider *OauthProviderClient // Position is the client for interacting with the Position builders. Position *PositionClient // Role is the client for interacting with the Role builders. Role *RoleClient // Token is the client for interacting with the Token builders. Token *TokenClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) ExecContext ¶ added in v1.0.9
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
func (*Tx) QueryContext ¶ added in v1.0.9
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type User ¶
type User struct { // ID of the ent. // UUID ID uuid.UUID `json:"id,omitempty"` // Create Time | 创建日期 CreatedAt time.Time `json:"created_at,omitempty"` // Update Time | 修改日期 UpdatedAt time.Time `json:"updated_at,omitempty"` // Status 1 : normal 2 : ban | 状态 1 正常 2 禁用 Status uint8 `json:"status,omitempty"` // Delete Time | 删除日期 DeletedAt time.Time `json:"deleted_at,omitempty"` // User's login name | 登录名 Username string `json:"username,omitempty"` // Password | 密码 Password string `json:"password,omitempty"` // Nickname | 昵称 Nickname string `json:"nickname,omitempty"` // The description of user | 用户的描述信息 Description string `json:"description,omitempty"` // The home page that the user enters after logging in | 用户登陆后进入的首页 HomePath string `json:"home_path,omitempty"` // Mobile number | 手机号 Mobile string `json:"mobile,omitempty"` // Email | 邮箱号 Email string `json:"email,omitempty"` // Avatar | 头像路径 Avatar string `json:"avatar,omitempty"` // Department ID | 部门ID DepartmentID uint64 `json:"department_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) ExecContext ¶ added in v1.0.9
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*User) QueryContext ¶ added in v1.0.9
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*User) QueryDepartments ¶
func (u *User) QueryDepartments() *DepartmentQuery
QueryDepartments queries the "departments" edge of the User entity.
func (*User) QueryPositions ¶
func (u *User) QueryPositions() *PositionQuery
QueryPositions queries the "positions" 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 uuid.UUID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) ExecContext ¶ added in v1.0.9
func (c *UserClient) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserClient) 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) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryContext ¶ added in v1.0.9
func (c *UserClient) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserClient) QueryDepartments ¶
func (c *UserClient) QueryDepartments(u *User) *DepartmentQuery
QueryDepartments queries the departments edge of a User.
func (*UserClient) QueryPositions ¶
func (c *UserClient) QueryPositions(u *User) *PositionQuery
QueryPositions queries the positions 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 uuid.UUID) *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) AddPositionIDs ¶
func (uc *UserCreate) AddPositionIDs(ids ...uint64) *UserCreate
AddPositionIDs adds the "positions" edge to the Position entity by IDs.
func (*UserCreate) AddPositions ¶
func (uc *UserCreate) AddPositions(p ...*Position) *UserCreate
AddPositions adds the "positions" edges to the Position entity.
func (*UserCreate) AddRoleIDs ¶
func (uc *UserCreate) AddRoleIDs(ids ...uint64) *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) ExecContext ¶ added in v1.0.9
func (c *UserCreate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) QueryContext ¶ added in v1.0.9
func (c *UserCreate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAvatar ¶
func (uc *UserCreate) SetAvatar(s string) *UserCreate
SetAvatar sets the "avatar" field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetDeletedAt ¶ added in v1.0.9
func (uc *UserCreate) SetDeletedAt(t time.Time) *UserCreate
SetDeletedAt sets the "deleted_at" field.
func (*UserCreate) SetDepartmentID ¶
func (uc *UserCreate) SetDepartmentID(u uint64) *UserCreate
SetDepartmentID sets the "department_id" field.
func (*UserCreate) SetDepartments ¶
func (uc *UserCreate) SetDepartments(d *Department) *UserCreate
SetDepartments sets the "departments" edge to the Department entity.
func (*UserCreate) SetDepartmentsID ¶
func (uc *UserCreate) SetDepartmentsID(id uint64) *UserCreate
SetDepartmentsID sets the "departments" edge to the Department entity by ID.
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) SetHomePath ¶
func (uc *UserCreate) SetHomePath(s string) *UserCreate
SetHomePath sets the "home_path" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetMobile ¶
func (uc *UserCreate) SetMobile(s string) *UserCreate
SetMobile sets the "mobile" field.
func (*UserCreate) SetNickname ¶
func (uc *UserCreate) SetNickname(s string) *UserCreate
SetNickname sets the "nickname" field.
func (*UserCreate) SetNillableAvatar ¶
func (uc *UserCreate) SetNillableAvatar(s *string) *UserCreate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserCreate) 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 ¶ added in v1.0.9
func (uc *UserCreate) SetNillableDeletedAt(t *time.Time) *UserCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserCreate) SetNillableDepartmentID ¶
func (uc *UserCreate) SetNillableDepartmentID(u *uint64) *UserCreate
SetNillableDepartmentID sets the "department_id" field if the given value is not nil.
func (*UserCreate) SetNillableDepartmentsID ¶
func (uc *UserCreate) SetNillableDepartmentsID(id *uint64) *UserCreate
SetNillableDepartmentsID sets the "departments" edge to the Department entity by ID 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) SetNillableHomePath ¶
func (uc *UserCreate) SetNillableHomePath(s *string) *UserCreate
SetNillableHomePath sets the "home_path" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableMobile ¶
func (uc *UserCreate) SetNillableMobile(s *string) *UserCreate
SetNillableMobile sets the "mobile" field if the given value is not nil.
func (*UserCreate) SetNillableStatus ¶
func (uc *UserCreate) SetNillableStatus(u *uint8) *UserCreate
SetNillableStatus sets the "status" 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) SetNotNilAvatar ¶ added in v1.0.9
func (u *UserCreate) SetNotNilAvatar(value *string) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilDeletedAt ¶ added in v1.0.9
func (u *UserCreate) SetNotNilDeletedAt(value *time.Time) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilDepartmentID ¶ added in v1.0.9
func (u *UserCreate) SetNotNilDepartmentID(value *uint64) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilDescription ¶ added in v1.0.9
func (u *UserCreate) SetNotNilDescription(value *string) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilEmail ¶ added in v1.0.9
func (u *UserCreate) SetNotNilEmail(value *string) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilHomePath ¶ added in v1.0.9
func (u *UserCreate) SetNotNilHomePath(value *string) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilMobile ¶ added in v1.0.9
func (u *UserCreate) SetNotNilMobile(value *string) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilNickname ¶ added in v1.0.9
func (u *UserCreate) SetNotNilNickname(value *string) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilPassword ¶ added in v1.0.9
func (u *UserCreate) SetNotNilPassword(value *string) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilStatus ¶ added in v1.0.9
func (u *UserCreate) SetNotNilStatus(value *uint8) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (u *UserCreate) SetNotNilUpdatedAt(value *time.Time) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetNotNilUsername ¶ added in v1.0.9
func (u *UserCreate) SetNotNilUsername(value *string) *UserCreate
set field if value's pointer is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetStatus ¶
func (uc *UserCreate) SetStatus(u uint8) *UserCreate
SetStatus sets the "status" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecContext ¶ added in v1.0.9
func (c *UserCreateBulk) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) QueryContext ¶ added in v1.0.9
func (c *UserCreateBulk) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecContext ¶ added in v1.0.9
func (c *UserDelete) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) QueryContext ¶ added in v1.0.9
func (c *UserDelete) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Departments holds the value of the departments edge. Departments *Department `json:"departments,omitempty"` // Positions holds the value of the positions edge. Positions []*Position `json:"positions,omitempty"` // Roles holds the value of the roles edge. Roles []*Role `json:"roles,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) DepartmentsOrErr ¶
func (e UserEdges) DepartmentsOrErr() (*Department, error)
DepartmentsOrErr returns the Departments value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) PositionsOrErr ¶
PositionsOrErr returns the Positions 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 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) 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) AddPositionIDs ¶
func (m *UserMutation) AddPositionIDs(ids ...uint64)
AddPositionIDs adds the "positions" edge to the Position entity by ids.
func (*UserMutation) AddRoleIDs ¶
func (m *UserMutation) AddRoleIDs(ids ...uint64)
AddRoleIDs adds the "roles" edge to the Role entity by ids.
func (*UserMutation) AddStatus ¶
func (m *UserMutation) AddStatus(u int8)
AddStatus adds u to the "status" field.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AddedStatus ¶
func (m *UserMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*UserMutation) Avatar ¶
func (m *UserMutation) Avatar() (r string, exists bool)
Avatar returns the value of the "avatar" field in the mutation.
func (*UserMutation) AvatarCleared ¶
func (m *UserMutation) AvatarCleared() bool
AvatarCleared returns if the "avatar" field was cleared in this mutation.
func (*UserMutation) ClearAvatar ¶
func (m *UserMutation) ClearAvatar()
ClearAvatar clears the value of the "avatar" field.
func (*UserMutation) ClearDeletedAt ¶ added in v1.0.9
func (m *UserMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserMutation) ClearDepartmentID ¶
func (m *UserMutation) ClearDepartmentID()
ClearDepartmentID clears the value of the "department_id" field.
func (*UserMutation) ClearDepartments ¶
func (m *UserMutation) ClearDepartments()
ClearDepartments clears the "departments" edge to the Department entity.
func (*UserMutation) ClearDescription ¶
func (m *UserMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearEmail ¶
func (m *UserMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*UserMutation) 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) ClearMobile ¶
func (m *UserMutation) ClearMobile()
ClearMobile clears the value of the "mobile" field.
func (*UserMutation) ClearPositions ¶
func (m *UserMutation) ClearPositions()
ClearPositions clears the "positions" edge to the Position entity.
func (*UserMutation) ClearRoles ¶
func (m *UserMutation) ClearRoles()
ClearRoles clears the "roles" edge to the Role entity.
func (*UserMutation) ClearStatus ¶
func (m *UserMutation) ClearStatus()
ClearStatus clears the value of the "status" 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) DeletedAt ¶ added in v1.0.9
func (m *UserMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*UserMutation) DeletedAtCleared ¶ added in v1.0.9
func (m *UserMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*UserMutation) DepartmentID ¶
func (m *UserMutation) DepartmentID() (r uint64, exists bool)
DepartmentID returns the value of the "department_id" field in the mutation.
func (*UserMutation) DepartmentIDCleared ¶
func (m *UserMutation) DepartmentIDCleared() bool
DepartmentIDCleared returns if the "department_id" field was cleared in this mutation.
func (*UserMutation) DepartmentsCleared ¶
func (m *UserMutation) DepartmentsCleared() bool
DepartmentsCleared reports if the "departments" edge to the Department entity was cleared.
func (*UserMutation) DepartmentsID ¶
func (m *UserMutation) DepartmentsID() (id uint64, exists bool)
DepartmentsID returns the "departments" edge ID in the mutation.
func (*UserMutation) DepartmentsIDs ¶
func (m *UserMutation) DepartmentsIDs() (ids []uint64)
DepartmentsIDs returns the "departments" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DepartmentsID instead. It exists only for internal usage by the builders.
func (*UserMutation) Description ¶
func (m *UserMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*UserMutation) DescriptionCleared ¶
func (m *UserMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) EmailCleared ¶
func (m *UserMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*UserMutation) ExecContext ¶ added in v1.0.9
func (c *UserMutation) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) HomePath ¶
func (m *UserMutation) HomePath() (r string, exists bool)
HomePath returns the value of the "home_path" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, 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 ¶
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) Mobile ¶
func (m *UserMutation) Mobile() (r string, exists bool)
Mobile returns the value of the "mobile" field in the mutation.
func (*UserMutation) MobileCleared ¶
func (m *UserMutation) MobileCleared() bool
MobileCleared returns if the "mobile" field was cleared in this mutation.
func (*UserMutation) Nickname ¶
func (m *UserMutation) Nickname() (r string, exists bool)
Nickname returns the value of the "nickname" field in the mutation.
func (*UserMutation) OldAvatar ¶
func (m *UserMutation) OldAvatar(ctx context.Context) (v string, err error)
OldAvatar returns the old "avatar" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) 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 ¶ added in v1.0.9
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) OldDepartmentID ¶
func (m *UserMutation) OldDepartmentID(ctx context.Context) (v uint64, err error)
OldDepartmentID returns the old "department_id" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) 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) OldHomePath ¶
func (m *UserMutation) OldHomePath(ctx context.Context) (v string, err error)
OldHomePath returns the old "home_path" 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) OldMobile ¶
func (m *UserMutation) OldMobile(ctx context.Context) (v string, err error)
OldMobile returns the old "mobile" 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 "nickname" 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) OldStatus ¶
func (m *UserMutation) OldStatus(ctx context.Context) (v uint8, err error)
OldStatus returns the old "status" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) PositionsCleared ¶
func (m *UserMutation) PositionsCleared() bool
PositionsCleared reports if the "positions" edge to the Position entity was cleared.
func (*UserMutation) PositionsIDs ¶
func (m *UserMutation) PositionsIDs() (ids []uint64)
PositionsIDs returns the "positions" edge IDs in the mutation.
func (*UserMutation) QueryContext ¶ added in v1.0.9
func (c *UserMutation) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserMutation) RemovePositionIDs ¶
func (m *UserMutation) RemovePositionIDs(ids ...uint64)
RemovePositionIDs removes the "positions" edge to the Position entity by IDs.
func (*UserMutation) RemoveRoleIDs ¶
func (m *UserMutation) RemoveRoleIDs(ids ...uint64)
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) RemovedPositionsIDs ¶
func (m *UserMutation) RemovedPositionsIDs() (ids []uint64)
RemovedPositions returns the removed IDs of the "positions" edge to the Position entity.
func (*UserMutation) RemovedRolesIDs ¶
func (m *UserMutation) RemovedRolesIDs() (ids []uint64)
RemovedRoles returns the removed IDs of the "roles" edge to the Role entity.
func (*UserMutation) ResetAvatar ¶
func (m *UserMutation) ResetAvatar()
ResetAvatar resets all changes to the "avatar" field.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetDeletedAt ¶ added in v1.0.9
func (m *UserMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*UserMutation) ResetDepartmentID ¶
func (m *UserMutation) ResetDepartmentID()
ResetDepartmentID resets all changes to the "department_id" field.
func (*UserMutation) ResetDepartments ¶
func (m *UserMutation) ResetDepartments()
ResetDepartments resets all changes to the "departments" edge.
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) ResetHomePath ¶
func (m *UserMutation) ResetHomePath()
ResetHomePath resets all changes to the "home_path" field.
func (*UserMutation) ResetMobile ¶
func (m *UserMutation) ResetMobile()
ResetMobile resets all changes to the "mobile" field.
func (*UserMutation) ResetNickname ¶
func (m *UserMutation) ResetNickname()
ResetNickname resets all changes to the "nickname" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetPositions ¶
func (m *UserMutation) ResetPositions()
ResetPositions resets all changes to the "positions" edge.
func (*UserMutation) ResetRoles ¶
func (m *UserMutation) ResetRoles()
ResetRoles resets all changes to the "roles" edge.
func (*UserMutation) ResetStatus ¶
func (m *UserMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) 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 []uint64)
RolesIDs returns the "roles" edge IDs in the mutation.
func (*UserMutation) SetAvatar ¶
func (m *UserMutation) SetAvatar(s string)
SetAvatar sets the "avatar" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetDeletedAt ¶ added in v1.0.9
func (m *UserMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*UserMutation) SetDepartmentID ¶
func (m *UserMutation) SetDepartmentID(u uint64)
SetDepartmentID sets the "department_id" field.
func (*UserMutation) SetDepartmentsID ¶
func (m *UserMutation) SetDepartmentsID(id uint64)
SetDepartmentsID sets the "departments" edge to the Department entity by id.
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) SetHomePath ¶
func (m *UserMutation) SetHomePath(s string)
SetHomePath sets the "home_path" field.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetMobile ¶
func (m *UserMutation) SetMobile(s string)
SetMobile sets the "mobile" field.
func (*UserMutation) SetNickname ¶
func (m *UserMutation) SetNickname(s string)
SetNickname sets the "nickname" 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) SetStatus ¶
func (m *UserMutation) SetStatus(u uint8)
SetStatus sets the "status" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (*UserMutation) Status ¶
func (m *UserMutation) Status() (r uint8, exists bool)
Status returns the value of the "status" field in the mutation.
func (*UserMutation) StatusCleared ¶
func (m *UserMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this 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) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the 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 UserPageList ¶
type UserPageList struct { List []*User `json:"list"` PageDetails *PageDetails `json:"pageDetails"` }
UserPageList is User PageList result.
type UserPager ¶
type UserPager struct { Order user.OrderOption Filter func(*UserQuery) (*UserQuery, error) }
type UserPaginateOption ¶
type UserPaginateOption func(*UserPager)
UserPaginateOption enables pagination customization.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) ExecContext ¶ added in v1.0.9
func (c *UserQuery) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { 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) 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) Page ¶
func (u *UserQuery) Page( ctx context.Context, pageNum uint64, pageSize uint64, opts ...UserPaginateOption, ) (*UserPageList, error)
func (*UserQuery) QueryContext ¶ added in v1.0.9
func (c *UserQuery) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserQuery) QueryDepartments ¶
func (uq *UserQuery) QueryDepartments() *DepartmentQuery
QueryDepartments chains the current query on the "departments" edge.
func (*UserQuery) QueryPositions ¶
func (uq *UserQuery) QueryPositions() *PositionQuery
QueryPositions chains the current query on the "positions" 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.
func (*UserQuery) WithDepartments ¶
func (uq *UserQuery) WithDepartments(opts ...func(*DepartmentQuery)) *UserQuery
WithDepartments tells the query-builder to eager-load the nodes that are connected to the "departments" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithPositions ¶
func (uq *UserQuery) WithPositions(opts ...func(*PositionQuery)) *UserQuery
WithPositions tells the query-builder to eager-load the nodes that are connected to the "positions" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (UserSelect) ExecContext ¶ added in v1.0.9
func (c UserSelect) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (UserSelect) QueryContext ¶ added in v1.0.9
func (c UserSelect) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddPositionIDs ¶
func (uu *UserUpdate) AddPositionIDs(ids ...uint64) *UserUpdate
AddPositionIDs adds the "positions" edge to the Position entity by IDs.
func (*UserUpdate) AddPositions ¶
func (uu *UserUpdate) AddPositions(p ...*Position) *UserUpdate
AddPositions adds the "positions" edges to the Position entity.
func (*UserUpdate) AddRoleIDs ¶
func (uu *UserUpdate) AddRoleIDs(ids ...uint64) *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) AddStatus ¶
func (uu *UserUpdate) AddStatus(u int8) *UserUpdate
AddStatus adds u to the "status" field.
func (*UserUpdate) ClearAvatar ¶
func (uu *UserUpdate) ClearAvatar() *UserUpdate
ClearAvatar clears the value of the "avatar" field.
func (*UserUpdate) ClearDeletedAt ¶ added in v1.0.9
func (uu *UserUpdate) ClearDeletedAt() *UserUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdate) ClearDepartmentID ¶
func (uu *UserUpdate) ClearDepartmentID() *UserUpdate
ClearDepartmentID clears the value of the "department_id" field.
func (*UserUpdate) ClearDepartments ¶
func (uu *UserUpdate) ClearDepartments() *UserUpdate
ClearDepartments clears the "departments" edge to the Department entity.
func (*UserUpdate) ClearDescription ¶
func (uu *UserUpdate) ClearDescription() *UserUpdate
ClearDescription clears the value of the "description" field.
func (*UserUpdate) ClearEmail ¶
func (uu *UserUpdate) ClearEmail() *UserUpdate
ClearEmail clears the value of the "email" field.
func (*UserUpdate) ClearMobile ¶
func (uu *UserUpdate) ClearMobile() *UserUpdate
ClearMobile clears the value of the "mobile" field.
func (*UserUpdate) ClearPositions ¶
func (uu *UserUpdate) ClearPositions() *UserUpdate
ClearPositions clears all "positions" edges to the Position entity.
func (*UserUpdate) ClearRoles ¶
func (uu *UserUpdate) ClearRoles() *UserUpdate
ClearRoles clears all "roles" edges to the Role entity.
func (*UserUpdate) ClearStatus ¶
func (uu *UserUpdate) ClearStatus() *UserUpdate
ClearStatus clears the value of the "status" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecContext ¶ added in v1.0.9
func (c *UserUpdate) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) QueryContext ¶ added in v1.0.9
func (c *UserUpdate) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserUpdate) RemovePositionIDs ¶
func (uu *UserUpdate) RemovePositionIDs(ids ...uint64) *UserUpdate
RemovePositionIDs removes the "positions" edge to Position entities by IDs.
func (*UserUpdate) RemovePositions ¶
func (uu *UserUpdate) RemovePositions(p ...*Position) *UserUpdate
RemovePositions removes "positions" edges to Position entities.
func (*UserUpdate) RemoveRoleIDs ¶
func (uu *UserUpdate) RemoveRoleIDs(ids ...uint64) *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) SetAvatar ¶
func (uu *UserUpdate) SetAvatar(s string) *UserUpdate
SetAvatar sets the "avatar" field.
func (*UserUpdate) SetDeletedAt ¶ added in v1.0.9
func (uu *UserUpdate) SetDeletedAt(t time.Time) *UserUpdate
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdate) SetDepartmentID ¶
func (uu *UserUpdate) SetDepartmentID(u uint64) *UserUpdate
SetDepartmentID sets the "department_id" field.
func (*UserUpdate) SetDepartments ¶
func (uu *UserUpdate) SetDepartments(d *Department) *UserUpdate
SetDepartments sets the "departments" edge to the Department entity.
func (*UserUpdate) SetDepartmentsID ¶
func (uu *UserUpdate) SetDepartmentsID(id uint64) *UserUpdate
SetDepartmentsID sets the "departments" edge to the Department entity by ID.
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) SetHomePath ¶
func (uu *UserUpdate) SetHomePath(s string) *UserUpdate
SetHomePath sets the "home_path" field.
func (*UserUpdate) SetMobile ¶
func (uu *UserUpdate) SetMobile(s string) *UserUpdate
SetMobile sets the "mobile" field.
func (*UserUpdate) SetNickname ¶
func (uu *UserUpdate) SetNickname(s string) *UserUpdate
SetNickname sets the "nickname" field.
func (*UserUpdate) SetNillableAvatar ¶
func (uu *UserUpdate) SetNillableAvatar(s *string) *UserUpdate
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserUpdate) SetNillableDeletedAt ¶ added in v1.0.9
func (uu *UserUpdate) SetNillableDeletedAt(t *time.Time) *UserUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdate) SetNillableDepartmentID ¶
func (uu *UserUpdate) SetNillableDepartmentID(u *uint64) *UserUpdate
SetNillableDepartmentID sets the "department_id" field if the given value is not nil.
func (*UserUpdate) SetNillableDepartmentsID ¶
func (uu *UserUpdate) SetNillableDepartmentsID(id *uint64) *UserUpdate
SetNillableDepartmentsID sets the "departments" edge to the Department entity by ID 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) SetNillableHomePath ¶
func (uu *UserUpdate) SetNillableHomePath(s *string) *UserUpdate
SetNillableHomePath sets the "home_path" field if the given value is not nil.
func (*UserUpdate) SetNillableMobile ¶
func (uu *UserUpdate) SetNillableMobile(s *string) *UserUpdate
SetNillableMobile sets the "mobile" field if the given value is not nil.
func (*UserUpdate) SetNillableStatus ¶
func (uu *UserUpdate) SetNillableStatus(u *uint8) *UserUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserUpdate) SetNotEmptyAvatar ¶
func (u *UserUpdate) SetNotEmptyAvatar(value string) *UserUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdate) SetNotEmptyDepartmentID ¶
func (u *UserUpdate) SetNotEmptyDepartmentID(value uint64) *UserUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdate) SetNotEmptyDescription ¶
func (u *UserUpdate) SetNotEmptyDescription(value string) *UserUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdate) SetNotEmptyEmail ¶
func (u *UserUpdate) SetNotEmptyEmail(value string) *UserUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdate) SetNotEmptyHomePath ¶
func (u *UserUpdate) SetNotEmptyHomePath(value string) *UserUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdate) SetNotEmptyMobile ¶
func (u *UserUpdate) SetNotEmptyMobile(value string) *UserUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdate) SetNotEmptyNickname ¶
func (u *UserUpdate) SetNotEmptyNickname(value string) *UserUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdate) SetNotEmptyPassword ¶
func (u *UserUpdate) SetNotEmptyPassword(value string) *UserUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdate) SetNotEmptyStatus ¶
func (u *UserUpdate) SetNotEmptyStatus(value uint8) *UserUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdate) SetNotEmptyUsername ¶
func (u *UserUpdate) SetNotEmptyUsername(value string) *UserUpdate
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdate) SetNotNilAvatar ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilAvatar(value *string) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilDeletedAt ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilDeletedAt(value *time.Time) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilDepartmentID ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilDepartmentID(value *uint64) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilDescription ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilDescription(value *string) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilEmail ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilEmail(value *string) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilHomePath ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilHomePath(value *string) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilMobile ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilMobile(value *string) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilNickname ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilNickname(value *string) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilPassword ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilPassword(value *string) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilStatus ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilStatus(value *uint8) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilUpdatedAt ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilUpdatedAt(value *time.Time) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetNotNilUsername ¶ added in v1.0.9
func (u *UserUpdate) SetNotNilUsername(value *string) *UserUpdate
set field if value's pointer is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetStatus ¶
func (uu *UserUpdate) SetStatus(u uint8) *UserUpdate
SetStatus sets the "status" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddPositionIDs ¶
func (uuo *UserUpdateOne) AddPositionIDs(ids ...uint64) *UserUpdateOne
AddPositionIDs adds the "positions" edge to the Position entity by IDs.
func (*UserUpdateOne) AddPositions ¶
func (uuo *UserUpdateOne) AddPositions(p ...*Position) *UserUpdateOne
AddPositions adds the "positions" edges to the Position entity.
func (*UserUpdateOne) AddRoleIDs ¶
func (uuo *UserUpdateOne) AddRoleIDs(ids ...uint64) *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) AddStatus ¶
func (uuo *UserUpdateOne) AddStatus(u int8) *UserUpdateOne
AddStatus adds u to the "status" field.
func (*UserUpdateOne) ClearAvatar ¶
func (uuo *UserUpdateOne) ClearAvatar() *UserUpdateOne
ClearAvatar clears the value of the "avatar" field.
func (*UserUpdateOne) ClearDeletedAt ¶ added in v1.0.9
func (uuo *UserUpdateOne) ClearDeletedAt() *UserUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*UserUpdateOne) ClearDepartmentID ¶
func (uuo *UserUpdateOne) ClearDepartmentID() *UserUpdateOne
ClearDepartmentID clears the value of the "department_id" field.
func (*UserUpdateOne) ClearDepartments ¶
func (uuo *UserUpdateOne) ClearDepartments() *UserUpdateOne
ClearDepartments clears the "departments" edge to the Department entity.
func (*UserUpdateOne) ClearDescription ¶
func (uuo *UserUpdateOne) ClearDescription() *UserUpdateOne
ClearDescription clears the value of the "description" field.
func (*UserUpdateOne) ClearEmail ¶
func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne
ClearEmail clears the value of the "email" field.
func (*UserUpdateOne) ClearMobile ¶
func (uuo *UserUpdateOne) ClearMobile() *UserUpdateOne
ClearMobile clears the value of the "mobile" field.
func (*UserUpdateOne) ClearPositions ¶
func (uuo *UserUpdateOne) ClearPositions() *UserUpdateOne
ClearPositions clears all "positions" edges to the Position entity.
func (*UserUpdateOne) ClearRoles ¶
func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne
ClearRoles clears all "roles" edges to the Role entity.
func (*UserUpdateOne) ClearStatus ¶
func (uuo *UserUpdateOne) ClearStatus() *UserUpdateOne
ClearStatus clears the value of the "status" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecContext ¶ added in v1.0.9
func (c *UserUpdateOne) ExecContext(ctx context.Context, query string, args ...any) (stdsql.Result, error)
ExecContext allows calling the underlying ExecContext method of the driver if it is supported by it. See, database/sql#DB.ExecContext for more information.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) QueryContext ¶ added in v1.0.9
func (c *UserUpdateOne) QueryContext(ctx context.Context, query string, args ...any) (*stdsql.Rows, error)
QueryContext allows calling the underlying QueryContext method of the driver if it is supported by it. See, database/sql#DB.QueryContext for more information.
func (*UserUpdateOne) RemovePositionIDs ¶
func (uuo *UserUpdateOne) RemovePositionIDs(ids ...uint64) *UserUpdateOne
RemovePositionIDs removes the "positions" edge to Position entities by IDs.
func (*UserUpdateOne) RemovePositions ¶
func (uuo *UserUpdateOne) RemovePositions(p ...*Position) *UserUpdateOne
RemovePositions removes "positions" edges to Position entities.
func (*UserUpdateOne) RemoveRoleIDs ¶
func (uuo *UserUpdateOne) RemoveRoleIDs(ids ...uint64) *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) SetAvatar ¶
func (uuo *UserUpdateOne) SetAvatar(s string) *UserUpdateOne
SetAvatar sets the "avatar" field.
func (*UserUpdateOne) SetDeletedAt ¶ added in v1.0.9
func (uuo *UserUpdateOne) SetDeletedAt(t time.Time) *UserUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*UserUpdateOne) SetDepartmentID ¶
func (uuo *UserUpdateOne) SetDepartmentID(u uint64) *UserUpdateOne
SetDepartmentID sets the "department_id" field.
func (*UserUpdateOne) SetDepartments ¶
func (uuo *UserUpdateOne) SetDepartments(d *Department) *UserUpdateOne
SetDepartments sets the "departments" edge to the Department entity.
func (*UserUpdateOne) SetDepartmentsID ¶
func (uuo *UserUpdateOne) SetDepartmentsID(id uint64) *UserUpdateOne
SetDepartmentsID sets the "departments" edge to the Department entity by ID.
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) SetHomePath ¶
func (uuo *UserUpdateOne) SetHomePath(s string) *UserUpdateOne
SetHomePath sets the "home_path" field.
func (*UserUpdateOne) SetMobile ¶
func (uuo *UserUpdateOne) SetMobile(s string) *UserUpdateOne
SetMobile sets the "mobile" field.
func (*UserUpdateOne) SetNickname ¶
func (uuo *UserUpdateOne) SetNickname(s string) *UserUpdateOne
SetNickname sets the "nickname" field.
func (*UserUpdateOne) SetNillableAvatar ¶
func (uuo *UserUpdateOne) SetNillableAvatar(s *string) *UserUpdateOne
SetNillableAvatar sets the "avatar" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDeletedAt ¶ added in v1.0.9
func (uuo *UserUpdateOne) SetNillableDeletedAt(t *time.Time) *UserUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDepartmentID ¶
func (uuo *UserUpdateOne) SetNillableDepartmentID(u *uint64) *UserUpdateOne
SetNillableDepartmentID sets the "department_id" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDepartmentsID ¶
func (uuo *UserUpdateOne) SetNillableDepartmentsID(id *uint64) *UserUpdateOne
SetNillableDepartmentsID sets the "departments" edge to the Department entity by ID 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) SetNillableHomePath ¶
func (uuo *UserUpdateOne) SetNillableHomePath(s *string) *UserUpdateOne
SetNillableHomePath sets the "home_path" field if the given value is not nil.
func (*UserUpdateOne) SetNillableMobile ¶
func (uuo *UserUpdateOne) SetNillableMobile(s *string) *UserUpdateOne
SetNillableMobile sets the "mobile" field if the given value is not nil.
func (*UserUpdateOne) SetNillableStatus ¶
func (uuo *UserUpdateOne) SetNillableStatus(u *uint8) *UserUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*UserUpdateOne) SetNotEmptyAvatar ¶
func (u *UserUpdateOne) SetNotEmptyAvatar(value string) *UserUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdateOne) SetNotEmptyDepartmentID ¶
func (u *UserUpdateOne) SetNotEmptyDepartmentID(value uint64) *UserUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdateOne) SetNotEmptyDescription ¶
func (u *UserUpdateOne) SetNotEmptyDescription(value string) *UserUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdateOne) SetNotEmptyEmail ¶
func (u *UserUpdateOne) SetNotEmptyEmail(value string) *UserUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdateOne) SetNotEmptyHomePath ¶
func (u *UserUpdateOne) SetNotEmptyHomePath(value string) *UserUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdateOne) SetNotEmptyMobile ¶
func (u *UserUpdateOne) SetNotEmptyMobile(value string) *UserUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdateOne) SetNotEmptyNickname ¶
func (u *UserUpdateOne) SetNotEmptyNickname(value string) *UserUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdateOne) SetNotEmptyPassword ¶
func (u *UserUpdateOne) SetNotEmptyPassword(value string) *UserUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdateOne) SetNotEmptyStatus ¶
func (u *UserUpdateOne) SetNotEmptyStatus(value uint8) *UserUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdateOne) SetNotEmptyUsername ¶
func (u *UserUpdateOne) SetNotEmptyUsername(value string) *UserUpdateOne
set field if value is not empty. e.g. string does not equal to ""
func (*UserUpdateOne) SetNotNilAvatar ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilAvatar(value *string) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilDeletedAt ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilDeletedAt(value *time.Time) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilDepartmentID ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilDepartmentID(value *uint64) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilDescription ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilDescription(value *string) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilEmail ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilEmail(value *string) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilHomePath ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilHomePath(value *string) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilMobile ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilMobile(value *string) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilNickname ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilNickname(value *string) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilPassword ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilPassword(value *string) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilStatus ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilStatus(value *uint8) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilUpdatedAt ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilUpdatedAt(value *time.Time) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetNotNilUsername ¶ added in v1.0.9
func (u *UserUpdateOne) SetNotNilUsername(value *string) *UserUpdateOne
set field if value's pointer is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetStatus ¶
func (uuo *UserUpdateOne) SetStatus(u uint8) *UserUpdateOne
SetStatus sets the "status" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type 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 ¶
- api.go
- api_create.go
- api_delete.go
- api_query.go
- api_update.go
- client.go
- department.go
- department_create.go
- department_delete.go
- department_query.go
- department_update.go
- dictionary.go
- dictionary_create.go
- dictionary_delete.go
- dictionary_query.go
- dictionary_update.go
- dictionarydetail.go
- dictionarydetail_create.go
- dictionarydetail_delete.go
- dictionarydetail_query.go
- dictionarydetail_update.go
- ent.go
- generate.go
- menu.go
- menu_create.go
- menu_delete.go
- menu_query.go
- menu_update.go
- mutation.go
- not_empty_update.go
- oauthprovider.go
- oauthprovider_create.go
- oauthprovider_delete.go
- oauthprovider_query.go
- oauthprovider_update.go
- pagination.go
- position.go
- position_create.go
- position_delete.go
- position_query.go
- position_update.go
- role.go
- role_create.go
- role_delete.go
- role_query.go
- role_update.go
- runtime.go
- set_not_nil.go
- token.go
- token_create.go
- token_delete.go
- token_query.go
- token_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go