Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type GroupBandwidth
- type GroupBandwidthClient
- func (c *GroupBandwidthClient) Create() *GroupBandwidthCreate
- func (c *GroupBandwidthClient) CreateBulk(builders ...*GroupBandwidthCreate) *GroupBandwidthCreateBulk
- func (c *GroupBandwidthClient) Delete() *GroupBandwidthDelete
- func (c *GroupBandwidthClient) DeleteOne(gb *GroupBandwidth) *GroupBandwidthDeleteOne
- func (c *GroupBandwidthClient) DeleteOneID(id int) *GroupBandwidthDeleteOne
- func (c *GroupBandwidthClient) Get(ctx context.Context, id int) (*GroupBandwidth, error)
- func (c *GroupBandwidthClient) GetX(ctx context.Context, id int) *GroupBandwidth
- func (c *GroupBandwidthClient) Hooks() []Hook
- func (c *GroupBandwidthClient) Query() *GroupBandwidthQuery
- func (c *GroupBandwidthClient) QueryGroups(gb *GroupBandwidth) *GroupsQuery
- func (c *GroupBandwidthClient) Update() *GroupBandwidthUpdate
- func (c *GroupBandwidthClient) UpdateOne(gb *GroupBandwidth) *GroupBandwidthUpdateOne
- func (c *GroupBandwidthClient) UpdateOneID(id int) *GroupBandwidthUpdateOne
- func (c *GroupBandwidthClient) Use(hooks ...Hook)
- type GroupBandwidthCreate
- func (gbc *GroupBandwidthCreate) AddGroupIDs(ids ...int) *GroupBandwidthCreate
- func (gbc *GroupBandwidthCreate) AddGroups(g ...*Groups) *GroupBandwidthCreate
- func (gbc *GroupBandwidthCreate) Exec(ctx context.Context) error
- func (gbc *GroupBandwidthCreate) ExecX(ctx context.Context)
- func (gbc *GroupBandwidthCreate) Mutation() *GroupBandwidthMutation
- func (gbc *GroupBandwidthCreate) Save(ctx context.Context) (*GroupBandwidth, error)
- func (gbc *GroupBandwidthCreate) SaveX(ctx context.Context) *GroupBandwidth
- func (gbc *GroupBandwidthCreate) SetGbwCreatedAt(t time.Time) *GroupBandwidthCreate
- func (gbc *GroupBandwidthCreate) SetGbwDownloadSpeed(i int) *GroupBandwidthCreate
- func (gbc *GroupBandwidthCreate) SetGbwUploadSpeed(i int) *GroupBandwidthCreate
- func (gbc *GroupBandwidthCreate) SetNillableGbwCreatedAt(t *time.Time) *GroupBandwidthCreate
- type GroupBandwidthCreateBulk
- func (gbcb *GroupBandwidthCreateBulk) Exec(ctx context.Context) error
- func (gbcb *GroupBandwidthCreateBulk) ExecX(ctx context.Context)
- func (gbcb *GroupBandwidthCreateBulk) Save(ctx context.Context) ([]*GroupBandwidth, error)
- func (gbcb *GroupBandwidthCreateBulk) SaveX(ctx context.Context) []*GroupBandwidth
- type GroupBandwidthDelete
- type GroupBandwidthDeleteOne
- type GroupBandwidthEdges
- type GroupBandwidthGroupBy
- func (gbgb *GroupBandwidthGroupBy) Aggregate(fns ...AggregateFunc) *GroupBandwidthGroupBy
- func (gbgb *GroupBandwidthGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (gbgb *GroupBandwidthGroupBy) BoolX(ctx context.Context) bool
- func (gbgb *GroupBandwidthGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (gbgb *GroupBandwidthGroupBy) BoolsX(ctx context.Context) []bool
- func (gbgb *GroupBandwidthGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (gbgb *GroupBandwidthGroupBy) Float64X(ctx context.Context) float64
- func (gbgb *GroupBandwidthGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (gbgb *GroupBandwidthGroupBy) Float64sX(ctx context.Context) []float64
- func (gbgb *GroupBandwidthGroupBy) Int(ctx context.Context) (_ int, err error)
- func (gbgb *GroupBandwidthGroupBy) IntX(ctx context.Context) int
- func (gbgb *GroupBandwidthGroupBy) Ints(ctx context.Context) ([]int, error)
- func (gbgb *GroupBandwidthGroupBy) IntsX(ctx context.Context) []int
- func (gbgb *GroupBandwidthGroupBy) Scan(ctx context.Context, v interface{}) error
- func (gbgb *GroupBandwidthGroupBy) ScanX(ctx context.Context, v interface{})
- func (gbgb *GroupBandwidthGroupBy) String(ctx context.Context) (_ string, err error)
- func (gbgb *GroupBandwidthGroupBy) StringX(ctx context.Context) string
- func (gbgb *GroupBandwidthGroupBy) Strings(ctx context.Context) ([]string, error)
- func (gbgb *GroupBandwidthGroupBy) StringsX(ctx context.Context) []string
- type GroupBandwidthMutation
- func (m *GroupBandwidthMutation) AddField(name string, value ent.Value) error
- func (m *GroupBandwidthMutation) AddGbwDownloadSpeed(i int)
- func (m *GroupBandwidthMutation) AddGbwUploadSpeed(i int)
- func (m *GroupBandwidthMutation) AddGroupIDs(ids ...int)
- func (m *GroupBandwidthMutation) AddedEdges() []string
- func (m *GroupBandwidthMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupBandwidthMutation) AddedFields() []string
- func (m *GroupBandwidthMutation) AddedGbwDownloadSpeed() (r int, exists bool)
- func (m *GroupBandwidthMutation) AddedGbwUploadSpeed() (r int, exists bool)
- func (m *GroupBandwidthMutation) AddedIDs(name string) []ent.Value
- func (m *GroupBandwidthMutation) ClearEdge(name string) error
- func (m *GroupBandwidthMutation) ClearField(name string) error
- func (m *GroupBandwidthMutation) ClearGbwCreatedAt()
- func (m *GroupBandwidthMutation) ClearGroups()
- func (m *GroupBandwidthMutation) ClearedEdges() []string
- func (m *GroupBandwidthMutation) ClearedFields() []string
- func (m GroupBandwidthMutation) Client() *Client
- func (m *GroupBandwidthMutation) EdgeCleared(name string) bool
- func (m *GroupBandwidthMutation) Field(name string) (ent.Value, bool)
- func (m *GroupBandwidthMutation) FieldCleared(name string) bool
- func (m *GroupBandwidthMutation) Fields() []string
- func (m *GroupBandwidthMutation) GbwCreatedAt() (r time.Time, exists bool)
- func (m *GroupBandwidthMutation) GbwCreatedAtCleared() bool
- func (m *GroupBandwidthMutation) GbwDownloadSpeed() (r int, exists bool)
- func (m *GroupBandwidthMutation) GbwUploadSpeed() (r int, exists bool)
- func (m *GroupBandwidthMutation) GroupsCleared() bool
- func (m *GroupBandwidthMutation) GroupsIDs() (ids []int)
- func (m *GroupBandwidthMutation) ID() (id int, exists bool)
- func (m *GroupBandwidthMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupBandwidthMutation) OldGbwCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupBandwidthMutation) OldGbwDownloadSpeed(ctx context.Context) (v int, err error)
- func (m *GroupBandwidthMutation) OldGbwUploadSpeed(ctx context.Context) (v int, err error)
- func (m *GroupBandwidthMutation) Op() Op
- func (m *GroupBandwidthMutation) RemoveGroupIDs(ids ...int)
- func (m *GroupBandwidthMutation) RemovedEdges() []string
- func (m *GroupBandwidthMutation) RemovedGroupsIDs() (ids []int)
- func (m *GroupBandwidthMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupBandwidthMutation) ResetEdge(name string) error
- func (m *GroupBandwidthMutation) ResetField(name string) error
- func (m *GroupBandwidthMutation) ResetGbwCreatedAt()
- func (m *GroupBandwidthMutation) ResetGbwDownloadSpeed()
- func (m *GroupBandwidthMutation) ResetGbwUploadSpeed()
- func (m *GroupBandwidthMutation) ResetGroups()
- func (m *GroupBandwidthMutation) SetField(name string, value ent.Value) error
- func (m *GroupBandwidthMutation) SetGbwCreatedAt(t time.Time)
- func (m *GroupBandwidthMutation) SetGbwDownloadSpeed(i int)
- func (m *GroupBandwidthMutation) SetGbwUploadSpeed(i int)
- func (m GroupBandwidthMutation) Tx() (*Tx, error)
- func (m *GroupBandwidthMutation) Type() string
- func (m *GroupBandwidthMutation) Where(ps ...predicate.GroupBandwidth)
- type GroupBandwidthQuery
- func (gbq *GroupBandwidthQuery) All(ctx context.Context) ([]*GroupBandwidth, error)
- func (gbq *GroupBandwidthQuery) AllX(ctx context.Context) []*GroupBandwidth
- func (gbq *GroupBandwidthQuery) Clone() *GroupBandwidthQuery
- func (gbq *GroupBandwidthQuery) Count(ctx context.Context) (int, error)
- func (gbq *GroupBandwidthQuery) CountX(ctx context.Context) int
- func (gbq *GroupBandwidthQuery) Exist(ctx context.Context) (bool, error)
- func (gbq *GroupBandwidthQuery) ExistX(ctx context.Context) bool
- func (gbq *GroupBandwidthQuery) First(ctx context.Context) (*GroupBandwidth, error)
- func (gbq *GroupBandwidthQuery) FirstID(ctx context.Context) (id int, err error)
- func (gbq *GroupBandwidthQuery) FirstIDX(ctx context.Context) int
- func (gbq *GroupBandwidthQuery) FirstX(ctx context.Context) *GroupBandwidth
- func (gbq *GroupBandwidthQuery) GroupBy(field string, fields ...string) *GroupBandwidthGroupBy
- func (gbq *GroupBandwidthQuery) IDs(ctx context.Context) ([]int, error)
- func (gbq *GroupBandwidthQuery) IDsX(ctx context.Context) []int
- func (gbq *GroupBandwidthQuery) Limit(limit int) *GroupBandwidthQuery
- func (gbq *GroupBandwidthQuery) Offset(offset int) *GroupBandwidthQuery
- func (gbq *GroupBandwidthQuery) Only(ctx context.Context) (*GroupBandwidth, error)
- func (gbq *GroupBandwidthQuery) OnlyID(ctx context.Context) (id int, err error)
- func (gbq *GroupBandwidthQuery) OnlyIDX(ctx context.Context) int
- func (gbq *GroupBandwidthQuery) OnlyX(ctx context.Context) *GroupBandwidth
- func (gbq *GroupBandwidthQuery) Order(o ...OrderFunc) *GroupBandwidthQuery
- func (gbq *GroupBandwidthQuery) QueryGroups() *GroupsQuery
- func (gbq *GroupBandwidthQuery) Select(fields ...string) *GroupBandwidthSelect
- func (gbq *GroupBandwidthQuery) Unique(unique bool) *GroupBandwidthQuery
- func (gbq *GroupBandwidthQuery) Where(ps ...predicate.GroupBandwidth) *GroupBandwidthQuery
- func (gbq *GroupBandwidthQuery) WithGroups(opts ...func(*GroupsQuery)) *GroupBandwidthQuery
- type GroupBandwidthSelect
- func (gbs *GroupBandwidthSelect) Bool(ctx context.Context) (_ bool, err error)
- func (gbs *GroupBandwidthSelect) BoolX(ctx context.Context) bool
- func (gbs *GroupBandwidthSelect) Bools(ctx context.Context) ([]bool, error)
- func (gbs *GroupBandwidthSelect) BoolsX(ctx context.Context) []bool
- func (gbs *GroupBandwidthSelect) Float64(ctx context.Context) (_ float64, err error)
- func (gbs *GroupBandwidthSelect) Float64X(ctx context.Context) float64
- func (gbs *GroupBandwidthSelect) Float64s(ctx context.Context) ([]float64, error)
- func (gbs *GroupBandwidthSelect) Float64sX(ctx context.Context) []float64
- func (gbs *GroupBandwidthSelect) Int(ctx context.Context) (_ int, err error)
- func (gbs *GroupBandwidthSelect) IntX(ctx context.Context) int
- func (gbs *GroupBandwidthSelect) Ints(ctx context.Context) ([]int, error)
- func (gbs *GroupBandwidthSelect) IntsX(ctx context.Context) []int
- func (gbs *GroupBandwidthSelect) Scan(ctx context.Context, v interface{}) error
- func (gbs *GroupBandwidthSelect) ScanX(ctx context.Context, v interface{})
- func (gbs *GroupBandwidthSelect) String(ctx context.Context) (_ string, err error)
- func (gbs *GroupBandwidthSelect) StringX(ctx context.Context) string
- func (gbs *GroupBandwidthSelect) Strings(ctx context.Context) ([]string, error)
- func (gbs *GroupBandwidthSelect) StringsX(ctx context.Context) []string
- type GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) AddGbwDownloadSpeed(i int) *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) AddGbwUploadSpeed(i int) *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) AddGroupIDs(ids ...int) *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) AddGroups(g ...*Groups) *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) ClearGbwCreatedAt() *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) ClearGroups() *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) Exec(ctx context.Context) error
- func (gbu *GroupBandwidthUpdate) ExecX(ctx context.Context)
- func (gbu *GroupBandwidthUpdate) Mutation() *GroupBandwidthMutation
- func (gbu *GroupBandwidthUpdate) RemoveGroupIDs(ids ...int) *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) RemoveGroups(g ...*Groups) *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) Save(ctx context.Context) (int, error)
- func (gbu *GroupBandwidthUpdate) SaveX(ctx context.Context) int
- func (gbu *GroupBandwidthUpdate) SetGbwCreatedAt(t time.Time) *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) SetGbwDownloadSpeed(i int) *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) SetGbwUploadSpeed(i int) *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) SetNillableGbwCreatedAt(t *time.Time) *GroupBandwidthUpdate
- func (gbu *GroupBandwidthUpdate) Where(ps ...predicate.GroupBandwidth) *GroupBandwidthUpdate
- type GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) AddGbwDownloadSpeed(i int) *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) AddGbwUploadSpeed(i int) *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) AddGroupIDs(ids ...int) *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) AddGroups(g ...*Groups) *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) ClearGbwCreatedAt() *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) ClearGroups() *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) Exec(ctx context.Context) error
- func (gbuo *GroupBandwidthUpdateOne) ExecX(ctx context.Context)
- func (gbuo *GroupBandwidthUpdateOne) Mutation() *GroupBandwidthMutation
- func (gbuo *GroupBandwidthUpdateOne) RemoveGroupIDs(ids ...int) *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) RemoveGroups(g ...*Groups) *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) Save(ctx context.Context) (*GroupBandwidth, error)
- func (gbuo *GroupBandwidthUpdateOne) SaveX(ctx context.Context) *GroupBandwidth
- func (gbuo *GroupBandwidthUpdateOne) Select(field string, fields ...string) *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) SetGbwCreatedAt(t time.Time) *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) SetGbwDownloadSpeed(i int) *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) SetGbwUploadSpeed(i int) *GroupBandwidthUpdateOne
- func (gbuo *GroupBandwidthUpdateOne) SetNillableGbwCreatedAt(t *time.Time) *GroupBandwidthUpdateOne
- type GroupBandwidths
- type Groups
- type GroupsClient
- func (c *GroupsClient) Create() *GroupsCreate
- func (c *GroupsClient) CreateBulk(builders ...*GroupsCreate) *GroupsCreateBulk
- func (c *GroupsClient) Delete() *GroupsDelete
- func (c *GroupsClient) DeleteOne(gr *Groups) *GroupsDeleteOne
- func (c *GroupsClient) DeleteOneID(id int) *GroupsDeleteOne
- func (c *GroupsClient) Get(ctx context.Context, id int) (*Groups, error)
- func (c *GroupsClient) GetX(ctx context.Context, id int) *Groups
- func (c *GroupsClient) Hooks() []Hook
- func (c *GroupsClient) Query() *GroupsQuery
- func (c *GroupsClient) QueryUseBandwidth(gr *Groups) *GroupBandwidthQuery
- func (c *GroupsClient) QueryUsers(gr *Groups) *UsersQuery
- func (c *GroupsClient) Update() *GroupsUpdate
- func (c *GroupsClient) UpdateOne(gr *Groups) *GroupsUpdateOne
- func (c *GroupsClient) UpdateOneID(id int) *GroupsUpdateOne
- func (c *GroupsClient) Use(hooks ...Hook)
- type GroupsCreate
- func (gc *GroupsCreate) AddUserIDs(ids ...int) *GroupsCreate
- func (gc *GroupsCreate) AddUsers(u ...*Users) *GroupsCreate
- func (gc *GroupsCreate) Exec(ctx context.Context) error
- func (gc *GroupsCreate) ExecX(ctx context.Context)
- func (gc *GroupsCreate) Mutation() *GroupsMutation
- func (gc *GroupsCreate) Save(ctx context.Context) (*Groups, error)
- func (gc *GroupsCreate) SaveX(ctx context.Context) *Groups
- func (gc *GroupsCreate) SetGCreatedAt(t time.Time) *GroupsCreate
- func (gc *GroupsCreate) SetGIsIntOrg(b bool) *GroupsCreate
- func (gc *GroupsCreate) SetGIsSuperAdmin(b bool) *GroupsCreate
- func (gc *GroupsCreate) SetGName(s string) *GroupsCreate
- func (gc *GroupsCreate) SetNillableGCreatedAt(t *time.Time) *GroupsCreate
- func (gc *GroupsCreate) SetNillableGIsIntOrg(b *bool) *GroupsCreate
- func (gc *GroupsCreate) SetNillableGIsSuperAdmin(b *bool) *GroupsCreate
- func (gc *GroupsCreate) SetNillableUseBandwidthID(id *int) *GroupsCreate
- func (gc *GroupsCreate) SetUseBandwidth(g *GroupBandwidth) *GroupsCreate
- func (gc *GroupsCreate) SetUseBandwidthID(id int) *GroupsCreate
- type GroupsCreateBulk
- type GroupsDelete
- type GroupsDeleteOne
- type GroupsEdges
- type GroupsGroupBy
- func (ggb *GroupsGroupBy) Aggregate(fns ...AggregateFunc) *GroupsGroupBy
- func (ggb *GroupsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ggb *GroupsGroupBy) BoolX(ctx context.Context) bool
- func (ggb *GroupsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ggb *GroupsGroupBy) BoolsX(ctx context.Context) []bool
- func (ggb *GroupsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ggb *GroupsGroupBy) Float64X(ctx context.Context) float64
- func (ggb *GroupsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ggb *GroupsGroupBy) Float64sX(ctx context.Context) []float64
- func (ggb *GroupsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ggb *GroupsGroupBy) IntX(ctx context.Context) int
- func (ggb *GroupsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ggb *GroupsGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GroupsGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ggb *GroupsGroupBy) ScanX(ctx context.Context, v interface{})
- func (ggb *GroupsGroupBy) String(ctx context.Context) (_ string, err error)
- func (ggb *GroupsGroupBy) StringX(ctx context.Context) string
- func (ggb *GroupsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ggb *GroupsGroupBy) StringsX(ctx context.Context) []string
- type GroupsMutation
- func (m *GroupsMutation) AddField(name string, value ent.Value) error
- func (m *GroupsMutation) AddUserIDs(ids ...int)
- func (m *GroupsMutation) AddedEdges() []string
- func (m *GroupsMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupsMutation) AddedFields() []string
- func (m *GroupsMutation) AddedIDs(name string) []ent.Value
- func (m *GroupsMutation) ClearEdge(name string) error
- func (m *GroupsMutation) ClearField(name string) error
- func (m *GroupsMutation) ClearGCreatedAt()
- func (m *GroupsMutation) ClearUseBandwidth()
- func (m *GroupsMutation) ClearUsers()
- func (m *GroupsMutation) ClearedEdges() []string
- func (m *GroupsMutation) ClearedFields() []string
- func (m GroupsMutation) Client() *Client
- func (m *GroupsMutation) EdgeCleared(name string) bool
- func (m *GroupsMutation) Field(name string) (ent.Value, bool)
- func (m *GroupsMutation) FieldCleared(name string) bool
- func (m *GroupsMutation) Fields() []string
- func (m *GroupsMutation) GCreatedAt() (r time.Time, exists bool)
- func (m *GroupsMutation) GCreatedAtCleared() bool
- func (m *GroupsMutation) GIsIntOrg() (r bool, exists bool)
- func (m *GroupsMutation) GIsSuperAdmin() (r bool, exists bool)
- func (m *GroupsMutation) GName() (r string, exists bool)
- func (m *GroupsMutation) ID() (id int, exists bool)
- func (m *GroupsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupsMutation) OldGCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GroupsMutation) OldGIsIntOrg(ctx context.Context) (v bool, err error)
- func (m *GroupsMutation) OldGIsSuperAdmin(ctx context.Context) (v bool, err error)
- func (m *GroupsMutation) OldGName(ctx context.Context) (v string, err error)
- func (m *GroupsMutation) Op() Op
- func (m *GroupsMutation) RemoveUserIDs(ids ...int)
- func (m *GroupsMutation) RemovedEdges() []string
- func (m *GroupsMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupsMutation) RemovedUsersIDs() (ids []int)
- func (m *GroupsMutation) ResetEdge(name string) error
- func (m *GroupsMutation) ResetField(name string) error
- func (m *GroupsMutation) ResetGCreatedAt()
- func (m *GroupsMutation) ResetGIsIntOrg()
- func (m *GroupsMutation) ResetGIsSuperAdmin()
- func (m *GroupsMutation) ResetGName()
- func (m *GroupsMutation) ResetUseBandwidth()
- func (m *GroupsMutation) ResetUsers()
- func (m *GroupsMutation) SetField(name string, value ent.Value) error
- func (m *GroupsMutation) SetGCreatedAt(t time.Time)
- func (m *GroupsMutation) SetGIsIntOrg(b bool)
- func (m *GroupsMutation) SetGIsSuperAdmin(b bool)
- func (m *GroupsMutation) SetGName(s string)
- func (m *GroupsMutation) SetUseBandwidthID(id int)
- func (m GroupsMutation) Tx() (*Tx, error)
- func (m *GroupsMutation) Type() string
- func (m *GroupsMutation) UseBandwidthCleared() bool
- func (m *GroupsMutation) UseBandwidthID() (id int, exists bool)
- func (m *GroupsMutation) UseBandwidthIDs() (ids []int)
- func (m *GroupsMutation) UsersCleared() bool
- func (m *GroupsMutation) UsersIDs() (ids []int)
- func (m *GroupsMutation) Where(ps ...predicate.Groups)
- type GroupsQuery
- func (gq *GroupsQuery) All(ctx context.Context) ([]*Groups, error)
- func (gq *GroupsQuery) AllX(ctx context.Context) []*Groups
- func (gq *GroupsQuery) Clone() *GroupsQuery
- func (gq *GroupsQuery) Count(ctx context.Context) (int, error)
- func (gq *GroupsQuery) CountX(ctx context.Context) int
- func (gq *GroupsQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GroupsQuery) ExistX(ctx context.Context) bool
- func (gq *GroupsQuery) First(ctx context.Context) (*Groups, error)
- func (gq *GroupsQuery) FirstID(ctx context.Context) (id int, err error)
- func (gq *GroupsQuery) FirstIDX(ctx context.Context) int
- func (gq *GroupsQuery) FirstX(ctx context.Context) *Groups
- func (gq *GroupsQuery) GroupBy(field string, fields ...string) *GroupsGroupBy
- func (gq *GroupsQuery) IDs(ctx context.Context) ([]int, error)
- func (gq *GroupsQuery) IDsX(ctx context.Context) []int
- func (gq *GroupsQuery) Limit(limit int) *GroupsQuery
- func (gq *GroupsQuery) Offset(offset int) *GroupsQuery
- func (gq *GroupsQuery) Only(ctx context.Context) (*Groups, error)
- func (gq *GroupsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (gq *GroupsQuery) OnlyIDX(ctx context.Context) int
- func (gq *GroupsQuery) OnlyX(ctx context.Context) *Groups
- func (gq *GroupsQuery) Order(o ...OrderFunc) *GroupsQuery
- func (gq *GroupsQuery) QueryUseBandwidth() *GroupBandwidthQuery
- func (gq *GroupsQuery) QueryUsers() *UsersQuery
- func (gq *GroupsQuery) Select(fields ...string) *GroupsSelect
- func (gq *GroupsQuery) Unique(unique bool) *GroupsQuery
- func (gq *GroupsQuery) Where(ps ...predicate.Groups) *GroupsQuery
- func (gq *GroupsQuery) WithUseBandwidth(opts ...func(*GroupBandwidthQuery)) *GroupsQuery
- func (gq *GroupsQuery) WithUsers(opts ...func(*UsersQuery)) *GroupsQuery
- type GroupsSelect
- func (gs *GroupsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (gs *GroupsSelect) BoolX(ctx context.Context) bool
- func (gs *GroupsSelect) Bools(ctx context.Context) ([]bool, error)
- func (gs *GroupsSelect) BoolsX(ctx context.Context) []bool
- func (gs *GroupsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (gs *GroupsSelect) Float64X(ctx context.Context) float64
- func (gs *GroupsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (gs *GroupsSelect) Float64sX(ctx context.Context) []float64
- func (gs *GroupsSelect) Int(ctx context.Context) (_ int, err error)
- func (gs *GroupsSelect) IntX(ctx context.Context) int
- func (gs *GroupsSelect) Ints(ctx context.Context) ([]int, error)
- func (gs *GroupsSelect) IntsX(ctx context.Context) []int
- func (gs *GroupsSelect) Scan(ctx context.Context, v interface{}) error
- func (gs *GroupsSelect) ScanX(ctx context.Context, v interface{})
- func (gs *GroupsSelect) String(ctx context.Context) (_ string, err error)
- func (gs *GroupsSelect) StringX(ctx context.Context) string
- func (gs *GroupsSelect) Strings(ctx context.Context) ([]string, error)
- func (gs *GroupsSelect) StringsX(ctx context.Context) []string
- type GroupsSlice
- type GroupsUpdate
- func (gu *GroupsUpdate) AddUserIDs(ids ...int) *GroupsUpdate
- func (gu *GroupsUpdate) AddUsers(u ...*Users) *GroupsUpdate
- func (gu *GroupsUpdate) ClearGCreatedAt() *GroupsUpdate
- func (gu *GroupsUpdate) ClearUseBandwidth() *GroupsUpdate
- func (gu *GroupsUpdate) ClearUsers() *GroupsUpdate
- func (gu *GroupsUpdate) Exec(ctx context.Context) error
- func (gu *GroupsUpdate) ExecX(ctx context.Context)
- func (gu *GroupsUpdate) Mutation() *GroupsMutation
- func (gu *GroupsUpdate) RemoveUserIDs(ids ...int) *GroupsUpdate
- func (gu *GroupsUpdate) RemoveUsers(u ...*Users) *GroupsUpdate
- func (gu *GroupsUpdate) Save(ctx context.Context) (int, error)
- func (gu *GroupsUpdate) SaveX(ctx context.Context) int
- func (gu *GroupsUpdate) SetGCreatedAt(t time.Time) *GroupsUpdate
- func (gu *GroupsUpdate) SetGIsIntOrg(b bool) *GroupsUpdate
- func (gu *GroupsUpdate) SetGIsSuperAdmin(b bool) *GroupsUpdate
- func (gu *GroupsUpdate) SetGName(s string) *GroupsUpdate
- func (gu *GroupsUpdate) SetNillableGCreatedAt(t *time.Time) *GroupsUpdate
- func (gu *GroupsUpdate) SetNillableGIsIntOrg(b *bool) *GroupsUpdate
- func (gu *GroupsUpdate) SetNillableGIsSuperAdmin(b *bool) *GroupsUpdate
- func (gu *GroupsUpdate) SetNillableUseBandwidthID(id *int) *GroupsUpdate
- func (gu *GroupsUpdate) SetUseBandwidth(g *GroupBandwidth) *GroupsUpdate
- func (gu *GroupsUpdate) SetUseBandwidthID(id int) *GroupsUpdate
- func (gu *GroupsUpdate) Where(ps ...predicate.Groups) *GroupsUpdate
- type GroupsUpdateOne
- func (guo *GroupsUpdateOne) AddUserIDs(ids ...int) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) AddUsers(u ...*Users) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) ClearGCreatedAt() *GroupsUpdateOne
- func (guo *GroupsUpdateOne) ClearUseBandwidth() *GroupsUpdateOne
- func (guo *GroupsUpdateOne) ClearUsers() *GroupsUpdateOne
- func (guo *GroupsUpdateOne) Exec(ctx context.Context) error
- func (guo *GroupsUpdateOne) ExecX(ctx context.Context)
- func (guo *GroupsUpdateOne) Mutation() *GroupsMutation
- func (guo *GroupsUpdateOne) RemoveUserIDs(ids ...int) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) RemoveUsers(u ...*Users) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) Save(ctx context.Context) (*Groups, error)
- func (guo *GroupsUpdateOne) SaveX(ctx context.Context) *Groups
- func (guo *GroupsUpdateOne) Select(field string, fields ...string) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) SetGCreatedAt(t time.Time) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) SetGIsIntOrg(b bool) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) SetGIsSuperAdmin(b bool) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) SetGName(s string) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) SetNillableGCreatedAt(t *time.Time) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) SetNillableGIsIntOrg(b *bool) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) SetNillableGIsSuperAdmin(b *bool) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) SetNillableUseBandwidthID(id *int) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) SetUseBandwidth(g *GroupBandwidth) *GroupsUpdateOne
- func (guo *GroupsUpdateOne) SetUseBandwidthID(id int) *GroupsUpdateOne
- type Hook
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type OnlineSession
- type OnlineSessionClient
- func (c *OnlineSessionClient) Create() *OnlineSessionCreate
- func (c *OnlineSessionClient) CreateBulk(builders ...*OnlineSessionCreate) *OnlineSessionCreateBulk
- func (c *OnlineSessionClient) Delete() *OnlineSessionDelete
- func (c *OnlineSessionClient) DeleteOne(os *OnlineSession) *OnlineSessionDeleteOne
- func (c *OnlineSessionClient) DeleteOneID(id int) *OnlineSessionDeleteOne
- func (c *OnlineSessionClient) Get(ctx context.Context, id int) (*OnlineSession, error)
- func (c *OnlineSessionClient) GetX(ctx context.Context, id int) *OnlineSession
- func (c *OnlineSessionClient) Hooks() []Hook
- func (c *OnlineSessionClient) Query() *OnlineSessionQuery
- func (c *OnlineSessionClient) Update() *OnlineSessionUpdate
- func (c *OnlineSessionClient) UpdateOne(os *OnlineSession) *OnlineSessionUpdateOne
- func (c *OnlineSessionClient) UpdateOneID(id int) *OnlineSessionUpdateOne
- func (c *OnlineSessionClient) Use(hooks ...Hook)
- type OnlineSessionCreate
- func (osc *OnlineSessionCreate) Exec(ctx context.Context) error
- func (osc *OnlineSessionCreate) ExecX(ctx context.Context)
- func (osc *OnlineSessionCreate) Mutation() *OnlineSessionMutation
- func (osc *OnlineSessionCreate) Save(ctx context.Context) (*OnlineSession, error)
- func (osc *OnlineSessionCreate) SaveX(ctx context.Context) *OnlineSession
- func (osc *OnlineSessionCreate) SetIPAddress(s string) *OnlineSessionCreate
- func (osc *OnlineSessionCreate) SetUPid(s string) *OnlineSessionCreate
- type OnlineSessionCreateBulk
- func (oscb *OnlineSessionCreateBulk) Exec(ctx context.Context) error
- func (oscb *OnlineSessionCreateBulk) ExecX(ctx context.Context)
- func (oscb *OnlineSessionCreateBulk) Save(ctx context.Context) ([]*OnlineSession, error)
- func (oscb *OnlineSessionCreateBulk) SaveX(ctx context.Context) []*OnlineSession
- type OnlineSessionDelete
- type OnlineSessionDeleteOne
- type OnlineSessionGroupBy
- func (osgb *OnlineSessionGroupBy) Aggregate(fns ...AggregateFunc) *OnlineSessionGroupBy
- func (osgb *OnlineSessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (osgb *OnlineSessionGroupBy) BoolX(ctx context.Context) bool
- func (osgb *OnlineSessionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (osgb *OnlineSessionGroupBy) BoolsX(ctx context.Context) []bool
- func (osgb *OnlineSessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (osgb *OnlineSessionGroupBy) Float64X(ctx context.Context) float64
- func (osgb *OnlineSessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (osgb *OnlineSessionGroupBy) Float64sX(ctx context.Context) []float64
- func (osgb *OnlineSessionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (osgb *OnlineSessionGroupBy) IntX(ctx context.Context) int
- func (osgb *OnlineSessionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (osgb *OnlineSessionGroupBy) IntsX(ctx context.Context) []int
- func (osgb *OnlineSessionGroupBy) Scan(ctx context.Context, v interface{}) error
- func (osgb *OnlineSessionGroupBy) ScanX(ctx context.Context, v interface{})
- func (osgb *OnlineSessionGroupBy) String(ctx context.Context) (_ string, err error)
- func (osgb *OnlineSessionGroupBy) StringX(ctx context.Context) string
- func (osgb *OnlineSessionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (osgb *OnlineSessionGroupBy) StringsX(ctx context.Context) []string
- type OnlineSessionMutation
- func (m *OnlineSessionMutation) AddField(name string, value ent.Value) error
- func (m *OnlineSessionMutation) AddedEdges() []string
- func (m *OnlineSessionMutation) AddedField(name string) (ent.Value, bool)
- func (m *OnlineSessionMutation) AddedFields() []string
- func (m *OnlineSessionMutation) AddedIDs(name string) []ent.Value
- func (m *OnlineSessionMutation) ClearEdge(name string) error
- func (m *OnlineSessionMutation) ClearField(name string) error
- func (m *OnlineSessionMutation) ClearedEdges() []string
- func (m *OnlineSessionMutation) ClearedFields() []string
- func (m OnlineSessionMutation) Client() *Client
- func (m *OnlineSessionMutation) EdgeCleared(name string) bool
- func (m *OnlineSessionMutation) Field(name string) (ent.Value, bool)
- func (m *OnlineSessionMutation) FieldCleared(name string) bool
- func (m *OnlineSessionMutation) Fields() []string
- func (m *OnlineSessionMutation) ID() (id int, exists bool)
- func (m *OnlineSessionMutation) IPAddress() (r string, exists bool)
- func (m *OnlineSessionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *OnlineSessionMutation) OldIPAddress(ctx context.Context) (v string, err error)
- func (m *OnlineSessionMutation) OldUPid(ctx context.Context) (v string, err error)
- func (m *OnlineSessionMutation) Op() Op
- func (m *OnlineSessionMutation) RemovedEdges() []string
- func (m *OnlineSessionMutation) RemovedIDs(name string) []ent.Value
- func (m *OnlineSessionMutation) ResetEdge(name string) error
- func (m *OnlineSessionMutation) ResetField(name string) error
- func (m *OnlineSessionMutation) ResetIPAddress()
- func (m *OnlineSessionMutation) ResetUPid()
- func (m *OnlineSessionMutation) SetField(name string, value ent.Value) error
- func (m *OnlineSessionMutation) SetIPAddress(s string)
- func (m *OnlineSessionMutation) SetUPid(s string)
- func (m OnlineSessionMutation) Tx() (*Tx, error)
- func (m *OnlineSessionMutation) Type() string
- func (m *OnlineSessionMutation) UPid() (r string, exists bool)
- func (m *OnlineSessionMutation) Where(ps ...predicate.OnlineSession)
- type OnlineSessionQuery
- func (osq *OnlineSessionQuery) All(ctx context.Context) ([]*OnlineSession, error)
- func (osq *OnlineSessionQuery) AllX(ctx context.Context) []*OnlineSession
- func (osq *OnlineSessionQuery) Clone() *OnlineSessionQuery
- func (osq *OnlineSessionQuery) Count(ctx context.Context) (int, error)
- func (osq *OnlineSessionQuery) CountX(ctx context.Context) int
- func (osq *OnlineSessionQuery) Exist(ctx context.Context) (bool, error)
- func (osq *OnlineSessionQuery) ExistX(ctx context.Context) bool
- func (osq *OnlineSessionQuery) First(ctx context.Context) (*OnlineSession, error)
- func (osq *OnlineSessionQuery) FirstID(ctx context.Context) (id int, err error)
- func (osq *OnlineSessionQuery) FirstIDX(ctx context.Context) int
- func (osq *OnlineSessionQuery) FirstX(ctx context.Context) *OnlineSession
- func (osq *OnlineSessionQuery) GroupBy(field string, fields ...string) *OnlineSessionGroupBy
- func (osq *OnlineSessionQuery) IDs(ctx context.Context) ([]int, error)
- func (osq *OnlineSessionQuery) IDsX(ctx context.Context) []int
- func (osq *OnlineSessionQuery) Limit(limit int) *OnlineSessionQuery
- func (osq *OnlineSessionQuery) Offset(offset int) *OnlineSessionQuery
- func (osq *OnlineSessionQuery) Only(ctx context.Context) (*OnlineSession, error)
- func (osq *OnlineSessionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (osq *OnlineSessionQuery) OnlyIDX(ctx context.Context) int
- func (osq *OnlineSessionQuery) OnlyX(ctx context.Context) *OnlineSession
- func (osq *OnlineSessionQuery) Order(o ...OrderFunc) *OnlineSessionQuery
- func (osq *OnlineSessionQuery) Select(fields ...string) *OnlineSessionSelect
- func (osq *OnlineSessionQuery) Unique(unique bool) *OnlineSessionQuery
- func (osq *OnlineSessionQuery) Where(ps ...predicate.OnlineSession) *OnlineSessionQuery
- type OnlineSessionSelect
- func (oss *OnlineSessionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (oss *OnlineSessionSelect) BoolX(ctx context.Context) bool
- func (oss *OnlineSessionSelect) Bools(ctx context.Context) ([]bool, error)
- func (oss *OnlineSessionSelect) BoolsX(ctx context.Context) []bool
- func (oss *OnlineSessionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (oss *OnlineSessionSelect) Float64X(ctx context.Context) float64
- func (oss *OnlineSessionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (oss *OnlineSessionSelect) Float64sX(ctx context.Context) []float64
- func (oss *OnlineSessionSelect) Int(ctx context.Context) (_ int, err error)
- func (oss *OnlineSessionSelect) IntX(ctx context.Context) int
- func (oss *OnlineSessionSelect) Ints(ctx context.Context) ([]int, error)
- func (oss *OnlineSessionSelect) IntsX(ctx context.Context) []int
- func (oss *OnlineSessionSelect) Scan(ctx context.Context, v interface{}) error
- func (oss *OnlineSessionSelect) ScanX(ctx context.Context, v interface{})
- func (oss *OnlineSessionSelect) String(ctx context.Context) (_ string, err error)
- func (oss *OnlineSessionSelect) StringX(ctx context.Context) string
- func (oss *OnlineSessionSelect) Strings(ctx context.Context) ([]string, error)
- func (oss *OnlineSessionSelect) StringsX(ctx context.Context) []string
- type OnlineSessionUpdate
- func (osu *OnlineSessionUpdate) Exec(ctx context.Context) error
- func (osu *OnlineSessionUpdate) ExecX(ctx context.Context)
- func (osu *OnlineSessionUpdate) Mutation() *OnlineSessionMutation
- func (osu *OnlineSessionUpdate) Save(ctx context.Context) (int, error)
- func (osu *OnlineSessionUpdate) SaveX(ctx context.Context) int
- func (osu *OnlineSessionUpdate) SetIPAddress(s string) *OnlineSessionUpdate
- func (osu *OnlineSessionUpdate) SetUPid(s string) *OnlineSessionUpdate
- func (osu *OnlineSessionUpdate) Where(ps ...predicate.OnlineSession) *OnlineSessionUpdate
- type OnlineSessionUpdateOne
- func (osuo *OnlineSessionUpdateOne) Exec(ctx context.Context) error
- func (osuo *OnlineSessionUpdateOne) ExecX(ctx context.Context)
- func (osuo *OnlineSessionUpdateOne) Mutation() *OnlineSessionMutation
- func (osuo *OnlineSessionUpdateOne) Save(ctx context.Context) (*OnlineSession, error)
- func (osuo *OnlineSessionUpdateOne) SaveX(ctx context.Context) *OnlineSession
- func (osuo *OnlineSessionUpdateOne) Select(field string, fields ...string) *OnlineSessionUpdateOne
- func (osuo *OnlineSessionUpdateOne) SetIPAddress(s string) *OnlineSessionUpdateOne
- func (osuo *OnlineSessionUpdateOne) SetUPid(s string) *OnlineSessionUpdateOne
- type OnlineSessions
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tx
- type Users
- type UsersClient
- func (c *UsersClient) Create() *UsersCreate
- func (c *UsersClient) CreateBulk(builders ...*UsersCreate) *UsersCreateBulk
- func (c *UsersClient) Delete() *UsersDelete
- func (c *UsersClient) DeleteOne(u *Users) *UsersDeleteOne
- func (c *UsersClient) DeleteOneID(id int) *UsersDeleteOne
- func (c *UsersClient) Get(ctx context.Context, id int) (*Users, error)
- func (c *UsersClient) GetX(ctx context.Context, id int) *Users
- func (c *UsersClient) Hooks() []Hook
- func (c *UsersClient) Query() *UsersQuery
- func (c *UsersClient) QueryInGroup(u *Users) *GroupsQuery
- func (c *UsersClient) Update() *UsersUpdate
- func (c *UsersClient) UpdateOne(u *Users) *UsersUpdateOne
- func (c *UsersClient) UpdateOneID(id int) *UsersUpdateOne
- func (c *UsersClient) Use(hooks ...Hook)
- type UsersCreate
- func (uc *UsersCreate) Exec(ctx context.Context) error
- func (uc *UsersCreate) ExecX(ctx context.Context)
- func (uc *UsersCreate) Mutation() *UsersMutation
- func (uc *UsersCreate) Save(ctx context.Context) (*Users, error)
- func (uc *UsersCreate) SaveX(ctx context.Context) *Users
- func (uc *UsersCreate) SetInGroup(g *Groups) *UsersCreate
- func (uc *UsersCreate) SetInGroupID(id int) *UsersCreate
- func (uc *UsersCreate) SetNillableInGroupID(id *int) *UsersCreate
- func (uc *UsersCreate) SetNillableUCreatedAt(t *time.Time) *UsersCreate
- func (uc *UsersCreate) SetNillableUExpiredAt(t *time.Time) *UsersCreate
- func (uc *UsersCreate) SetNillableUIsActive(b *bool) *UsersCreate
- func (uc *UsersCreate) SetNillableUPasswordUpdatedAt(t *time.Time) *UsersCreate
- func (uc *UsersCreate) SetUCreatedAt(t time.Time) *UsersCreate
- func (uc *UsersCreate) SetUExpiredAt(t time.Time) *UsersCreate
- func (uc *UsersCreate) SetUFirstName(s string) *UsersCreate
- func (uc *UsersCreate) SetUIsActive(b bool) *UsersCreate
- func (uc *UsersCreate) SetULastName(s string) *UsersCreate
- func (uc *UsersCreate) SetUOrgid(s string) *UsersCreate
- func (uc *UsersCreate) SetUPasswordUpdatedAt(t time.Time) *UsersCreate
- func (uc *UsersCreate) SetUPid(s string) *UsersCreate
- type UsersCreateBulk
- type UsersDelete
- type UsersDeleteOne
- type UsersEdges
- type UsersGroupBy
- func (ugb *UsersGroupBy) Aggregate(fns ...AggregateFunc) *UsersGroupBy
- func (ugb *UsersGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (ugb *UsersGroupBy) BoolX(ctx context.Context) bool
- func (ugb *UsersGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (ugb *UsersGroupBy) BoolsX(ctx context.Context) []bool
- func (ugb *UsersGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (ugb *UsersGroupBy) Float64X(ctx context.Context) float64
- func (ugb *UsersGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (ugb *UsersGroupBy) Float64sX(ctx context.Context) []float64
- func (ugb *UsersGroupBy) Int(ctx context.Context) (_ int, err error)
- func (ugb *UsersGroupBy) IntX(ctx context.Context) int
- func (ugb *UsersGroupBy) Ints(ctx context.Context) ([]int, error)
- func (ugb *UsersGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UsersGroupBy) Scan(ctx context.Context, v interface{}) error
- func (ugb *UsersGroupBy) ScanX(ctx context.Context, v interface{})
- func (ugb *UsersGroupBy) String(ctx context.Context) (_ string, err error)
- func (ugb *UsersGroupBy) StringX(ctx context.Context) string
- func (ugb *UsersGroupBy) Strings(ctx context.Context) ([]string, error)
- func (ugb *UsersGroupBy) StringsX(ctx context.Context) []string
- type UsersMutation
- func (m *UsersMutation) AddField(name string, value ent.Value) error
- func (m *UsersMutation) AddedEdges() []string
- func (m *UsersMutation) AddedField(name string) (ent.Value, bool)
- func (m *UsersMutation) AddedFields() []string
- func (m *UsersMutation) AddedIDs(name string) []ent.Value
- func (m *UsersMutation) ClearEdge(name string) error
- func (m *UsersMutation) ClearField(name string) error
- func (m *UsersMutation) ClearInGroup()
- func (m *UsersMutation) ClearUCreatedAt()
- func (m *UsersMutation) ClearUExpiredAt()
- func (m *UsersMutation) ClearUPasswordUpdatedAt()
- func (m *UsersMutation) ClearedEdges() []string
- func (m *UsersMutation) ClearedFields() []string
- func (m UsersMutation) Client() *Client
- func (m *UsersMutation) EdgeCleared(name string) bool
- func (m *UsersMutation) Field(name string) (ent.Value, bool)
- func (m *UsersMutation) FieldCleared(name string) bool
- func (m *UsersMutation) Fields() []string
- func (m *UsersMutation) ID() (id int, exists bool)
- func (m *UsersMutation) InGroupCleared() bool
- func (m *UsersMutation) InGroupID() (id int, exists bool)
- func (m *UsersMutation) InGroupIDs() (ids []int)
- func (m *UsersMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UsersMutation) OldUCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UsersMutation) OldUExpiredAt(ctx context.Context) (v time.Time, err error)
- func (m *UsersMutation) OldUFirstName(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldUIsActive(ctx context.Context) (v bool, err error)
- func (m *UsersMutation) OldULastName(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldUOrgid(ctx context.Context) (v string, err error)
- func (m *UsersMutation) OldUPasswordUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UsersMutation) OldUPid(ctx context.Context) (v string, err error)
- func (m *UsersMutation) Op() Op
- func (m *UsersMutation) RemovedEdges() []string
- func (m *UsersMutation) RemovedIDs(name string) []ent.Value
- func (m *UsersMutation) ResetEdge(name string) error
- func (m *UsersMutation) ResetField(name string) error
- func (m *UsersMutation) ResetInGroup()
- func (m *UsersMutation) ResetUCreatedAt()
- func (m *UsersMutation) ResetUExpiredAt()
- func (m *UsersMutation) ResetUFirstName()
- func (m *UsersMutation) ResetUIsActive()
- func (m *UsersMutation) ResetULastName()
- func (m *UsersMutation) ResetUOrgid()
- func (m *UsersMutation) ResetUPasswordUpdatedAt()
- func (m *UsersMutation) ResetUPid()
- func (m *UsersMutation) SetField(name string, value ent.Value) error
- func (m *UsersMutation) SetInGroupID(id int)
- func (m *UsersMutation) SetUCreatedAt(t time.Time)
- func (m *UsersMutation) SetUExpiredAt(t time.Time)
- func (m *UsersMutation) SetUFirstName(s string)
- func (m *UsersMutation) SetUIsActive(b bool)
- func (m *UsersMutation) SetULastName(s string)
- func (m *UsersMutation) SetUOrgid(s string)
- func (m *UsersMutation) SetUPasswordUpdatedAt(t time.Time)
- func (m *UsersMutation) SetUPid(s string)
- func (m UsersMutation) Tx() (*Tx, error)
- func (m *UsersMutation) Type() string
- func (m *UsersMutation) UCreatedAt() (r time.Time, exists bool)
- func (m *UsersMutation) UCreatedAtCleared() bool
- func (m *UsersMutation) UExpiredAt() (r time.Time, exists bool)
- func (m *UsersMutation) UExpiredAtCleared() bool
- func (m *UsersMutation) UFirstName() (r string, exists bool)
- func (m *UsersMutation) UIsActive() (r bool, exists bool)
- func (m *UsersMutation) ULastName() (r string, exists bool)
- func (m *UsersMutation) UOrgid() (r string, exists bool)
- func (m *UsersMutation) UPasswordUpdatedAt() (r time.Time, exists bool)
- func (m *UsersMutation) UPasswordUpdatedAtCleared() bool
- func (m *UsersMutation) UPid() (r string, exists bool)
- func (m *UsersMutation) Where(ps ...predicate.Users)
- type UsersQuery
- func (uq *UsersQuery) All(ctx context.Context) ([]*Users, error)
- func (uq *UsersQuery) AllX(ctx context.Context) []*Users
- func (uq *UsersQuery) Clone() *UsersQuery
- func (uq *UsersQuery) Count(ctx context.Context) (int, error)
- func (uq *UsersQuery) CountX(ctx context.Context) int
- func (uq *UsersQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UsersQuery) ExistX(ctx context.Context) bool
- func (uq *UsersQuery) First(ctx context.Context) (*Users, error)
- func (uq *UsersQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UsersQuery) FirstIDX(ctx context.Context) int
- func (uq *UsersQuery) FirstX(ctx context.Context) *Users
- func (uq *UsersQuery) GroupBy(field string, fields ...string) *UsersGroupBy
- func (uq *UsersQuery) IDs(ctx context.Context) ([]int, error)
- func (uq *UsersQuery) IDsX(ctx context.Context) []int
- func (uq *UsersQuery) Limit(limit int) *UsersQuery
- func (uq *UsersQuery) Offset(offset int) *UsersQuery
- func (uq *UsersQuery) Only(ctx context.Context) (*Users, error)
- func (uq *UsersQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UsersQuery) OnlyIDX(ctx context.Context) int
- func (uq *UsersQuery) OnlyX(ctx context.Context) *Users
- func (uq *UsersQuery) Order(o ...OrderFunc) *UsersQuery
- func (uq *UsersQuery) QueryInGroup() *GroupsQuery
- func (uq *UsersQuery) Select(fields ...string) *UsersSelect
- func (uq *UsersQuery) Unique(unique bool) *UsersQuery
- func (uq *UsersQuery) Where(ps ...predicate.Users) *UsersQuery
- func (uq *UsersQuery) WithInGroup(opts ...func(*GroupsQuery)) *UsersQuery
- type UsersSelect
- func (us *UsersSelect) Bool(ctx context.Context) (_ bool, err error)
- func (us *UsersSelect) BoolX(ctx context.Context) bool
- func (us *UsersSelect) Bools(ctx context.Context) ([]bool, error)
- func (us *UsersSelect) BoolsX(ctx context.Context) []bool
- func (us *UsersSelect) Float64(ctx context.Context) (_ float64, err error)
- func (us *UsersSelect) Float64X(ctx context.Context) float64
- func (us *UsersSelect) Float64s(ctx context.Context) ([]float64, error)
- func (us *UsersSelect) Float64sX(ctx context.Context) []float64
- func (us *UsersSelect) Int(ctx context.Context) (_ int, err error)
- func (us *UsersSelect) IntX(ctx context.Context) int
- func (us *UsersSelect) Ints(ctx context.Context) ([]int, error)
- func (us *UsersSelect) IntsX(ctx context.Context) []int
- func (us *UsersSelect) Scan(ctx context.Context, v interface{}) error
- func (us *UsersSelect) ScanX(ctx context.Context, v interface{})
- func (us *UsersSelect) String(ctx context.Context) (_ string, err error)
- func (us *UsersSelect) StringX(ctx context.Context) string
- func (us *UsersSelect) Strings(ctx context.Context) ([]string, error)
- func (us *UsersSelect) StringsX(ctx context.Context) []string
- type UsersSlice
- type UsersUpdate
- func (uu *UsersUpdate) ClearInGroup() *UsersUpdate
- func (uu *UsersUpdate) ClearUExpiredAt() *UsersUpdate
- func (uu *UsersUpdate) ClearUPasswordUpdatedAt() *UsersUpdate
- func (uu *UsersUpdate) Exec(ctx context.Context) error
- func (uu *UsersUpdate) ExecX(ctx context.Context)
- func (uu *UsersUpdate) Mutation() *UsersMutation
- func (uu *UsersUpdate) Save(ctx context.Context) (int, error)
- func (uu *UsersUpdate) SaveX(ctx context.Context) int
- func (uu *UsersUpdate) SetInGroup(g *Groups) *UsersUpdate
- func (uu *UsersUpdate) SetInGroupID(id int) *UsersUpdate
- func (uu *UsersUpdate) SetNillableInGroupID(id *int) *UsersUpdate
- func (uu *UsersUpdate) SetNillableUExpiredAt(t *time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetNillableUIsActive(b *bool) *UsersUpdate
- func (uu *UsersUpdate) SetNillableUPasswordUpdatedAt(t *time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetUExpiredAt(t time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetUFirstName(s string) *UsersUpdate
- func (uu *UsersUpdate) SetUIsActive(b bool) *UsersUpdate
- func (uu *UsersUpdate) SetULastName(s string) *UsersUpdate
- func (uu *UsersUpdate) SetUOrgid(s string) *UsersUpdate
- func (uu *UsersUpdate) SetUPasswordUpdatedAt(t time.Time) *UsersUpdate
- func (uu *UsersUpdate) SetUPid(s string) *UsersUpdate
- func (uu *UsersUpdate) Where(ps ...predicate.Users) *UsersUpdate
- type UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearInGroup() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearUExpiredAt() *UsersUpdateOne
- func (uuo *UsersUpdateOne) ClearUPasswordUpdatedAt() *UsersUpdateOne
- func (uuo *UsersUpdateOne) Exec(ctx context.Context) error
- func (uuo *UsersUpdateOne) ExecX(ctx context.Context)
- func (uuo *UsersUpdateOne) Mutation() *UsersMutation
- func (uuo *UsersUpdateOne) Save(ctx context.Context) (*Users, error)
- func (uuo *UsersUpdateOne) SaveX(ctx context.Context) *Users
- func (uuo *UsersUpdateOne) Select(field string, fields ...string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetInGroup(g *Groups) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetInGroupID(id int) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableInGroupID(id *int) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableUExpiredAt(t *time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableUIsActive(b *bool) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetNillableUPasswordUpdatedAt(t *time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUExpiredAt(t time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUFirstName(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUIsActive(b bool) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetULastName(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUOrgid(s string) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUPasswordUpdatedAt(t time.Time) *UsersUpdateOne
- func (uuo *UsersUpdateOne) SetUPid(s string) *UsersUpdateOne
- 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. TypeGroupBandwidth = "GroupBandwidth" TypeGroups = "Groups" TypeOnlineSession = "OnlineSession" TypeUsers = "Users" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // GroupBandwidth is the client for interacting with the GroupBandwidth builders. GroupBandwidth *GroupBandwidthClient // Groups is the client for interacting with the Groups builders. Groups *GroupsClient // OnlineSession is the client for interacting with the OnlineSession builders. OnlineSession *OnlineSessionClient // Users is the client for interacting with the Users builders. Users *UsersClient // 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(). GroupBandwidth. Query(). Count(ctx)
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(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 GroupBandwidth ¶
type GroupBandwidth struct { // ID of the ent. ID int `json:"id,omitempty"` // GbwDownloadSpeed holds the value of the "gbw_download_speed" field. GbwDownloadSpeed int `json:"gbw_download_speed,omitempty"` // GbwUploadSpeed holds the value of the "gbw_upload_speed" field. GbwUploadSpeed int `json:"gbw_upload_speed,omitempty"` // GbwCreatedAt holds the value of the "gbw_created_at" field. GbwCreatedAt time.Time `json:"gbw_created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupBandwidthQuery when eager-loading is set. Edges GroupBandwidthEdges `json:"edges"` // contains filtered or unexported fields }
GroupBandwidth is the model entity for the GroupBandwidth schema.
func (*GroupBandwidth) QueryGroups ¶
func (gb *GroupBandwidth) QueryGroups() *GroupsQuery
QueryGroups queries the "groups" edge of the GroupBandwidth entity.
func (*GroupBandwidth) String ¶
func (gb *GroupBandwidth) String() string
String implements the fmt.Stringer.
func (*GroupBandwidth) Unwrap ¶
func (gb *GroupBandwidth) Unwrap() *GroupBandwidth
Unwrap unwraps the GroupBandwidth 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 (*GroupBandwidth) Update ¶
func (gb *GroupBandwidth) Update() *GroupBandwidthUpdateOne
Update returns a builder for updating this GroupBandwidth. Note that you need to call GroupBandwidth.Unwrap() before calling this method if this GroupBandwidth was returned from a transaction, and the transaction was committed or rolled back.
type GroupBandwidthClient ¶
type GroupBandwidthClient struct {
// contains filtered or unexported fields
}
GroupBandwidthClient is a client for the GroupBandwidth schema.
func NewGroupBandwidthClient ¶
func NewGroupBandwidthClient(c config) *GroupBandwidthClient
NewGroupBandwidthClient returns a client for the GroupBandwidth from the given config.
func (*GroupBandwidthClient) Create ¶
func (c *GroupBandwidthClient) Create() *GroupBandwidthCreate
Create returns a create builder for GroupBandwidth.
func (*GroupBandwidthClient) CreateBulk ¶
func (c *GroupBandwidthClient) CreateBulk(builders ...*GroupBandwidthCreate) *GroupBandwidthCreateBulk
CreateBulk returns a builder for creating a bulk of GroupBandwidth entities.
func (*GroupBandwidthClient) Delete ¶
func (c *GroupBandwidthClient) Delete() *GroupBandwidthDelete
Delete returns a delete builder for GroupBandwidth.
func (*GroupBandwidthClient) DeleteOne ¶
func (c *GroupBandwidthClient) DeleteOne(gb *GroupBandwidth) *GroupBandwidthDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*GroupBandwidthClient) DeleteOneID ¶
func (c *GroupBandwidthClient) DeleteOneID(id int) *GroupBandwidthDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*GroupBandwidthClient) Get ¶
func (c *GroupBandwidthClient) Get(ctx context.Context, id int) (*GroupBandwidth, error)
Get returns a GroupBandwidth entity by its id.
func (*GroupBandwidthClient) GetX ¶
func (c *GroupBandwidthClient) GetX(ctx context.Context, id int) *GroupBandwidth
GetX is like Get, but panics if an error occurs.
func (*GroupBandwidthClient) Hooks ¶
func (c *GroupBandwidthClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroupBandwidthClient) Query ¶
func (c *GroupBandwidthClient) Query() *GroupBandwidthQuery
Query returns a query builder for GroupBandwidth.
func (*GroupBandwidthClient) QueryGroups ¶
func (c *GroupBandwidthClient) QueryGroups(gb *GroupBandwidth) *GroupsQuery
QueryGroups queries the groups edge of a GroupBandwidth.
func (*GroupBandwidthClient) Update ¶
func (c *GroupBandwidthClient) Update() *GroupBandwidthUpdate
Update returns an update builder for GroupBandwidth.
func (*GroupBandwidthClient) UpdateOne ¶
func (c *GroupBandwidthClient) UpdateOne(gb *GroupBandwidth) *GroupBandwidthUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupBandwidthClient) UpdateOneID ¶
func (c *GroupBandwidthClient) UpdateOneID(id int) *GroupBandwidthUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupBandwidthClient) Use ¶
func (c *GroupBandwidthClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `groupbandwidth.Hooks(f(g(h())))`.
type GroupBandwidthCreate ¶
type GroupBandwidthCreate struct {
// contains filtered or unexported fields
}
GroupBandwidthCreate is the builder for creating a GroupBandwidth entity.
func (*GroupBandwidthCreate) AddGroupIDs ¶
func (gbc *GroupBandwidthCreate) AddGroupIDs(ids ...int) *GroupBandwidthCreate
AddGroupIDs adds the "groups" edge to the Groups entity by IDs.
func (*GroupBandwidthCreate) AddGroups ¶
func (gbc *GroupBandwidthCreate) AddGroups(g ...*Groups) *GroupBandwidthCreate
AddGroups adds the "groups" edges to the Groups entity.
func (*GroupBandwidthCreate) Exec ¶
func (gbc *GroupBandwidthCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupBandwidthCreate) ExecX ¶
func (gbc *GroupBandwidthCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupBandwidthCreate) Mutation ¶
func (gbc *GroupBandwidthCreate) Mutation() *GroupBandwidthMutation
Mutation returns the GroupBandwidthMutation object of the builder.
func (*GroupBandwidthCreate) Save ¶
func (gbc *GroupBandwidthCreate) Save(ctx context.Context) (*GroupBandwidth, error)
Save creates the GroupBandwidth in the database.
func (*GroupBandwidthCreate) SaveX ¶
func (gbc *GroupBandwidthCreate) SaveX(ctx context.Context) *GroupBandwidth
SaveX calls Save and panics if Save returns an error.
func (*GroupBandwidthCreate) SetGbwCreatedAt ¶
func (gbc *GroupBandwidthCreate) SetGbwCreatedAt(t time.Time) *GroupBandwidthCreate
SetGbwCreatedAt sets the "gbw_created_at" field.
func (*GroupBandwidthCreate) SetGbwDownloadSpeed ¶
func (gbc *GroupBandwidthCreate) SetGbwDownloadSpeed(i int) *GroupBandwidthCreate
SetGbwDownloadSpeed sets the "gbw_download_speed" field.
func (*GroupBandwidthCreate) SetGbwUploadSpeed ¶
func (gbc *GroupBandwidthCreate) SetGbwUploadSpeed(i int) *GroupBandwidthCreate
SetGbwUploadSpeed sets the "gbw_upload_speed" field.
func (*GroupBandwidthCreate) SetNillableGbwCreatedAt ¶
func (gbc *GroupBandwidthCreate) SetNillableGbwCreatedAt(t *time.Time) *GroupBandwidthCreate
SetNillableGbwCreatedAt sets the "gbw_created_at" field if the given value is not nil.
type GroupBandwidthCreateBulk ¶
type GroupBandwidthCreateBulk struct {
// contains filtered or unexported fields
}
GroupBandwidthCreateBulk is the builder for creating many GroupBandwidth entities in bulk.
func (*GroupBandwidthCreateBulk) Exec ¶
func (gbcb *GroupBandwidthCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupBandwidthCreateBulk) ExecX ¶
func (gbcb *GroupBandwidthCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupBandwidthCreateBulk) Save ¶
func (gbcb *GroupBandwidthCreateBulk) Save(ctx context.Context) ([]*GroupBandwidth, error)
Save creates the GroupBandwidth entities in the database.
func (*GroupBandwidthCreateBulk) SaveX ¶
func (gbcb *GroupBandwidthCreateBulk) SaveX(ctx context.Context) []*GroupBandwidth
SaveX is like Save, but panics if an error occurs.
type GroupBandwidthDelete ¶
type GroupBandwidthDelete struct {
// contains filtered or unexported fields
}
GroupBandwidthDelete is the builder for deleting a GroupBandwidth entity.
func (*GroupBandwidthDelete) Exec ¶
func (gbd *GroupBandwidthDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupBandwidthDelete) ExecX ¶
func (gbd *GroupBandwidthDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupBandwidthDelete) Where ¶
func (gbd *GroupBandwidthDelete) Where(ps ...predicate.GroupBandwidth) *GroupBandwidthDelete
Where appends a list predicates to the GroupBandwidthDelete builder.
type GroupBandwidthDeleteOne ¶
type GroupBandwidthDeleteOne struct {
// contains filtered or unexported fields
}
GroupBandwidthDeleteOne is the builder for deleting a single GroupBandwidth entity.
func (*GroupBandwidthDeleteOne) Exec ¶
func (gbdo *GroupBandwidthDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupBandwidthDeleteOne) ExecX ¶
func (gbdo *GroupBandwidthDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GroupBandwidthEdges ¶
type GroupBandwidthEdges struct { // Groups holds the value of the groups edge. Groups []*Groups `json:"groups,omitempty"` // contains filtered or unexported fields }
GroupBandwidthEdges holds the relations/edges for other nodes in the graph.
func (GroupBandwidthEdges) GroupsOrErr ¶
func (e GroupBandwidthEdges) GroupsOrErr() ([]*Groups, error)
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.
type GroupBandwidthGroupBy ¶
type GroupBandwidthGroupBy struct {
// contains filtered or unexported fields
}
GroupBandwidthGroupBy is the group-by builder for GroupBandwidth entities.
func (*GroupBandwidthGroupBy) Aggregate ¶
func (gbgb *GroupBandwidthGroupBy) Aggregate(fns ...AggregateFunc) *GroupBandwidthGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupBandwidthGroupBy) Bool ¶
func (gbgb *GroupBandwidthGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupBandwidthGroupBy) BoolX ¶
func (gbgb *GroupBandwidthGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GroupBandwidthGroupBy) Bools ¶
func (gbgb *GroupBandwidthGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*GroupBandwidthGroupBy) BoolsX ¶
func (gbgb *GroupBandwidthGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GroupBandwidthGroupBy) Float64 ¶
func (gbgb *GroupBandwidthGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupBandwidthGroupBy) Float64X ¶
func (gbgb *GroupBandwidthGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GroupBandwidthGroupBy) Float64s ¶
func (gbgb *GroupBandwidthGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*GroupBandwidthGroupBy) Float64sX ¶
func (gbgb *GroupBandwidthGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupBandwidthGroupBy) Int ¶
func (gbgb *GroupBandwidthGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupBandwidthGroupBy) IntX ¶
func (gbgb *GroupBandwidthGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GroupBandwidthGroupBy) Ints ¶
func (gbgb *GroupBandwidthGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*GroupBandwidthGroupBy) IntsX ¶
func (gbgb *GroupBandwidthGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GroupBandwidthGroupBy) Scan ¶
func (gbgb *GroupBandwidthGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*GroupBandwidthGroupBy) ScanX ¶
func (gbgb *GroupBandwidthGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GroupBandwidthGroupBy) String ¶
func (gbgb *GroupBandwidthGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupBandwidthGroupBy) StringX ¶
func (gbgb *GroupBandwidthGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GroupBandwidthMutation ¶
type GroupBandwidthMutation struct {
// contains filtered or unexported fields
}
GroupBandwidthMutation represents an operation that mutates the GroupBandwidth nodes in the graph.
func (*GroupBandwidthMutation) AddField ¶
func (m *GroupBandwidthMutation) 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 (*GroupBandwidthMutation) AddGbwDownloadSpeed ¶
func (m *GroupBandwidthMutation) AddGbwDownloadSpeed(i int)
AddGbwDownloadSpeed adds i to the "gbw_download_speed" field.
func (*GroupBandwidthMutation) AddGbwUploadSpeed ¶
func (m *GroupBandwidthMutation) AddGbwUploadSpeed(i int)
AddGbwUploadSpeed adds i to the "gbw_upload_speed" field.
func (*GroupBandwidthMutation) AddGroupIDs ¶
func (m *GroupBandwidthMutation) AddGroupIDs(ids ...int)
AddGroupIDs adds the "groups" edge to the Groups entity by ids.
func (*GroupBandwidthMutation) AddedEdges ¶
func (m *GroupBandwidthMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupBandwidthMutation) AddedField ¶
func (m *GroupBandwidthMutation) 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 (*GroupBandwidthMutation) AddedFields ¶
func (m *GroupBandwidthMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupBandwidthMutation) AddedGbwDownloadSpeed ¶
func (m *GroupBandwidthMutation) AddedGbwDownloadSpeed() (r int, exists bool)
AddedGbwDownloadSpeed returns the value that was added to the "gbw_download_speed" field in this mutation.
func (*GroupBandwidthMutation) AddedGbwUploadSpeed ¶
func (m *GroupBandwidthMutation) AddedGbwUploadSpeed() (r int, exists bool)
AddedGbwUploadSpeed returns the value that was added to the "gbw_upload_speed" field in this mutation.
func (*GroupBandwidthMutation) AddedIDs ¶
func (m *GroupBandwidthMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupBandwidthMutation) ClearEdge ¶
func (m *GroupBandwidthMutation) 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 (*GroupBandwidthMutation) ClearField ¶
func (m *GroupBandwidthMutation) 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 (*GroupBandwidthMutation) ClearGbwCreatedAt ¶
func (m *GroupBandwidthMutation) ClearGbwCreatedAt()
ClearGbwCreatedAt clears the value of the "gbw_created_at" field.
func (*GroupBandwidthMutation) ClearGroups ¶
func (m *GroupBandwidthMutation) ClearGroups()
ClearGroups clears the "groups" edge to the Groups entity.
func (*GroupBandwidthMutation) ClearedEdges ¶
func (m *GroupBandwidthMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupBandwidthMutation) ClearedFields ¶
func (m *GroupBandwidthMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupBandwidthMutation) Client ¶
func (m GroupBandwidthMutation) 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 (*GroupBandwidthMutation) EdgeCleared ¶
func (m *GroupBandwidthMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupBandwidthMutation) Field ¶
func (m *GroupBandwidthMutation) 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 (*GroupBandwidthMutation) FieldCleared ¶
func (m *GroupBandwidthMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupBandwidthMutation) Fields ¶
func (m *GroupBandwidthMutation) 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 (*GroupBandwidthMutation) GbwCreatedAt ¶
func (m *GroupBandwidthMutation) GbwCreatedAt() (r time.Time, exists bool)
GbwCreatedAt returns the value of the "gbw_created_at" field in the mutation.
func (*GroupBandwidthMutation) GbwCreatedAtCleared ¶
func (m *GroupBandwidthMutation) GbwCreatedAtCleared() bool
GbwCreatedAtCleared returns if the "gbw_created_at" field was cleared in this mutation.
func (*GroupBandwidthMutation) GbwDownloadSpeed ¶
func (m *GroupBandwidthMutation) GbwDownloadSpeed() (r int, exists bool)
GbwDownloadSpeed returns the value of the "gbw_download_speed" field in the mutation.
func (*GroupBandwidthMutation) GbwUploadSpeed ¶
func (m *GroupBandwidthMutation) GbwUploadSpeed() (r int, exists bool)
GbwUploadSpeed returns the value of the "gbw_upload_speed" field in the mutation.
func (*GroupBandwidthMutation) GroupsCleared ¶
func (m *GroupBandwidthMutation) GroupsCleared() bool
GroupsCleared reports if the "groups" edge to the Groups entity was cleared.
func (*GroupBandwidthMutation) GroupsIDs ¶
func (m *GroupBandwidthMutation) GroupsIDs() (ids []int)
GroupsIDs returns the "groups" edge IDs in the mutation.
func (*GroupBandwidthMutation) ID ¶
func (m *GroupBandwidthMutation) ID() (id int, 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 (*GroupBandwidthMutation) 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 (*GroupBandwidthMutation) OldGbwCreatedAt ¶
OldGbwCreatedAt returns the old "gbw_created_at" field's value of the GroupBandwidth entity. If the GroupBandwidth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupBandwidthMutation) OldGbwDownloadSpeed ¶
func (m *GroupBandwidthMutation) OldGbwDownloadSpeed(ctx context.Context) (v int, err error)
OldGbwDownloadSpeed returns the old "gbw_download_speed" field's value of the GroupBandwidth entity. If the GroupBandwidth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupBandwidthMutation) OldGbwUploadSpeed ¶
func (m *GroupBandwidthMutation) OldGbwUploadSpeed(ctx context.Context) (v int, err error)
OldGbwUploadSpeed returns the old "gbw_upload_speed" field's value of the GroupBandwidth entity. If the GroupBandwidth object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupBandwidthMutation) Op ¶
func (m *GroupBandwidthMutation) Op() Op
Op returns the operation name.
func (*GroupBandwidthMutation) RemoveGroupIDs ¶
func (m *GroupBandwidthMutation) RemoveGroupIDs(ids ...int)
RemoveGroupIDs removes the "groups" edge to the Groups entity by IDs.
func (*GroupBandwidthMutation) RemovedEdges ¶
func (m *GroupBandwidthMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupBandwidthMutation) RemovedGroupsIDs ¶
func (m *GroupBandwidthMutation) RemovedGroupsIDs() (ids []int)
RemovedGroups returns the removed IDs of the "groups" edge to the Groups entity.
func (*GroupBandwidthMutation) RemovedIDs ¶
func (m *GroupBandwidthMutation) 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 (*GroupBandwidthMutation) ResetEdge ¶
func (m *GroupBandwidthMutation) 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 (*GroupBandwidthMutation) ResetField ¶
func (m *GroupBandwidthMutation) 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 (*GroupBandwidthMutation) ResetGbwCreatedAt ¶
func (m *GroupBandwidthMutation) ResetGbwCreatedAt()
ResetGbwCreatedAt resets all changes to the "gbw_created_at" field.
func (*GroupBandwidthMutation) ResetGbwDownloadSpeed ¶
func (m *GroupBandwidthMutation) ResetGbwDownloadSpeed()
ResetGbwDownloadSpeed resets all changes to the "gbw_download_speed" field.
func (*GroupBandwidthMutation) ResetGbwUploadSpeed ¶
func (m *GroupBandwidthMutation) ResetGbwUploadSpeed()
ResetGbwUploadSpeed resets all changes to the "gbw_upload_speed" field.
func (*GroupBandwidthMutation) ResetGroups ¶
func (m *GroupBandwidthMutation) ResetGroups()
ResetGroups resets all changes to the "groups" edge.
func (*GroupBandwidthMutation) SetField ¶
func (m *GroupBandwidthMutation) 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 (*GroupBandwidthMutation) SetGbwCreatedAt ¶
func (m *GroupBandwidthMutation) SetGbwCreatedAt(t time.Time)
SetGbwCreatedAt sets the "gbw_created_at" field.
func (*GroupBandwidthMutation) SetGbwDownloadSpeed ¶
func (m *GroupBandwidthMutation) SetGbwDownloadSpeed(i int)
SetGbwDownloadSpeed sets the "gbw_download_speed" field.
func (*GroupBandwidthMutation) SetGbwUploadSpeed ¶
func (m *GroupBandwidthMutation) SetGbwUploadSpeed(i int)
SetGbwUploadSpeed sets the "gbw_upload_speed" field.
func (GroupBandwidthMutation) Tx ¶
func (m GroupBandwidthMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupBandwidthMutation) Type ¶
func (m *GroupBandwidthMutation) Type() string
Type returns the node type of this mutation (GroupBandwidth).
func (*GroupBandwidthMutation) Where ¶
func (m *GroupBandwidthMutation) Where(ps ...predicate.GroupBandwidth)
Where appends a list predicates to the GroupBandwidthMutation builder.
type GroupBandwidthQuery ¶
type GroupBandwidthQuery struct {
// contains filtered or unexported fields
}
GroupBandwidthQuery is the builder for querying GroupBandwidth entities.
func (*GroupBandwidthQuery) All ¶
func (gbq *GroupBandwidthQuery) All(ctx context.Context) ([]*GroupBandwidth, error)
All executes the query and returns a list of GroupBandwidths.
func (*GroupBandwidthQuery) AllX ¶
func (gbq *GroupBandwidthQuery) AllX(ctx context.Context) []*GroupBandwidth
AllX is like All, but panics if an error occurs.
func (*GroupBandwidthQuery) Clone ¶
func (gbq *GroupBandwidthQuery) Clone() *GroupBandwidthQuery
Clone returns a duplicate of the GroupBandwidthQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupBandwidthQuery) Count ¶
func (gbq *GroupBandwidthQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupBandwidthQuery) CountX ¶
func (gbq *GroupBandwidthQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupBandwidthQuery) Exist ¶
func (gbq *GroupBandwidthQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupBandwidthQuery) ExistX ¶
func (gbq *GroupBandwidthQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupBandwidthQuery) First ¶
func (gbq *GroupBandwidthQuery) First(ctx context.Context) (*GroupBandwidth, error)
First returns the first GroupBandwidth entity from the query. Returns a *NotFoundError when no GroupBandwidth was found.
func (*GroupBandwidthQuery) FirstID ¶
func (gbq *GroupBandwidthQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first GroupBandwidth ID from the query. Returns a *NotFoundError when no GroupBandwidth ID was found.
func (*GroupBandwidthQuery) FirstIDX ¶
func (gbq *GroupBandwidthQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupBandwidthQuery) FirstX ¶
func (gbq *GroupBandwidthQuery) FirstX(ctx context.Context) *GroupBandwidth
FirstX is like First, but panics if an error occurs.
func (*GroupBandwidthQuery) GroupBy ¶
func (gbq *GroupBandwidthQuery) GroupBy(field string, fields ...string) *GroupBandwidthGroupBy
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 { GbwDownloadSpeed int `json:"gbw_download_speed,omitempty"` Count int `json:"count,omitempty"` } client.GroupBandwidth.Query(). GroupBy(groupbandwidth.FieldGbwDownloadSpeed). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupBandwidthQuery) IDs ¶
func (gbq *GroupBandwidthQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of GroupBandwidth IDs.
func (*GroupBandwidthQuery) IDsX ¶
func (gbq *GroupBandwidthQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroupBandwidthQuery) Limit ¶
func (gbq *GroupBandwidthQuery) Limit(limit int) *GroupBandwidthQuery
Limit adds a limit step to the query.
func (*GroupBandwidthQuery) Offset ¶
func (gbq *GroupBandwidthQuery) Offset(offset int) *GroupBandwidthQuery
Offset adds an offset step to the query.
func (*GroupBandwidthQuery) Only ¶
func (gbq *GroupBandwidthQuery) Only(ctx context.Context) (*GroupBandwidth, error)
Only returns a single GroupBandwidth entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one GroupBandwidth entity is not found. Returns a *NotFoundError when no GroupBandwidth entities are found.
func (*GroupBandwidthQuery) OnlyID ¶
func (gbq *GroupBandwidthQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only GroupBandwidth ID in the query. Returns a *NotSingularError when exactly one GroupBandwidth ID is not found. Returns a *NotFoundError when no entities are found.
func (*GroupBandwidthQuery) OnlyIDX ¶
func (gbq *GroupBandwidthQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupBandwidthQuery) OnlyX ¶
func (gbq *GroupBandwidthQuery) OnlyX(ctx context.Context) *GroupBandwidth
OnlyX is like Only, but panics if an error occurs.
func (*GroupBandwidthQuery) Order ¶
func (gbq *GroupBandwidthQuery) Order(o ...OrderFunc) *GroupBandwidthQuery
Order adds an order step to the query.
func (*GroupBandwidthQuery) QueryGroups ¶
func (gbq *GroupBandwidthQuery) QueryGroups() *GroupsQuery
QueryGroups chains the current query on the "groups" edge.
func (*GroupBandwidthQuery) Select ¶
func (gbq *GroupBandwidthQuery) Select(fields ...string) *GroupBandwidthSelect
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 { GbwDownloadSpeed int `json:"gbw_download_speed,omitempty"` } client.GroupBandwidth.Query(). Select(groupbandwidth.FieldGbwDownloadSpeed). Scan(ctx, &v)
func (*GroupBandwidthQuery) Unique ¶
func (gbq *GroupBandwidthQuery) Unique(unique bool) *GroupBandwidthQuery
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 (*GroupBandwidthQuery) Where ¶
func (gbq *GroupBandwidthQuery) Where(ps ...predicate.GroupBandwidth) *GroupBandwidthQuery
Where adds a new predicate for the GroupBandwidthQuery builder.
func (*GroupBandwidthQuery) WithGroups ¶
func (gbq *GroupBandwidthQuery) WithGroups(opts ...func(*GroupsQuery)) *GroupBandwidthQuery
WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.
type GroupBandwidthSelect ¶
type GroupBandwidthSelect struct { *GroupBandwidthQuery // contains filtered or unexported fields }
GroupBandwidthSelect is the builder for selecting fields of GroupBandwidth entities.
func (*GroupBandwidthSelect) Bool ¶
func (gbs *GroupBandwidthSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupBandwidthSelect) BoolX ¶
func (gbs *GroupBandwidthSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GroupBandwidthSelect) Bools ¶
func (gbs *GroupBandwidthSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupBandwidthSelect) BoolsX ¶
func (gbs *GroupBandwidthSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GroupBandwidthSelect) Float64 ¶
func (gbs *GroupBandwidthSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupBandwidthSelect) Float64X ¶
func (gbs *GroupBandwidthSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GroupBandwidthSelect) Float64s ¶
func (gbs *GroupBandwidthSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupBandwidthSelect) Float64sX ¶
func (gbs *GroupBandwidthSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupBandwidthSelect) Int ¶
func (gbs *GroupBandwidthSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupBandwidthSelect) IntX ¶
func (gbs *GroupBandwidthSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GroupBandwidthSelect) Ints ¶
func (gbs *GroupBandwidthSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupBandwidthSelect) IntsX ¶
func (gbs *GroupBandwidthSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GroupBandwidthSelect) Scan ¶
func (gbs *GroupBandwidthSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*GroupBandwidthSelect) ScanX ¶
func (gbs *GroupBandwidthSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GroupBandwidthSelect) String ¶
func (gbs *GroupBandwidthSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*GroupBandwidthSelect) StringX ¶
func (gbs *GroupBandwidthSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GroupBandwidthUpdate ¶
type GroupBandwidthUpdate struct {
// contains filtered or unexported fields
}
GroupBandwidthUpdate is the builder for updating GroupBandwidth entities.
func (*GroupBandwidthUpdate) AddGbwDownloadSpeed ¶
func (gbu *GroupBandwidthUpdate) AddGbwDownloadSpeed(i int) *GroupBandwidthUpdate
AddGbwDownloadSpeed adds i to the "gbw_download_speed" field.
func (*GroupBandwidthUpdate) AddGbwUploadSpeed ¶
func (gbu *GroupBandwidthUpdate) AddGbwUploadSpeed(i int) *GroupBandwidthUpdate
AddGbwUploadSpeed adds i to the "gbw_upload_speed" field.
func (*GroupBandwidthUpdate) AddGroupIDs ¶
func (gbu *GroupBandwidthUpdate) AddGroupIDs(ids ...int) *GroupBandwidthUpdate
AddGroupIDs adds the "groups" edge to the Groups entity by IDs.
func (*GroupBandwidthUpdate) AddGroups ¶
func (gbu *GroupBandwidthUpdate) AddGroups(g ...*Groups) *GroupBandwidthUpdate
AddGroups adds the "groups" edges to the Groups entity.
func (*GroupBandwidthUpdate) ClearGbwCreatedAt ¶
func (gbu *GroupBandwidthUpdate) ClearGbwCreatedAt() *GroupBandwidthUpdate
ClearGbwCreatedAt clears the value of the "gbw_created_at" field.
func (*GroupBandwidthUpdate) ClearGroups ¶
func (gbu *GroupBandwidthUpdate) ClearGroups() *GroupBandwidthUpdate
ClearGroups clears all "groups" edges to the Groups entity.
func (*GroupBandwidthUpdate) Exec ¶
func (gbu *GroupBandwidthUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupBandwidthUpdate) ExecX ¶
func (gbu *GroupBandwidthUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupBandwidthUpdate) Mutation ¶
func (gbu *GroupBandwidthUpdate) Mutation() *GroupBandwidthMutation
Mutation returns the GroupBandwidthMutation object of the builder.
func (*GroupBandwidthUpdate) RemoveGroupIDs ¶
func (gbu *GroupBandwidthUpdate) RemoveGroupIDs(ids ...int) *GroupBandwidthUpdate
RemoveGroupIDs removes the "groups" edge to Groups entities by IDs.
func (*GroupBandwidthUpdate) RemoveGroups ¶
func (gbu *GroupBandwidthUpdate) RemoveGroups(g ...*Groups) *GroupBandwidthUpdate
RemoveGroups removes "groups" edges to Groups entities.
func (*GroupBandwidthUpdate) Save ¶
func (gbu *GroupBandwidthUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupBandwidthUpdate) SaveX ¶
func (gbu *GroupBandwidthUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupBandwidthUpdate) SetGbwCreatedAt ¶
func (gbu *GroupBandwidthUpdate) SetGbwCreatedAt(t time.Time) *GroupBandwidthUpdate
SetGbwCreatedAt sets the "gbw_created_at" field.
func (*GroupBandwidthUpdate) SetGbwDownloadSpeed ¶
func (gbu *GroupBandwidthUpdate) SetGbwDownloadSpeed(i int) *GroupBandwidthUpdate
SetGbwDownloadSpeed sets the "gbw_download_speed" field.
func (*GroupBandwidthUpdate) SetGbwUploadSpeed ¶
func (gbu *GroupBandwidthUpdate) SetGbwUploadSpeed(i int) *GroupBandwidthUpdate
SetGbwUploadSpeed sets the "gbw_upload_speed" field.
func (*GroupBandwidthUpdate) SetNillableGbwCreatedAt ¶
func (gbu *GroupBandwidthUpdate) SetNillableGbwCreatedAt(t *time.Time) *GroupBandwidthUpdate
SetNillableGbwCreatedAt sets the "gbw_created_at" field if the given value is not nil.
func (*GroupBandwidthUpdate) Where ¶
func (gbu *GroupBandwidthUpdate) Where(ps ...predicate.GroupBandwidth) *GroupBandwidthUpdate
Where appends a list predicates to the GroupBandwidthUpdate builder.
type GroupBandwidthUpdateOne ¶
type GroupBandwidthUpdateOne struct {
// contains filtered or unexported fields
}
GroupBandwidthUpdateOne is the builder for updating a single GroupBandwidth entity.
func (*GroupBandwidthUpdateOne) AddGbwDownloadSpeed ¶
func (gbuo *GroupBandwidthUpdateOne) AddGbwDownloadSpeed(i int) *GroupBandwidthUpdateOne
AddGbwDownloadSpeed adds i to the "gbw_download_speed" field.
func (*GroupBandwidthUpdateOne) AddGbwUploadSpeed ¶
func (gbuo *GroupBandwidthUpdateOne) AddGbwUploadSpeed(i int) *GroupBandwidthUpdateOne
AddGbwUploadSpeed adds i to the "gbw_upload_speed" field.
func (*GroupBandwidthUpdateOne) AddGroupIDs ¶
func (gbuo *GroupBandwidthUpdateOne) AddGroupIDs(ids ...int) *GroupBandwidthUpdateOne
AddGroupIDs adds the "groups" edge to the Groups entity by IDs.
func (*GroupBandwidthUpdateOne) AddGroups ¶
func (gbuo *GroupBandwidthUpdateOne) AddGroups(g ...*Groups) *GroupBandwidthUpdateOne
AddGroups adds the "groups" edges to the Groups entity.
func (*GroupBandwidthUpdateOne) ClearGbwCreatedAt ¶
func (gbuo *GroupBandwidthUpdateOne) ClearGbwCreatedAt() *GroupBandwidthUpdateOne
ClearGbwCreatedAt clears the value of the "gbw_created_at" field.
func (*GroupBandwidthUpdateOne) ClearGroups ¶
func (gbuo *GroupBandwidthUpdateOne) ClearGroups() *GroupBandwidthUpdateOne
ClearGroups clears all "groups" edges to the Groups entity.
func (*GroupBandwidthUpdateOne) Exec ¶
func (gbuo *GroupBandwidthUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupBandwidthUpdateOne) ExecX ¶
func (gbuo *GroupBandwidthUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupBandwidthUpdateOne) Mutation ¶
func (gbuo *GroupBandwidthUpdateOne) Mutation() *GroupBandwidthMutation
Mutation returns the GroupBandwidthMutation object of the builder.
func (*GroupBandwidthUpdateOne) RemoveGroupIDs ¶
func (gbuo *GroupBandwidthUpdateOne) RemoveGroupIDs(ids ...int) *GroupBandwidthUpdateOne
RemoveGroupIDs removes the "groups" edge to Groups entities by IDs.
func (*GroupBandwidthUpdateOne) RemoveGroups ¶
func (gbuo *GroupBandwidthUpdateOne) RemoveGroups(g ...*Groups) *GroupBandwidthUpdateOne
RemoveGroups removes "groups" edges to Groups entities.
func (*GroupBandwidthUpdateOne) Save ¶
func (gbuo *GroupBandwidthUpdateOne) Save(ctx context.Context) (*GroupBandwidth, error)
Save executes the query and returns the updated GroupBandwidth entity.
func (*GroupBandwidthUpdateOne) SaveX ¶
func (gbuo *GroupBandwidthUpdateOne) SaveX(ctx context.Context) *GroupBandwidth
SaveX is like Save, but panics if an error occurs.
func (*GroupBandwidthUpdateOne) Select ¶
func (gbuo *GroupBandwidthUpdateOne) Select(field string, fields ...string) *GroupBandwidthUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupBandwidthUpdateOne) SetGbwCreatedAt ¶
func (gbuo *GroupBandwidthUpdateOne) SetGbwCreatedAt(t time.Time) *GroupBandwidthUpdateOne
SetGbwCreatedAt sets the "gbw_created_at" field.
func (*GroupBandwidthUpdateOne) SetGbwDownloadSpeed ¶
func (gbuo *GroupBandwidthUpdateOne) SetGbwDownloadSpeed(i int) *GroupBandwidthUpdateOne
SetGbwDownloadSpeed sets the "gbw_download_speed" field.
func (*GroupBandwidthUpdateOne) SetGbwUploadSpeed ¶
func (gbuo *GroupBandwidthUpdateOne) SetGbwUploadSpeed(i int) *GroupBandwidthUpdateOne
SetGbwUploadSpeed sets the "gbw_upload_speed" field.
func (*GroupBandwidthUpdateOne) SetNillableGbwCreatedAt ¶
func (gbuo *GroupBandwidthUpdateOne) SetNillableGbwCreatedAt(t *time.Time) *GroupBandwidthUpdateOne
SetNillableGbwCreatedAt sets the "gbw_created_at" field if the given value is not nil.
type GroupBandwidths ¶
type GroupBandwidths []*GroupBandwidth
GroupBandwidths is a parsable slice of GroupBandwidth.
type Groups ¶
type Groups struct { // ID of the ent. ID int `json:"id,omitempty"` // GName holds the value of the "g_name" field. GName string `json:"g_name,omitempty"` // GIsIntOrg holds the value of the "g_is_int_org" field. GIsIntOrg bool `json:"g_is_int_org,omitempty"` // GIsSuperAdmin holds the value of the "g_is_super_admin" field. GIsSuperAdmin bool `json:"g_is_super_admin,omitempty"` // GCreatedAt holds the value of the "g_created_at" field. GCreatedAt time.Time `json:"g_created_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupsQuery when eager-loading is set. Edges GroupsEdges `json:"edges"` // contains filtered or unexported fields }
Groups is the model entity for the Groups schema.
func (*Groups) QueryUseBandwidth ¶
func (gr *Groups) QueryUseBandwidth() *GroupBandwidthQuery
QueryUseBandwidth queries the "use_bandwidth" edge of the Groups entity.
func (*Groups) QueryUsers ¶
func (gr *Groups) QueryUsers() *UsersQuery
QueryUsers queries the "users" edge of the Groups entity.
func (*Groups) Unwrap ¶
Unwrap unwraps the Groups 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 (*Groups) Update ¶
func (gr *Groups) Update() *GroupsUpdateOne
Update returns a builder for updating this Groups. Note that you need to call Groups.Unwrap() before calling this method if this Groups was returned from a transaction, and the transaction was committed or rolled back.
type GroupsClient ¶
type GroupsClient struct {
// contains filtered or unexported fields
}
GroupsClient is a client for the Groups schema.
func NewGroupsClient ¶
func NewGroupsClient(c config) *GroupsClient
NewGroupsClient returns a client for the Groups from the given config.
func (*GroupsClient) Create ¶
func (c *GroupsClient) Create() *GroupsCreate
Create returns a create builder for Groups.
func (*GroupsClient) CreateBulk ¶
func (c *GroupsClient) CreateBulk(builders ...*GroupsCreate) *GroupsCreateBulk
CreateBulk returns a builder for creating a bulk of Groups entities.
func (*GroupsClient) Delete ¶
func (c *GroupsClient) Delete() *GroupsDelete
Delete returns a delete builder for Groups.
func (*GroupsClient) DeleteOne ¶
func (c *GroupsClient) DeleteOne(gr *Groups) *GroupsDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*GroupsClient) DeleteOneID ¶
func (c *GroupsClient) DeleteOneID(id int) *GroupsDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*GroupsClient) GetX ¶
func (c *GroupsClient) GetX(ctx context.Context, id int) *Groups
GetX is like Get, but panics if an error occurs.
func (*GroupsClient) Query ¶
func (c *GroupsClient) Query() *GroupsQuery
Query returns a query builder for Groups.
func (*GroupsClient) QueryUseBandwidth ¶
func (c *GroupsClient) QueryUseBandwidth(gr *Groups) *GroupBandwidthQuery
QueryUseBandwidth queries the use_bandwidth edge of a Groups.
func (*GroupsClient) QueryUsers ¶
func (c *GroupsClient) QueryUsers(gr *Groups) *UsersQuery
QueryUsers queries the users edge of a Groups.
func (*GroupsClient) Update ¶
func (c *GroupsClient) Update() *GroupsUpdate
Update returns an update builder for Groups.
func (*GroupsClient) UpdateOne ¶
func (c *GroupsClient) UpdateOne(gr *Groups) *GroupsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupsClient) UpdateOneID ¶
func (c *GroupsClient) UpdateOneID(id int) *GroupsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupsClient) Use ¶
func (c *GroupsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `groups.Hooks(f(g(h())))`.
type GroupsCreate ¶
type GroupsCreate struct {
// contains filtered or unexported fields
}
GroupsCreate is the builder for creating a Groups entity.
func (*GroupsCreate) AddUserIDs ¶
func (gc *GroupsCreate) AddUserIDs(ids ...int) *GroupsCreate
AddUserIDs adds the "users" edge to the Users entity by IDs.
func (*GroupsCreate) AddUsers ¶
func (gc *GroupsCreate) AddUsers(u ...*Users) *GroupsCreate
AddUsers adds the "users" edges to the Users entity.
func (*GroupsCreate) Exec ¶
func (gc *GroupsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupsCreate) ExecX ¶
func (gc *GroupsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupsCreate) Mutation ¶
func (gc *GroupsCreate) Mutation() *GroupsMutation
Mutation returns the GroupsMutation object of the builder.
func (*GroupsCreate) Save ¶
func (gc *GroupsCreate) Save(ctx context.Context) (*Groups, error)
Save creates the Groups in the database.
func (*GroupsCreate) SaveX ¶
func (gc *GroupsCreate) SaveX(ctx context.Context) *Groups
SaveX calls Save and panics if Save returns an error.
func (*GroupsCreate) SetGCreatedAt ¶
func (gc *GroupsCreate) SetGCreatedAt(t time.Time) *GroupsCreate
SetGCreatedAt sets the "g_created_at" field.
func (*GroupsCreate) SetGIsIntOrg ¶
func (gc *GroupsCreate) SetGIsIntOrg(b bool) *GroupsCreate
SetGIsIntOrg sets the "g_is_int_org" field.
func (*GroupsCreate) SetGIsSuperAdmin ¶
func (gc *GroupsCreate) SetGIsSuperAdmin(b bool) *GroupsCreate
SetGIsSuperAdmin sets the "g_is_super_admin" field.
func (*GroupsCreate) SetGName ¶
func (gc *GroupsCreate) SetGName(s string) *GroupsCreate
SetGName sets the "g_name" field.
func (*GroupsCreate) SetNillableGCreatedAt ¶
func (gc *GroupsCreate) SetNillableGCreatedAt(t *time.Time) *GroupsCreate
SetNillableGCreatedAt sets the "g_created_at" field if the given value is not nil.
func (*GroupsCreate) SetNillableGIsIntOrg ¶
func (gc *GroupsCreate) SetNillableGIsIntOrg(b *bool) *GroupsCreate
SetNillableGIsIntOrg sets the "g_is_int_org" field if the given value is not nil.
func (*GroupsCreate) SetNillableGIsSuperAdmin ¶
func (gc *GroupsCreate) SetNillableGIsSuperAdmin(b *bool) *GroupsCreate
SetNillableGIsSuperAdmin sets the "g_is_super_admin" field if the given value is not nil.
func (*GroupsCreate) SetNillableUseBandwidthID ¶
func (gc *GroupsCreate) SetNillableUseBandwidthID(id *int) *GroupsCreate
SetNillableUseBandwidthID sets the "use_bandwidth" edge to the GroupBandwidth entity by ID if the given value is not nil.
func (*GroupsCreate) SetUseBandwidth ¶
func (gc *GroupsCreate) SetUseBandwidth(g *GroupBandwidth) *GroupsCreate
SetUseBandwidth sets the "use_bandwidth" edge to the GroupBandwidth entity.
func (*GroupsCreate) SetUseBandwidthID ¶
func (gc *GroupsCreate) SetUseBandwidthID(id int) *GroupsCreate
SetUseBandwidthID sets the "use_bandwidth" edge to the GroupBandwidth entity by ID.
type GroupsCreateBulk ¶
type GroupsCreateBulk struct {
// contains filtered or unexported fields
}
GroupsCreateBulk is the builder for creating many Groups entities in bulk.
func (*GroupsCreateBulk) Exec ¶
func (gcb *GroupsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupsCreateBulk) ExecX ¶
func (gcb *GroupsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GroupsDelete ¶
type GroupsDelete struct {
// contains filtered or unexported fields
}
GroupsDelete is the builder for deleting a Groups entity.
func (*GroupsDelete) Exec ¶
func (gd *GroupsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupsDelete) ExecX ¶
func (gd *GroupsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupsDelete) Where ¶
func (gd *GroupsDelete) Where(ps ...predicate.Groups) *GroupsDelete
Where appends a list predicates to the GroupsDelete builder.
type GroupsDeleteOne ¶
type GroupsDeleteOne struct {
// contains filtered or unexported fields
}
GroupsDeleteOne is the builder for deleting a single Groups entity.
func (*GroupsDeleteOne) Exec ¶
func (gdo *GroupsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupsDeleteOne) ExecX ¶
func (gdo *GroupsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GroupsEdges ¶
type GroupsEdges struct { // UseBandwidth holds the value of the use_bandwidth edge. UseBandwidth *GroupBandwidth `json:"use_bandwidth,omitempty"` // Users holds the value of the users edge. Users []*Users `json:"users,omitempty"` // contains filtered or unexported fields }
GroupsEdges holds the relations/edges for other nodes in the graph.
func (GroupsEdges) UseBandwidthOrErr ¶
func (e GroupsEdges) UseBandwidthOrErr() (*GroupBandwidth, error)
UseBandwidthOrErr returns the UseBandwidth value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GroupsEdges) UsersOrErr ¶
func (e GroupsEdges) UsersOrErr() ([]*Users, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type GroupsGroupBy ¶
type GroupsGroupBy struct {
// contains filtered or unexported fields
}
GroupsGroupBy is the group-by builder for Groups entities.
func (*GroupsGroupBy) Aggregate ¶
func (ggb *GroupsGroupBy) Aggregate(fns ...AggregateFunc) *GroupsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupsGroupBy) Bool ¶
func (ggb *GroupsGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupsGroupBy) BoolX ¶
func (ggb *GroupsGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GroupsGroupBy) Bools ¶
func (ggb *GroupsGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*GroupsGroupBy) BoolsX ¶
func (ggb *GroupsGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GroupsGroupBy) Float64 ¶
func (ggb *GroupsGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupsGroupBy) Float64X ¶
func (ggb *GroupsGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GroupsGroupBy) Float64s ¶
func (ggb *GroupsGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*GroupsGroupBy) Float64sX ¶
func (ggb *GroupsGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupsGroupBy) Int ¶
func (ggb *GroupsGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupsGroupBy) IntX ¶
func (ggb *GroupsGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GroupsGroupBy) Ints ¶
func (ggb *GroupsGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*GroupsGroupBy) IntsX ¶
func (ggb *GroupsGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GroupsGroupBy) Scan ¶
func (ggb *GroupsGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*GroupsGroupBy) ScanX ¶
func (ggb *GroupsGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GroupsGroupBy) String ¶
func (ggb *GroupsGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*GroupsGroupBy) StringX ¶
func (ggb *GroupsGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GroupsMutation ¶
type GroupsMutation struct {
// contains filtered or unexported fields
}
GroupsMutation represents an operation that mutates the Groups nodes in the graph.
func (*GroupsMutation) AddField ¶
func (m *GroupsMutation) 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 (*GroupsMutation) AddUserIDs ¶
func (m *GroupsMutation) AddUserIDs(ids ...int)
AddUserIDs adds the "users" edge to the Users entity by ids.
func (*GroupsMutation) AddedEdges ¶
func (m *GroupsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupsMutation) AddedField ¶
func (m *GroupsMutation) 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 (*GroupsMutation) AddedFields ¶
func (m *GroupsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupsMutation) AddedIDs ¶
func (m *GroupsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupsMutation) ClearEdge ¶
func (m *GroupsMutation) 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 (*GroupsMutation) ClearField ¶
func (m *GroupsMutation) 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 (*GroupsMutation) ClearGCreatedAt ¶
func (m *GroupsMutation) ClearGCreatedAt()
ClearGCreatedAt clears the value of the "g_created_at" field.
func (*GroupsMutation) ClearUseBandwidth ¶
func (m *GroupsMutation) ClearUseBandwidth()
ClearUseBandwidth clears the "use_bandwidth" edge to the GroupBandwidth entity.
func (*GroupsMutation) ClearUsers ¶
func (m *GroupsMutation) ClearUsers()
ClearUsers clears the "users" edge to the Users entity.
func (*GroupsMutation) ClearedEdges ¶
func (m *GroupsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupsMutation) ClearedFields ¶
func (m *GroupsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupsMutation) Client ¶
func (m GroupsMutation) 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 (*GroupsMutation) EdgeCleared ¶
func (m *GroupsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupsMutation) Field ¶
func (m *GroupsMutation) 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 (*GroupsMutation) FieldCleared ¶
func (m *GroupsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupsMutation) Fields ¶
func (m *GroupsMutation) 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 (*GroupsMutation) GCreatedAt ¶
func (m *GroupsMutation) GCreatedAt() (r time.Time, exists bool)
GCreatedAt returns the value of the "g_created_at" field in the mutation.
func (*GroupsMutation) GCreatedAtCleared ¶
func (m *GroupsMutation) GCreatedAtCleared() bool
GCreatedAtCleared returns if the "g_created_at" field was cleared in this mutation.
func (*GroupsMutation) GIsIntOrg ¶
func (m *GroupsMutation) GIsIntOrg() (r bool, exists bool)
GIsIntOrg returns the value of the "g_is_int_org" field in the mutation.
func (*GroupsMutation) GIsSuperAdmin ¶
func (m *GroupsMutation) GIsSuperAdmin() (r bool, exists bool)
GIsSuperAdmin returns the value of the "g_is_super_admin" field in the mutation.
func (*GroupsMutation) GName ¶
func (m *GroupsMutation) GName() (r string, exists bool)
GName returns the value of the "g_name" field in the mutation.
func (*GroupsMutation) ID ¶
func (m *GroupsMutation) ID() (id int, 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 (*GroupsMutation) 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 (*GroupsMutation) OldGCreatedAt ¶
OldGCreatedAt returns the old "g_created_at" field's value of the Groups entity. If the Groups object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupsMutation) OldGIsIntOrg ¶
func (m *GroupsMutation) OldGIsIntOrg(ctx context.Context) (v bool, err error)
OldGIsIntOrg returns the old "g_is_int_org" field's value of the Groups entity. If the Groups object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupsMutation) OldGIsSuperAdmin ¶
func (m *GroupsMutation) OldGIsSuperAdmin(ctx context.Context) (v bool, err error)
OldGIsSuperAdmin returns the old "g_is_super_admin" field's value of the Groups entity. If the Groups object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupsMutation) OldGName ¶
func (m *GroupsMutation) OldGName(ctx context.Context) (v string, err error)
OldGName returns the old "g_name" field's value of the Groups entity. If the Groups object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupsMutation) RemoveUserIDs ¶
func (m *GroupsMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the "users" edge to the Users entity by IDs.
func (*GroupsMutation) RemovedEdges ¶
func (m *GroupsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupsMutation) RemovedIDs ¶
func (m *GroupsMutation) 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 (*GroupsMutation) RemovedUsersIDs ¶
func (m *GroupsMutation) RemovedUsersIDs() (ids []int)
RemovedUsers returns the removed IDs of the "users" edge to the Users entity.
func (*GroupsMutation) ResetEdge ¶
func (m *GroupsMutation) 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 (*GroupsMutation) ResetField ¶
func (m *GroupsMutation) 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 (*GroupsMutation) ResetGCreatedAt ¶
func (m *GroupsMutation) ResetGCreatedAt()
ResetGCreatedAt resets all changes to the "g_created_at" field.
func (*GroupsMutation) ResetGIsIntOrg ¶
func (m *GroupsMutation) ResetGIsIntOrg()
ResetGIsIntOrg resets all changes to the "g_is_int_org" field.
func (*GroupsMutation) ResetGIsSuperAdmin ¶
func (m *GroupsMutation) ResetGIsSuperAdmin()
ResetGIsSuperAdmin resets all changes to the "g_is_super_admin" field.
func (*GroupsMutation) ResetGName ¶
func (m *GroupsMutation) ResetGName()
ResetGName resets all changes to the "g_name" field.
func (*GroupsMutation) ResetUseBandwidth ¶
func (m *GroupsMutation) ResetUseBandwidth()
ResetUseBandwidth resets all changes to the "use_bandwidth" edge.
func (*GroupsMutation) ResetUsers ¶
func (m *GroupsMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*GroupsMutation) SetField ¶
func (m *GroupsMutation) 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 (*GroupsMutation) SetGCreatedAt ¶
func (m *GroupsMutation) SetGCreatedAt(t time.Time)
SetGCreatedAt sets the "g_created_at" field.
func (*GroupsMutation) SetGIsIntOrg ¶
func (m *GroupsMutation) SetGIsIntOrg(b bool)
SetGIsIntOrg sets the "g_is_int_org" field.
func (*GroupsMutation) SetGIsSuperAdmin ¶
func (m *GroupsMutation) SetGIsSuperAdmin(b bool)
SetGIsSuperAdmin sets the "g_is_super_admin" field.
func (*GroupsMutation) SetGName ¶
func (m *GroupsMutation) SetGName(s string)
SetGName sets the "g_name" field.
func (*GroupsMutation) SetUseBandwidthID ¶
func (m *GroupsMutation) SetUseBandwidthID(id int)
SetUseBandwidthID sets the "use_bandwidth" edge to the GroupBandwidth entity by id.
func (GroupsMutation) Tx ¶
func (m GroupsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupsMutation) Type ¶
func (m *GroupsMutation) Type() string
Type returns the node type of this mutation (Groups).
func (*GroupsMutation) UseBandwidthCleared ¶
func (m *GroupsMutation) UseBandwidthCleared() bool
UseBandwidthCleared reports if the "use_bandwidth" edge to the GroupBandwidth entity was cleared.
func (*GroupsMutation) UseBandwidthID ¶
func (m *GroupsMutation) UseBandwidthID() (id int, exists bool)
UseBandwidthID returns the "use_bandwidth" edge ID in the mutation.
func (*GroupsMutation) UseBandwidthIDs ¶
func (m *GroupsMutation) UseBandwidthIDs() (ids []int)
UseBandwidthIDs returns the "use_bandwidth" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UseBandwidthID instead. It exists only for internal usage by the builders.
func (*GroupsMutation) UsersCleared ¶
func (m *GroupsMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the Users entity was cleared.
func (*GroupsMutation) UsersIDs ¶
func (m *GroupsMutation) UsersIDs() (ids []int)
UsersIDs returns the "users" edge IDs in the mutation.
func (*GroupsMutation) Where ¶
func (m *GroupsMutation) Where(ps ...predicate.Groups)
Where appends a list predicates to the GroupsMutation builder.
type GroupsQuery ¶
type GroupsQuery struct {
// contains filtered or unexported fields
}
GroupsQuery is the builder for querying Groups entities.
func (*GroupsQuery) All ¶
func (gq *GroupsQuery) All(ctx context.Context) ([]*Groups, error)
All executes the query and returns a list of GroupsSlice.
func (*GroupsQuery) AllX ¶
func (gq *GroupsQuery) AllX(ctx context.Context) []*Groups
AllX is like All, but panics if an error occurs.
func (*GroupsQuery) Clone ¶
func (gq *GroupsQuery) Clone() *GroupsQuery
Clone returns a duplicate of the GroupsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupsQuery) Count ¶
func (gq *GroupsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupsQuery) CountX ¶
func (gq *GroupsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupsQuery) Exist ¶
func (gq *GroupsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupsQuery) ExistX ¶
func (gq *GroupsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupsQuery) First ¶
func (gq *GroupsQuery) First(ctx context.Context) (*Groups, error)
First returns the first Groups entity from the query. Returns a *NotFoundError when no Groups was found.
func (*GroupsQuery) FirstID ¶
func (gq *GroupsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Groups ID from the query. Returns a *NotFoundError when no Groups ID was found.
func (*GroupsQuery) FirstIDX ¶
func (gq *GroupsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupsQuery) FirstX ¶
func (gq *GroupsQuery) FirstX(ctx context.Context) *Groups
FirstX is like First, but panics if an error occurs.
func (*GroupsQuery) GroupBy ¶
func (gq *GroupsQuery) GroupBy(field string, fields ...string) *GroupsGroupBy
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 { GName string `json:"g_name,omitempty"` Count int `json:"count,omitempty"` } client.Groups.Query(). GroupBy(groups.FieldGName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupsQuery) IDs ¶
func (gq *GroupsQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Groups IDs.
func (*GroupsQuery) IDsX ¶
func (gq *GroupsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroupsQuery) Limit ¶
func (gq *GroupsQuery) Limit(limit int) *GroupsQuery
Limit adds a limit step to the query.
func (*GroupsQuery) Offset ¶
func (gq *GroupsQuery) Offset(offset int) *GroupsQuery
Offset adds an offset step to the query.
func (*GroupsQuery) Only ¶
func (gq *GroupsQuery) Only(ctx context.Context) (*Groups, error)
Only returns a single Groups entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Groups entity is not found. Returns a *NotFoundError when no Groups entities are found.
func (*GroupsQuery) OnlyID ¶
func (gq *GroupsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Groups ID in the query. Returns a *NotSingularError when exactly one Groups ID is not found. Returns a *NotFoundError when no entities are found.
func (*GroupsQuery) OnlyIDX ¶
func (gq *GroupsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupsQuery) OnlyX ¶
func (gq *GroupsQuery) OnlyX(ctx context.Context) *Groups
OnlyX is like Only, but panics if an error occurs.
func (*GroupsQuery) Order ¶
func (gq *GroupsQuery) Order(o ...OrderFunc) *GroupsQuery
Order adds an order step to the query.
func (*GroupsQuery) QueryUseBandwidth ¶
func (gq *GroupsQuery) QueryUseBandwidth() *GroupBandwidthQuery
QueryUseBandwidth chains the current query on the "use_bandwidth" edge.
func (*GroupsQuery) QueryUsers ¶
func (gq *GroupsQuery) QueryUsers() *UsersQuery
QueryUsers chains the current query on the "users" edge.
func (*GroupsQuery) Select ¶
func (gq *GroupsQuery) Select(fields ...string) *GroupsSelect
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 { GName string `json:"g_name,omitempty"` } client.Groups.Query(). Select(groups.FieldGName). Scan(ctx, &v)
func (*GroupsQuery) Unique ¶
func (gq *GroupsQuery) Unique(unique bool) *GroupsQuery
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 (*GroupsQuery) Where ¶
func (gq *GroupsQuery) Where(ps ...predicate.Groups) *GroupsQuery
Where adds a new predicate for the GroupsQuery builder.
func (*GroupsQuery) WithUseBandwidth ¶
func (gq *GroupsQuery) WithUseBandwidth(opts ...func(*GroupBandwidthQuery)) *GroupsQuery
WithUseBandwidth tells the query-builder to eager-load the nodes that are connected to the "use_bandwidth" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupsQuery) WithUsers ¶
func (gq *GroupsQuery) WithUsers(opts ...func(*UsersQuery)) *GroupsQuery
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 GroupsSelect ¶
type GroupsSelect struct { *GroupsQuery // contains filtered or unexported fields }
GroupsSelect is the builder for selecting fields of Groups entities.
func (*GroupsSelect) Bool ¶
func (gs *GroupsSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupsSelect) BoolX ¶
func (gs *GroupsSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*GroupsSelect) Bools ¶
func (gs *GroupsSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupsSelect) BoolsX ¶
func (gs *GroupsSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*GroupsSelect) Float64 ¶
func (gs *GroupsSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupsSelect) Float64X ¶
func (gs *GroupsSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*GroupsSelect) Float64s ¶
func (gs *GroupsSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupsSelect) Float64sX ¶
func (gs *GroupsSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupsSelect) Int ¶
func (gs *GroupsSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupsSelect) IntX ¶
func (gs *GroupsSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*GroupsSelect) Ints ¶
func (gs *GroupsSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupsSelect) IntsX ¶
func (gs *GroupsSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*GroupsSelect) Scan ¶
func (gs *GroupsSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*GroupsSelect) ScanX ¶
func (gs *GroupsSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*GroupsSelect) String ¶
func (gs *GroupsSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*GroupsSelect) StringX ¶
func (gs *GroupsSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type GroupsUpdate ¶
type GroupsUpdate struct {
// contains filtered or unexported fields
}
GroupsUpdate is the builder for updating Groups entities.
func (*GroupsUpdate) AddUserIDs ¶
func (gu *GroupsUpdate) AddUserIDs(ids ...int) *GroupsUpdate
AddUserIDs adds the "users" edge to the Users entity by IDs.
func (*GroupsUpdate) AddUsers ¶
func (gu *GroupsUpdate) AddUsers(u ...*Users) *GroupsUpdate
AddUsers adds the "users" edges to the Users entity.
func (*GroupsUpdate) ClearGCreatedAt ¶
func (gu *GroupsUpdate) ClearGCreatedAt() *GroupsUpdate
ClearGCreatedAt clears the value of the "g_created_at" field.
func (*GroupsUpdate) ClearUseBandwidth ¶
func (gu *GroupsUpdate) ClearUseBandwidth() *GroupsUpdate
ClearUseBandwidth clears the "use_bandwidth" edge to the GroupBandwidth entity.
func (*GroupsUpdate) ClearUsers ¶
func (gu *GroupsUpdate) ClearUsers() *GroupsUpdate
ClearUsers clears all "users" edges to the Users entity.
func (*GroupsUpdate) Exec ¶
func (gu *GroupsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupsUpdate) ExecX ¶
func (gu *GroupsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupsUpdate) Mutation ¶
func (gu *GroupsUpdate) Mutation() *GroupsMutation
Mutation returns the GroupsMutation object of the builder.
func (*GroupsUpdate) RemoveUserIDs ¶
func (gu *GroupsUpdate) RemoveUserIDs(ids ...int) *GroupsUpdate
RemoveUserIDs removes the "users" edge to Users entities by IDs.
func (*GroupsUpdate) RemoveUsers ¶
func (gu *GroupsUpdate) RemoveUsers(u ...*Users) *GroupsUpdate
RemoveUsers removes "users" edges to Users entities.
func (*GroupsUpdate) Save ¶
func (gu *GroupsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupsUpdate) SaveX ¶
func (gu *GroupsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupsUpdate) SetGCreatedAt ¶
func (gu *GroupsUpdate) SetGCreatedAt(t time.Time) *GroupsUpdate
SetGCreatedAt sets the "g_created_at" field.
func (*GroupsUpdate) SetGIsIntOrg ¶
func (gu *GroupsUpdate) SetGIsIntOrg(b bool) *GroupsUpdate
SetGIsIntOrg sets the "g_is_int_org" field.
func (*GroupsUpdate) SetGIsSuperAdmin ¶
func (gu *GroupsUpdate) SetGIsSuperAdmin(b bool) *GroupsUpdate
SetGIsSuperAdmin sets the "g_is_super_admin" field.
func (*GroupsUpdate) SetGName ¶
func (gu *GroupsUpdate) SetGName(s string) *GroupsUpdate
SetGName sets the "g_name" field.
func (*GroupsUpdate) SetNillableGCreatedAt ¶
func (gu *GroupsUpdate) SetNillableGCreatedAt(t *time.Time) *GroupsUpdate
SetNillableGCreatedAt sets the "g_created_at" field if the given value is not nil.
func (*GroupsUpdate) SetNillableGIsIntOrg ¶
func (gu *GroupsUpdate) SetNillableGIsIntOrg(b *bool) *GroupsUpdate
SetNillableGIsIntOrg sets the "g_is_int_org" field if the given value is not nil.
func (*GroupsUpdate) SetNillableGIsSuperAdmin ¶
func (gu *GroupsUpdate) SetNillableGIsSuperAdmin(b *bool) *GroupsUpdate
SetNillableGIsSuperAdmin sets the "g_is_super_admin" field if the given value is not nil.
func (*GroupsUpdate) SetNillableUseBandwidthID ¶
func (gu *GroupsUpdate) SetNillableUseBandwidthID(id *int) *GroupsUpdate
SetNillableUseBandwidthID sets the "use_bandwidth" edge to the GroupBandwidth entity by ID if the given value is not nil.
func (*GroupsUpdate) SetUseBandwidth ¶
func (gu *GroupsUpdate) SetUseBandwidth(g *GroupBandwidth) *GroupsUpdate
SetUseBandwidth sets the "use_bandwidth" edge to the GroupBandwidth entity.
func (*GroupsUpdate) SetUseBandwidthID ¶
func (gu *GroupsUpdate) SetUseBandwidthID(id int) *GroupsUpdate
SetUseBandwidthID sets the "use_bandwidth" edge to the GroupBandwidth entity by ID.
func (*GroupsUpdate) Where ¶
func (gu *GroupsUpdate) Where(ps ...predicate.Groups) *GroupsUpdate
Where appends a list predicates to the GroupsUpdate builder.
type GroupsUpdateOne ¶
type GroupsUpdateOne struct {
// contains filtered or unexported fields
}
GroupsUpdateOne is the builder for updating a single Groups entity.
func (*GroupsUpdateOne) AddUserIDs ¶
func (guo *GroupsUpdateOne) AddUserIDs(ids ...int) *GroupsUpdateOne
AddUserIDs adds the "users" edge to the Users entity by IDs.
func (*GroupsUpdateOne) AddUsers ¶
func (guo *GroupsUpdateOne) AddUsers(u ...*Users) *GroupsUpdateOne
AddUsers adds the "users" edges to the Users entity.
func (*GroupsUpdateOne) ClearGCreatedAt ¶
func (guo *GroupsUpdateOne) ClearGCreatedAt() *GroupsUpdateOne
ClearGCreatedAt clears the value of the "g_created_at" field.
func (*GroupsUpdateOne) ClearUseBandwidth ¶
func (guo *GroupsUpdateOne) ClearUseBandwidth() *GroupsUpdateOne
ClearUseBandwidth clears the "use_bandwidth" edge to the GroupBandwidth entity.
func (*GroupsUpdateOne) ClearUsers ¶
func (guo *GroupsUpdateOne) ClearUsers() *GroupsUpdateOne
ClearUsers clears all "users" edges to the Users entity.
func (*GroupsUpdateOne) Exec ¶
func (guo *GroupsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupsUpdateOne) ExecX ¶
func (guo *GroupsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupsUpdateOne) Mutation ¶
func (guo *GroupsUpdateOne) Mutation() *GroupsMutation
Mutation returns the GroupsMutation object of the builder.
func (*GroupsUpdateOne) RemoveUserIDs ¶
func (guo *GroupsUpdateOne) RemoveUserIDs(ids ...int) *GroupsUpdateOne
RemoveUserIDs removes the "users" edge to Users entities by IDs.
func (*GroupsUpdateOne) RemoveUsers ¶
func (guo *GroupsUpdateOne) RemoveUsers(u ...*Users) *GroupsUpdateOne
RemoveUsers removes "users" edges to Users entities.
func (*GroupsUpdateOne) Save ¶
func (guo *GroupsUpdateOne) Save(ctx context.Context) (*Groups, error)
Save executes the query and returns the updated Groups entity.
func (*GroupsUpdateOne) SaveX ¶
func (guo *GroupsUpdateOne) SaveX(ctx context.Context) *Groups
SaveX is like Save, but panics if an error occurs.
func (*GroupsUpdateOne) Select ¶
func (guo *GroupsUpdateOne) Select(field string, fields ...string) *GroupsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupsUpdateOne) SetGCreatedAt ¶
func (guo *GroupsUpdateOne) SetGCreatedAt(t time.Time) *GroupsUpdateOne
SetGCreatedAt sets the "g_created_at" field.
func (*GroupsUpdateOne) SetGIsIntOrg ¶
func (guo *GroupsUpdateOne) SetGIsIntOrg(b bool) *GroupsUpdateOne
SetGIsIntOrg sets the "g_is_int_org" field.
func (*GroupsUpdateOne) SetGIsSuperAdmin ¶
func (guo *GroupsUpdateOne) SetGIsSuperAdmin(b bool) *GroupsUpdateOne
SetGIsSuperAdmin sets the "g_is_super_admin" field.
func (*GroupsUpdateOne) SetGName ¶
func (guo *GroupsUpdateOne) SetGName(s string) *GroupsUpdateOne
SetGName sets the "g_name" field.
func (*GroupsUpdateOne) SetNillableGCreatedAt ¶
func (guo *GroupsUpdateOne) SetNillableGCreatedAt(t *time.Time) *GroupsUpdateOne
SetNillableGCreatedAt sets the "g_created_at" field if the given value is not nil.
func (*GroupsUpdateOne) SetNillableGIsIntOrg ¶
func (guo *GroupsUpdateOne) SetNillableGIsIntOrg(b *bool) *GroupsUpdateOne
SetNillableGIsIntOrg sets the "g_is_int_org" field if the given value is not nil.
func (*GroupsUpdateOne) SetNillableGIsSuperAdmin ¶
func (guo *GroupsUpdateOne) SetNillableGIsSuperAdmin(b *bool) *GroupsUpdateOne
SetNillableGIsSuperAdmin sets the "g_is_super_admin" field if the given value is not nil.
func (*GroupsUpdateOne) SetNillableUseBandwidthID ¶
func (guo *GroupsUpdateOne) SetNillableUseBandwidthID(id *int) *GroupsUpdateOne
SetNillableUseBandwidthID sets the "use_bandwidth" edge to the GroupBandwidth entity by ID if the given value is not nil.
func (*GroupsUpdateOne) SetUseBandwidth ¶
func (guo *GroupsUpdateOne) SetUseBandwidth(g *GroupBandwidth) *GroupsUpdateOne
SetUseBandwidth sets the "use_bandwidth" edge to the GroupBandwidth entity.
func (*GroupsUpdateOne) SetUseBandwidthID ¶
func (guo *GroupsUpdateOne) SetUseBandwidthID(id int) *GroupsUpdateOne
SetUseBandwidthID sets the "use_bandwidth" edge to the GroupBandwidth entity by ID.
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 OnlineSession ¶
type OnlineSession struct { // ID of the ent. ID int `json:"id,omitempty"` // IPAddress holds the value of the "ip_address" field. IPAddress string `json:"ip_address,omitempty"` // UPid holds the value of the "u_pid" field. UPid string `json:"u_pid,omitempty"` // contains filtered or unexported fields }
OnlineSession is the model entity for the OnlineSession schema.
func (*OnlineSession) String ¶
func (os *OnlineSession) String() string
String implements the fmt.Stringer.
func (*OnlineSession) Unwrap ¶
func (os *OnlineSession) Unwrap() *OnlineSession
Unwrap unwraps the OnlineSession 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 (*OnlineSession) Update ¶
func (os *OnlineSession) Update() *OnlineSessionUpdateOne
Update returns a builder for updating this OnlineSession. Note that you need to call OnlineSession.Unwrap() before calling this method if this OnlineSession was returned from a transaction, and the transaction was committed or rolled back.
type OnlineSessionClient ¶
type OnlineSessionClient struct {
// contains filtered or unexported fields
}
OnlineSessionClient is a client for the OnlineSession schema.
func NewOnlineSessionClient ¶
func NewOnlineSessionClient(c config) *OnlineSessionClient
NewOnlineSessionClient returns a client for the OnlineSession from the given config.
func (*OnlineSessionClient) Create ¶
func (c *OnlineSessionClient) Create() *OnlineSessionCreate
Create returns a create builder for OnlineSession.
func (*OnlineSessionClient) CreateBulk ¶
func (c *OnlineSessionClient) CreateBulk(builders ...*OnlineSessionCreate) *OnlineSessionCreateBulk
CreateBulk returns a builder for creating a bulk of OnlineSession entities.
func (*OnlineSessionClient) Delete ¶
func (c *OnlineSessionClient) Delete() *OnlineSessionDelete
Delete returns a delete builder for OnlineSession.
func (*OnlineSessionClient) DeleteOne ¶
func (c *OnlineSessionClient) DeleteOne(os *OnlineSession) *OnlineSessionDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*OnlineSessionClient) DeleteOneID ¶
func (c *OnlineSessionClient) DeleteOneID(id int) *OnlineSessionDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*OnlineSessionClient) Get ¶
func (c *OnlineSessionClient) Get(ctx context.Context, id int) (*OnlineSession, error)
Get returns a OnlineSession entity by its id.
func (*OnlineSessionClient) GetX ¶
func (c *OnlineSessionClient) GetX(ctx context.Context, id int) *OnlineSession
GetX is like Get, but panics if an error occurs.
func (*OnlineSessionClient) Hooks ¶
func (c *OnlineSessionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*OnlineSessionClient) Query ¶
func (c *OnlineSessionClient) Query() *OnlineSessionQuery
Query returns a query builder for OnlineSession.
func (*OnlineSessionClient) Update ¶
func (c *OnlineSessionClient) Update() *OnlineSessionUpdate
Update returns an update builder for OnlineSession.
func (*OnlineSessionClient) UpdateOne ¶
func (c *OnlineSessionClient) UpdateOne(os *OnlineSession) *OnlineSessionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*OnlineSessionClient) UpdateOneID ¶
func (c *OnlineSessionClient) UpdateOneID(id int) *OnlineSessionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*OnlineSessionClient) Use ¶
func (c *OnlineSessionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `onlinesession.Hooks(f(g(h())))`.
type OnlineSessionCreate ¶
type OnlineSessionCreate struct {
// contains filtered or unexported fields
}
OnlineSessionCreate is the builder for creating a OnlineSession entity.
func (*OnlineSessionCreate) Exec ¶
func (osc *OnlineSessionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*OnlineSessionCreate) ExecX ¶
func (osc *OnlineSessionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OnlineSessionCreate) Mutation ¶
func (osc *OnlineSessionCreate) Mutation() *OnlineSessionMutation
Mutation returns the OnlineSessionMutation object of the builder.
func (*OnlineSessionCreate) Save ¶
func (osc *OnlineSessionCreate) Save(ctx context.Context) (*OnlineSession, error)
Save creates the OnlineSession in the database.
func (*OnlineSessionCreate) SaveX ¶
func (osc *OnlineSessionCreate) SaveX(ctx context.Context) *OnlineSession
SaveX calls Save and panics if Save returns an error.
func (*OnlineSessionCreate) SetIPAddress ¶
func (osc *OnlineSessionCreate) SetIPAddress(s string) *OnlineSessionCreate
SetIPAddress sets the "ip_address" field.
func (*OnlineSessionCreate) SetUPid ¶
func (osc *OnlineSessionCreate) SetUPid(s string) *OnlineSessionCreate
SetUPid sets the "u_pid" field.
type OnlineSessionCreateBulk ¶
type OnlineSessionCreateBulk struct {
// contains filtered or unexported fields
}
OnlineSessionCreateBulk is the builder for creating many OnlineSession entities in bulk.
func (*OnlineSessionCreateBulk) Exec ¶
func (oscb *OnlineSessionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*OnlineSessionCreateBulk) ExecX ¶
func (oscb *OnlineSessionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OnlineSessionCreateBulk) Save ¶
func (oscb *OnlineSessionCreateBulk) Save(ctx context.Context) ([]*OnlineSession, error)
Save creates the OnlineSession entities in the database.
func (*OnlineSessionCreateBulk) SaveX ¶
func (oscb *OnlineSessionCreateBulk) SaveX(ctx context.Context) []*OnlineSession
SaveX is like Save, but panics if an error occurs.
type OnlineSessionDelete ¶
type OnlineSessionDelete struct {
// contains filtered or unexported fields
}
OnlineSessionDelete is the builder for deleting a OnlineSession entity.
func (*OnlineSessionDelete) Exec ¶
func (osd *OnlineSessionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*OnlineSessionDelete) ExecX ¶
func (osd *OnlineSessionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*OnlineSessionDelete) Where ¶
func (osd *OnlineSessionDelete) Where(ps ...predicate.OnlineSession) *OnlineSessionDelete
Where appends a list predicates to the OnlineSessionDelete builder.
type OnlineSessionDeleteOne ¶
type OnlineSessionDeleteOne struct {
// contains filtered or unexported fields
}
OnlineSessionDeleteOne is the builder for deleting a single OnlineSession entity.
func (*OnlineSessionDeleteOne) Exec ¶
func (osdo *OnlineSessionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*OnlineSessionDeleteOne) ExecX ¶
func (osdo *OnlineSessionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type OnlineSessionGroupBy ¶
type OnlineSessionGroupBy struct {
// contains filtered or unexported fields
}
OnlineSessionGroupBy is the group-by builder for OnlineSession entities.
func (*OnlineSessionGroupBy) Aggregate ¶
func (osgb *OnlineSessionGroupBy) Aggregate(fns ...AggregateFunc) *OnlineSessionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*OnlineSessionGroupBy) Bool ¶
func (osgb *OnlineSessionGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OnlineSessionGroupBy) BoolX ¶
func (osgb *OnlineSessionGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*OnlineSessionGroupBy) Bools ¶
func (osgb *OnlineSessionGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*OnlineSessionGroupBy) BoolsX ¶
func (osgb *OnlineSessionGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*OnlineSessionGroupBy) Float64 ¶
func (osgb *OnlineSessionGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OnlineSessionGroupBy) Float64X ¶
func (osgb *OnlineSessionGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*OnlineSessionGroupBy) Float64s ¶
func (osgb *OnlineSessionGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*OnlineSessionGroupBy) Float64sX ¶
func (osgb *OnlineSessionGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*OnlineSessionGroupBy) Int ¶
func (osgb *OnlineSessionGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OnlineSessionGroupBy) IntX ¶
func (osgb *OnlineSessionGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*OnlineSessionGroupBy) Ints ¶
func (osgb *OnlineSessionGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*OnlineSessionGroupBy) IntsX ¶
func (osgb *OnlineSessionGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*OnlineSessionGroupBy) Scan ¶
func (osgb *OnlineSessionGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*OnlineSessionGroupBy) ScanX ¶
func (osgb *OnlineSessionGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*OnlineSessionGroupBy) String ¶
func (osgb *OnlineSessionGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*OnlineSessionGroupBy) StringX ¶
func (osgb *OnlineSessionGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type OnlineSessionMutation ¶
type OnlineSessionMutation struct {
// contains filtered or unexported fields
}
OnlineSessionMutation represents an operation that mutates the OnlineSession nodes in the graph.
func (*OnlineSessionMutation) AddField ¶
func (m *OnlineSessionMutation) 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 (*OnlineSessionMutation) AddedEdges ¶
func (m *OnlineSessionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*OnlineSessionMutation) AddedField ¶
func (m *OnlineSessionMutation) 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 (*OnlineSessionMutation) AddedFields ¶
func (m *OnlineSessionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*OnlineSessionMutation) AddedIDs ¶
func (m *OnlineSessionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*OnlineSessionMutation) ClearEdge ¶
func (m *OnlineSessionMutation) 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 (*OnlineSessionMutation) ClearField ¶
func (m *OnlineSessionMutation) 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 (*OnlineSessionMutation) ClearedEdges ¶
func (m *OnlineSessionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*OnlineSessionMutation) ClearedFields ¶
func (m *OnlineSessionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (OnlineSessionMutation) Client ¶
func (m OnlineSessionMutation) 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 (*OnlineSessionMutation) EdgeCleared ¶
func (m *OnlineSessionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*OnlineSessionMutation) Field ¶
func (m *OnlineSessionMutation) 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 (*OnlineSessionMutation) FieldCleared ¶
func (m *OnlineSessionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*OnlineSessionMutation) Fields ¶
func (m *OnlineSessionMutation) 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 (*OnlineSessionMutation) ID ¶
func (m *OnlineSessionMutation) ID() (id int, 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 (*OnlineSessionMutation) IPAddress ¶
func (m *OnlineSessionMutation) IPAddress() (r string, exists bool)
IPAddress returns the value of the "ip_address" field in the mutation.
func (*OnlineSessionMutation) 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 (*OnlineSessionMutation) OldIPAddress ¶
func (m *OnlineSessionMutation) OldIPAddress(ctx context.Context) (v string, err error)
OldIPAddress returns the old "ip_address" field's value of the OnlineSession entity. If the OnlineSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OnlineSessionMutation) OldUPid ¶
func (m *OnlineSessionMutation) OldUPid(ctx context.Context) (v string, err error)
OldUPid returns the old "u_pid" field's value of the OnlineSession entity. If the OnlineSession object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*OnlineSessionMutation) Op ¶
func (m *OnlineSessionMutation) Op() Op
Op returns the operation name.
func (*OnlineSessionMutation) RemovedEdges ¶
func (m *OnlineSessionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*OnlineSessionMutation) RemovedIDs ¶
func (m *OnlineSessionMutation) 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 (*OnlineSessionMutation) ResetEdge ¶
func (m *OnlineSessionMutation) 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 (*OnlineSessionMutation) ResetField ¶
func (m *OnlineSessionMutation) 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 (*OnlineSessionMutation) ResetIPAddress ¶
func (m *OnlineSessionMutation) ResetIPAddress()
ResetIPAddress resets all changes to the "ip_address" field.
func (*OnlineSessionMutation) ResetUPid ¶
func (m *OnlineSessionMutation) ResetUPid()
ResetUPid resets all changes to the "u_pid" field.
func (*OnlineSessionMutation) SetField ¶
func (m *OnlineSessionMutation) 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 (*OnlineSessionMutation) SetIPAddress ¶
func (m *OnlineSessionMutation) SetIPAddress(s string)
SetIPAddress sets the "ip_address" field.
func (*OnlineSessionMutation) SetUPid ¶
func (m *OnlineSessionMutation) SetUPid(s string)
SetUPid sets the "u_pid" field.
func (OnlineSessionMutation) Tx ¶
func (m OnlineSessionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*OnlineSessionMutation) Type ¶
func (m *OnlineSessionMutation) Type() string
Type returns the node type of this mutation (OnlineSession).
func (*OnlineSessionMutation) UPid ¶
func (m *OnlineSessionMutation) UPid() (r string, exists bool)
UPid returns the value of the "u_pid" field in the mutation.
func (*OnlineSessionMutation) Where ¶
func (m *OnlineSessionMutation) Where(ps ...predicate.OnlineSession)
Where appends a list predicates to the OnlineSessionMutation builder.
type OnlineSessionQuery ¶
type OnlineSessionQuery struct {
// contains filtered or unexported fields
}
OnlineSessionQuery is the builder for querying OnlineSession entities.
func (*OnlineSessionQuery) All ¶
func (osq *OnlineSessionQuery) All(ctx context.Context) ([]*OnlineSession, error)
All executes the query and returns a list of OnlineSessions.
func (*OnlineSessionQuery) AllX ¶
func (osq *OnlineSessionQuery) AllX(ctx context.Context) []*OnlineSession
AllX is like All, but panics if an error occurs.
func (*OnlineSessionQuery) Clone ¶
func (osq *OnlineSessionQuery) Clone() *OnlineSessionQuery
Clone returns a duplicate of the OnlineSessionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*OnlineSessionQuery) Count ¶
func (osq *OnlineSessionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*OnlineSessionQuery) CountX ¶
func (osq *OnlineSessionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*OnlineSessionQuery) Exist ¶
func (osq *OnlineSessionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*OnlineSessionQuery) ExistX ¶
func (osq *OnlineSessionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*OnlineSessionQuery) First ¶
func (osq *OnlineSessionQuery) First(ctx context.Context) (*OnlineSession, error)
First returns the first OnlineSession entity from the query. Returns a *NotFoundError when no OnlineSession was found.
func (*OnlineSessionQuery) FirstID ¶
func (osq *OnlineSessionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first OnlineSession ID from the query. Returns a *NotFoundError when no OnlineSession ID was found.
func (*OnlineSessionQuery) FirstIDX ¶
func (osq *OnlineSessionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*OnlineSessionQuery) FirstX ¶
func (osq *OnlineSessionQuery) FirstX(ctx context.Context) *OnlineSession
FirstX is like First, but panics if an error occurs.
func (*OnlineSessionQuery) GroupBy ¶
func (osq *OnlineSessionQuery) GroupBy(field string, fields ...string) *OnlineSessionGroupBy
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 { IPAddress string `json:"ip_address,omitempty"` Count int `json:"count,omitempty"` } client.OnlineSession.Query(). GroupBy(onlinesession.FieldIPAddress). Aggregate(ent.Count()). Scan(ctx, &v)
func (*OnlineSessionQuery) IDs ¶
func (osq *OnlineSessionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of OnlineSession IDs.
func (*OnlineSessionQuery) IDsX ¶
func (osq *OnlineSessionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*OnlineSessionQuery) Limit ¶
func (osq *OnlineSessionQuery) Limit(limit int) *OnlineSessionQuery
Limit adds a limit step to the query.
func (*OnlineSessionQuery) Offset ¶
func (osq *OnlineSessionQuery) Offset(offset int) *OnlineSessionQuery
Offset adds an offset step to the query.
func (*OnlineSessionQuery) Only ¶
func (osq *OnlineSessionQuery) Only(ctx context.Context) (*OnlineSession, error)
Only returns a single OnlineSession entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one OnlineSession entity is not found. Returns a *NotFoundError when no OnlineSession entities are found.
func (*OnlineSessionQuery) OnlyID ¶
func (osq *OnlineSessionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only OnlineSession ID in the query. Returns a *NotSingularError when exactly one OnlineSession ID is not found. Returns a *NotFoundError when no entities are found.
func (*OnlineSessionQuery) OnlyIDX ¶
func (osq *OnlineSessionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*OnlineSessionQuery) OnlyX ¶
func (osq *OnlineSessionQuery) OnlyX(ctx context.Context) *OnlineSession
OnlyX is like Only, but panics if an error occurs.
func (*OnlineSessionQuery) Order ¶
func (osq *OnlineSessionQuery) Order(o ...OrderFunc) *OnlineSessionQuery
Order adds an order step to the query.
func (*OnlineSessionQuery) Select ¶
func (osq *OnlineSessionQuery) Select(fields ...string) *OnlineSessionSelect
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 { IPAddress string `json:"ip_address,omitempty"` } client.OnlineSession.Query(). Select(onlinesession.FieldIPAddress). Scan(ctx, &v)
func (*OnlineSessionQuery) Unique ¶
func (osq *OnlineSessionQuery) Unique(unique bool) *OnlineSessionQuery
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 (*OnlineSessionQuery) Where ¶
func (osq *OnlineSessionQuery) Where(ps ...predicate.OnlineSession) *OnlineSessionQuery
Where adds a new predicate for the OnlineSessionQuery builder.
type OnlineSessionSelect ¶
type OnlineSessionSelect struct { *OnlineSessionQuery // contains filtered or unexported fields }
OnlineSessionSelect is the builder for selecting fields of OnlineSession entities.
func (*OnlineSessionSelect) Bool ¶
func (oss *OnlineSessionSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*OnlineSessionSelect) BoolX ¶
func (oss *OnlineSessionSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*OnlineSessionSelect) Bools ¶
func (oss *OnlineSessionSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*OnlineSessionSelect) BoolsX ¶
func (oss *OnlineSessionSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*OnlineSessionSelect) Float64 ¶
func (oss *OnlineSessionSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*OnlineSessionSelect) Float64X ¶
func (oss *OnlineSessionSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*OnlineSessionSelect) Float64s ¶
func (oss *OnlineSessionSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*OnlineSessionSelect) Float64sX ¶
func (oss *OnlineSessionSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*OnlineSessionSelect) Int ¶
func (oss *OnlineSessionSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*OnlineSessionSelect) IntX ¶
func (oss *OnlineSessionSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*OnlineSessionSelect) Ints ¶
func (oss *OnlineSessionSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*OnlineSessionSelect) IntsX ¶
func (oss *OnlineSessionSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*OnlineSessionSelect) Scan ¶
func (oss *OnlineSessionSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*OnlineSessionSelect) ScanX ¶
func (oss *OnlineSessionSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*OnlineSessionSelect) String ¶
func (oss *OnlineSessionSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*OnlineSessionSelect) StringX ¶
func (oss *OnlineSessionSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type OnlineSessionUpdate ¶
type OnlineSessionUpdate struct {
// contains filtered or unexported fields
}
OnlineSessionUpdate is the builder for updating OnlineSession entities.
func (*OnlineSessionUpdate) Exec ¶
func (osu *OnlineSessionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*OnlineSessionUpdate) ExecX ¶
func (osu *OnlineSessionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OnlineSessionUpdate) Mutation ¶
func (osu *OnlineSessionUpdate) Mutation() *OnlineSessionMutation
Mutation returns the OnlineSessionMutation object of the builder.
func (*OnlineSessionUpdate) Save ¶
func (osu *OnlineSessionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*OnlineSessionUpdate) SaveX ¶
func (osu *OnlineSessionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*OnlineSessionUpdate) SetIPAddress ¶
func (osu *OnlineSessionUpdate) SetIPAddress(s string) *OnlineSessionUpdate
SetIPAddress sets the "ip_address" field.
func (*OnlineSessionUpdate) SetUPid ¶
func (osu *OnlineSessionUpdate) SetUPid(s string) *OnlineSessionUpdate
SetUPid sets the "u_pid" field.
func (*OnlineSessionUpdate) Where ¶
func (osu *OnlineSessionUpdate) Where(ps ...predicate.OnlineSession) *OnlineSessionUpdate
Where appends a list predicates to the OnlineSessionUpdate builder.
type OnlineSessionUpdateOne ¶
type OnlineSessionUpdateOne struct {
// contains filtered or unexported fields
}
OnlineSessionUpdateOne is the builder for updating a single OnlineSession entity.
func (*OnlineSessionUpdateOne) Exec ¶
func (osuo *OnlineSessionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*OnlineSessionUpdateOne) ExecX ¶
func (osuo *OnlineSessionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*OnlineSessionUpdateOne) Mutation ¶
func (osuo *OnlineSessionUpdateOne) Mutation() *OnlineSessionMutation
Mutation returns the OnlineSessionMutation object of the builder.
func (*OnlineSessionUpdateOne) Save ¶
func (osuo *OnlineSessionUpdateOne) Save(ctx context.Context) (*OnlineSession, error)
Save executes the query and returns the updated OnlineSession entity.
func (*OnlineSessionUpdateOne) SaveX ¶
func (osuo *OnlineSessionUpdateOne) SaveX(ctx context.Context) *OnlineSession
SaveX is like Save, but panics if an error occurs.
func (*OnlineSessionUpdateOne) Select ¶
func (osuo *OnlineSessionUpdateOne) Select(field string, fields ...string) *OnlineSessionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*OnlineSessionUpdateOne) SetIPAddress ¶
func (osuo *OnlineSessionUpdateOne) SetIPAddress(s string) *OnlineSessionUpdateOne
SetIPAddress sets the "ip_address" field.
func (*OnlineSessionUpdateOne) SetUPid ¶
func (osuo *OnlineSessionUpdateOne) SetUPid(s string) *OnlineSessionUpdateOne
SetUPid sets the "u_pid" field.
type OnlineSessions ¶
type OnlineSessions []*OnlineSession
OnlineSessions is a parsable slice of OnlineSession.
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(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 Rollbacker method.
type Tx ¶
type Tx struct { // GroupBandwidth is the client for interacting with the GroupBandwidth builders. GroupBandwidth *GroupBandwidthClient // Groups is the client for interacting with the Groups builders. Groups *GroupsClient // OnlineSession is the client for interacting with the OnlineSession builders. OnlineSession *OnlineSessionClient // Users is the client for interacting with the Users builders. Users *UsersClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type Users ¶
type Users struct { // ID of the ent. ID int `json:"id,omitempty"` // UPid holds the value of the "u_pid" field. UPid string `json:"u_pid,omitempty"` // UOrgid holds the value of the "u_orgid" field. UOrgid string `json:"u_orgid,omitempty"` // UFirstName holds the value of the "u_first_name" field. UFirstName string `json:"u_first_name,omitempty"` // ULastName holds the value of the "u_last_name" field. ULastName string `json:"u_last_name,omitempty"` // UIsActive holds the value of the "u_is_active" field. UIsActive bool `json:"u_is_active,omitempty"` // UCreatedAt holds the value of the "u_created_at" field. UCreatedAt time.Time `json:"u_created_at,omitempty"` // UPasswordUpdatedAt holds the value of the "u_password_updated_at" field. UPasswordUpdatedAt time.Time `json:"u_password_updated_at,omitempty"` // UExpiredAt holds the value of the "u_expired_at" field. UExpiredAt time.Time `json:"u_expired_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UsersQuery when eager-loading is set. Edges UsersEdges `json:"edges"` // contains filtered or unexported fields }
Users is the model entity for the Users schema.
func (*Users) QueryInGroup ¶
func (u *Users) QueryInGroup() *GroupsQuery
QueryInGroup queries the "in_group" edge of the Users entity.
func (*Users) Unwrap ¶
Unwrap unwraps the Users 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 (*Users) Update ¶
func (u *Users) Update() *UsersUpdateOne
Update returns a builder for updating this Users. Note that you need to call Users.Unwrap() before calling this method if this Users was returned from a transaction, and the transaction was committed or rolled back.
type UsersClient ¶
type UsersClient struct {
// contains filtered or unexported fields
}
UsersClient is a client for the Users schema.
func NewUsersClient ¶
func NewUsersClient(c config) *UsersClient
NewUsersClient returns a client for the Users from the given config.
func (*UsersClient) Create ¶
func (c *UsersClient) Create() *UsersCreate
Create returns a create builder for Users.
func (*UsersClient) CreateBulk ¶
func (c *UsersClient) CreateBulk(builders ...*UsersCreate) *UsersCreateBulk
CreateBulk returns a builder for creating a bulk of Users entities.
func (*UsersClient) Delete ¶
func (c *UsersClient) Delete() *UsersDelete
Delete returns a delete builder for Users.
func (*UsersClient) DeleteOne ¶
func (c *UsersClient) DeleteOne(u *Users) *UsersDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*UsersClient) DeleteOneID ¶
func (c *UsersClient) DeleteOneID(id int) *UsersDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*UsersClient) GetX ¶
func (c *UsersClient) GetX(ctx context.Context, id int) *Users
GetX is like Get, but panics if an error occurs.
func (*UsersClient) Query ¶
func (c *UsersClient) Query() *UsersQuery
Query returns a query builder for Users.
func (*UsersClient) QueryInGroup ¶
func (c *UsersClient) QueryInGroup(u *Users) *GroupsQuery
QueryInGroup queries the in_group edge of a Users.
func (*UsersClient) Update ¶
func (c *UsersClient) Update() *UsersUpdate
Update returns an update builder for Users.
func (*UsersClient) UpdateOne ¶
func (c *UsersClient) UpdateOne(u *Users) *UsersUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UsersClient) UpdateOneID ¶
func (c *UsersClient) UpdateOneID(id int) *UsersUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UsersClient) Use ¶
func (c *UsersClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `users.Hooks(f(g(h())))`.
type UsersCreate ¶
type UsersCreate struct {
// contains filtered or unexported fields
}
UsersCreate is the builder for creating a Users entity.
func (*UsersCreate) Exec ¶
func (uc *UsersCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UsersCreate) ExecX ¶
func (uc *UsersCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersCreate) Mutation ¶
func (uc *UsersCreate) Mutation() *UsersMutation
Mutation returns the UsersMutation object of the builder.
func (*UsersCreate) Save ¶
func (uc *UsersCreate) Save(ctx context.Context) (*Users, error)
Save creates the Users in the database.
func (*UsersCreate) SaveX ¶
func (uc *UsersCreate) SaveX(ctx context.Context) *Users
SaveX calls Save and panics if Save returns an error.
func (*UsersCreate) SetInGroup ¶
func (uc *UsersCreate) SetInGroup(g *Groups) *UsersCreate
SetInGroup sets the "in_group" edge to the Groups entity.
func (*UsersCreate) SetInGroupID ¶
func (uc *UsersCreate) SetInGroupID(id int) *UsersCreate
SetInGroupID sets the "in_group" edge to the Groups entity by ID.
func (*UsersCreate) SetNillableInGroupID ¶
func (uc *UsersCreate) SetNillableInGroupID(id *int) *UsersCreate
SetNillableInGroupID sets the "in_group" edge to the Groups entity by ID if the given value is not nil.
func (*UsersCreate) SetNillableUCreatedAt ¶
func (uc *UsersCreate) SetNillableUCreatedAt(t *time.Time) *UsersCreate
SetNillableUCreatedAt sets the "u_created_at" field if the given value is not nil.
func (*UsersCreate) SetNillableUExpiredAt ¶
func (uc *UsersCreate) SetNillableUExpiredAt(t *time.Time) *UsersCreate
SetNillableUExpiredAt sets the "u_expired_at" field if the given value is not nil.
func (*UsersCreate) SetNillableUIsActive ¶
func (uc *UsersCreate) SetNillableUIsActive(b *bool) *UsersCreate
SetNillableUIsActive sets the "u_is_active" field if the given value is not nil.
func (*UsersCreate) SetNillableUPasswordUpdatedAt ¶
func (uc *UsersCreate) SetNillableUPasswordUpdatedAt(t *time.Time) *UsersCreate
SetNillableUPasswordUpdatedAt sets the "u_password_updated_at" field if the given value is not nil.
func (*UsersCreate) SetUCreatedAt ¶
func (uc *UsersCreate) SetUCreatedAt(t time.Time) *UsersCreate
SetUCreatedAt sets the "u_created_at" field.
func (*UsersCreate) SetUExpiredAt ¶
func (uc *UsersCreate) SetUExpiredAt(t time.Time) *UsersCreate
SetUExpiredAt sets the "u_expired_at" field.
func (*UsersCreate) SetUFirstName ¶
func (uc *UsersCreate) SetUFirstName(s string) *UsersCreate
SetUFirstName sets the "u_first_name" field.
func (*UsersCreate) SetUIsActive ¶
func (uc *UsersCreate) SetUIsActive(b bool) *UsersCreate
SetUIsActive sets the "u_is_active" field.
func (*UsersCreate) SetULastName ¶
func (uc *UsersCreate) SetULastName(s string) *UsersCreate
SetULastName sets the "u_last_name" field.
func (*UsersCreate) SetUOrgid ¶
func (uc *UsersCreate) SetUOrgid(s string) *UsersCreate
SetUOrgid sets the "u_orgid" field.
func (*UsersCreate) SetUPasswordUpdatedAt ¶
func (uc *UsersCreate) SetUPasswordUpdatedAt(t time.Time) *UsersCreate
SetUPasswordUpdatedAt sets the "u_password_updated_at" field.
func (*UsersCreate) SetUPid ¶
func (uc *UsersCreate) SetUPid(s string) *UsersCreate
SetUPid sets the "u_pid" field.
type UsersCreateBulk ¶
type UsersCreateBulk struct {
// contains filtered or unexported fields
}
UsersCreateBulk is the builder for creating many Users entities in bulk.
func (*UsersCreateBulk) Exec ¶
func (ucb *UsersCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UsersCreateBulk) ExecX ¶
func (ucb *UsersCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UsersDelete ¶
type UsersDelete struct {
// contains filtered or unexported fields
}
UsersDelete is the builder for deleting a Users entity.
func (*UsersDelete) Exec ¶
func (ud *UsersDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UsersDelete) ExecX ¶
func (ud *UsersDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UsersDelete) Where ¶
func (ud *UsersDelete) Where(ps ...predicate.Users) *UsersDelete
Where appends a list predicates to the UsersDelete builder.
type UsersDeleteOne ¶
type UsersDeleteOne struct {
// contains filtered or unexported fields
}
UsersDeleteOne is the builder for deleting a single Users entity.
func (*UsersDeleteOne) Exec ¶
func (udo *UsersDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UsersDeleteOne) ExecX ¶
func (udo *UsersDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UsersEdges ¶
type UsersEdges struct { // InGroup holds the value of the in_group edge. InGroup *Groups `json:"in_group,omitempty"` // contains filtered or unexported fields }
UsersEdges holds the relations/edges for other nodes in the graph.
func (UsersEdges) InGroupOrErr ¶
func (e UsersEdges) InGroupOrErr() (*Groups, error)
InGroupOrErr returns the InGroup value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UsersGroupBy ¶
type UsersGroupBy struct {
// contains filtered or unexported fields
}
UsersGroupBy is the group-by builder for Users entities.
func (*UsersGroupBy) Aggregate ¶
func (ugb *UsersGroupBy) Aggregate(fns ...AggregateFunc) *UsersGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UsersGroupBy) Bool ¶
func (ugb *UsersGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UsersGroupBy) BoolX ¶
func (ugb *UsersGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UsersGroupBy) Bools ¶
func (ugb *UsersGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*UsersGroupBy) BoolsX ¶
func (ugb *UsersGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UsersGroupBy) Float64 ¶
func (ugb *UsersGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UsersGroupBy) Float64X ¶
func (ugb *UsersGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UsersGroupBy) Float64s ¶
func (ugb *UsersGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*UsersGroupBy) Float64sX ¶
func (ugb *UsersGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UsersGroupBy) Int ¶
func (ugb *UsersGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UsersGroupBy) IntX ¶
func (ugb *UsersGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UsersGroupBy) Ints ¶
func (ugb *UsersGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*UsersGroupBy) IntsX ¶
func (ugb *UsersGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UsersGroupBy) Scan ¶
func (ugb *UsersGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*UsersGroupBy) ScanX ¶
func (ugb *UsersGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UsersGroupBy) String ¶
func (ugb *UsersGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*UsersGroupBy) StringX ¶
func (ugb *UsersGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UsersMutation ¶
type UsersMutation struct {
// contains filtered or unexported fields
}
UsersMutation represents an operation that mutates the Users nodes in the graph.
func (*UsersMutation) AddField ¶
func (m *UsersMutation) 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 (*UsersMutation) AddedEdges ¶
func (m *UsersMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UsersMutation) AddedField ¶
func (m *UsersMutation) 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 (*UsersMutation) AddedFields ¶
func (m *UsersMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UsersMutation) AddedIDs ¶
func (m *UsersMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UsersMutation) ClearEdge ¶
func (m *UsersMutation) 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 (*UsersMutation) ClearField ¶
func (m *UsersMutation) 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 (*UsersMutation) ClearInGroup ¶
func (m *UsersMutation) ClearInGroup()
ClearInGroup clears the "in_group" edge to the Groups entity.
func (*UsersMutation) ClearUCreatedAt ¶
func (m *UsersMutation) ClearUCreatedAt()
ClearUCreatedAt clears the value of the "u_created_at" field.
func (*UsersMutation) ClearUExpiredAt ¶
func (m *UsersMutation) ClearUExpiredAt()
ClearUExpiredAt clears the value of the "u_expired_at" field.
func (*UsersMutation) ClearUPasswordUpdatedAt ¶
func (m *UsersMutation) ClearUPasswordUpdatedAt()
ClearUPasswordUpdatedAt clears the value of the "u_password_updated_at" field.
func (*UsersMutation) ClearedEdges ¶
func (m *UsersMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UsersMutation) ClearedFields ¶
func (m *UsersMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UsersMutation) Client ¶
func (m UsersMutation) 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 (*UsersMutation) EdgeCleared ¶
func (m *UsersMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UsersMutation) Field ¶
func (m *UsersMutation) 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 (*UsersMutation) FieldCleared ¶
func (m *UsersMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UsersMutation) Fields ¶
func (m *UsersMutation) 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 (*UsersMutation) ID ¶
func (m *UsersMutation) ID() (id int, 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 (*UsersMutation) InGroupCleared ¶
func (m *UsersMutation) InGroupCleared() bool
InGroupCleared reports if the "in_group" edge to the Groups entity was cleared.
func (*UsersMutation) InGroupID ¶
func (m *UsersMutation) InGroupID() (id int, exists bool)
InGroupID returns the "in_group" edge ID in the mutation.
func (*UsersMutation) InGroupIDs ¶
func (m *UsersMutation) InGroupIDs() (ids []int)
InGroupIDs returns the "in_group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InGroupID instead. It exists only for internal usage by the builders.
func (*UsersMutation) 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 (*UsersMutation) OldUCreatedAt ¶
OldUCreatedAt returns the old "u_created_at" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldUExpiredAt ¶
OldUExpiredAt returns the old "u_expired_at" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldUFirstName ¶
func (m *UsersMutation) OldUFirstName(ctx context.Context) (v string, err error)
OldUFirstName returns the old "u_first_name" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldUIsActive ¶
func (m *UsersMutation) OldUIsActive(ctx context.Context) (v bool, err error)
OldUIsActive returns the old "u_is_active" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldULastName ¶
func (m *UsersMutation) OldULastName(ctx context.Context) (v string, err error)
OldULastName returns the old "u_last_name" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldUOrgid ¶
func (m *UsersMutation) OldUOrgid(ctx context.Context) (v string, err error)
OldUOrgid returns the old "u_orgid" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldUPasswordUpdatedAt ¶
OldUPasswordUpdatedAt returns the old "u_password_updated_at" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) OldUPid ¶
func (m *UsersMutation) OldUPid(ctx context.Context) (v string, err error)
OldUPid returns the old "u_pid" field's value of the Users entity. If the Users object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UsersMutation) RemovedEdges ¶
func (m *UsersMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UsersMutation) RemovedIDs ¶
func (m *UsersMutation) 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 (*UsersMutation) ResetEdge ¶
func (m *UsersMutation) 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 (*UsersMutation) ResetField ¶
func (m *UsersMutation) 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 (*UsersMutation) ResetInGroup ¶
func (m *UsersMutation) ResetInGroup()
ResetInGroup resets all changes to the "in_group" edge.
func (*UsersMutation) ResetUCreatedAt ¶
func (m *UsersMutation) ResetUCreatedAt()
ResetUCreatedAt resets all changes to the "u_created_at" field.
func (*UsersMutation) ResetUExpiredAt ¶
func (m *UsersMutation) ResetUExpiredAt()
ResetUExpiredAt resets all changes to the "u_expired_at" field.
func (*UsersMutation) ResetUFirstName ¶
func (m *UsersMutation) ResetUFirstName()
ResetUFirstName resets all changes to the "u_first_name" field.
func (*UsersMutation) ResetUIsActive ¶
func (m *UsersMutation) ResetUIsActive()
ResetUIsActive resets all changes to the "u_is_active" field.
func (*UsersMutation) ResetULastName ¶
func (m *UsersMutation) ResetULastName()
ResetULastName resets all changes to the "u_last_name" field.
func (*UsersMutation) ResetUOrgid ¶
func (m *UsersMutation) ResetUOrgid()
ResetUOrgid resets all changes to the "u_orgid" field.
func (*UsersMutation) ResetUPasswordUpdatedAt ¶
func (m *UsersMutation) ResetUPasswordUpdatedAt()
ResetUPasswordUpdatedAt resets all changes to the "u_password_updated_at" field.
func (*UsersMutation) ResetUPid ¶
func (m *UsersMutation) ResetUPid()
ResetUPid resets all changes to the "u_pid" field.
func (*UsersMutation) SetField ¶
func (m *UsersMutation) 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 (*UsersMutation) SetInGroupID ¶
func (m *UsersMutation) SetInGroupID(id int)
SetInGroupID sets the "in_group" edge to the Groups entity by id.
func (*UsersMutation) SetUCreatedAt ¶
func (m *UsersMutation) SetUCreatedAt(t time.Time)
SetUCreatedAt sets the "u_created_at" field.
func (*UsersMutation) SetUExpiredAt ¶
func (m *UsersMutation) SetUExpiredAt(t time.Time)
SetUExpiredAt sets the "u_expired_at" field.
func (*UsersMutation) SetUFirstName ¶
func (m *UsersMutation) SetUFirstName(s string)
SetUFirstName sets the "u_first_name" field.
func (*UsersMutation) SetUIsActive ¶
func (m *UsersMutation) SetUIsActive(b bool)
SetUIsActive sets the "u_is_active" field.
func (*UsersMutation) SetULastName ¶
func (m *UsersMutation) SetULastName(s string)
SetULastName sets the "u_last_name" field.
func (*UsersMutation) SetUOrgid ¶
func (m *UsersMutation) SetUOrgid(s string)
SetUOrgid sets the "u_orgid" field.
func (*UsersMutation) SetUPasswordUpdatedAt ¶
func (m *UsersMutation) SetUPasswordUpdatedAt(t time.Time)
SetUPasswordUpdatedAt sets the "u_password_updated_at" field.
func (*UsersMutation) SetUPid ¶
func (m *UsersMutation) SetUPid(s string)
SetUPid sets the "u_pid" field.
func (UsersMutation) Tx ¶
func (m UsersMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UsersMutation) Type ¶
func (m *UsersMutation) Type() string
Type returns the node type of this mutation (Users).
func (*UsersMutation) UCreatedAt ¶
func (m *UsersMutation) UCreatedAt() (r time.Time, exists bool)
UCreatedAt returns the value of the "u_created_at" field in the mutation.
func (*UsersMutation) UCreatedAtCleared ¶
func (m *UsersMutation) UCreatedAtCleared() bool
UCreatedAtCleared returns if the "u_created_at" field was cleared in this mutation.
func (*UsersMutation) UExpiredAt ¶
func (m *UsersMutation) UExpiredAt() (r time.Time, exists bool)
UExpiredAt returns the value of the "u_expired_at" field in the mutation.
func (*UsersMutation) UExpiredAtCleared ¶
func (m *UsersMutation) UExpiredAtCleared() bool
UExpiredAtCleared returns if the "u_expired_at" field was cleared in this mutation.
func (*UsersMutation) UFirstName ¶
func (m *UsersMutation) UFirstName() (r string, exists bool)
UFirstName returns the value of the "u_first_name" field in the mutation.
func (*UsersMutation) UIsActive ¶
func (m *UsersMutation) UIsActive() (r bool, exists bool)
UIsActive returns the value of the "u_is_active" field in the mutation.
func (*UsersMutation) ULastName ¶
func (m *UsersMutation) ULastName() (r string, exists bool)
ULastName returns the value of the "u_last_name" field in the mutation.
func (*UsersMutation) UOrgid ¶
func (m *UsersMutation) UOrgid() (r string, exists bool)
UOrgid returns the value of the "u_orgid" field in the mutation.
func (*UsersMutation) UPasswordUpdatedAt ¶
func (m *UsersMutation) UPasswordUpdatedAt() (r time.Time, exists bool)
UPasswordUpdatedAt returns the value of the "u_password_updated_at" field in the mutation.
func (*UsersMutation) UPasswordUpdatedAtCleared ¶
func (m *UsersMutation) UPasswordUpdatedAtCleared() bool
UPasswordUpdatedAtCleared returns if the "u_password_updated_at" field was cleared in this mutation.
func (*UsersMutation) UPid ¶
func (m *UsersMutation) UPid() (r string, exists bool)
UPid returns the value of the "u_pid" field in the mutation.
func (*UsersMutation) Where ¶
func (m *UsersMutation) Where(ps ...predicate.Users)
Where appends a list predicates to the UsersMutation builder.
type UsersQuery ¶
type UsersQuery struct {
// contains filtered or unexported fields
}
UsersQuery is the builder for querying Users entities.
func (*UsersQuery) All ¶
func (uq *UsersQuery) All(ctx context.Context) ([]*Users, error)
All executes the query and returns a list of UsersSlice.
func (*UsersQuery) AllX ¶
func (uq *UsersQuery) AllX(ctx context.Context) []*Users
AllX is like All, but panics if an error occurs.
func (*UsersQuery) Clone ¶
func (uq *UsersQuery) Clone() *UsersQuery
Clone returns a duplicate of the UsersQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UsersQuery) Count ¶
func (uq *UsersQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UsersQuery) CountX ¶
func (uq *UsersQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UsersQuery) Exist ¶
func (uq *UsersQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UsersQuery) ExistX ¶
func (uq *UsersQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UsersQuery) First ¶
func (uq *UsersQuery) First(ctx context.Context) (*Users, error)
First returns the first Users entity from the query. Returns a *NotFoundError when no Users was found.
func (*UsersQuery) FirstID ¶
func (uq *UsersQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Users ID from the query. Returns a *NotFoundError when no Users ID was found.
func (*UsersQuery) FirstIDX ¶
func (uq *UsersQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UsersQuery) FirstX ¶
func (uq *UsersQuery) FirstX(ctx context.Context) *Users
FirstX is like First, but panics if an error occurs.
func (*UsersQuery) GroupBy ¶
func (uq *UsersQuery) GroupBy(field string, fields ...string) *UsersGroupBy
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 { UPid string `json:"u_pid,omitempty"` Count int `json:"count,omitempty"` } client.Users.Query(). GroupBy(users.FieldUPid). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UsersQuery) IDs ¶
func (uq *UsersQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Users IDs.
func (*UsersQuery) IDsX ¶
func (uq *UsersQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UsersQuery) Limit ¶
func (uq *UsersQuery) Limit(limit int) *UsersQuery
Limit adds a limit step to the query.
func (*UsersQuery) Offset ¶
func (uq *UsersQuery) Offset(offset int) *UsersQuery
Offset adds an offset step to the query.
func (*UsersQuery) Only ¶
func (uq *UsersQuery) Only(ctx context.Context) (*Users, error)
Only returns a single Users entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Users entity is not found. Returns a *NotFoundError when no Users entities are found.
func (*UsersQuery) OnlyID ¶
func (uq *UsersQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Users ID in the query. Returns a *NotSingularError when exactly one Users ID is not found. Returns a *NotFoundError when no entities are found.
func (*UsersQuery) OnlyIDX ¶
func (uq *UsersQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UsersQuery) OnlyX ¶
func (uq *UsersQuery) OnlyX(ctx context.Context) *Users
OnlyX is like Only, but panics if an error occurs.
func (*UsersQuery) Order ¶
func (uq *UsersQuery) Order(o ...OrderFunc) *UsersQuery
Order adds an order step to the query.
func (*UsersQuery) QueryInGroup ¶
func (uq *UsersQuery) QueryInGroup() *GroupsQuery
QueryInGroup chains the current query on the "in_group" edge.
func (*UsersQuery) Select ¶
func (uq *UsersQuery) Select(fields ...string) *UsersSelect
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 { UPid string `json:"u_pid,omitempty"` } client.Users.Query(). Select(users.FieldUPid). Scan(ctx, &v)
func (*UsersQuery) Unique ¶
func (uq *UsersQuery) Unique(unique bool) *UsersQuery
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 (*UsersQuery) Where ¶
func (uq *UsersQuery) Where(ps ...predicate.Users) *UsersQuery
Where adds a new predicate for the UsersQuery builder.
func (*UsersQuery) WithInGroup ¶
func (uq *UsersQuery) WithInGroup(opts ...func(*GroupsQuery)) *UsersQuery
WithInGroup tells the query-builder to eager-load the nodes that are connected to the "in_group" edge. The optional arguments are used to configure the query builder of the edge.
type UsersSelect ¶
type UsersSelect struct { *UsersQuery // contains filtered or unexported fields }
UsersSelect is the builder for selecting fields of Users entities.
func (*UsersSelect) Bool ¶
func (us *UsersSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UsersSelect) BoolX ¶
func (us *UsersSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*UsersSelect) Bools ¶
func (us *UsersSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UsersSelect) BoolsX ¶
func (us *UsersSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*UsersSelect) Float64 ¶
func (us *UsersSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Float64X ¶
func (us *UsersSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*UsersSelect) Float64s ¶
func (us *UsersSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UsersSelect) Float64sX ¶
func (us *UsersSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*UsersSelect) Int ¶
func (us *UsersSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UsersSelect) IntX ¶
func (us *UsersSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*UsersSelect) Ints ¶
func (us *UsersSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UsersSelect) IntsX ¶
func (us *UsersSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*UsersSelect) Scan ¶
func (us *UsersSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*UsersSelect) ScanX ¶
func (us *UsersSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*UsersSelect) String ¶
func (us *UsersSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*UsersSelect) StringX ¶
func (us *UsersSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type UsersUpdate ¶
type UsersUpdate struct {
// contains filtered or unexported fields
}
UsersUpdate is the builder for updating Users entities.
func (*UsersUpdate) ClearInGroup ¶
func (uu *UsersUpdate) ClearInGroup() *UsersUpdate
ClearInGroup clears the "in_group" edge to the Groups entity.
func (*UsersUpdate) ClearUExpiredAt ¶
func (uu *UsersUpdate) ClearUExpiredAt() *UsersUpdate
ClearUExpiredAt clears the value of the "u_expired_at" field.
func (*UsersUpdate) ClearUPasswordUpdatedAt ¶
func (uu *UsersUpdate) ClearUPasswordUpdatedAt() *UsersUpdate
ClearUPasswordUpdatedAt clears the value of the "u_password_updated_at" field.
func (*UsersUpdate) Exec ¶
func (uu *UsersUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UsersUpdate) ExecX ¶
func (uu *UsersUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersUpdate) Mutation ¶
func (uu *UsersUpdate) Mutation() *UsersMutation
Mutation returns the UsersMutation object of the builder.
func (*UsersUpdate) Save ¶
func (uu *UsersUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UsersUpdate) SaveX ¶
func (uu *UsersUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UsersUpdate) SetInGroup ¶
func (uu *UsersUpdate) SetInGroup(g *Groups) *UsersUpdate
SetInGroup sets the "in_group" edge to the Groups entity.
func (*UsersUpdate) SetInGroupID ¶
func (uu *UsersUpdate) SetInGroupID(id int) *UsersUpdate
SetInGroupID sets the "in_group" edge to the Groups entity by ID.
func (*UsersUpdate) SetNillableInGroupID ¶
func (uu *UsersUpdate) SetNillableInGroupID(id *int) *UsersUpdate
SetNillableInGroupID sets the "in_group" edge to the Groups entity by ID if the given value is not nil.
func (*UsersUpdate) SetNillableUExpiredAt ¶
func (uu *UsersUpdate) SetNillableUExpiredAt(t *time.Time) *UsersUpdate
SetNillableUExpiredAt sets the "u_expired_at" field if the given value is not nil.
func (*UsersUpdate) SetNillableUIsActive ¶
func (uu *UsersUpdate) SetNillableUIsActive(b *bool) *UsersUpdate
SetNillableUIsActive sets the "u_is_active" field if the given value is not nil.
func (*UsersUpdate) SetNillableUPasswordUpdatedAt ¶
func (uu *UsersUpdate) SetNillableUPasswordUpdatedAt(t *time.Time) *UsersUpdate
SetNillableUPasswordUpdatedAt sets the "u_password_updated_at" field if the given value is not nil.
func (*UsersUpdate) SetUExpiredAt ¶
func (uu *UsersUpdate) SetUExpiredAt(t time.Time) *UsersUpdate
SetUExpiredAt sets the "u_expired_at" field.
func (*UsersUpdate) SetUFirstName ¶
func (uu *UsersUpdate) SetUFirstName(s string) *UsersUpdate
SetUFirstName sets the "u_first_name" field.
func (*UsersUpdate) SetUIsActive ¶
func (uu *UsersUpdate) SetUIsActive(b bool) *UsersUpdate
SetUIsActive sets the "u_is_active" field.
func (*UsersUpdate) SetULastName ¶
func (uu *UsersUpdate) SetULastName(s string) *UsersUpdate
SetULastName sets the "u_last_name" field.
func (*UsersUpdate) SetUOrgid ¶
func (uu *UsersUpdate) SetUOrgid(s string) *UsersUpdate
SetUOrgid sets the "u_orgid" field.
func (*UsersUpdate) SetUPasswordUpdatedAt ¶
func (uu *UsersUpdate) SetUPasswordUpdatedAt(t time.Time) *UsersUpdate
SetUPasswordUpdatedAt sets the "u_password_updated_at" field.
func (*UsersUpdate) SetUPid ¶
func (uu *UsersUpdate) SetUPid(s string) *UsersUpdate
SetUPid sets the "u_pid" field.
func (*UsersUpdate) Where ¶
func (uu *UsersUpdate) Where(ps ...predicate.Users) *UsersUpdate
Where appends a list predicates to the UsersUpdate builder.
type UsersUpdateOne ¶
type UsersUpdateOne struct {
// contains filtered or unexported fields
}
UsersUpdateOne is the builder for updating a single Users entity.
func (*UsersUpdateOne) ClearInGroup ¶
func (uuo *UsersUpdateOne) ClearInGroup() *UsersUpdateOne
ClearInGroup clears the "in_group" edge to the Groups entity.
func (*UsersUpdateOne) ClearUExpiredAt ¶
func (uuo *UsersUpdateOne) ClearUExpiredAt() *UsersUpdateOne
ClearUExpiredAt clears the value of the "u_expired_at" field.
func (*UsersUpdateOne) ClearUPasswordUpdatedAt ¶
func (uuo *UsersUpdateOne) ClearUPasswordUpdatedAt() *UsersUpdateOne
ClearUPasswordUpdatedAt clears the value of the "u_password_updated_at" field.
func (*UsersUpdateOne) Exec ¶
func (uuo *UsersUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UsersUpdateOne) ExecX ¶
func (uuo *UsersUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UsersUpdateOne) Mutation ¶
func (uuo *UsersUpdateOne) Mutation() *UsersMutation
Mutation returns the UsersMutation object of the builder.
func (*UsersUpdateOne) Save ¶
func (uuo *UsersUpdateOne) Save(ctx context.Context) (*Users, error)
Save executes the query and returns the updated Users entity.
func (*UsersUpdateOne) SaveX ¶
func (uuo *UsersUpdateOne) SaveX(ctx context.Context) *Users
SaveX is like Save, but panics if an error occurs.
func (*UsersUpdateOne) Select ¶
func (uuo *UsersUpdateOne) Select(field string, fields ...string) *UsersUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UsersUpdateOne) SetInGroup ¶
func (uuo *UsersUpdateOne) SetInGroup(g *Groups) *UsersUpdateOne
SetInGroup sets the "in_group" edge to the Groups entity.
func (*UsersUpdateOne) SetInGroupID ¶
func (uuo *UsersUpdateOne) SetInGroupID(id int) *UsersUpdateOne
SetInGroupID sets the "in_group" edge to the Groups entity by ID.
func (*UsersUpdateOne) SetNillableInGroupID ¶
func (uuo *UsersUpdateOne) SetNillableInGroupID(id *int) *UsersUpdateOne
SetNillableInGroupID sets the "in_group" edge to the Groups entity by ID if the given value is not nil.
func (*UsersUpdateOne) SetNillableUExpiredAt ¶
func (uuo *UsersUpdateOne) SetNillableUExpiredAt(t *time.Time) *UsersUpdateOne
SetNillableUExpiredAt sets the "u_expired_at" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableUIsActive ¶
func (uuo *UsersUpdateOne) SetNillableUIsActive(b *bool) *UsersUpdateOne
SetNillableUIsActive sets the "u_is_active" field if the given value is not nil.
func (*UsersUpdateOne) SetNillableUPasswordUpdatedAt ¶
func (uuo *UsersUpdateOne) SetNillableUPasswordUpdatedAt(t *time.Time) *UsersUpdateOne
SetNillableUPasswordUpdatedAt sets the "u_password_updated_at" field if the given value is not nil.
func (*UsersUpdateOne) SetUExpiredAt ¶
func (uuo *UsersUpdateOne) SetUExpiredAt(t time.Time) *UsersUpdateOne
SetUExpiredAt sets the "u_expired_at" field.
func (*UsersUpdateOne) SetUFirstName ¶
func (uuo *UsersUpdateOne) SetUFirstName(s string) *UsersUpdateOne
SetUFirstName sets the "u_first_name" field.
func (*UsersUpdateOne) SetUIsActive ¶
func (uuo *UsersUpdateOne) SetUIsActive(b bool) *UsersUpdateOne
SetUIsActive sets the "u_is_active" field.
func (*UsersUpdateOne) SetULastName ¶
func (uuo *UsersUpdateOne) SetULastName(s string) *UsersUpdateOne
SetULastName sets the "u_last_name" field.
func (*UsersUpdateOne) SetUOrgid ¶
func (uuo *UsersUpdateOne) SetUOrgid(s string) *UsersUpdateOne
SetUOrgid sets the "u_orgid" field.
func (*UsersUpdateOne) SetUPasswordUpdatedAt ¶
func (uuo *UsersUpdateOne) SetUPasswordUpdatedAt(t time.Time) *UsersUpdateOne
SetUPasswordUpdatedAt sets the "u_password_updated_at" field.
func (*UsersUpdateOne) SetUPid ¶
func (uuo *UsersUpdateOne) SetUPid(s string) *UsersUpdateOne
SetUPid sets the "u_pid" field.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- config.go
- context.go
- ent.go
- generate.go
- groupbandwidth.go
- groupbandwidth_create.go
- groupbandwidth_delete.go
- groupbandwidth_query.go
- groupbandwidth_update.go
- groups.go
- groups_create.go
- groups_delete.go
- groups_query.go
- groups_update.go
- mutation.go
- onlinesession.go
- onlinesession_create.go
- onlinesession_delete.go
- onlinesession_query.go
- onlinesession_update.go
- runtime.go
- tx.go
- users.go
- users_create.go
- users_delete.go
- users_query.go
- users_update.go