Documentation ¶
Index ¶
- Constants
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Accessories
- type Accessory
- type AccessoryClient
- func (c *AccessoryClient) Create() *AccessoryCreate
- func (c *AccessoryClient) CreateBulk(builders ...*AccessoryCreate) *AccessoryCreateBulk
- func (c *AccessoryClient) Delete() *AccessoryDelete
- func (c *AccessoryClient) DeleteOne(a *Accessory) *AccessoryDeleteOne
- func (c *AccessoryClient) DeleteOneID(id int) *AccessoryDeleteOne
- func (c *AccessoryClient) Get(ctx context.Context, id int) (*Accessory, error)
- func (c *AccessoryClient) GetX(ctx context.Context, id int) *Accessory
- func (c *AccessoryClient) Hooks() []Hook
- func (c *AccessoryClient) Intercept(interceptors ...Interceptor)
- func (c *AccessoryClient) Interceptors() []Interceptor
- func (c *AccessoryClient) Query() *AccessoryQuery
- func (c *AccessoryClient) QueryInstitution(a *Accessory) *InstitutionQuery
- func (c *AccessoryClient) QueryRedemptions(a *Accessory) *RedemptionQuery
- func (c *AccessoryClient) Update() *AccessoryUpdate
- func (c *AccessoryClient) UpdateOne(a *Accessory) *AccessoryUpdateOne
- func (c *AccessoryClient) UpdateOneID(id int) *AccessoryUpdateOne
- func (c *AccessoryClient) Use(hooks ...Hook)
- type AccessoryCreate
- func (ac *AccessoryCreate) AddRedemptionIDs(ids ...int) *AccessoryCreate
- func (ac *AccessoryCreate) AddRedemptions(r ...*Redemption) *AccessoryCreate
- func (ac *AccessoryCreate) Exec(ctx context.Context) error
- func (ac *AccessoryCreate) ExecX(ctx context.Context)
- func (ac *AccessoryCreate) Mutation() *AccessoryMutation
- func (ac *AccessoryCreate) OnConflict(opts ...sql.ConflictOption) *AccessoryUpsertOne
- func (ac *AccessoryCreate) OnConflictColumns(columns ...string) *AccessoryUpsertOne
- func (ac *AccessoryCreate) Save(ctx context.Context) (*Accessory, error)
- func (ac *AccessoryCreate) SaveX(ctx context.Context) *Accessory
- func (ac *AccessoryCreate) SetDescription(s string) *AccessoryCreate
- func (ac *AccessoryCreate) SetInstitution(i *Institution) *AccessoryCreate
- func (ac *AccessoryCreate) SetInstitutionID(id int) *AccessoryCreate
- func (ac *AccessoryCreate) SetName(s string) *AccessoryCreate
- func (ac *AccessoryCreate) SetPointsRequired(i int) *AccessoryCreate
- type AccessoryCreateBulk
- func (acb *AccessoryCreateBulk) Exec(ctx context.Context) error
- func (acb *AccessoryCreateBulk) ExecX(ctx context.Context)
- func (acb *AccessoryCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccessoryUpsertBulk
- func (acb *AccessoryCreateBulk) OnConflictColumns(columns ...string) *AccessoryUpsertBulk
- func (acb *AccessoryCreateBulk) Save(ctx context.Context) ([]*Accessory, error)
- func (acb *AccessoryCreateBulk) SaveX(ctx context.Context) []*Accessory
- type AccessoryDelete
- type AccessoryDeleteOne
- type AccessoryEdges
- type AccessoryGroupBy
- func (agb *AccessoryGroupBy) Aggregate(fns ...AggregateFunc) *AccessoryGroupBy
- func (s *AccessoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccessoryGroupBy) BoolX(ctx context.Context) bool
- func (s *AccessoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AccessoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AccessoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccessoryGroupBy) Float64X(ctx context.Context) float64
- func (s *AccessoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccessoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AccessoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AccessoryGroupBy) IntX(ctx context.Context) int
- func (s *AccessoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AccessoryGroupBy) IntsX(ctx context.Context) []int
- func (agb *AccessoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *AccessoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *AccessoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AccessoryGroupBy) StringX(ctx context.Context) string
- func (s *AccessoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AccessoryGroupBy) StringsX(ctx context.Context) []string
- type AccessoryMutation
- func (m *AccessoryMutation) AddField(name string, value ent.Value) error
- func (m *AccessoryMutation) AddPointsRequired(i int)
- func (m *AccessoryMutation) AddRedemptionIDs(ids ...int)
- func (m *AccessoryMutation) AddedEdges() []string
- func (m *AccessoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *AccessoryMutation) AddedFields() []string
- func (m *AccessoryMutation) AddedIDs(name string) []ent.Value
- func (m *AccessoryMutation) AddedPointsRequired() (r int, exists bool)
- func (m *AccessoryMutation) ClearEdge(name string) error
- func (m *AccessoryMutation) ClearField(name string) error
- func (m *AccessoryMutation) ClearInstitution()
- func (m *AccessoryMutation) ClearRedemptions()
- func (m *AccessoryMutation) ClearedEdges() []string
- func (m *AccessoryMutation) ClearedFields() []string
- func (m AccessoryMutation) Client() *Client
- func (m *AccessoryMutation) Description() (r string, exists bool)
- func (m *AccessoryMutation) EdgeCleared(name string) bool
- func (m *AccessoryMutation) Field(name string) (ent.Value, bool)
- func (m *AccessoryMutation) FieldCleared(name string) bool
- func (m *AccessoryMutation) Fields() []string
- func (m *AccessoryMutation) ID() (id int, exists bool)
- func (m *AccessoryMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AccessoryMutation) InstitutionCleared() bool
- func (m *AccessoryMutation) InstitutionID() (id int, exists bool)
- func (m *AccessoryMutation) InstitutionIDs() (ids []int)
- func (m *AccessoryMutation) Name() (r string, exists bool)
- func (m *AccessoryMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *AccessoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AccessoryMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AccessoryMutation) OldPointsRequired(ctx context.Context) (v int, err error)
- func (m *AccessoryMutation) Op() Op
- func (m *AccessoryMutation) PointsRequired() (r int, exists bool)
- func (m *AccessoryMutation) RedemptionsCleared() bool
- func (m *AccessoryMutation) RedemptionsIDs() (ids []int)
- func (m *AccessoryMutation) RemoveRedemptionIDs(ids ...int)
- func (m *AccessoryMutation) RemovedEdges() []string
- func (m *AccessoryMutation) RemovedIDs(name string) []ent.Value
- func (m *AccessoryMutation) RemovedRedemptionsIDs() (ids []int)
- func (m *AccessoryMutation) ResetDescription()
- func (m *AccessoryMutation) ResetEdge(name string) error
- func (m *AccessoryMutation) ResetField(name string) error
- func (m *AccessoryMutation) ResetInstitution()
- func (m *AccessoryMutation) ResetName()
- func (m *AccessoryMutation) ResetPointsRequired()
- func (m *AccessoryMutation) ResetRedemptions()
- func (m *AccessoryMutation) SetDescription(s string)
- func (m *AccessoryMutation) SetField(name string, value ent.Value) error
- func (m *AccessoryMutation) SetInstitutionID(id int)
- func (m *AccessoryMutation) SetName(s string)
- func (m *AccessoryMutation) SetOp(op Op)
- func (m *AccessoryMutation) SetPointsRequired(i int)
- func (m AccessoryMutation) Tx() (*Tx, error)
- func (m *AccessoryMutation) Type() string
- func (m *AccessoryMutation) Where(ps ...predicate.Accessory)
- func (m *AccessoryMutation) WhereP(ps ...func(*sql.Selector))
- type AccessoryQuery
- func (aq *AccessoryQuery) Aggregate(fns ...AggregateFunc) *AccessorySelect
- func (aq *AccessoryQuery) All(ctx context.Context) ([]*Accessory, error)
- func (aq *AccessoryQuery) AllX(ctx context.Context) []*Accessory
- func (aq *AccessoryQuery) Clone() *AccessoryQuery
- func (aq *AccessoryQuery) Count(ctx context.Context) (int, error)
- func (aq *AccessoryQuery) CountX(ctx context.Context) int
- func (aq *AccessoryQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AccessoryQuery) ExistX(ctx context.Context) bool
- func (aq *AccessoryQuery) First(ctx context.Context) (*Accessory, error)
- func (aq *AccessoryQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AccessoryQuery) FirstIDX(ctx context.Context) int
- func (aq *AccessoryQuery) FirstX(ctx context.Context) *Accessory
- func (aq *AccessoryQuery) GroupBy(field string, fields ...string) *AccessoryGroupBy
- func (aq *AccessoryQuery) IDs(ctx context.Context) (ids []int, err error)
- func (aq *AccessoryQuery) IDsX(ctx context.Context) []int
- func (aq *AccessoryQuery) Limit(limit int) *AccessoryQuery
- func (aq *AccessoryQuery) Offset(offset int) *AccessoryQuery
- func (aq *AccessoryQuery) Only(ctx context.Context) (*Accessory, error)
- func (aq *AccessoryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AccessoryQuery) OnlyIDX(ctx context.Context) int
- func (aq *AccessoryQuery) OnlyX(ctx context.Context) *Accessory
- func (aq *AccessoryQuery) Order(o ...accessory.OrderOption) *AccessoryQuery
- func (aq *AccessoryQuery) QueryInstitution() *InstitutionQuery
- func (aq *AccessoryQuery) QueryRedemptions() *RedemptionQuery
- func (aq *AccessoryQuery) Select(fields ...string) *AccessorySelect
- func (aq *AccessoryQuery) Unique(unique bool) *AccessoryQuery
- func (aq *AccessoryQuery) Where(ps ...predicate.Accessory) *AccessoryQuery
- func (aq *AccessoryQuery) WithInstitution(opts ...func(*InstitutionQuery)) *AccessoryQuery
- func (aq *AccessoryQuery) WithRedemptions(opts ...func(*RedemptionQuery)) *AccessoryQuery
- type AccessorySelect
- func (as *AccessorySelect) Aggregate(fns ...AggregateFunc) *AccessorySelect
- func (s *AccessorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccessorySelect) BoolX(ctx context.Context) bool
- func (s *AccessorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AccessorySelect) BoolsX(ctx context.Context) []bool
- func (s *AccessorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccessorySelect) Float64X(ctx context.Context) float64
- func (s *AccessorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccessorySelect) Float64sX(ctx context.Context) []float64
- func (s *AccessorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *AccessorySelect) IntX(ctx context.Context) int
- func (s *AccessorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *AccessorySelect) IntsX(ctx context.Context) []int
- func (as *AccessorySelect) Scan(ctx context.Context, v any) error
- func (s *AccessorySelect) ScanX(ctx context.Context, v any)
- func (s *AccessorySelect) String(ctx context.Context) (_ string, err error)
- func (s *AccessorySelect) StringX(ctx context.Context) string
- func (s *AccessorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *AccessorySelect) StringsX(ctx context.Context) []string
- type AccessoryUpdate
- func (au *AccessoryUpdate) AddPointsRequired(i int) *AccessoryUpdate
- func (au *AccessoryUpdate) AddRedemptionIDs(ids ...int) *AccessoryUpdate
- func (au *AccessoryUpdate) AddRedemptions(r ...*Redemption) *AccessoryUpdate
- func (au *AccessoryUpdate) ClearInstitution() *AccessoryUpdate
- func (au *AccessoryUpdate) ClearRedemptions() *AccessoryUpdate
- func (au *AccessoryUpdate) Exec(ctx context.Context) error
- func (au *AccessoryUpdate) ExecX(ctx context.Context)
- func (au *AccessoryUpdate) Mutation() *AccessoryMutation
- func (au *AccessoryUpdate) RemoveRedemptionIDs(ids ...int) *AccessoryUpdate
- func (au *AccessoryUpdate) RemoveRedemptions(r ...*Redemption) *AccessoryUpdate
- func (au *AccessoryUpdate) Save(ctx context.Context) (int, error)
- func (au *AccessoryUpdate) SaveX(ctx context.Context) int
- func (au *AccessoryUpdate) SetDescription(s string) *AccessoryUpdate
- func (au *AccessoryUpdate) SetInstitution(i *Institution) *AccessoryUpdate
- func (au *AccessoryUpdate) SetInstitutionID(id int) *AccessoryUpdate
- func (au *AccessoryUpdate) SetName(s string) *AccessoryUpdate
- func (au *AccessoryUpdate) SetPointsRequired(i int) *AccessoryUpdate
- func (au *AccessoryUpdate) Where(ps ...predicate.Accessory) *AccessoryUpdate
- type AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) AddPointsRequired(i int) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) AddRedemptionIDs(ids ...int) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) AddRedemptions(r ...*Redemption) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) ClearInstitution() *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) ClearRedemptions() *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) Exec(ctx context.Context) error
- func (auo *AccessoryUpdateOne) ExecX(ctx context.Context)
- func (auo *AccessoryUpdateOne) Mutation() *AccessoryMutation
- func (auo *AccessoryUpdateOne) RemoveRedemptionIDs(ids ...int) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) RemoveRedemptions(r ...*Redemption) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) Save(ctx context.Context) (*Accessory, error)
- func (auo *AccessoryUpdateOne) SaveX(ctx context.Context) *Accessory
- func (auo *AccessoryUpdateOne) Select(field string, fields ...string) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) SetDescription(s string) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) SetInstitution(i *Institution) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) SetInstitutionID(id int) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) SetName(s string) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) SetPointsRequired(i int) *AccessoryUpdateOne
- func (auo *AccessoryUpdateOne) Where(ps ...predicate.Accessory) *AccessoryUpdateOne
- type AccessoryUpsert
- func (u *AccessoryUpsert) AddPointsRequired(v int) *AccessoryUpsert
- func (u *AccessoryUpsert) SetDescription(v string) *AccessoryUpsert
- func (u *AccessoryUpsert) SetName(v string) *AccessoryUpsert
- func (u *AccessoryUpsert) SetPointsRequired(v int) *AccessoryUpsert
- func (u *AccessoryUpsert) UpdateDescription() *AccessoryUpsert
- func (u *AccessoryUpsert) UpdateName() *AccessoryUpsert
- func (u *AccessoryUpsert) UpdatePointsRequired() *AccessoryUpsert
- type AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) AddPointsRequired(v int) *AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) DoNothing() *AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) Exec(ctx context.Context) error
- func (u *AccessoryUpsertBulk) ExecX(ctx context.Context)
- func (u *AccessoryUpsertBulk) Ignore() *AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) SetDescription(v string) *AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) SetName(v string) *AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) SetPointsRequired(v int) *AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) Update(set func(*AccessoryUpsert)) *AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) UpdateDescription() *AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) UpdateName() *AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) UpdateNewValues() *AccessoryUpsertBulk
- func (u *AccessoryUpsertBulk) UpdatePointsRequired() *AccessoryUpsertBulk
- type AccessoryUpsertOne
- func (u *AccessoryUpsertOne) AddPointsRequired(v int) *AccessoryUpsertOne
- func (u *AccessoryUpsertOne) DoNothing() *AccessoryUpsertOne
- func (u *AccessoryUpsertOne) Exec(ctx context.Context) error
- func (u *AccessoryUpsertOne) ExecX(ctx context.Context)
- func (u *AccessoryUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *AccessoryUpsertOne) IDX(ctx context.Context) int
- func (u *AccessoryUpsertOne) Ignore() *AccessoryUpsertOne
- func (u *AccessoryUpsertOne) SetDescription(v string) *AccessoryUpsertOne
- func (u *AccessoryUpsertOne) SetName(v string) *AccessoryUpsertOne
- func (u *AccessoryUpsertOne) SetPointsRequired(v int) *AccessoryUpsertOne
- func (u *AccessoryUpsertOne) Update(set func(*AccessoryUpsert)) *AccessoryUpsertOne
- func (u *AccessoryUpsertOne) UpdateDescription() *AccessoryUpsertOne
- func (u *AccessoryUpsertOne) UpdateName() *AccessoryUpsertOne
- func (u *AccessoryUpsertOne) UpdateNewValues() *AccessoryUpsertOne
- func (u *AccessoryUpsertOne) UpdatePointsRequired() *AccessoryUpsertOne
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Deadline
- func (d *Deadline) QueryAuthor() *UserQuery
- func (d *Deadline) QueryGroup() *GroupQuery
- func (d *Deadline) QueryVotedUsers() *UserQuery
- func (d *Deadline) String() string
- func (d *Deadline) Unwrap() *Deadline
- func (d *Deadline) Update() *DeadlineUpdateOne
- func (d *Deadline) Value(name string) (ent.Value, error)
- type DeadlineClient
- func (c *DeadlineClient) Create() *DeadlineCreate
- func (c *DeadlineClient) CreateBulk(builders ...*DeadlineCreate) *DeadlineCreateBulk
- func (c *DeadlineClient) Delete() *DeadlineDelete
- func (c *DeadlineClient) DeleteOne(d *Deadline) *DeadlineDeleteOne
- func (c *DeadlineClient) DeleteOneID(id int) *DeadlineDeleteOne
- func (c *DeadlineClient) Get(ctx context.Context, id int) (*Deadline, error)
- func (c *DeadlineClient) GetX(ctx context.Context, id int) *Deadline
- func (c *DeadlineClient) Hooks() []Hook
- func (c *DeadlineClient) Intercept(interceptors ...Interceptor)
- func (c *DeadlineClient) Interceptors() []Interceptor
- func (c *DeadlineClient) Query() *DeadlineQuery
- func (c *DeadlineClient) QueryAuthor(d *Deadline) *UserQuery
- func (c *DeadlineClient) QueryGroup(d *Deadline) *GroupQuery
- func (c *DeadlineClient) QueryVotedUsers(d *Deadline) *UserQuery
- func (c *DeadlineClient) Update() *DeadlineUpdate
- func (c *DeadlineClient) UpdateOne(d *Deadline) *DeadlineUpdateOne
- func (c *DeadlineClient) UpdateOneID(id int) *DeadlineUpdateOne
- func (c *DeadlineClient) Use(hooks ...Hook)
- type DeadlineCreate
- func (dc *DeadlineCreate) AddVotedUserIDs(ids ...int) *DeadlineCreate
- func (dc *DeadlineCreate) AddVotedUsers(u ...*User) *DeadlineCreate
- func (dc *DeadlineCreate) Exec(ctx context.Context) error
- func (dc *DeadlineCreate) ExecX(ctx context.Context)
- func (dc *DeadlineCreate) Mutation() *DeadlineMutation
- func (dc *DeadlineCreate) OnConflict(opts ...sql.ConflictOption) *DeadlineUpsertOne
- func (dc *DeadlineCreate) OnConflictColumns(columns ...string) *DeadlineUpsertOne
- func (dc *DeadlineCreate) Save(ctx context.Context) (*Deadline, error)
- func (dc *DeadlineCreate) SaveX(ctx context.Context) *Deadline
- func (dc *DeadlineCreate) SetAuthor(u *User) *DeadlineCreate
- func (dc *DeadlineCreate) SetAuthorID(id int) *DeadlineCreate
- func (dc *DeadlineCreate) SetDueTime(t time.Time) *DeadlineCreate
- func (dc *DeadlineCreate) SetGroup(g *Group) *DeadlineCreate
- func (dc *DeadlineCreate) SetGroupID(id int) *DeadlineCreate
- func (dc *DeadlineCreate) SetName(s string) *DeadlineCreate
- func (dc *DeadlineCreate) SetNillableDueTime(t *time.Time) *DeadlineCreate
- type DeadlineCreateBulk
- func (dcb *DeadlineCreateBulk) Exec(ctx context.Context) error
- func (dcb *DeadlineCreateBulk) ExecX(ctx context.Context)
- func (dcb *DeadlineCreateBulk) OnConflict(opts ...sql.ConflictOption) *DeadlineUpsertBulk
- func (dcb *DeadlineCreateBulk) OnConflictColumns(columns ...string) *DeadlineUpsertBulk
- func (dcb *DeadlineCreateBulk) Save(ctx context.Context) ([]*Deadline, error)
- func (dcb *DeadlineCreateBulk) SaveX(ctx context.Context) []*Deadline
- type DeadlineDelete
- type DeadlineDeleteOne
- type DeadlineEdges
- type DeadlineGroupBy
- func (dgb *DeadlineGroupBy) Aggregate(fns ...AggregateFunc) *DeadlineGroupBy
- func (s *DeadlineGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DeadlineGroupBy) BoolX(ctx context.Context) bool
- func (s *DeadlineGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DeadlineGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DeadlineGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DeadlineGroupBy) Float64X(ctx context.Context) float64
- func (s *DeadlineGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DeadlineGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DeadlineGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DeadlineGroupBy) IntX(ctx context.Context) int
- func (s *DeadlineGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DeadlineGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DeadlineGroupBy) Scan(ctx context.Context, v any) error
- func (s *DeadlineGroupBy) ScanX(ctx context.Context, v any)
- func (s *DeadlineGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DeadlineGroupBy) StringX(ctx context.Context) string
- func (s *DeadlineGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DeadlineGroupBy) StringsX(ctx context.Context) []string
- type DeadlineMutation
- func (m *DeadlineMutation) AddField(name string, value ent.Value) error
- func (m *DeadlineMutation) AddVotedUserIDs(ids ...int)
- func (m *DeadlineMutation) AddedEdges() []string
- func (m *DeadlineMutation) AddedField(name string) (ent.Value, bool)
- func (m *DeadlineMutation) AddedFields() []string
- func (m *DeadlineMutation) AddedIDs(name string) []ent.Value
- func (m *DeadlineMutation) AuthorCleared() bool
- func (m *DeadlineMutation) AuthorID() (id int, exists bool)
- func (m *DeadlineMutation) AuthorIDs() (ids []int)
- func (m *DeadlineMutation) ClearAuthor()
- func (m *DeadlineMutation) ClearDueTime()
- func (m *DeadlineMutation) ClearEdge(name string) error
- func (m *DeadlineMutation) ClearField(name string) error
- func (m *DeadlineMutation) ClearGroup()
- func (m *DeadlineMutation) ClearVotedUsers()
- func (m *DeadlineMutation) ClearedEdges() []string
- func (m *DeadlineMutation) ClearedFields() []string
- func (m DeadlineMutation) Client() *Client
- func (m *DeadlineMutation) DueTime() (r time.Time, exists bool)
- func (m *DeadlineMutation) DueTimeCleared() bool
- func (m *DeadlineMutation) EdgeCleared(name string) bool
- func (m *DeadlineMutation) Field(name string) (ent.Value, bool)
- func (m *DeadlineMutation) FieldCleared(name string) bool
- func (m *DeadlineMutation) Fields() []string
- func (m *DeadlineMutation) GroupCleared() bool
- func (m *DeadlineMutation) GroupID() (id int, exists bool)
- func (m *DeadlineMutation) GroupIDs() (ids []int)
- func (m *DeadlineMutation) ID() (id int, exists bool)
- func (m *DeadlineMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DeadlineMutation) Name() (r string, exists bool)
- func (m *DeadlineMutation) OldDueTime(ctx context.Context) (v *time.Time, err error)
- func (m *DeadlineMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DeadlineMutation) OldName(ctx context.Context) (v string, err error)
- func (m *DeadlineMutation) Op() Op
- func (m *DeadlineMutation) RemoveVotedUserIDs(ids ...int)
- func (m *DeadlineMutation) RemovedEdges() []string
- func (m *DeadlineMutation) RemovedIDs(name string) []ent.Value
- func (m *DeadlineMutation) RemovedVotedUsersIDs() (ids []int)
- func (m *DeadlineMutation) ResetAuthor()
- func (m *DeadlineMutation) ResetDueTime()
- func (m *DeadlineMutation) ResetEdge(name string) error
- func (m *DeadlineMutation) ResetField(name string) error
- func (m *DeadlineMutation) ResetGroup()
- func (m *DeadlineMutation) ResetName()
- func (m *DeadlineMutation) ResetVotedUsers()
- func (m *DeadlineMutation) SetAuthorID(id int)
- func (m *DeadlineMutation) SetDueTime(t time.Time)
- func (m *DeadlineMutation) SetField(name string, value ent.Value) error
- func (m *DeadlineMutation) SetGroupID(id int)
- func (m *DeadlineMutation) SetName(s string)
- func (m *DeadlineMutation) SetOp(op Op)
- func (m DeadlineMutation) Tx() (*Tx, error)
- func (m *DeadlineMutation) Type() string
- func (m *DeadlineMutation) VotedUsersCleared() bool
- func (m *DeadlineMutation) VotedUsersIDs() (ids []int)
- func (m *DeadlineMutation) Where(ps ...predicate.Deadline)
- func (m *DeadlineMutation) WhereP(ps ...func(*sql.Selector))
- type DeadlineQuery
- func (dq *DeadlineQuery) Aggregate(fns ...AggregateFunc) *DeadlineSelect
- func (dq *DeadlineQuery) All(ctx context.Context) ([]*Deadline, error)
- func (dq *DeadlineQuery) AllX(ctx context.Context) []*Deadline
- func (dq *DeadlineQuery) Clone() *DeadlineQuery
- func (dq *DeadlineQuery) Count(ctx context.Context) (int, error)
- func (dq *DeadlineQuery) CountX(ctx context.Context) int
- func (dq *DeadlineQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DeadlineQuery) ExistX(ctx context.Context) bool
- func (dq *DeadlineQuery) First(ctx context.Context) (*Deadline, error)
- func (dq *DeadlineQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DeadlineQuery) FirstIDX(ctx context.Context) int
- func (dq *DeadlineQuery) FirstX(ctx context.Context) *Deadline
- func (dq *DeadlineQuery) GroupBy(field string, fields ...string) *DeadlineGroupBy
- func (dq *DeadlineQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dq *DeadlineQuery) IDsX(ctx context.Context) []int
- func (dq *DeadlineQuery) Limit(limit int) *DeadlineQuery
- func (dq *DeadlineQuery) Offset(offset int) *DeadlineQuery
- func (dq *DeadlineQuery) Only(ctx context.Context) (*Deadline, error)
- func (dq *DeadlineQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DeadlineQuery) OnlyIDX(ctx context.Context) int
- func (dq *DeadlineQuery) OnlyX(ctx context.Context) *Deadline
- func (dq *DeadlineQuery) Order(o ...deadline.OrderOption) *DeadlineQuery
- func (dq *DeadlineQuery) QueryAuthor() *UserQuery
- func (dq *DeadlineQuery) QueryGroup() *GroupQuery
- func (dq *DeadlineQuery) QueryVotedUsers() *UserQuery
- func (dq *DeadlineQuery) Select(fields ...string) *DeadlineSelect
- func (dq *DeadlineQuery) Unique(unique bool) *DeadlineQuery
- func (dq *DeadlineQuery) Where(ps ...predicate.Deadline) *DeadlineQuery
- func (dq *DeadlineQuery) WithAuthor(opts ...func(*UserQuery)) *DeadlineQuery
- func (dq *DeadlineQuery) WithGroup(opts ...func(*GroupQuery)) *DeadlineQuery
- func (dq *DeadlineQuery) WithVotedUsers(opts ...func(*UserQuery)) *DeadlineQuery
- type DeadlineSelect
- func (ds *DeadlineSelect) Aggregate(fns ...AggregateFunc) *DeadlineSelect
- func (s *DeadlineSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DeadlineSelect) BoolX(ctx context.Context) bool
- func (s *DeadlineSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DeadlineSelect) BoolsX(ctx context.Context) []bool
- func (s *DeadlineSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DeadlineSelect) Float64X(ctx context.Context) float64
- func (s *DeadlineSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DeadlineSelect) Float64sX(ctx context.Context) []float64
- func (s *DeadlineSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DeadlineSelect) IntX(ctx context.Context) int
- func (s *DeadlineSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DeadlineSelect) IntsX(ctx context.Context) []int
- func (ds *DeadlineSelect) Scan(ctx context.Context, v any) error
- func (s *DeadlineSelect) ScanX(ctx context.Context, v any)
- func (s *DeadlineSelect) String(ctx context.Context) (_ string, err error)
- func (s *DeadlineSelect) StringX(ctx context.Context) string
- func (s *DeadlineSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DeadlineSelect) StringsX(ctx context.Context) []string
- type DeadlineUpdate
- func (du *DeadlineUpdate) AddVotedUserIDs(ids ...int) *DeadlineUpdate
- func (du *DeadlineUpdate) AddVotedUsers(u ...*User) *DeadlineUpdate
- func (du *DeadlineUpdate) ClearAuthor() *DeadlineUpdate
- func (du *DeadlineUpdate) ClearDueTime() *DeadlineUpdate
- func (du *DeadlineUpdate) ClearGroup() *DeadlineUpdate
- func (du *DeadlineUpdate) ClearVotedUsers() *DeadlineUpdate
- func (du *DeadlineUpdate) Exec(ctx context.Context) error
- func (du *DeadlineUpdate) ExecX(ctx context.Context)
- func (du *DeadlineUpdate) Mutation() *DeadlineMutation
- func (du *DeadlineUpdate) RemoveVotedUserIDs(ids ...int) *DeadlineUpdate
- func (du *DeadlineUpdate) RemoveVotedUsers(u ...*User) *DeadlineUpdate
- func (du *DeadlineUpdate) Save(ctx context.Context) (int, error)
- func (du *DeadlineUpdate) SaveX(ctx context.Context) int
- func (du *DeadlineUpdate) SetAuthor(u *User) *DeadlineUpdate
- func (du *DeadlineUpdate) SetAuthorID(id int) *DeadlineUpdate
- func (du *DeadlineUpdate) SetDueTime(t time.Time) *DeadlineUpdate
- func (du *DeadlineUpdate) SetGroup(g *Group) *DeadlineUpdate
- func (du *DeadlineUpdate) SetGroupID(id int) *DeadlineUpdate
- func (du *DeadlineUpdate) SetName(s string) *DeadlineUpdate
- func (du *DeadlineUpdate) SetNillableDueTime(t *time.Time) *DeadlineUpdate
- func (du *DeadlineUpdate) Where(ps ...predicate.Deadline) *DeadlineUpdate
- type DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) AddVotedUserIDs(ids ...int) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) AddVotedUsers(u ...*User) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) ClearAuthor() *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) ClearDueTime() *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) ClearGroup() *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) ClearVotedUsers() *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) Exec(ctx context.Context) error
- func (duo *DeadlineUpdateOne) ExecX(ctx context.Context)
- func (duo *DeadlineUpdateOne) Mutation() *DeadlineMutation
- func (duo *DeadlineUpdateOne) RemoveVotedUserIDs(ids ...int) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) RemoveVotedUsers(u ...*User) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) Save(ctx context.Context) (*Deadline, error)
- func (duo *DeadlineUpdateOne) SaveX(ctx context.Context) *Deadline
- func (duo *DeadlineUpdateOne) Select(field string, fields ...string) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) SetAuthor(u *User) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) SetAuthorID(id int) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) SetDueTime(t time.Time) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) SetGroup(g *Group) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) SetGroupID(id int) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) SetName(s string) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) SetNillableDueTime(t *time.Time) *DeadlineUpdateOne
- func (duo *DeadlineUpdateOne) Where(ps ...predicate.Deadline) *DeadlineUpdateOne
- type DeadlineUpsert
- type DeadlineUpsertBulk
- func (u *DeadlineUpsertBulk) ClearDueTime() *DeadlineUpsertBulk
- func (u *DeadlineUpsertBulk) DoNothing() *DeadlineUpsertBulk
- func (u *DeadlineUpsertBulk) Exec(ctx context.Context) error
- func (u *DeadlineUpsertBulk) ExecX(ctx context.Context)
- func (u *DeadlineUpsertBulk) Ignore() *DeadlineUpsertBulk
- func (u *DeadlineUpsertBulk) SetDueTime(v time.Time) *DeadlineUpsertBulk
- func (u *DeadlineUpsertBulk) SetName(v string) *DeadlineUpsertBulk
- func (u *DeadlineUpsertBulk) Update(set func(*DeadlineUpsert)) *DeadlineUpsertBulk
- func (u *DeadlineUpsertBulk) UpdateDueTime() *DeadlineUpsertBulk
- func (u *DeadlineUpsertBulk) UpdateName() *DeadlineUpsertBulk
- func (u *DeadlineUpsertBulk) UpdateNewValues() *DeadlineUpsertBulk
- type DeadlineUpsertOne
- func (u *DeadlineUpsertOne) ClearDueTime() *DeadlineUpsertOne
- func (u *DeadlineUpsertOne) DoNothing() *DeadlineUpsertOne
- func (u *DeadlineUpsertOne) Exec(ctx context.Context) error
- func (u *DeadlineUpsertOne) ExecX(ctx context.Context)
- func (u *DeadlineUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *DeadlineUpsertOne) IDX(ctx context.Context) int
- func (u *DeadlineUpsertOne) Ignore() *DeadlineUpsertOne
- func (u *DeadlineUpsertOne) SetDueTime(v time.Time) *DeadlineUpsertOne
- func (u *DeadlineUpsertOne) SetName(v string) *DeadlineUpsertOne
- func (u *DeadlineUpsertOne) Update(set func(*DeadlineUpsert)) *DeadlineUpsertOne
- func (u *DeadlineUpsertOne) UpdateDueTime() *DeadlineUpsertOne
- func (u *DeadlineUpsertOne) UpdateName() *DeadlineUpsertOne
- func (u *DeadlineUpsertOne) UpdateNewValues() *DeadlineUpsertOne
- type Deadlines
- type Event
- type EventClient
- func (c *EventClient) Create() *EventCreate
- func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk
- func (c *EventClient) Delete() *EventDelete
- func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne
- func (c *EventClient) DeleteOneID(id int) *EventDeleteOne
- func (c *EventClient) Get(ctx context.Context, id int) (*Event, error)
- func (c *EventClient) GetX(ctx context.Context, id int) *Event
- func (c *EventClient) Hooks() []Hook
- func (c *EventClient) Intercept(interceptors ...Interceptor)
- func (c *EventClient) Interceptors() []Interceptor
- func (c *EventClient) Query() *EventQuery
- func (c *EventClient) QueryGroup(e *Event) *GroupQuery
- func (c *EventClient) Update() *EventUpdate
- func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne
- func (c *EventClient) UpdateOneID(id int) *EventUpdateOne
- func (c *EventClient) Use(hooks ...Hook)
- type EventCreate
- func (ec *EventCreate) Exec(ctx context.Context) error
- func (ec *EventCreate) ExecX(ctx context.Context)
- func (ec *EventCreate) Mutation() *EventMutation
- func (ec *EventCreate) OnConflict(opts ...sql.ConflictOption) *EventUpsertOne
- func (ec *EventCreate) OnConflictColumns(columns ...string) *EventUpsertOne
- func (ec *EventCreate) Save(ctx context.Context) (*Event, error)
- func (ec *EventCreate) SaveX(ctx context.Context) *Event
- func (ec *EventCreate) SetEndTime(t time.Time) *EventCreate
- func (ec *EventCreate) SetGroup(g *Group) *EventCreate
- func (ec *EventCreate) SetGroupID(id int) *EventCreate
- func (ec *EventCreate) SetLocation(s string) *EventCreate
- func (ec *EventCreate) SetName(s string) *EventCreate
- func (ec *EventCreate) SetNillableEndTime(t *time.Time) *EventCreate
- func (ec *EventCreate) SetNillableLocation(s *string) *EventCreate
- func (ec *EventCreate) SetNillableRepeatPattern(s *string) *EventCreate
- func (ec *EventCreate) SetRepeatPattern(s string) *EventCreate
- func (ec *EventCreate) SetStartTime(t time.Time) *EventCreate
- type EventCreateBulk
- func (ecb *EventCreateBulk) Exec(ctx context.Context) error
- func (ecb *EventCreateBulk) ExecX(ctx context.Context)
- func (ecb *EventCreateBulk) OnConflict(opts ...sql.ConflictOption) *EventUpsertBulk
- func (ecb *EventCreateBulk) OnConflictColumns(columns ...string) *EventUpsertBulk
- func (ecb *EventCreateBulk) Save(ctx context.Context) ([]*Event, error)
- func (ecb *EventCreateBulk) SaveX(ctx context.Context) []*Event
- type EventDelete
- type EventDeleteOne
- type EventEdges
- type EventGroupBy
- func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy
- func (s *EventGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EventGroupBy) BoolX(ctx context.Context) bool
- func (s *EventGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EventGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EventGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EventGroupBy) Float64X(ctx context.Context) float64
- func (s *EventGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EventGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EventGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EventGroupBy) IntX(ctx context.Context) int
- func (s *EventGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EventGroupBy) IntsX(ctx context.Context) []int
- func (egb *EventGroupBy) Scan(ctx context.Context, v any) error
- func (s *EventGroupBy) ScanX(ctx context.Context, v any)
- func (s *EventGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EventGroupBy) StringX(ctx context.Context) string
- func (s *EventGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EventGroupBy) StringsX(ctx context.Context) []string
- type EventMutation
- func (m *EventMutation) AddField(name string, value ent.Value) error
- func (m *EventMutation) AddedEdges() []string
- func (m *EventMutation) AddedField(name string) (ent.Value, bool)
- func (m *EventMutation) AddedFields() []string
- func (m *EventMutation) AddedIDs(name string) []ent.Value
- func (m *EventMutation) ClearEdge(name string) error
- func (m *EventMutation) ClearEndTime()
- func (m *EventMutation) ClearField(name string) error
- func (m *EventMutation) ClearGroup()
- func (m *EventMutation) ClearLocation()
- func (m *EventMutation) ClearRepeatPattern()
- func (m *EventMutation) ClearedEdges() []string
- func (m *EventMutation) ClearedFields() []string
- func (m EventMutation) Client() *Client
- func (m *EventMutation) EdgeCleared(name string) bool
- func (m *EventMutation) EndTime() (r time.Time, exists bool)
- func (m *EventMutation) EndTimeCleared() bool
- func (m *EventMutation) Field(name string) (ent.Value, bool)
- func (m *EventMutation) FieldCleared(name string) bool
- func (m *EventMutation) Fields() []string
- func (m *EventMutation) GroupCleared() bool
- func (m *EventMutation) GroupID() (id int, exists bool)
- func (m *EventMutation) GroupIDs() (ids []int)
- func (m *EventMutation) ID() (id int, exists bool)
- func (m *EventMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EventMutation) Location() (r string, exists bool)
- func (m *EventMutation) LocationCleared() bool
- func (m *EventMutation) Name() (r string, exists bool)
- func (m *EventMutation) OldEndTime(ctx context.Context) (v *time.Time, err error)
- func (m *EventMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EventMutation) OldLocation(ctx context.Context) (v string, err error)
- func (m *EventMutation) OldName(ctx context.Context) (v string, err error)
- func (m *EventMutation) OldRepeatPattern(ctx context.Context) (v string, err error)
- func (m *EventMutation) OldStartTime(ctx context.Context) (v time.Time, err error)
- func (m *EventMutation) Op() Op
- func (m *EventMutation) RemovedEdges() []string
- func (m *EventMutation) RemovedIDs(name string) []ent.Value
- func (m *EventMutation) RepeatPattern() (r string, exists bool)
- func (m *EventMutation) RepeatPatternCleared() bool
- func (m *EventMutation) ResetEdge(name string) error
- func (m *EventMutation) ResetEndTime()
- func (m *EventMutation) ResetField(name string) error
- func (m *EventMutation) ResetGroup()
- func (m *EventMutation) ResetLocation()
- func (m *EventMutation) ResetName()
- func (m *EventMutation) ResetRepeatPattern()
- func (m *EventMutation) ResetStartTime()
- func (m *EventMutation) SetEndTime(t time.Time)
- func (m *EventMutation) SetField(name string, value ent.Value) error
- func (m *EventMutation) SetGroupID(id int)
- func (m *EventMutation) SetLocation(s string)
- func (m *EventMutation) SetName(s string)
- func (m *EventMutation) SetOp(op Op)
- func (m *EventMutation) SetRepeatPattern(s string)
- func (m *EventMutation) SetStartTime(t time.Time)
- func (m *EventMutation) StartTime() (r time.Time, exists bool)
- func (m EventMutation) Tx() (*Tx, error)
- func (m *EventMutation) Type() string
- func (m *EventMutation) Where(ps ...predicate.Event)
- func (m *EventMutation) WhereP(ps ...func(*sql.Selector))
- type EventQuery
- func (eq *EventQuery) Aggregate(fns ...AggregateFunc) *EventSelect
- func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)
- func (eq *EventQuery) AllX(ctx context.Context) []*Event
- func (eq *EventQuery) Clone() *EventQuery
- func (eq *EventQuery) Count(ctx context.Context) (int, error)
- func (eq *EventQuery) CountX(ctx context.Context) int
- func (eq *EventQuery) Exist(ctx context.Context) (bool, error)
- func (eq *EventQuery) ExistX(ctx context.Context) bool
- func (eq *EventQuery) First(ctx context.Context) (*Event, error)
- func (eq *EventQuery) FirstID(ctx context.Context) (id int, err error)
- func (eq *EventQuery) FirstIDX(ctx context.Context) int
- func (eq *EventQuery) FirstX(ctx context.Context) *Event
- func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy
- func (eq *EventQuery) IDs(ctx context.Context) (ids []int, err error)
- func (eq *EventQuery) IDsX(ctx context.Context) []int
- func (eq *EventQuery) Limit(limit int) *EventQuery
- func (eq *EventQuery) Offset(offset int) *EventQuery
- func (eq *EventQuery) Only(ctx context.Context) (*Event, error)
- func (eq *EventQuery) OnlyID(ctx context.Context) (id int, err error)
- func (eq *EventQuery) OnlyIDX(ctx context.Context) int
- func (eq *EventQuery) OnlyX(ctx context.Context) *Event
- func (eq *EventQuery) Order(o ...event.OrderOption) *EventQuery
- func (eq *EventQuery) QueryGroup() *GroupQuery
- func (eq *EventQuery) Select(fields ...string) *EventSelect
- func (eq *EventQuery) Unique(unique bool) *EventQuery
- func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery
- func (eq *EventQuery) WithGroup(opts ...func(*GroupQuery)) *EventQuery
- type EventSelect
- func (es *EventSelect) Aggregate(fns ...AggregateFunc) *EventSelect
- func (s *EventSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EventSelect) BoolX(ctx context.Context) bool
- func (s *EventSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EventSelect) BoolsX(ctx context.Context) []bool
- func (s *EventSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EventSelect) Float64X(ctx context.Context) float64
- func (s *EventSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EventSelect) Float64sX(ctx context.Context) []float64
- func (s *EventSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EventSelect) IntX(ctx context.Context) int
- func (s *EventSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EventSelect) IntsX(ctx context.Context) []int
- func (es *EventSelect) Scan(ctx context.Context, v any) error
- func (s *EventSelect) ScanX(ctx context.Context, v any)
- func (s *EventSelect) String(ctx context.Context) (_ string, err error)
- func (s *EventSelect) StringX(ctx context.Context) string
- func (s *EventSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EventSelect) StringsX(ctx context.Context) []string
- type EventUpdate
- func (eu *EventUpdate) ClearEndTime() *EventUpdate
- func (eu *EventUpdate) ClearGroup() *EventUpdate
- func (eu *EventUpdate) ClearLocation() *EventUpdate
- func (eu *EventUpdate) ClearRepeatPattern() *EventUpdate
- func (eu *EventUpdate) Exec(ctx context.Context) error
- func (eu *EventUpdate) ExecX(ctx context.Context)
- func (eu *EventUpdate) Mutation() *EventMutation
- func (eu *EventUpdate) Save(ctx context.Context) (int, error)
- func (eu *EventUpdate) SaveX(ctx context.Context) int
- func (eu *EventUpdate) SetEndTime(t time.Time) *EventUpdate
- func (eu *EventUpdate) SetGroup(g *Group) *EventUpdate
- func (eu *EventUpdate) SetGroupID(id int) *EventUpdate
- func (eu *EventUpdate) SetLocation(s string) *EventUpdate
- func (eu *EventUpdate) SetName(s string) *EventUpdate
- func (eu *EventUpdate) SetNillableEndTime(t *time.Time) *EventUpdate
- func (eu *EventUpdate) SetNillableLocation(s *string) *EventUpdate
- func (eu *EventUpdate) SetNillableRepeatPattern(s *string) *EventUpdate
- func (eu *EventUpdate) SetRepeatPattern(s string) *EventUpdate
- func (eu *EventUpdate) SetStartTime(t time.Time) *EventUpdate
- func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate
- type EventUpdateOne
- func (euo *EventUpdateOne) ClearEndTime() *EventUpdateOne
- func (euo *EventUpdateOne) ClearGroup() *EventUpdateOne
- func (euo *EventUpdateOne) ClearLocation() *EventUpdateOne
- func (euo *EventUpdateOne) ClearRepeatPattern() *EventUpdateOne
- func (euo *EventUpdateOne) Exec(ctx context.Context) error
- func (euo *EventUpdateOne) ExecX(ctx context.Context)
- func (euo *EventUpdateOne) Mutation() *EventMutation
- func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)
- func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event
- func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne
- func (euo *EventUpdateOne) SetEndTime(t time.Time) *EventUpdateOne
- func (euo *EventUpdateOne) SetGroup(g *Group) *EventUpdateOne
- func (euo *EventUpdateOne) SetGroupID(id int) *EventUpdateOne
- func (euo *EventUpdateOne) SetLocation(s string) *EventUpdateOne
- func (euo *EventUpdateOne) SetName(s string) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableEndTime(t *time.Time) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableLocation(s *string) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableRepeatPattern(s *string) *EventUpdateOne
- func (euo *EventUpdateOne) SetRepeatPattern(s string) *EventUpdateOne
- func (euo *EventUpdateOne) SetStartTime(t time.Time) *EventUpdateOne
- func (euo *EventUpdateOne) Where(ps ...predicate.Event) *EventUpdateOne
- type EventUpsert
- func (u *EventUpsert) ClearEndTime() *EventUpsert
- func (u *EventUpsert) ClearLocation() *EventUpsert
- func (u *EventUpsert) ClearRepeatPattern() *EventUpsert
- func (u *EventUpsert) SetEndTime(v time.Time) *EventUpsert
- func (u *EventUpsert) SetLocation(v string) *EventUpsert
- func (u *EventUpsert) SetName(v string) *EventUpsert
- func (u *EventUpsert) SetRepeatPattern(v string) *EventUpsert
- func (u *EventUpsert) SetStartTime(v time.Time) *EventUpsert
- func (u *EventUpsert) UpdateEndTime() *EventUpsert
- func (u *EventUpsert) UpdateLocation() *EventUpsert
- func (u *EventUpsert) UpdateName() *EventUpsert
- func (u *EventUpsert) UpdateRepeatPattern() *EventUpsert
- func (u *EventUpsert) UpdateStartTime() *EventUpsert
- type EventUpsertBulk
- func (u *EventUpsertBulk) ClearEndTime() *EventUpsertBulk
- func (u *EventUpsertBulk) ClearLocation() *EventUpsertBulk
- func (u *EventUpsertBulk) ClearRepeatPattern() *EventUpsertBulk
- func (u *EventUpsertBulk) DoNothing() *EventUpsertBulk
- func (u *EventUpsertBulk) Exec(ctx context.Context) error
- func (u *EventUpsertBulk) ExecX(ctx context.Context)
- func (u *EventUpsertBulk) Ignore() *EventUpsertBulk
- func (u *EventUpsertBulk) SetEndTime(v time.Time) *EventUpsertBulk
- func (u *EventUpsertBulk) SetLocation(v string) *EventUpsertBulk
- func (u *EventUpsertBulk) SetName(v string) *EventUpsertBulk
- func (u *EventUpsertBulk) SetRepeatPattern(v string) *EventUpsertBulk
- func (u *EventUpsertBulk) SetStartTime(v time.Time) *EventUpsertBulk
- func (u *EventUpsertBulk) Update(set func(*EventUpsert)) *EventUpsertBulk
- func (u *EventUpsertBulk) UpdateEndTime() *EventUpsertBulk
- func (u *EventUpsertBulk) UpdateLocation() *EventUpsertBulk
- func (u *EventUpsertBulk) UpdateName() *EventUpsertBulk
- func (u *EventUpsertBulk) UpdateNewValues() *EventUpsertBulk
- func (u *EventUpsertBulk) UpdateRepeatPattern() *EventUpsertBulk
- func (u *EventUpsertBulk) UpdateStartTime() *EventUpsertBulk
- type EventUpsertOne
- func (u *EventUpsertOne) ClearEndTime() *EventUpsertOne
- func (u *EventUpsertOne) ClearLocation() *EventUpsertOne
- func (u *EventUpsertOne) ClearRepeatPattern() *EventUpsertOne
- func (u *EventUpsertOne) DoNothing() *EventUpsertOne
- func (u *EventUpsertOne) Exec(ctx context.Context) error
- func (u *EventUpsertOne) ExecX(ctx context.Context)
- func (u *EventUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *EventUpsertOne) IDX(ctx context.Context) int
- func (u *EventUpsertOne) Ignore() *EventUpsertOne
- func (u *EventUpsertOne) SetEndTime(v time.Time) *EventUpsertOne
- func (u *EventUpsertOne) SetLocation(v string) *EventUpsertOne
- func (u *EventUpsertOne) SetName(v string) *EventUpsertOne
- func (u *EventUpsertOne) SetRepeatPattern(v string) *EventUpsertOne
- func (u *EventUpsertOne) SetStartTime(v time.Time) *EventUpsertOne
- func (u *EventUpsertOne) Update(set func(*EventUpsert)) *EventUpsertOne
- func (u *EventUpsertOne) UpdateEndTime() *EventUpsertOne
- func (u *EventUpsertOne) UpdateLocation() *EventUpsertOne
- func (u *EventUpsertOne) UpdateName() *EventUpsertOne
- func (u *EventUpsertOne) UpdateNewValues() *EventUpsertOne
- func (u *EventUpsertOne) UpdateRepeatPattern() *EventUpsertOne
- func (u *EventUpsertOne) UpdateStartTime() *EventUpsertOne
- type Events
- type Forum
- type ForumClient
- func (c *ForumClient) Create() *ForumCreate
- func (c *ForumClient) CreateBulk(builders ...*ForumCreate) *ForumCreateBulk
- func (c *ForumClient) Delete() *ForumDelete
- func (c *ForumClient) DeleteOne(f *Forum) *ForumDeleteOne
- func (c *ForumClient) DeleteOneID(id int) *ForumDeleteOne
- func (c *ForumClient) Get(ctx context.Context, id int) (*Forum, error)
- func (c *ForumClient) GetX(ctx context.Context, id int) *Forum
- func (c *ForumClient) Hooks() []Hook
- func (c *ForumClient) Intercept(interceptors ...Interceptor)
- func (c *ForumClient) Interceptors() []Interceptor
- func (c *ForumClient) Query() *ForumQuery
- func (c *ForumClient) QueryGroup(f *Forum) *GroupQuery
- func (c *ForumClient) QueryPosts(f *Forum) *ForumPostQuery
- func (c *ForumClient) Update() *ForumUpdate
- func (c *ForumClient) UpdateOne(f *Forum) *ForumUpdateOne
- func (c *ForumClient) UpdateOneID(id int) *ForumUpdateOne
- func (c *ForumClient) Use(hooks ...Hook)
- type ForumCreate
- func (fc *ForumCreate) AddPostIDs(ids ...int) *ForumCreate
- func (fc *ForumCreate) AddPosts(f ...*ForumPost) *ForumCreate
- func (fc *ForumCreate) Exec(ctx context.Context) error
- func (fc *ForumCreate) ExecX(ctx context.Context)
- func (fc *ForumCreate) Mutation() *ForumMutation
- func (fc *ForumCreate) OnConflict(opts ...sql.ConflictOption) *ForumUpsertOne
- func (fc *ForumCreate) OnConflictColumns(columns ...string) *ForumUpsertOne
- func (fc *ForumCreate) Save(ctx context.Context) (*Forum, error)
- func (fc *ForumCreate) SaveX(ctx context.Context) *Forum
- func (fc *ForumCreate) SetDescription(s string) *ForumCreate
- func (fc *ForumCreate) SetGroup(g *Group) *ForumCreate
- func (fc *ForumCreate) SetGroupID(id int) *ForumCreate
- func (fc *ForumCreate) SetName(s string) *ForumCreate
- func (fc *ForumCreate) SetShortName(s string) *ForumCreate
- type ForumCreateBulk
- func (fcb *ForumCreateBulk) Exec(ctx context.Context) error
- func (fcb *ForumCreateBulk) ExecX(ctx context.Context)
- func (fcb *ForumCreateBulk) OnConflict(opts ...sql.ConflictOption) *ForumUpsertBulk
- func (fcb *ForumCreateBulk) OnConflictColumns(columns ...string) *ForumUpsertBulk
- func (fcb *ForumCreateBulk) Save(ctx context.Context) ([]*Forum, error)
- func (fcb *ForumCreateBulk) SaveX(ctx context.Context) []*Forum
- type ForumDelete
- type ForumDeleteOne
- type ForumEdges
- type ForumGroupBy
- func (fgb *ForumGroupBy) Aggregate(fns ...AggregateFunc) *ForumGroupBy
- func (s *ForumGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ForumGroupBy) BoolX(ctx context.Context) bool
- func (s *ForumGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ForumGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ForumGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ForumGroupBy) Float64X(ctx context.Context) float64
- func (s *ForumGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ForumGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ForumGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ForumGroupBy) IntX(ctx context.Context) int
- func (s *ForumGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ForumGroupBy) IntsX(ctx context.Context) []int
- func (fgb *ForumGroupBy) Scan(ctx context.Context, v any) error
- func (s *ForumGroupBy) ScanX(ctx context.Context, v any)
- func (s *ForumGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ForumGroupBy) StringX(ctx context.Context) string
- func (s *ForumGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ForumGroupBy) StringsX(ctx context.Context) []string
- type ForumMutation
- func (m *ForumMutation) AddField(name string, value ent.Value) error
- func (m *ForumMutation) AddPostIDs(ids ...int)
- func (m *ForumMutation) AddedEdges() []string
- func (m *ForumMutation) AddedField(name string) (ent.Value, bool)
- func (m *ForumMutation) AddedFields() []string
- func (m *ForumMutation) AddedIDs(name string) []ent.Value
- func (m *ForumMutation) ClearEdge(name string) error
- func (m *ForumMutation) ClearField(name string) error
- func (m *ForumMutation) ClearGroup()
- func (m *ForumMutation) ClearPosts()
- func (m *ForumMutation) ClearedEdges() []string
- func (m *ForumMutation) ClearedFields() []string
- func (m ForumMutation) Client() *Client
- func (m *ForumMutation) Description() (r string, exists bool)
- func (m *ForumMutation) EdgeCleared(name string) bool
- func (m *ForumMutation) Field(name string) (ent.Value, bool)
- func (m *ForumMutation) FieldCleared(name string) bool
- func (m *ForumMutation) Fields() []string
- func (m *ForumMutation) GroupCleared() bool
- func (m *ForumMutation) GroupID() (id int, exists bool)
- func (m *ForumMutation) GroupIDs() (ids []int)
- func (m *ForumMutation) ID() (id int, exists bool)
- func (m *ForumMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ForumMutation) Name() (r string, exists bool)
- func (m *ForumMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *ForumMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ForumMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ForumMutation) OldShortName(ctx context.Context) (v string, err error)
- func (m *ForumMutation) Op() Op
- func (m *ForumMutation) PostsCleared() bool
- func (m *ForumMutation) PostsIDs() (ids []int)
- func (m *ForumMutation) RemovePostIDs(ids ...int)
- func (m *ForumMutation) RemovedEdges() []string
- func (m *ForumMutation) RemovedIDs(name string) []ent.Value
- func (m *ForumMutation) RemovedPostsIDs() (ids []int)
- func (m *ForumMutation) ResetDescription()
- func (m *ForumMutation) ResetEdge(name string) error
- func (m *ForumMutation) ResetField(name string) error
- func (m *ForumMutation) ResetGroup()
- func (m *ForumMutation) ResetName()
- func (m *ForumMutation) ResetPosts()
- func (m *ForumMutation) ResetShortName()
- func (m *ForumMutation) SetDescription(s string)
- func (m *ForumMutation) SetField(name string, value ent.Value) error
- func (m *ForumMutation) SetGroupID(id int)
- func (m *ForumMutation) SetName(s string)
- func (m *ForumMutation) SetOp(op Op)
- func (m *ForumMutation) SetShortName(s string)
- func (m *ForumMutation) ShortName() (r string, exists bool)
- func (m ForumMutation) Tx() (*Tx, error)
- func (m *ForumMutation) Type() string
- func (m *ForumMutation) Where(ps ...predicate.Forum)
- func (m *ForumMutation) WhereP(ps ...func(*sql.Selector))
- type ForumPost
- func (fp *ForumPost) QueryAuthor() *UserQuery
- func (fp *ForumPost) QueryChildren() *ForumPostQuery
- func (fp *ForumPost) QueryForum() *ForumQuery
- func (fp *ForumPost) QueryParent() *ForumPostQuery
- func (fp *ForumPost) QueryReactedUsers() *UserQuery
- func (fp *ForumPost) QueryReactions() *ReactionQuery
- func (fp *ForumPost) String() string
- func (fp *ForumPost) Unwrap() *ForumPost
- func (fp *ForumPost) Update() *ForumPostUpdateOne
- func (fp *ForumPost) Value(name string) (ent.Value, error)
- type ForumPostClient
- func (c *ForumPostClient) Create() *ForumPostCreate
- func (c *ForumPostClient) CreateBulk(builders ...*ForumPostCreate) *ForumPostCreateBulk
- func (c *ForumPostClient) Delete() *ForumPostDelete
- func (c *ForumPostClient) DeleteOne(fp *ForumPost) *ForumPostDeleteOne
- func (c *ForumPostClient) DeleteOneID(id int) *ForumPostDeleteOne
- func (c *ForumPostClient) Get(ctx context.Context, id int) (*ForumPost, error)
- func (c *ForumPostClient) GetX(ctx context.Context, id int) *ForumPost
- func (c *ForumPostClient) Hooks() []Hook
- func (c *ForumPostClient) Intercept(interceptors ...Interceptor)
- func (c *ForumPostClient) Interceptors() []Interceptor
- func (c *ForumPostClient) Query() *ForumPostQuery
- func (c *ForumPostClient) QueryAuthor(fp *ForumPost) *UserQuery
- func (c *ForumPostClient) QueryChildren(fp *ForumPost) *ForumPostQuery
- func (c *ForumPostClient) QueryForum(fp *ForumPost) *ForumQuery
- func (c *ForumPostClient) QueryParent(fp *ForumPost) *ForumPostQuery
- func (c *ForumPostClient) QueryReactedUsers(fp *ForumPost) *UserQuery
- func (c *ForumPostClient) QueryReactions(fp *ForumPost) *ReactionQuery
- func (c *ForumPostClient) Update() *ForumPostUpdate
- func (c *ForumPostClient) UpdateOne(fp *ForumPost) *ForumPostUpdateOne
- func (c *ForumPostClient) UpdateOneID(id int) *ForumPostUpdateOne
- func (c *ForumPostClient) Use(hooks ...Hook)
- type ForumPostCreate
- func (fpc *ForumPostCreate) AddChildIDs(ids ...int) *ForumPostCreate
- func (fpc *ForumPostCreate) AddChildren(f ...*ForumPost) *ForumPostCreate
- func (fpc *ForumPostCreate) AddReactedUserIDs(ids ...int) *ForumPostCreate
- func (fpc *ForumPostCreate) AddReactedUsers(u ...*User) *ForumPostCreate
- func (fpc *ForumPostCreate) Exec(ctx context.Context) error
- func (fpc *ForumPostCreate) ExecX(ctx context.Context)
- func (fpc *ForumPostCreate) Mutation() *ForumPostMutation
- func (fpc *ForumPostCreate) OnConflict(opts ...sql.ConflictOption) *ForumPostUpsertOne
- func (fpc *ForumPostCreate) OnConflictColumns(columns ...string) *ForumPostUpsertOne
- func (fpc *ForumPostCreate) Save(ctx context.Context) (*ForumPost, error)
- func (fpc *ForumPostCreate) SaveX(ctx context.Context) *ForumPost
- func (fpc *ForumPostCreate) SetAuthor(u *User) *ForumPostCreate
- func (fpc *ForumPostCreate) SetAuthorID(id int) *ForumPostCreate
- func (fpc *ForumPostCreate) SetContent(s string) *ForumPostCreate
- func (fpc *ForumPostCreate) SetForum(f *Forum) *ForumPostCreate
- func (fpc *ForumPostCreate) SetForumID(id int) *ForumPostCreate
- func (fpc *ForumPostCreate) SetMentionedUsersJSON(i []int) *ForumPostCreate
- func (fpc *ForumPostCreate) SetNillableParentID(id *int) *ForumPostCreate
- func (fpc *ForumPostCreate) SetParent(f *ForumPost) *ForumPostCreate
- func (fpc *ForumPostCreate) SetParentID(id int) *ForumPostCreate
- func (fpc *ForumPostCreate) SetTitle(s string) *ForumPostCreate
- type ForumPostCreateBulk
- func (fpcb *ForumPostCreateBulk) Exec(ctx context.Context) error
- func (fpcb *ForumPostCreateBulk) ExecX(ctx context.Context)
- func (fpcb *ForumPostCreateBulk) OnConflict(opts ...sql.ConflictOption) *ForumPostUpsertBulk
- func (fpcb *ForumPostCreateBulk) OnConflictColumns(columns ...string) *ForumPostUpsertBulk
- func (fpcb *ForumPostCreateBulk) Save(ctx context.Context) ([]*ForumPost, error)
- func (fpcb *ForumPostCreateBulk) SaveX(ctx context.Context) []*ForumPost
- type ForumPostDelete
- type ForumPostDeleteOne
- type ForumPostEdges
- func (e ForumPostEdges) AuthorOrErr() (*User, error)
- func (e ForumPostEdges) ChildrenOrErr() ([]*ForumPost, error)
- func (e ForumPostEdges) ForumOrErr() (*Forum, error)
- func (e ForumPostEdges) ParentOrErr() (*ForumPost, error)
- func (e ForumPostEdges) ReactedUsersOrErr() ([]*User, error)
- func (e ForumPostEdges) ReactionsOrErr() ([]*Reaction, error)
- type ForumPostGroupBy
- func (fpgb *ForumPostGroupBy) Aggregate(fns ...AggregateFunc) *ForumPostGroupBy
- func (s *ForumPostGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ForumPostGroupBy) BoolX(ctx context.Context) bool
- func (s *ForumPostGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ForumPostGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ForumPostGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ForumPostGroupBy) Float64X(ctx context.Context) float64
- func (s *ForumPostGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ForumPostGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ForumPostGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ForumPostGroupBy) IntX(ctx context.Context) int
- func (s *ForumPostGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ForumPostGroupBy) IntsX(ctx context.Context) []int
- func (fpgb *ForumPostGroupBy) Scan(ctx context.Context, v any) error
- func (s *ForumPostGroupBy) ScanX(ctx context.Context, v any)
- func (s *ForumPostGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ForumPostGroupBy) StringX(ctx context.Context) string
- func (s *ForumPostGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ForumPostGroupBy) StringsX(ctx context.Context) []string
- type ForumPostMutation
- func (m *ForumPostMutation) AddChildIDs(ids ...int)
- func (m *ForumPostMutation) AddField(name string, value ent.Value) error
- func (m *ForumPostMutation) AddReactedUserIDs(ids ...int)
- func (m *ForumPostMutation) AddedEdges() []string
- func (m *ForumPostMutation) AddedField(name string) (ent.Value, bool)
- func (m *ForumPostMutation) AddedFields() []string
- func (m *ForumPostMutation) AddedIDs(name string) []ent.Value
- func (m *ForumPostMutation) AppendMentionedUsersJSON(i []int)
- func (m *ForumPostMutation) AppendedMentionedUsersJSON() ([]int, bool)
- func (m *ForumPostMutation) AuthorCleared() bool
- func (m *ForumPostMutation) AuthorID() (id int, exists bool)
- func (m *ForumPostMutation) AuthorIDs() (ids []int)
- func (m *ForumPostMutation) ChildrenCleared() bool
- func (m *ForumPostMutation) ChildrenIDs() (ids []int)
- func (m *ForumPostMutation) ClearAuthor()
- func (m *ForumPostMutation) ClearChildren()
- func (m *ForumPostMutation) ClearEdge(name string) error
- func (m *ForumPostMutation) ClearField(name string) error
- func (m *ForumPostMutation) ClearForum()
- func (m *ForumPostMutation) ClearParent()
- func (m *ForumPostMutation) ClearReactedUsers()
- func (m *ForumPostMutation) ClearedEdges() []string
- func (m *ForumPostMutation) ClearedFields() []string
- func (m ForumPostMutation) Client() *Client
- func (m *ForumPostMutation) Content() (r string, exists bool)
- func (m *ForumPostMutation) EdgeCleared(name string) bool
- func (m *ForumPostMutation) Field(name string) (ent.Value, bool)
- func (m *ForumPostMutation) FieldCleared(name string) bool
- func (m *ForumPostMutation) Fields() []string
- func (m *ForumPostMutation) ForumCleared() bool
- func (m *ForumPostMutation) ForumID() (id int, exists bool)
- func (m *ForumPostMutation) ForumIDs() (ids []int)
- func (m *ForumPostMutation) ID() (id int, exists bool)
- func (m *ForumPostMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ForumPostMutation) MentionedUsersJSON() (r []int, exists bool)
- func (m *ForumPostMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *ForumPostMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ForumPostMutation) OldMentionedUsersJSON(ctx context.Context) (v []int, err error)
- func (m *ForumPostMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *ForumPostMutation) Op() Op
- func (m *ForumPostMutation) ParentCleared() bool
- func (m *ForumPostMutation) ParentID() (id int, exists bool)
- func (m *ForumPostMutation) ParentIDs() (ids []int)
- func (m *ForumPostMutation) ReactedUsersCleared() bool
- func (m *ForumPostMutation) ReactedUsersIDs() (ids []int)
- func (m *ForumPostMutation) RemoveChildIDs(ids ...int)
- func (m *ForumPostMutation) RemoveReactedUserIDs(ids ...int)
- func (m *ForumPostMutation) RemovedChildrenIDs() (ids []int)
- func (m *ForumPostMutation) RemovedEdges() []string
- func (m *ForumPostMutation) RemovedIDs(name string) []ent.Value
- func (m *ForumPostMutation) RemovedReactedUsersIDs() (ids []int)
- func (m *ForumPostMutation) ResetAuthor()
- func (m *ForumPostMutation) ResetChildren()
- func (m *ForumPostMutation) ResetContent()
- func (m *ForumPostMutation) ResetEdge(name string) error
- func (m *ForumPostMutation) ResetField(name string) error
- func (m *ForumPostMutation) ResetForum()
- func (m *ForumPostMutation) ResetMentionedUsersJSON()
- func (m *ForumPostMutation) ResetParent()
- func (m *ForumPostMutation) ResetReactedUsers()
- func (m *ForumPostMutation) ResetTitle()
- func (m *ForumPostMutation) SetAuthorID(id int)
- func (m *ForumPostMutation) SetContent(s string)
- func (m *ForumPostMutation) SetField(name string, value ent.Value) error
- func (m *ForumPostMutation) SetForumID(id int)
- func (m *ForumPostMutation) SetMentionedUsersJSON(i []int)
- func (m *ForumPostMutation) SetOp(op Op)
- func (m *ForumPostMutation) SetParentID(id int)
- func (m *ForumPostMutation) SetTitle(s string)
- func (m *ForumPostMutation) Title() (r string, exists bool)
- func (m ForumPostMutation) Tx() (*Tx, error)
- func (m *ForumPostMutation) Type() string
- func (m *ForumPostMutation) Where(ps ...predicate.ForumPost)
- func (m *ForumPostMutation) WhereP(ps ...func(*sql.Selector))
- type ForumPostQuery
- func (fpq *ForumPostQuery) Aggregate(fns ...AggregateFunc) *ForumPostSelect
- func (fpq *ForumPostQuery) All(ctx context.Context) ([]*ForumPost, error)
- func (fpq *ForumPostQuery) AllX(ctx context.Context) []*ForumPost
- func (fpq *ForumPostQuery) Clone() *ForumPostQuery
- func (fpq *ForumPostQuery) Count(ctx context.Context) (int, error)
- func (fpq *ForumPostQuery) CountX(ctx context.Context) int
- func (fpq *ForumPostQuery) Exist(ctx context.Context) (bool, error)
- func (fpq *ForumPostQuery) ExistX(ctx context.Context) bool
- func (fpq *ForumPostQuery) First(ctx context.Context) (*ForumPost, error)
- func (fpq *ForumPostQuery) FirstID(ctx context.Context) (id int, err error)
- func (fpq *ForumPostQuery) FirstIDX(ctx context.Context) int
- func (fpq *ForumPostQuery) FirstX(ctx context.Context) *ForumPost
- func (fpq *ForumPostQuery) GroupBy(field string, fields ...string) *ForumPostGroupBy
- func (fpq *ForumPostQuery) IDs(ctx context.Context) (ids []int, err error)
- func (fpq *ForumPostQuery) IDsX(ctx context.Context) []int
- func (fpq *ForumPostQuery) Limit(limit int) *ForumPostQuery
- func (fpq *ForumPostQuery) Offset(offset int) *ForumPostQuery
- func (fpq *ForumPostQuery) Only(ctx context.Context) (*ForumPost, error)
- func (fpq *ForumPostQuery) OnlyID(ctx context.Context) (id int, err error)
- func (fpq *ForumPostQuery) OnlyIDX(ctx context.Context) int
- func (fpq *ForumPostQuery) OnlyX(ctx context.Context) *ForumPost
- func (fpq *ForumPostQuery) Order(o ...forumpost.OrderOption) *ForumPostQuery
- func (fpq *ForumPostQuery) QueryAuthor() *UserQuery
- func (fpq *ForumPostQuery) QueryChildren() *ForumPostQuery
- func (fpq *ForumPostQuery) QueryForum() *ForumQuery
- func (fpq *ForumPostQuery) QueryParent() *ForumPostQuery
- func (fpq *ForumPostQuery) QueryReactedUsers() *UserQuery
- func (fpq *ForumPostQuery) QueryReactions() *ReactionQuery
- func (fpq *ForumPostQuery) Select(fields ...string) *ForumPostSelect
- func (fpq *ForumPostQuery) Unique(unique bool) *ForumPostQuery
- func (fpq *ForumPostQuery) Where(ps ...predicate.ForumPost) *ForumPostQuery
- func (fpq *ForumPostQuery) WithAuthor(opts ...func(*UserQuery)) *ForumPostQuery
- func (fpq *ForumPostQuery) WithChildren(opts ...func(*ForumPostQuery)) *ForumPostQuery
- func (fpq *ForumPostQuery) WithForum(opts ...func(*ForumQuery)) *ForumPostQuery
- func (fpq *ForumPostQuery) WithParent(opts ...func(*ForumPostQuery)) *ForumPostQuery
- func (fpq *ForumPostQuery) WithReactedUsers(opts ...func(*UserQuery)) *ForumPostQuery
- func (fpq *ForumPostQuery) WithReactions(opts ...func(*ReactionQuery)) *ForumPostQuery
- type ForumPostSelect
- func (fps *ForumPostSelect) Aggregate(fns ...AggregateFunc) *ForumPostSelect
- func (s *ForumPostSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ForumPostSelect) BoolX(ctx context.Context) bool
- func (s *ForumPostSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ForumPostSelect) BoolsX(ctx context.Context) []bool
- func (s *ForumPostSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ForumPostSelect) Float64X(ctx context.Context) float64
- func (s *ForumPostSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ForumPostSelect) Float64sX(ctx context.Context) []float64
- func (s *ForumPostSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ForumPostSelect) IntX(ctx context.Context) int
- func (s *ForumPostSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ForumPostSelect) IntsX(ctx context.Context) []int
- func (fps *ForumPostSelect) Scan(ctx context.Context, v any) error
- func (s *ForumPostSelect) ScanX(ctx context.Context, v any)
- func (s *ForumPostSelect) String(ctx context.Context) (_ string, err error)
- func (s *ForumPostSelect) StringX(ctx context.Context) string
- func (s *ForumPostSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ForumPostSelect) StringsX(ctx context.Context) []string
- type ForumPostUpdate
- func (fpu *ForumPostUpdate) AddChildIDs(ids ...int) *ForumPostUpdate
- func (fpu *ForumPostUpdate) AddChildren(f ...*ForumPost) *ForumPostUpdate
- func (fpu *ForumPostUpdate) AddReactedUserIDs(ids ...int) *ForumPostUpdate
- func (fpu *ForumPostUpdate) AddReactedUsers(u ...*User) *ForumPostUpdate
- func (fpu *ForumPostUpdate) AppendMentionedUsersJSON(i []int) *ForumPostUpdate
- func (fpu *ForumPostUpdate) ClearAuthor() *ForumPostUpdate
- func (fpu *ForumPostUpdate) ClearChildren() *ForumPostUpdate
- func (fpu *ForumPostUpdate) ClearForum() *ForumPostUpdate
- func (fpu *ForumPostUpdate) ClearParent() *ForumPostUpdate
- func (fpu *ForumPostUpdate) ClearReactedUsers() *ForumPostUpdate
- func (fpu *ForumPostUpdate) Exec(ctx context.Context) error
- func (fpu *ForumPostUpdate) ExecX(ctx context.Context)
- func (fpu *ForumPostUpdate) Mutation() *ForumPostMutation
- func (fpu *ForumPostUpdate) RemoveChildIDs(ids ...int) *ForumPostUpdate
- func (fpu *ForumPostUpdate) RemoveChildren(f ...*ForumPost) *ForumPostUpdate
- func (fpu *ForumPostUpdate) RemoveReactedUserIDs(ids ...int) *ForumPostUpdate
- func (fpu *ForumPostUpdate) RemoveReactedUsers(u ...*User) *ForumPostUpdate
- func (fpu *ForumPostUpdate) Save(ctx context.Context) (int, error)
- func (fpu *ForumPostUpdate) SaveX(ctx context.Context) int
- func (fpu *ForumPostUpdate) SetAuthor(u *User) *ForumPostUpdate
- func (fpu *ForumPostUpdate) SetAuthorID(id int) *ForumPostUpdate
- func (fpu *ForumPostUpdate) SetContent(s string) *ForumPostUpdate
- func (fpu *ForumPostUpdate) SetForum(f *Forum) *ForumPostUpdate
- func (fpu *ForumPostUpdate) SetForumID(id int) *ForumPostUpdate
- func (fpu *ForumPostUpdate) SetMentionedUsersJSON(i []int) *ForumPostUpdate
- func (fpu *ForumPostUpdate) SetNillableParentID(id *int) *ForumPostUpdate
- func (fpu *ForumPostUpdate) SetParent(f *ForumPost) *ForumPostUpdate
- func (fpu *ForumPostUpdate) SetParentID(id int) *ForumPostUpdate
- func (fpu *ForumPostUpdate) SetTitle(s string) *ForumPostUpdate
- func (fpu *ForumPostUpdate) Where(ps ...predicate.ForumPost) *ForumPostUpdate
- type ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) AddChildIDs(ids ...int) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) AddChildren(f ...*ForumPost) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) AddReactedUserIDs(ids ...int) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) AddReactedUsers(u ...*User) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) AppendMentionedUsersJSON(i []int) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) ClearAuthor() *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) ClearChildren() *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) ClearForum() *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) ClearParent() *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) ClearReactedUsers() *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) Exec(ctx context.Context) error
- func (fpuo *ForumPostUpdateOne) ExecX(ctx context.Context)
- func (fpuo *ForumPostUpdateOne) Mutation() *ForumPostMutation
- func (fpuo *ForumPostUpdateOne) RemoveChildIDs(ids ...int) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) RemoveChildren(f ...*ForumPost) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) RemoveReactedUserIDs(ids ...int) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) RemoveReactedUsers(u ...*User) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) Save(ctx context.Context) (*ForumPost, error)
- func (fpuo *ForumPostUpdateOne) SaveX(ctx context.Context) *ForumPost
- func (fpuo *ForumPostUpdateOne) Select(field string, fields ...string) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) SetAuthor(u *User) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) SetAuthorID(id int) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) SetContent(s string) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) SetForum(f *Forum) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) SetForumID(id int) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) SetMentionedUsersJSON(i []int) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) SetNillableParentID(id *int) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) SetParent(f *ForumPost) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) SetParentID(id int) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) SetTitle(s string) *ForumPostUpdateOne
- func (fpuo *ForumPostUpdateOne) Where(ps ...predicate.ForumPost) *ForumPostUpdateOne
- type ForumPostUpsert
- func (u *ForumPostUpsert) SetContent(v string) *ForumPostUpsert
- func (u *ForumPostUpsert) SetMentionedUsersJSON(v []int) *ForumPostUpsert
- func (u *ForumPostUpsert) SetTitle(v string) *ForumPostUpsert
- func (u *ForumPostUpsert) UpdateContent() *ForumPostUpsert
- func (u *ForumPostUpsert) UpdateMentionedUsersJSON() *ForumPostUpsert
- func (u *ForumPostUpsert) UpdateTitle() *ForumPostUpsert
- type ForumPostUpsertBulk
- func (u *ForumPostUpsertBulk) DoNothing() *ForumPostUpsertBulk
- func (u *ForumPostUpsertBulk) Exec(ctx context.Context) error
- func (u *ForumPostUpsertBulk) ExecX(ctx context.Context)
- func (u *ForumPostUpsertBulk) Ignore() *ForumPostUpsertBulk
- func (u *ForumPostUpsertBulk) SetContent(v string) *ForumPostUpsertBulk
- func (u *ForumPostUpsertBulk) SetMentionedUsersJSON(v []int) *ForumPostUpsertBulk
- func (u *ForumPostUpsertBulk) SetTitle(v string) *ForumPostUpsertBulk
- func (u *ForumPostUpsertBulk) Update(set func(*ForumPostUpsert)) *ForumPostUpsertBulk
- func (u *ForumPostUpsertBulk) UpdateContent() *ForumPostUpsertBulk
- func (u *ForumPostUpsertBulk) UpdateMentionedUsersJSON() *ForumPostUpsertBulk
- func (u *ForumPostUpsertBulk) UpdateNewValues() *ForumPostUpsertBulk
- func (u *ForumPostUpsertBulk) UpdateTitle() *ForumPostUpsertBulk
- type ForumPostUpsertOne
- func (u *ForumPostUpsertOne) DoNothing() *ForumPostUpsertOne
- func (u *ForumPostUpsertOne) Exec(ctx context.Context) error
- func (u *ForumPostUpsertOne) ExecX(ctx context.Context)
- func (u *ForumPostUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *ForumPostUpsertOne) IDX(ctx context.Context) int
- func (u *ForumPostUpsertOne) Ignore() *ForumPostUpsertOne
- func (u *ForumPostUpsertOne) SetContent(v string) *ForumPostUpsertOne
- func (u *ForumPostUpsertOne) SetMentionedUsersJSON(v []int) *ForumPostUpsertOne
- func (u *ForumPostUpsertOne) SetTitle(v string) *ForumPostUpsertOne
- func (u *ForumPostUpsertOne) Update(set func(*ForumPostUpsert)) *ForumPostUpsertOne
- func (u *ForumPostUpsertOne) UpdateContent() *ForumPostUpsertOne
- func (u *ForumPostUpsertOne) UpdateMentionedUsersJSON() *ForumPostUpsertOne
- func (u *ForumPostUpsertOne) UpdateNewValues() *ForumPostUpsertOne
- func (u *ForumPostUpsertOne) UpdateTitle() *ForumPostUpsertOne
- type ForumPosts
- type ForumQuery
- func (fq *ForumQuery) Aggregate(fns ...AggregateFunc) *ForumSelect
- func (fq *ForumQuery) All(ctx context.Context) ([]*Forum, error)
- func (fq *ForumQuery) AllX(ctx context.Context) []*Forum
- func (fq *ForumQuery) Clone() *ForumQuery
- func (fq *ForumQuery) Count(ctx context.Context) (int, error)
- func (fq *ForumQuery) CountX(ctx context.Context) int
- func (fq *ForumQuery) Exist(ctx context.Context) (bool, error)
- func (fq *ForumQuery) ExistX(ctx context.Context) bool
- func (fq *ForumQuery) First(ctx context.Context) (*Forum, error)
- func (fq *ForumQuery) FirstID(ctx context.Context) (id int, err error)
- func (fq *ForumQuery) FirstIDX(ctx context.Context) int
- func (fq *ForumQuery) FirstX(ctx context.Context) *Forum
- func (fq *ForumQuery) GroupBy(field string, fields ...string) *ForumGroupBy
- func (fq *ForumQuery) IDs(ctx context.Context) (ids []int, err error)
- func (fq *ForumQuery) IDsX(ctx context.Context) []int
- func (fq *ForumQuery) Limit(limit int) *ForumQuery
- func (fq *ForumQuery) Offset(offset int) *ForumQuery
- func (fq *ForumQuery) Only(ctx context.Context) (*Forum, error)
- func (fq *ForumQuery) OnlyID(ctx context.Context) (id int, err error)
- func (fq *ForumQuery) OnlyIDX(ctx context.Context) int
- func (fq *ForumQuery) OnlyX(ctx context.Context) *Forum
- func (fq *ForumQuery) Order(o ...forum.OrderOption) *ForumQuery
- func (fq *ForumQuery) QueryGroup() *GroupQuery
- func (fq *ForumQuery) QueryPosts() *ForumPostQuery
- func (fq *ForumQuery) Select(fields ...string) *ForumSelect
- func (fq *ForumQuery) Unique(unique bool) *ForumQuery
- func (fq *ForumQuery) Where(ps ...predicate.Forum) *ForumQuery
- func (fq *ForumQuery) WithGroup(opts ...func(*GroupQuery)) *ForumQuery
- func (fq *ForumQuery) WithPosts(opts ...func(*ForumPostQuery)) *ForumQuery
- type ForumSelect
- func (fs *ForumSelect) Aggregate(fns ...AggregateFunc) *ForumSelect
- func (s *ForumSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ForumSelect) BoolX(ctx context.Context) bool
- func (s *ForumSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ForumSelect) BoolsX(ctx context.Context) []bool
- func (s *ForumSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ForumSelect) Float64X(ctx context.Context) float64
- func (s *ForumSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ForumSelect) Float64sX(ctx context.Context) []float64
- func (s *ForumSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ForumSelect) IntX(ctx context.Context) int
- func (s *ForumSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ForumSelect) IntsX(ctx context.Context) []int
- func (fs *ForumSelect) Scan(ctx context.Context, v any) error
- func (s *ForumSelect) ScanX(ctx context.Context, v any)
- func (s *ForumSelect) String(ctx context.Context) (_ string, err error)
- func (s *ForumSelect) StringX(ctx context.Context) string
- func (s *ForumSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ForumSelect) StringsX(ctx context.Context) []string
- type ForumUpdate
- func (fu *ForumUpdate) AddPostIDs(ids ...int) *ForumUpdate
- func (fu *ForumUpdate) AddPosts(f ...*ForumPost) *ForumUpdate
- func (fu *ForumUpdate) ClearGroup() *ForumUpdate
- func (fu *ForumUpdate) ClearPosts() *ForumUpdate
- func (fu *ForumUpdate) Exec(ctx context.Context) error
- func (fu *ForumUpdate) ExecX(ctx context.Context)
- func (fu *ForumUpdate) Mutation() *ForumMutation
- func (fu *ForumUpdate) RemovePostIDs(ids ...int) *ForumUpdate
- func (fu *ForumUpdate) RemovePosts(f ...*ForumPost) *ForumUpdate
- func (fu *ForumUpdate) Save(ctx context.Context) (int, error)
- func (fu *ForumUpdate) SaveX(ctx context.Context) int
- func (fu *ForumUpdate) SetDescription(s string) *ForumUpdate
- func (fu *ForumUpdate) SetGroup(g *Group) *ForumUpdate
- func (fu *ForumUpdate) SetGroupID(id int) *ForumUpdate
- func (fu *ForumUpdate) SetName(s string) *ForumUpdate
- func (fu *ForumUpdate) SetShortName(s string) *ForumUpdate
- func (fu *ForumUpdate) Where(ps ...predicate.Forum) *ForumUpdate
- type ForumUpdateOne
- func (fuo *ForumUpdateOne) AddPostIDs(ids ...int) *ForumUpdateOne
- func (fuo *ForumUpdateOne) AddPosts(f ...*ForumPost) *ForumUpdateOne
- func (fuo *ForumUpdateOne) ClearGroup() *ForumUpdateOne
- func (fuo *ForumUpdateOne) ClearPosts() *ForumUpdateOne
- func (fuo *ForumUpdateOne) Exec(ctx context.Context) error
- func (fuo *ForumUpdateOne) ExecX(ctx context.Context)
- func (fuo *ForumUpdateOne) Mutation() *ForumMutation
- func (fuo *ForumUpdateOne) RemovePostIDs(ids ...int) *ForumUpdateOne
- func (fuo *ForumUpdateOne) RemovePosts(f ...*ForumPost) *ForumUpdateOne
- func (fuo *ForumUpdateOne) Save(ctx context.Context) (*Forum, error)
- func (fuo *ForumUpdateOne) SaveX(ctx context.Context) *Forum
- func (fuo *ForumUpdateOne) Select(field string, fields ...string) *ForumUpdateOne
- func (fuo *ForumUpdateOne) SetDescription(s string) *ForumUpdateOne
- func (fuo *ForumUpdateOne) SetGroup(g *Group) *ForumUpdateOne
- func (fuo *ForumUpdateOne) SetGroupID(id int) *ForumUpdateOne
- func (fuo *ForumUpdateOne) SetName(s string) *ForumUpdateOne
- func (fuo *ForumUpdateOne) SetShortName(s string) *ForumUpdateOne
- func (fuo *ForumUpdateOne) Where(ps ...predicate.Forum) *ForumUpdateOne
- type ForumUpsert
- func (u *ForumUpsert) SetDescription(v string) *ForumUpsert
- func (u *ForumUpsert) SetName(v string) *ForumUpsert
- func (u *ForumUpsert) SetShortName(v string) *ForumUpsert
- func (u *ForumUpsert) UpdateDescription() *ForumUpsert
- func (u *ForumUpsert) UpdateName() *ForumUpsert
- func (u *ForumUpsert) UpdateShortName() *ForumUpsert
- type ForumUpsertBulk
- func (u *ForumUpsertBulk) DoNothing() *ForumUpsertBulk
- func (u *ForumUpsertBulk) Exec(ctx context.Context) error
- func (u *ForumUpsertBulk) ExecX(ctx context.Context)
- func (u *ForumUpsertBulk) Ignore() *ForumUpsertBulk
- func (u *ForumUpsertBulk) SetDescription(v string) *ForumUpsertBulk
- func (u *ForumUpsertBulk) SetName(v string) *ForumUpsertBulk
- func (u *ForumUpsertBulk) SetShortName(v string) *ForumUpsertBulk
- func (u *ForumUpsertBulk) Update(set func(*ForumUpsert)) *ForumUpsertBulk
- func (u *ForumUpsertBulk) UpdateDescription() *ForumUpsertBulk
- func (u *ForumUpsertBulk) UpdateName() *ForumUpsertBulk
- func (u *ForumUpsertBulk) UpdateNewValues() *ForumUpsertBulk
- func (u *ForumUpsertBulk) UpdateShortName() *ForumUpsertBulk
- type ForumUpsertOne
- func (u *ForumUpsertOne) DoNothing() *ForumUpsertOne
- func (u *ForumUpsertOne) Exec(ctx context.Context) error
- func (u *ForumUpsertOne) ExecX(ctx context.Context)
- func (u *ForumUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *ForumUpsertOne) IDX(ctx context.Context) int
- func (u *ForumUpsertOne) Ignore() *ForumUpsertOne
- func (u *ForumUpsertOne) SetDescription(v string) *ForumUpsertOne
- func (u *ForumUpsertOne) SetName(v string) *ForumUpsertOne
- func (u *ForumUpsertOne) SetShortName(v string) *ForumUpsertOne
- func (u *ForumUpsertOne) Update(set func(*ForumUpsert)) *ForumUpsertOne
- func (u *ForumUpsertOne) UpdateDescription() *ForumUpsertOne
- func (u *ForumUpsertOne) UpdateName() *ForumUpsertOne
- func (u *ForumUpsertOne) UpdateNewValues() *ForumUpsertOne
- func (u *ForumUpsertOne) UpdateShortName() *ForumUpsertOne
- type Forums
- type Group
- func (gr *Group) QueryDeadlines() *DeadlineQuery
- func (gr *Group) QueryEvents() *EventQuery
- func (gr *Group) QueryForums() *ForumQuery
- func (gr *Group) QueryGroupUsers() *GroupUserQuery
- func (gr *Group) QueryInstitution() *InstitutionQuery
- func (gr *Group) QueryInvites() *GroupInviteLinkQuery
- func (gr *Group) QueryUsers() *UserQuery
- func (gr *Group) String() string
- func (gr *Group) Unwrap() *Group
- func (gr *Group) Update() *GroupUpdateOne
- func (gr *Group) Value(name string) (ent.Value, error)
- type GroupClient
- func (c *GroupClient) Create() *GroupCreate
- func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
- func (c *GroupClient) Delete() *GroupDelete
- func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
- func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
- func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error)
- func (c *GroupClient) GetX(ctx context.Context, id int) *Group
- func (c *GroupClient) Hooks() []Hook
- func (c *GroupClient) Intercept(interceptors ...Interceptor)
- func (c *GroupClient) Interceptors() []Interceptor
- func (c *GroupClient) Query() *GroupQuery
- func (c *GroupClient) QueryDeadlines(gr *Group) *DeadlineQuery
- func (c *GroupClient) QueryEvents(gr *Group) *EventQuery
- func (c *GroupClient) QueryForums(gr *Group) *ForumQuery
- func (c *GroupClient) QueryGroupUsers(gr *Group) *GroupUserQuery
- func (c *GroupClient) QueryInstitution(gr *Group) *InstitutionQuery
- func (c *GroupClient) QueryInvites(gr *Group) *GroupInviteLinkQuery
- func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
- func (c *GroupClient) Update() *GroupUpdate
- func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
- func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne
- func (c *GroupClient) Use(hooks ...Hook)
- type GroupCreate
- func (gc *GroupCreate) AddDeadlineIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddDeadlines(d ...*Deadline) *GroupCreate
- func (gc *GroupCreate) AddEventIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddEvents(e ...*Event) *GroupCreate
- func (gc *GroupCreate) AddForumIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddForums(f ...*Forum) *GroupCreate
- func (gc *GroupCreate) AddInviteIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddInvites(g ...*GroupInviteLink) *GroupCreate
- func (gc *GroupCreate) AddUserIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
- func (gc *GroupCreate) Exec(ctx context.Context) error
- func (gc *GroupCreate) ExecX(ctx context.Context)
- func (gc *GroupCreate) Mutation() *GroupMutation
- func (gc *GroupCreate) OnConflict(opts ...sql.ConflictOption) *GroupUpsertOne
- func (gc *GroupCreate) OnConflictColumns(columns ...string) *GroupUpsertOne
- func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
- func (gc *GroupCreate) SaveX(ctx context.Context) *Group
- func (gc *GroupCreate) SetDescription(s string) *GroupCreate
- func (gc *GroupCreate) SetInstitution(i *Institution) *GroupCreate
- func (gc *GroupCreate) SetInstitutionID(id int) *GroupCreate
- func (gc *GroupCreate) SetName(s string) *GroupCreate
- func (gc *GroupCreate) SetShortName(s string) *GroupCreate
- type GroupCreateBulk
- func (gcb *GroupCreateBulk) Exec(ctx context.Context) error
- func (gcb *GroupCreateBulk) ExecX(ctx context.Context)
- func (gcb *GroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupUpsertBulk
- func (gcb *GroupCreateBulk) OnConflictColumns(columns ...string) *GroupUpsertBulk
- func (gcb *GroupCreateBulk) Save(ctx context.Context) ([]*Group, error)
- func (gcb *GroupCreateBulk) SaveX(ctx context.Context) []*Group
- type GroupDelete
- type GroupDeleteOne
- type GroupEdges
- func (e GroupEdges) DeadlinesOrErr() ([]*Deadline, error)
- func (e GroupEdges) EventsOrErr() ([]*Event, error)
- func (e GroupEdges) ForumsOrErr() ([]*Forum, error)
- func (e GroupEdges) GroupUsersOrErr() ([]*GroupUser, error)
- func (e GroupEdges) InstitutionOrErr() (*Institution, error)
- func (e GroupEdges) InvitesOrErr() ([]*GroupInviteLink, error)
- func (e GroupEdges) UsersOrErr() ([]*User, error)
- type GroupGroupBy
- func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
- func (s *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupGroupBy) BoolX(ctx context.Context) bool
- func (s *GroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupGroupBy) Float64X(ctx context.Context) float64
- func (s *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroupGroupBy) IntX(ctx context.Context) int
- func (s *GroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroupGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroupGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroupGroupBy) StringX(ctx context.Context) string
- func (s *GroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroupGroupBy) StringsX(ctx context.Context) []string
- type GroupInviteLink
- type GroupInviteLinkClient
- func (c *GroupInviteLinkClient) Create() *GroupInviteLinkCreate
- func (c *GroupInviteLinkClient) CreateBulk(builders ...*GroupInviteLinkCreate) *GroupInviteLinkCreateBulk
- func (c *GroupInviteLinkClient) Delete() *GroupInviteLinkDelete
- func (c *GroupInviteLinkClient) DeleteOne(gil *GroupInviteLink) *GroupInviteLinkDeleteOne
- func (c *GroupInviteLinkClient) DeleteOneID(id int) *GroupInviteLinkDeleteOne
- func (c *GroupInviteLinkClient) Get(ctx context.Context, id int) (*GroupInviteLink, error)
- func (c *GroupInviteLinkClient) GetX(ctx context.Context, id int) *GroupInviteLink
- func (c *GroupInviteLinkClient) Hooks() []Hook
- func (c *GroupInviteLinkClient) Intercept(interceptors ...Interceptor)
- func (c *GroupInviteLinkClient) Interceptors() []Interceptor
- func (c *GroupInviteLinkClient) Query() *GroupInviteLinkQuery
- func (c *GroupInviteLinkClient) QueryGroup(gil *GroupInviteLink) *GroupQuery
- func (c *GroupInviteLinkClient) Update() *GroupInviteLinkUpdate
- func (c *GroupInviteLinkClient) UpdateOne(gil *GroupInviteLink) *GroupInviteLinkUpdateOne
- func (c *GroupInviteLinkClient) UpdateOneID(id int) *GroupInviteLinkUpdateOne
- func (c *GroupInviteLinkClient) Use(hooks ...Hook)
- type GroupInviteLinkCreate
- func (gilc *GroupInviteLinkCreate) Exec(ctx context.Context) error
- func (gilc *GroupInviteLinkCreate) ExecX(ctx context.Context)
- func (gilc *GroupInviteLinkCreate) Mutation() *GroupInviteLinkMutation
- func (gilc *GroupInviteLinkCreate) OnConflict(opts ...sql.ConflictOption) *GroupInviteLinkUpsertOne
- func (gilc *GroupInviteLinkCreate) OnConflictColumns(columns ...string) *GroupInviteLinkUpsertOne
- func (gilc *GroupInviteLinkCreate) Save(ctx context.Context) (*GroupInviteLink, error)
- func (gilc *GroupInviteLinkCreate) SaveX(ctx context.Context) *GroupInviteLink
- func (gilc *GroupInviteLinkCreate) SetCode(s string) *GroupInviteLinkCreate
- func (gilc *GroupInviteLinkCreate) SetGroup(g *Group) *GroupInviteLinkCreate
- func (gilc *GroupInviteLinkCreate) SetGroupID(id int) *GroupInviteLinkCreate
- func (gilc *GroupInviteLinkCreate) SetRole(gr group.Role) *GroupInviteLinkCreate
- type GroupInviteLinkCreateBulk
- func (gilcb *GroupInviteLinkCreateBulk) Exec(ctx context.Context) error
- func (gilcb *GroupInviteLinkCreateBulk) ExecX(ctx context.Context)
- func (gilcb *GroupInviteLinkCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupInviteLinkUpsertBulk
- func (gilcb *GroupInviteLinkCreateBulk) OnConflictColumns(columns ...string) *GroupInviteLinkUpsertBulk
- func (gilcb *GroupInviteLinkCreateBulk) Save(ctx context.Context) ([]*GroupInviteLink, error)
- func (gilcb *GroupInviteLinkCreateBulk) SaveX(ctx context.Context) []*GroupInviteLink
- type GroupInviteLinkDelete
- type GroupInviteLinkDeleteOne
- type GroupInviteLinkEdges
- type GroupInviteLinkGroupBy
- func (gilgb *GroupInviteLinkGroupBy) Aggregate(fns ...AggregateFunc) *GroupInviteLinkGroupBy
- func (s *GroupInviteLinkGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupInviteLinkGroupBy) BoolX(ctx context.Context) bool
- func (s *GroupInviteLinkGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupInviteLinkGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroupInviteLinkGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupInviteLinkGroupBy) Float64X(ctx context.Context) float64
- func (s *GroupInviteLinkGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupInviteLinkGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroupInviteLinkGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroupInviteLinkGroupBy) IntX(ctx context.Context) int
- func (s *GroupInviteLinkGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroupInviteLinkGroupBy) IntsX(ctx context.Context) []int
- func (gilgb *GroupInviteLinkGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroupInviteLinkGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroupInviteLinkGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroupInviteLinkGroupBy) StringX(ctx context.Context) string
- func (s *GroupInviteLinkGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroupInviteLinkGroupBy) StringsX(ctx context.Context) []string
- type GroupInviteLinkMutation
- func (m *GroupInviteLinkMutation) AddField(name string, value ent.Value) error
- func (m *GroupInviteLinkMutation) AddedEdges() []string
- func (m *GroupInviteLinkMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupInviteLinkMutation) AddedFields() []string
- func (m *GroupInviteLinkMutation) AddedIDs(name string) []ent.Value
- func (m *GroupInviteLinkMutation) ClearEdge(name string) error
- func (m *GroupInviteLinkMutation) ClearField(name string) error
- func (m *GroupInviteLinkMutation) ClearGroup()
- func (m *GroupInviteLinkMutation) ClearedEdges() []string
- func (m *GroupInviteLinkMutation) ClearedFields() []string
- func (m GroupInviteLinkMutation) Client() *Client
- func (m *GroupInviteLinkMutation) Code() (r string, exists bool)
- func (m *GroupInviteLinkMutation) EdgeCleared(name string) bool
- func (m *GroupInviteLinkMutation) Field(name string) (ent.Value, bool)
- func (m *GroupInviteLinkMutation) FieldCleared(name string) bool
- func (m *GroupInviteLinkMutation) Fields() []string
- func (m *GroupInviteLinkMutation) GroupCleared() bool
- func (m *GroupInviteLinkMutation) GroupID() (id int, exists bool)
- func (m *GroupInviteLinkMutation) GroupIDs() (ids []int)
- func (m *GroupInviteLinkMutation) ID() (id int, exists bool)
- func (m *GroupInviteLinkMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GroupInviteLinkMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *GroupInviteLinkMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupInviteLinkMutation) OldRole(ctx context.Context) (v group.Role, err error)
- func (m *GroupInviteLinkMutation) Op() Op
- func (m *GroupInviteLinkMutation) RemovedEdges() []string
- func (m *GroupInviteLinkMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupInviteLinkMutation) ResetCode()
- func (m *GroupInviteLinkMutation) ResetEdge(name string) error
- func (m *GroupInviteLinkMutation) ResetField(name string) error
- func (m *GroupInviteLinkMutation) ResetGroup()
- func (m *GroupInviteLinkMutation) ResetRole()
- func (m *GroupInviteLinkMutation) Role() (r group.Role, exists bool)
- func (m *GroupInviteLinkMutation) SetCode(s string)
- func (m *GroupInviteLinkMutation) SetField(name string, value ent.Value) error
- func (m *GroupInviteLinkMutation) SetGroupID(id int)
- func (m *GroupInviteLinkMutation) SetOp(op Op)
- func (m *GroupInviteLinkMutation) SetRole(gr group.Role)
- func (m GroupInviteLinkMutation) Tx() (*Tx, error)
- func (m *GroupInviteLinkMutation) Type() string
- func (m *GroupInviteLinkMutation) Where(ps ...predicate.GroupInviteLink)
- func (m *GroupInviteLinkMutation) WhereP(ps ...func(*sql.Selector))
- type GroupInviteLinkQuery
- func (gilq *GroupInviteLinkQuery) Aggregate(fns ...AggregateFunc) *GroupInviteLinkSelect
- func (gilq *GroupInviteLinkQuery) All(ctx context.Context) ([]*GroupInviteLink, error)
- func (gilq *GroupInviteLinkQuery) AllX(ctx context.Context) []*GroupInviteLink
- func (gilq *GroupInviteLinkQuery) Clone() *GroupInviteLinkQuery
- func (gilq *GroupInviteLinkQuery) Count(ctx context.Context) (int, error)
- func (gilq *GroupInviteLinkQuery) CountX(ctx context.Context) int
- func (gilq *GroupInviteLinkQuery) Exist(ctx context.Context) (bool, error)
- func (gilq *GroupInviteLinkQuery) ExistX(ctx context.Context) bool
- func (gilq *GroupInviteLinkQuery) First(ctx context.Context) (*GroupInviteLink, error)
- func (gilq *GroupInviteLinkQuery) FirstID(ctx context.Context) (id int, err error)
- func (gilq *GroupInviteLinkQuery) FirstIDX(ctx context.Context) int
- func (gilq *GroupInviteLinkQuery) FirstX(ctx context.Context) *GroupInviteLink
- func (gilq *GroupInviteLinkQuery) GroupBy(field string, fields ...string) *GroupInviteLinkGroupBy
- func (gilq *GroupInviteLinkQuery) IDs(ctx context.Context) (ids []int, err error)
- func (gilq *GroupInviteLinkQuery) IDsX(ctx context.Context) []int
- func (gilq *GroupInviteLinkQuery) Limit(limit int) *GroupInviteLinkQuery
- func (gilq *GroupInviteLinkQuery) Offset(offset int) *GroupInviteLinkQuery
- func (gilq *GroupInviteLinkQuery) Only(ctx context.Context) (*GroupInviteLink, error)
- func (gilq *GroupInviteLinkQuery) OnlyID(ctx context.Context) (id int, err error)
- func (gilq *GroupInviteLinkQuery) OnlyIDX(ctx context.Context) int
- func (gilq *GroupInviteLinkQuery) OnlyX(ctx context.Context) *GroupInviteLink
- func (gilq *GroupInviteLinkQuery) Order(o ...groupinvitelink.OrderOption) *GroupInviteLinkQuery
- func (gilq *GroupInviteLinkQuery) QueryGroup() *GroupQuery
- func (gilq *GroupInviteLinkQuery) Select(fields ...string) *GroupInviteLinkSelect
- func (gilq *GroupInviteLinkQuery) Unique(unique bool) *GroupInviteLinkQuery
- func (gilq *GroupInviteLinkQuery) Where(ps ...predicate.GroupInviteLink) *GroupInviteLinkQuery
- func (gilq *GroupInviteLinkQuery) WithGroup(opts ...func(*GroupQuery)) *GroupInviteLinkQuery
- type GroupInviteLinkSelect
- func (gils *GroupInviteLinkSelect) Aggregate(fns ...AggregateFunc) *GroupInviteLinkSelect
- func (s *GroupInviteLinkSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupInviteLinkSelect) BoolX(ctx context.Context) bool
- func (s *GroupInviteLinkSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupInviteLinkSelect) BoolsX(ctx context.Context) []bool
- func (s *GroupInviteLinkSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupInviteLinkSelect) Float64X(ctx context.Context) float64
- func (s *GroupInviteLinkSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupInviteLinkSelect) Float64sX(ctx context.Context) []float64
- func (s *GroupInviteLinkSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroupInviteLinkSelect) IntX(ctx context.Context) int
- func (s *GroupInviteLinkSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroupInviteLinkSelect) IntsX(ctx context.Context) []int
- func (gils *GroupInviteLinkSelect) Scan(ctx context.Context, v any) error
- func (s *GroupInviteLinkSelect) ScanX(ctx context.Context, v any)
- func (s *GroupInviteLinkSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroupInviteLinkSelect) StringX(ctx context.Context) string
- func (s *GroupInviteLinkSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroupInviteLinkSelect) StringsX(ctx context.Context) []string
- type GroupInviteLinkUpdate
- func (gilu *GroupInviteLinkUpdate) ClearGroup() *GroupInviteLinkUpdate
- func (gilu *GroupInviteLinkUpdate) Exec(ctx context.Context) error
- func (gilu *GroupInviteLinkUpdate) ExecX(ctx context.Context)
- func (gilu *GroupInviteLinkUpdate) Mutation() *GroupInviteLinkMutation
- func (gilu *GroupInviteLinkUpdate) Save(ctx context.Context) (int, error)
- func (gilu *GroupInviteLinkUpdate) SaveX(ctx context.Context) int
- func (gilu *GroupInviteLinkUpdate) SetCode(s string) *GroupInviteLinkUpdate
- func (gilu *GroupInviteLinkUpdate) SetGroup(g *Group) *GroupInviteLinkUpdate
- func (gilu *GroupInviteLinkUpdate) SetGroupID(id int) *GroupInviteLinkUpdate
- func (gilu *GroupInviteLinkUpdate) SetRole(gr group.Role) *GroupInviteLinkUpdate
- func (gilu *GroupInviteLinkUpdate) Where(ps ...predicate.GroupInviteLink) *GroupInviteLinkUpdate
- type GroupInviteLinkUpdateOne
- func (giluo *GroupInviteLinkUpdateOne) ClearGroup() *GroupInviteLinkUpdateOne
- func (giluo *GroupInviteLinkUpdateOne) Exec(ctx context.Context) error
- func (giluo *GroupInviteLinkUpdateOne) ExecX(ctx context.Context)
- func (giluo *GroupInviteLinkUpdateOne) Mutation() *GroupInviteLinkMutation
- func (giluo *GroupInviteLinkUpdateOne) Save(ctx context.Context) (*GroupInviteLink, error)
- func (giluo *GroupInviteLinkUpdateOne) SaveX(ctx context.Context) *GroupInviteLink
- func (giluo *GroupInviteLinkUpdateOne) Select(field string, fields ...string) *GroupInviteLinkUpdateOne
- func (giluo *GroupInviteLinkUpdateOne) SetCode(s string) *GroupInviteLinkUpdateOne
- func (giluo *GroupInviteLinkUpdateOne) SetGroup(g *Group) *GroupInviteLinkUpdateOne
- func (giluo *GroupInviteLinkUpdateOne) SetGroupID(id int) *GroupInviteLinkUpdateOne
- func (giluo *GroupInviteLinkUpdateOne) SetRole(gr group.Role) *GroupInviteLinkUpdateOne
- func (giluo *GroupInviteLinkUpdateOne) Where(ps ...predicate.GroupInviteLink) *GroupInviteLinkUpdateOne
- type GroupInviteLinkUpsert
- type GroupInviteLinkUpsertBulk
- func (u *GroupInviteLinkUpsertBulk) DoNothing() *GroupInviteLinkUpsertBulk
- func (u *GroupInviteLinkUpsertBulk) Exec(ctx context.Context) error
- func (u *GroupInviteLinkUpsertBulk) ExecX(ctx context.Context)
- func (u *GroupInviteLinkUpsertBulk) Ignore() *GroupInviteLinkUpsertBulk
- func (u *GroupInviteLinkUpsertBulk) SetCode(v string) *GroupInviteLinkUpsertBulk
- func (u *GroupInviteLinkUpsertBulk) SetRole(v group.Role) *GroupInviteLinkUpsertBulk
- func (u *GroupInviteLinkUpsertBulk) Update(set func(*GroupInviteLinkUpsert)) *GroupInviteLinkUpsertBulk
- func (u *GroupInviteLinkUpsertBulk) UpdateCode() *GroupInviteLinkUpsertBulk
- func (u *GroupInviteLinkUpsertBulk) UpdateNewValues() *GroupInviteLinkUpsertBulk
- func (u *GroupInviteLinkUpsertBulk) UpdateRole() *GroupInviteLinkUpsertBulk
- type GroupInviteLinkUpsertOne
- func (u *GroupInviteLinkUpsertOne) DoNothing() *GroupInviteLinkUpsertOne
- func (u *GroupInviteLinkUpsertOne) Exec(ctx context.Context) error
- func (u *GroupInviteLinkUpsertOne) ExecX(ctx context.Context)
- func (u *GroupInviteLinkUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *GroupInviteLinkUpsertOne) IDX(ctx context.Context) int
- func (u *GroupInviteLinkUpsertOne) Ignore() *GroupInviteLinkUpsertOne
- func (u *GroupInviteLinkUpsertOne) SetCode(v string) *GroupInviteLinkUpsertOne
- func (u *GroupInviteLinkUpsertOne) SetRole(v group.Role) *GroupInviteLinkUpsertOne
- func (u *GroupInviteLinkUpsertOne) Update(set func(*GroupInviteLinkUpsert)) *GroupInviteLinkUpsertOne
- func (u *GroupInviteLinkUpsertOne) UpdateCode() *GroupInviteLinkUpsertOne
- func (u *GroupInviteLinkUpsertOne) UpdateNewValues() *GroupInviteLinkUpsertOne
- func (u *GroupInviteLinkUpsertOne) UpdateRole() *GroupInviteLinkUpsertOne
- type GroupInviteLinks
- type GroupMutation
- func (m *GroupMutation) AddDeadlineIDs(ids ...int)
- func (m *GroupMutation) AddEventIDs(ids ...int)
- func (m *GroupMutation) AddField(name string, value ent.Value) error
- func (m *GroupMutation) AddForumIDs(ids ...int)
- func (m *GroupMutation) AddInviteIDs(ids ...int)
- func (m *GroupMutation) AddUserIDs(ids ...int)
- func (m *GroupMutation) AddedEdges() []string
- func (m *GroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupMutation) AddedFields() []string
- func (m *GroupMutation) AddedIDs(name string) []ent.Value
- func (m *GroupMutation) ClearDeadlines()
- func (m *GroupMutation) ClearEdge(name string) error
- func (m *GroupMutation) ClearEvents()
- func (m *GroupMutation) ClearField(name string) error
- func (m *GroupMutation) ClearForums()
- func (m *GroupMutation) ClearInstitution()
- func (m *GroupMutation) ClearInvites()
- func (m *GroupMutation) ClearUsers()
- func (m *GroupMutation) ClearedEdges() []string
- func (m *GroupMutation) ClearedFields() []string
- func (m GroupMutation) Client() *Client
- func (m *GroupMutation) DeadlinesCleared() bool
- func (m *GroupMutation) DeadlinesIDs() (ids []int)
- func (m *GroupMutation) Description() (r string, exists bool)
- func (m *GroupMutation) EdgeCleared(name string) bool
- func (m *GroupMutation) EventsCleared() bool
- func (m *GroupMutation) EventsIDs() (ids []int)
- func (m *GroupMutation) Field(name string) (ent.Value, bool)
- func (m *GroupMutation) FieldCleared(name string) bool
- func (m *GroupMutation) Fields() []string
- func (m *GroupMutation) ForumsCleared() bool
- func (m *GroupMutation) ForumsIDs() (ids []int)
- func (m *GroupMutation) ID() (id int, exists bool)
- func (m *GroupMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GroupMutation) InstitutionCleared() bool
- func (m *GroupMutation) InstitutionID() (id int, exists bool)
- func (m *GroupMutation) InstitutionIDs() (ids []int)
- func (m *GroupMutation) InvitesCleared() bool
- func (m *GroupMutation) InvitesIDs() (ids []int)
- func (m *GroupMutation) Name() (r string, exists bool)
- func (m *GroupMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroupMutation) OldShortName(ctx context.Context) (v string, err error)
- func (m *GroupMutation) Op() Op
- func (m *GroupMutation) RemoveDeadlineIDs(ids ...int)
- func (m *GroupMutation) RemoveEventIDs(ids ...int)
- func (m *GroupMutation) RemoveForumIDs(ids ...int)
- func (m *GroupMutation) RemoveInviteIDs(ids ...int)
- func (m *GroupMutation) RemoveUserIDs(ids ...int)
- func (m *GroupMutation) RemovedDeadlinesIDs() (ids []int)
- func (m *GroupMutation) RemovedEdges() []string
- func (m *GroupMutation) RemovedEventsIDs() (ids []int)
- func (m *GroupMutation) RemovedForumsIDs() (ids []int)
- func (m *GroupMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupMutation) RemovedInvitesIDs() (ids []int)
- func (m *GroupMutation) RemovedUsersIDs() (ids []int)
- func (m *GroupMutation) ResetDeadlines()
- func (m *GroupMutation) ResetDescription()
- func (m *GroupMutation) ResetEdge(name string) error
- func (m *GroupMutation) ResetEvents()
- func (m *GroupMutation) ResetField(name string) error
- func (m *GroupMutation) ResetForums()
- func (m *GroupMutation) ResetInstitution()
- func (m *GroupMutation) ResetInvites()
- func (m *GroupMutation) ResetName()
- func (m *GroupMutation) ResetShortName()
- func (m *GroupMutation) ResetUsers()
- func (m *GroupMutation) SetDescription(s string)
- func (m *GroupMutation) SetField(name string, value ent.Value) error
- func (m *GroupMutation) SetInstitutionID(id int)
- func (m *GroupMutation) SetName(s string)
- func (m *GroupMutation) SetOp(op Op)
- func (m *GroupMutation) SetShortName(s string)
- func (m *GroupMutation) ShortName() (r string, exists bool)
- func (m GroupMutation) Tx() (*Tx, error)
- func (m *GroupMutation) Type() string
- func (m *GroupMutation) UsersCleared() bool
- func (m *GroupMutation) UsersIDs() (ids []int)
- func (m *GroupMutation) Where(ps ...predicate.Group)
- func (m *GroupMutation) WhereP(ps ...func(*sql.Selector))
- type GroupQuery
- func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect
- func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
- func (gq *GroupQuery) AllX(ctx context.Context) []*Group
- func (gq *GroupQuery) Clone() *GroupQuery
- func (gq *GroupQuery) Count(ctx context.Context) (int, error)
- func (gq *GroupQuery) CountX(ctx context.Context) int
- func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GroupQuery) ExistX(ctx context.Context) bool
- func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)
- func (gq *GroupQuery) FirstIDX(ctx context.Context) int
- func (gq *GroupQuery) FirstX(ctx context.Context) *Group
- func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
- func (gq *GroupQuery) IDs(ctx context.Context) (ids []int, err error)
- func (gq *GroupQuery) IDsX(ctx context.Context) []int
- func (gq *GroupQuery) Limit(limit int) *GroupQuery
- func (gq *GroupQuery) Offset(offset int) *GroupQuery
- func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)
- func (gq *GroupQuery) OnlyIDX(ctx context.Context) int
- func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
- func (gq *GroupQuery) Order(o ...entgroup.OrderOption) *GroupQuery
- func (gq *GroupQuery) QueryDeadlines() *DeadlineQuery
- func (gq *GroupQuery) QueryEvents() *EventQuery
- func (gq *GroupQuery) QueryForums() *ForumQuery
- func (gq *GroupQuery) QueryGroupUsers() *GroupUserQuery
- func (gq *GroupQuery) QueryInstitution() *InstitutionQuery
- func (gq *GroupQuery) QueryInvites() *GroupInviteLinkQuery
- func (gq *GroupQuery) QueryUsers() *UserQuery
- func (gq *GroupQuery) Select(fields ...string) *GroupSelect
- func (gq *GroupQuery) Unique(unique bool) *GroupQuery
- func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
- func (gq *GroupQuery) WithDeadlines(opts ...func(*DeadlineQuery)) *GroupQuery
- func (gq *GroupQuery) WithEvents(opts ...func(*EventQuery)) *GroupQuery
- func (gq *GroupQuery) WithForums(opts ...func(*ForumQuery)) *GroupQuery
- func (gq *GroupQuery) WithGroupUsers(opts ...func(*GroupUserQuery)) *GroupQuery
- func (gq *GroupQuery) WithInstitution(opts ...func(*InstitutionQuery)) *GroupQuery
- func (gq *GroupQuery) WithInvites(opts ...func(*GroupInviteLinkQuery)) *GroupQuery
- func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
- type GroupSelect
- func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect
- func (s *GroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupSelect) BoolX(ctx context.Context) bool
- func (s *GroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupSelect) BoolsX(ctx context.Context) []bool
- func (s *GroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupSelect) Float64X(ctx context.Context) float64
- func (s *GroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupSelect) Float64sX(ctx context.Context) []float64
- func (s *GroupSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroupSelect) IntX(ctx context.Context) int
- func (s *GroupSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroupSelect) IntsX(ctx context.Context) []int
- func (gs *GroupSelect) Scan(ctx context.Context, v any) error
- func (s *GroupSelect) ScanX(ctx context.Context, v any)
- func (s *GroupSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroupSelect) StringX(ctx context.Context) string
- func (s *GroupSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroupSelect) StringsX(ctx context.Context) []string
- type GroupUpdate
- func (gu *GroupUpdate) AddDeadlineIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddDeadlines(d ...*Deadline) *GroupUpdate
- func (gu *GroupUpdate) AddEventIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddEvents(e ...*Event) *GroupUpdate
- func (gu *GroupUpdate) AddForumIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddForums(f ...*Forum) *GroupUpdate
- func (gu *GroupUpdate) AddInviteIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddInvites(g ...*GroupInviteLink) *GroupUpdate
- func (gu *GroupUpdate) AddUserIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) ClearDeadlines() *GroupUpdate
- func (gu *GroupUpdate) ClearEvents() *GroupUpdate
- func (gu *GroupUpdate) ClearForums() *GroupUpdate
- func (gu *GroupUpdate) ClearInstitution() *GroupUpdate
- func (gu *GroupUpdate) ClearInvites() *GroupUpdate
- func (gu *GroupUpdate) ClearUsers() *GroupUpdate
- func (gu *GroupUpdate) Exec(ctx context.Context) error
- func (gu *GroupUpdate) ExecX(ctx context.Context)
- func (gu *GroupUpdate) Mutation() *GroupMutation
- func (gu *GroupUpdate) RemoveDeadlineIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveDeadlines(d ...*Deadline) *GroupUpdate
- func (gu *GroupUpdate) RemoveEventIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveEvents(e ...*Event) *GroupUpdate
- func (gu *GroupUpdate) RemoveForumIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveForums(f ...*Forum) *GroupUpdate
- func (gu *GroupUpdate) RemoveInviteIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveInvites(g ...*GroupInviteLink) *GroupUpdate
- func (gu *GroupUpdate) RemoveUserIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
- func (gu *GroupUpdate) SaveX(ctx context.Context) int
- func (gu *GroupUpdate) SetDescription(s string) *GroupUpdate
- func (gu *GroupUpdate) SetInstitution(i *Institution) *GroupUpdate
- func (gu *GroupUpdate) SetInstitutionID(id int) *GroupUpdate
- func (gu *GroupUpdate) SetName(s string) *GroupUpdate
- func (gu *GroupUpdate) SetShortName(s string) *GroupUpdate
- func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
- type GroupUpdateOne
- func (guo *GroupUpdateOne) AddDeadlineIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddDeadlines(d ...*Deadline) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddEventIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddEvents(e ...*Event) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddForumIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddForums(f ...*Forum) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddInviteIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddInvites(g ...*GroupInviteLink) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddUserIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearDeadlines() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearEvents() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearForums() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearInstitution() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearInvites() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
- func (guo *GroupUpdateOne) Exec(ctx context.Context) error
- func (guo *GroupUpdateOne) ExecX(ctx context.Context)
- func (guo *GroupUpdateOne) Mutation() *GroupMutation
- func (guo *GroupUpdateOne) RemoveDeadlineIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveDeadlines(d ...*Deadline) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveEventIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveEvents(e ...*Event) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveForumIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveForums(f ...*Forum) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveInviteIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveInvites(g ...*GroupInviteLink) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveUserIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
- func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
- func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetDescription(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetInstitution(i *Institution) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetInstitutionID(id int) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetShortName(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne
- type GroupUpsert
- func (u *GroupUpsert) SetDescription(v string) *GroupUpsert
- func (u *GroupUpsert) SetName(v string) *GroupUpsert
- func (u *GroupUpsert) SetShortName(v string) *GroupUpsert
- func (u *GroupUpsert) UpdateDescription() *GroupUpsert
- func (u *GroupUpsert) UpdateName() *GroupUpsert
- func (u *GroupUpsert) UpdateShortName() *GroupUpsert
- type GroupUpsertBulk
- func (u *GroupUpsertBulk) DoNothing() *GroupUpsertBulk
- func (u *GroupUpsertBulk) Exec(ctx context.Context) error
- func (u *GroupUpsertBulk) ExecX(ctx context.Context)
- func (u *GroupUpsertBulk) Ignore() *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetDescription(v string) *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetName(v string) *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetShortName(v string) *GroupUpsertBulk
- func (u *GroupUpsertBulk) Update(set func(*GroupUpsert)) *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateDescription() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateName() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateNewValues() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateShortName() *GroupUpsertBulk
- type GroupUpsertOne
- func (u *GroupUpsertOne) DoNothing() *GroupUpsertOne
- func (u *GroupUpsertOne) Exec(ctx context.Context) error
- func (u *GroupUpsertOne) ExecX(ctx context.Context)
- func (u *GroupUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *GroupUpsertOne) IDX(ctx context.Context) int
- func (u *GroupUpsertOne) Ignore() *GroupUpsertOne
- func (u *GroupUpsertOne) SetDescription(v string) *GroupUpsertOne
- func (u *GroupUpsertOne) SetName(v string) *GroupUpsertOne
- func (u *GroupUpsertOne) SetShortName(v string) *GroupUpsertOne
- func (u *GroupUpsertOne) Update(set func(*GroupUpsert)) *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateDescription() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateName() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateNewValues() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateShortName() *GroupUpsertOne
- type GroupUser
- type GroupUserClient
- func (c *GroupUserClient) Create() *GroupUserCreate
- func (c *GroupUserClient) CreateBulk(builders ...*GroupUserCreate) *GroupUserCreateBulk
- func (c *GroupUserClient) Delete() *GroupUserDelete
- func (c *GroupUserClient) Hooks() []Hook
- func (c *GroupUserClient) Intercept(interceptors ...Interceptor)
- func (c *GroupUserClient) Interceptors() []Interceptor
- func (c *GroupUserClient) Query() *GroupUserQuery
- func (c *GroupUserClient) QueryGroup(gu *GroupUser) *GroupQuery
- func (c *GroupUserClient) QueryUser(gu *GroupUser) *UserQuery
- func (c *GroupUserClient) Update() *GroupUserUpdate
- func (c *GroupUserClient) UpdateOne(gu *GroupUser) *GroupUserUpdateOne
- func (c *GroupUserClient) Use(hooks ...Hook)
- type GroupUserCreate
- func (guc *GroupUserCreate) Exec(ctx context.Context) error
- func (guc *GroupUserCreate) ExecX(ctx context.Context)
- func (guc *GroupUserCreate) Mutation() *GroupUserMutation
- func (guc *GroupUserCreate) OnConflict(opts ...sql.ConflictOption) *GroupUserUpsertOne
- func (guc *GroupUserCreate) OnConflictColumns(columns ...string) *GroupUserUpsertOne
- func (guc *GroupUserCreate) Save(ctx context.Context) (*GroupUser, error)
- func (guc *GroupUserCreate) SaveX(ctx context.Context) *GroupUser
- func (guc *GroupUserCreate) SetGroup(g *Group) *GroupUserCreate
- func (guc *GroupUserCreate) SetGroupID(i int) *GroupUserCreate
- func (guc *GroupUserCreate) SetRole(gr group.Role) *GroupUserCreate
- func (guc *GroupUserCreate) SetUser(u *User) *GroupUserCreate
- func (guc *GroupUserCreate) SetUserID(i int) *GroupUserCreate
- type GroupUserCreateBulk
- func (gucb *GroupUserCreateBulk) Exec(ctx context.Context) error
- func (gucb *GroupUserCreateBulk) ExecX(ctx context.Context)
- func (gucb *GroupUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupUserUpsertBulk
- func (gucb *GroupUserCreateBulk) OnConflictColumns(columns ...string) *GroupUserUpsertBulk
- func (gucb *GroupUserCreateBulk) Save(ctx context.Context) ([]*GroupUser, error)
- func (gucb *GroupUserCreateBulk) SaveX(ctx context.Context) []*GroupUser
- type GroupUserDelete
- type GroupUserDeleteOne
- type GroupUserEdges
- type GroupUserGroupBy
- func (gugb *GroupUserGroupBy) Aggregate(fns ...AggregateFunc) *GroupUserGroupBy
- func (s *GroupUserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupUserGroupBy) BoolX(ctx context.Context) bool
- func (s *GroupUserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupUserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroupUserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupUserGroupBy) Float64X(ctx context.Context) float64
- func (s *GroupUserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupUserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroupUserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroupUserGroupBy) IntX(ctx context.Context) int
- func (s *GroupUserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroupUserGroupBy) IntsX(ctx context.Context) []int
- func (gugb *GroupUserGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroupUserGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroupUserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroupUserGroupBy) StringX(ctx context.Context) string
- func (s *GroupUserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroupUserGroupBy) StringsX(ctx context.Context) []string
- type GroupUserMutation
- func (m *GroupUserMutation) AddField(name string, value ent.Value) error
- func (m *GroupUserMutation) AddedEdges() []string
- func (m *GroupUserMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupUserMutation) AddedFields() []string
- func (m *GroupUserMutation) AddedIDs(name string) []ent.Value
- func (m *GroupUserMutation) ClearEdge(name string) error
- func (m *GroupUserMutation) ClearField(name string) error
- func (m *GroupUserMutation) ClearGroup()
- func (m *GroupUserMutation) ClearUser()
- func (m *GroupUserMutation) ClearedEdges() []string
- func (m *GroupUserMutation) ClearedFields() []string
- func (m GroupUserMutation) Client() *Client
- func (m *GroupUserMutation) EdgeCleared(name string) bool
- func (m *GroupUserMutation) Field(name string) (ent.Value, bool)
- func (m *GroupUserMutation) FieldCleared(name string) bool
- func (m *GroupUserMutation) Fields() []string
- func (m *GroupUserMutation) GroupCleared() bool
- func (m *GroupUserMutation) GroupID() (r int, exists bool)
- func (m *GroupUserMutation) GroupIDs() (ids []int)
- func (m *GroupUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupUserMutation) Op() Op
- func (m *GroupUserMutation) RemovedEdges() []string
- func (m *GroupUserMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupUserMutation) ResetEdge(name string) error
- func (m *GroupUserMutation) ResetField(name string) error
- func (m *GroupUserMutation) ResetGroup()
- func (m *GroupUserMutation) ResetGroupID()
- func (m *GroupUserMutation) ResetRole()
- func (m *GroupUserMutation) ResetUser()
- func (m *GroupUserMutation) ResetUserID()
- func (m *GroupUserMutation) Role() (r group.Role, exists bool)
- func (m *GroupUserMutation) SetField(name string, value ent.Value) error
- func (m *GroupUserMutation) SetGroupID(i int)
- func (m *GroupUserMutation) SetOp(op Op)
- func (m *GroupUserMutation) SetRole(gr group.Role)
- func (m *GroupUserMutation) SetUserID(i int)
- func (m GroupUserMutation) Tx() (*Tx, error)
- func (m *GroupUserMutation) Type() string
- func (m *GroupUserMutation) UserCleared() bool
- func (m *GroupUserMutation) UserID() (r int, exists bool)
- func (m *GroupUserMutation) UserIDs() (ids []int)
- func (m *GroupUserMutation) Where(ps ...predicate.GroupUser)
- func (m *GroupUserMutation) WhereP(ps ...func(*sql.Selector))
- type GroupUserQuery
- func (guq *GroupUserQuery) Aggregate(fns ...AggregateFunc) *GroupUserSelect
- func (guq *GroupUserQuery) All(ctx context.Context) ([]*GroupUser, error)
- func (guq *GroupUserQuery) AllX(ctx context.Context) []*GroupUser
- func (guq *GroupUserQuery) Clone() *GroupUserQuery
- func (guq *GroupUserQuery) Count(ctx context.Context) (int, error)
- func (guq *GroupUserQuery) CountX(ctx context.Context) int
- func (guq *GroupUserQuery) Exist(ctx context.Context) (bool, error)
- func (guq *GroupUserQuery) ExistX(ctx context.Context) bool
- func (guq *GroupUserQuery) First(ctx context.Context) (*GroupUser, error)
- func (guq *GroupUserQuery) FirstX(ctx context.Context) *GroupUser
- func (guq *GroupUserQuery) GroupBy(field string, fields ...string) *GroupUserGroupBy
- func (guq *GroupUserQuery) Limit(limit int) *GroupUserQuery
- func (guq *GroupUserQuery) Offset(offset int) *GroupUserQuery
- func (guq *GroupUserQuery) Only(ctx context.Context) (*GroupUser, error)
- func (guq *GroupUserQuery) OnlyX(ctx context.Context) *GroupUser
- func (guq *GroupUserQuery) Order(o ...groupuser.OrderOption) *GroupUserQuery
- func (guq *GroupUserQuery) QueryGroup() *GroupQuery
- func (guq *GroupUserQuery) QueryUser() *UserQuery
- func (guq *GroupUserQuery) Select(fields ...string) *GroupUserSelect
- func (guq *GroupUserQuery) Unique(unique bool) *GroupUserQuery
- func (guq *GroupUserQuery) Where(ps ...predicate.GroupUser) *GroupUserQuery
- func (guq *GroupUserQuery) WithGroup(opts ...func(*GroupQuery)) *GroupUserQuery
- func (guq *GroupUserQuery) WithUser(opts ...func(*UserQuery)) *GroupUserQuery
- type GroupUserSelect
- func (gus *GroupUserSelect) Aggregate(fns ...AggregateFunc) *GroupUserSelect
- func (s *GroupUserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupUserSelect) BoolX(ctx context.Context) bool
- func (s *GroupUserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupUserSelect) BoolsX(ctx context.Context) []bool
- func (s *GroupUserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupUserSelect) Float64X(ctx context.Context) float64
- func (s *GroupUserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupUserSelect) Float64sX(ctx context.Context) []float64
- func (s *GroupUserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroupUserSelect) IntX(ctx context.Context) int
- func (s *GroupUserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroupUserSelect) IntsX(ctx context.Context) []int
- func (gus *GroupUserSelect) Scan(ctx context.Context, v any) error
- func (s *GroupUserSelect) ScanX(ctx context.Context, v any)
- func (s *GroupUserSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroupUserSelect) StringX(ctx context.Context) string
- func (s *GroupUserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroupUserSelect) StringsX(ctx context.Context) []string
- type GroupUserUpdate
- func (guu *GroupUserUpdate) ClearGroup() *GroupUserUpdate
- func (guu *GroupUserUpdate) ClearUser() *GroupUserUpdate
- func (guu *GroupUserUpdate) Exec(ctx context.Context) error
- func (guu *GroupUserUpdate) ExecX(ctx context.Context)
- func (guu *GroupUserUpdate) Mutation() *GroupUserMutation
- func (guu *GroupUserUpdate) Save(ctx context.Context) (int, error)
- func (guu *GroupUserUpdate) SaveX(ctx context.Context) int
- func (guu *GroupUserUpdate) SetGroup(g *Group) *GroupUserUpdate
- func (guu *GroupUserUpdate) SetGroupID(i int) *GroupUserUpdate
- func (guu *GroupUserUpdate) SetRole(gr group.Role) *GroupUserUpdate
- func (guu *GroupUserUpdate) SetUser(u *User) *GroupUserUpdate
- func (guu *GroupUserUpdate) SetUserID(i int) *GroupUserUpdate
- func (guu *GroupUserUpdate) Where(ps ...predicate.GroupUser) *GroupUserUpdate
- type GroupUserUpdateOne
- func (guuo *GroupUserUpdateOne) ClearGroup() *GroupUserUpdateOne
- func (guuo *GroupUserUpdateOne) ClearUser() *GroupUserUpdateOne
- func (guuo *GroupUserUpdateOne) Exec(ctx context.Context) error
- func (guuo *GroupUserUpdateOne) ExecX(ctx context.Context)
- func (guuo *GroupUserUpdateOne) Mutation() *GroupUserMutation
- func (guuo *GroupUserUpdateOne) Save(ctx context.Context) (*GroupUser, error)
- func (guuo *GroupUserUpdateOne) SaveX(ctx context.Context) *GroupUser
- func (guuo *GroupUserUpdateOne) Select(field string, fields ...string) *GroupUserUpdateOne
- func (guuo *GroupUserUpdateOne) SetGroup(g *Group) *GroupUserUpdateOne
- func (guuo *GroupUserUpdateOne) SetGroupID(i int) *GroupUserUpdateOne
- func (guuo *GroupUserUpdateOne) SetRole(gr group.Role) *GroupUserUpdateOne
- func (guuo *GroupUserUpdateOne) SetUser(u *User) *GroupUserUpdateOne
- func (guuo *GroupUserUpdateOne) SetUserID(i int) *GroupUserUpdateOne
- func (guuo *GroupUserUpdateOne) Where(ps ...predicate.GroupUser) *GroupUserUpdateOne
- type GroupUserUpsert
- func (u *GroupUserUpsert) SetGroupID(v int) *GroupUserUpsert
- func (u *GroupUserUpsert) SetRole(v group.Role) *GroupUserUpsert
- func (u *GroupUserUpsert) SetUserID(v int) *GroupUserUpsert
- func (u *GroupUserUpsert) UpdateGroupID() *GroupUserUpsert
- func (u *GroupUserUpsert) UpdateRole() *GroupUserUpsert
- func (u *GroupUserUpsert) UpdateUserID() *GroupUserUpsert
- type GroupUserUpsertBulk
- func (u *GroupUserUpsertBulk) DoNothing() *GroupUserUpsertBulk
- func (u *GroupUserUpsertBulk) Exec(ctx context.Context) error
- func (u *GroupUserUpsertBulk) ExecX(ctx context.Context)
- func (u *GroupUserUpsertBulk) Ignore() *GroupUserUpsertBulk
- func (u *GroupUserUpsertBulk) SetGroupID(v int) *GroupUserUpsertBulk
- func (u *GroupUserUpsertBulk) SetRole(v group.Role) *GroupUserUpsertBulk
- func (u *GroupUserUpsertBulk) SetUserID(v int) *GroupUserUpsertBulk
- func (u *GroupUserUpsertBulk) Update(set func(*GroupUserUpsert)) *GroupUserUpsertBulk
- func (u *GroupUserUpsertBulk) UpdateGroupID() *GroupUserUpsertBulk
- func (u *GroupUserUpsertBulk) UpdateNewValues() *GroupUserUpsertBulk
- func (u *GroupUserUpsertBulk) UpdateRole() *GroupUserUpsertBulk
- func (u *GroupUserUpsertBulk) UpdateUserID() *GroupUserUpsertBulk
- type GroupUserUpsertOne
- func (u *GroupUserUpsertOne) DoNothing() *GroupUserUpsertOne
- func (u *GroupUserUpsertOne) Exec(ctx context.Context) error
- func (u *GroupUserUpsertOne) ExecX(ctx context.Context)
- func (u *GroupUserUpsertOne) Ignore() *GroupUserUpsertOne
- func (u *GroupUserUpsertOne) SetGroupID(v int) *GroupUserUpsertOne
- func (u *GroupUserUpsertOne) SetRole(v group.Role) *GroupUserUpsertOne
- func (u *GroupUserUpsertOne) SetUserID(v int) *GroupUserUpsertOne
- func (u *GroupUserUpsertOne) Update(set func(*GroupUserUpsert)) *GroupUserUpsertOne
- func (u *GroupUserUpsertOne) UpdateGroupID() *GroupUserUpsertOne
- func (u *GroupUserUpsertOne) UpdateNewValues() *GroupUserUpsertOne
- func (u *GroupUserUpsertOne) UpdateRole() *GroupUserUpsertOne
- func (u *GroupUserUpsertOne) UpdateUserID() *GroupUserUpsertOne
- type GroupUsers
- type Groups
- type Hook
- type Institution
- func (i *Institution) QueryAccessories() *AccessoryQuery
- func (i *Institution) QueryGroups() *GroupQuery
- func (i *Institution) QueryInvites() *InstitutionInviteLinkQuery
- func (i *Institution) QueryUsers() *UserQuery
- func (i *Institution) QueryVouchers() *VoucherQuery
- func (i *Institution) String() string
- func (i *Institution) Unwrap() *Institution
- func (i *Institution) Update() *InstitutionUpdateOne
- func (i *Institution) Value(name string) (ent.Value, error)
- type InstitutionClient
- func (c *InstitutionClient) Create() *InstitutionCreate
- func (c *InstitutionClient) CreateBulk(builders ...*InstitutionCreate) *InstitutionCreateBulk
- func (c *InstitutionClient) Delete() *InstitutionDelete
- func (c *InstitutionClient) DeleteOne(i *Institution) *InstitutionDeleteOne
- func (c *InstitutionClient) DeleteOneID(id int) *InstitutionDeleteOne
- func (c *InstitutionClient) Get(ctx context.Context, id int) (*Institution, error)
- func (c *InstitutionClient) GetX(ctx context.Context, id int) *Institution
- func (c *InstitutionClient) Hooks() []Hook
- func (c *InstitutionClient) Intercept(interceptors ...Interceptor)
- func (c *InstitutionClient) Interceptors() []Interceptor
- func (c *InstitutionClient) Query() *InstitutionQuery
- func (c *InstitutionClient) QueryAccessories(i *Institution) *AccessoryQuery
- func (c *InstitutionClient) QueryGroups(i *Institution) *GroupQuery
- func (c *InstitutionClient) QueryInvites(i *Institution) *InstitutionInviteLinkQuery
- func (c *InstitutionClient) QueryUsers(i *Institution) *UserQuery
- func (c *InstitutionClient) QueryVouchers(i *Institution) *VoucherQuery
- func (c *InstitutionClient) Update() *InstitutionUpdate
- func (c *InstitutionClient) UpdateOne(i *Institution) *InstitutionUpdateOne
- func (c *InstitutionClient) UpdateOneID(id int) *InstitutionUpdateOne
- func (c *InstitutionClient) Use(hooks ...Hook)
- type InstitutionCreate
- func (ic *InstitutionCreate) AddAccessories(a ...*Accessory) *InstitutionCreate
- func (ic *InstitutionCreate) AddAccessoryIDs(ids ...int) *InstitutionCreate
- func (ic *InstitutionCreate) AddGroupIDs(ids ...int) *InstitutionCreate
- func (ic *InstitutionCreate) AddGroups(g ...*Group) *InstitutionCreate
- func (ic *InstitutionCreate) AddInviteIDs(ids ...int) *InstitutionCreate
- func (ic *InstitutionCreate) AddInvites(i ...*InstitutionInviteLink) *InstitutionCreate
- func (ic *InstitutionCreate) AddUserIDs(ids ...int) *InstitutionCreate
- func (ic *InstitutionCreate) AddUsers(u ...*User) *InstitutionCreate
- func (ic *InstitutionCreate) AddVoucherIDs(ids ...int) *InstitutionCreate
- func (ic *InstitutionCreate) AddVouchers(v ...*Voucher) *InstitutionCreate
- func (ic *InstitutionCreate) Exec(ctx context.Context) error
- func (ic *InstitutionCreate) ExecX(ctx context.Context)
- func (ic *InstitutionCreate) Mutation() *InstitutionMutation
- func (ic *InstitutionCreate) OnConflict(opts ...sql.ConflictOption) *InstitutionUpsertOne
- func (ic *InstitutionCreate) OnConflictColumns(columns ...string) *InstitutionUpsertOne
- func (ic *InstitutionCreate) Save(ctx context.Context) (*Institution, error)
- func (ic *InstitutionCreate) SaveX(ctx context.Context) *Institution
- func (ic *InstitutionCreate) SetDescription(s string) *InstitutionCreate
- func (ic *InstitutionCreate) SetName(s string) *InstitutionCreate
- func (ic *InstitutionCreate) SetNillableDescription(s *string) *InstitutionCreate
- func (ic *InstitutionCreate) SetShortName(s string) *InstitutionCreate
- type InstitutionCreateBulk
- func (icb *InstitutionCreateBulk) Exec(ctx context.Context) error
- func (icb *InstitutionCreateBulk) ExecX(ctx context.Context)
- func (icb *InstitutionCreateBulk) OnConflict(opts ...sql.ConflictOption) *InstitutionUpsertBulk
- func (icb *InstitutionCreateBulk) OnConflictColumns(columns ...string) *InstitutionUpsertBulk
- func (icb *InstitutionCreateBulk) Save(ctx context.Context) ([]*Institution, error)
- func (icb *InstitutionCreateBulk) SaveX(ctx context.Context) []*Institution
- type InstitutionDelete
- type InstitutionDeleteOne
- type InstitutionEdges
- func (e InstitutionEdges) AccessoriesOrErr() ([]*Accessory, error)
- func (e InstitutionEdges) GroupsOrErr() ([]*Group, error)
- func (e InstitutionEdges) InvitesOrErr() ([]*InstitutionInviteLink, error)
- func (e InstitutionEdges) UsersOrErr() ([]*User, error)
- func (e InstitutionEdges) VouchersOrErr() ([]*Voucher, error)
- type InstitutionGroupBy
- func (igb *InstitutionGroupBy) Aggregate(fns ...AggregateFunc) *InstitutionGroupBy
- func (s *InstitutionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InstitutionGroupBy) BoolX(ctx context.Context) bool
- func (s *InstitutionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InstitutionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InstitutionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InstitutionGroupBy) Float64X(ctx context.Context) float64
- func (s *InstitutionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InstitutionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InstitutionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InstitutionGroupBy) IntX(ctx context.Context) int
- func (s *InstitutionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InstitutionGroupBy) IntsX(ctx context.Context) []int
- func (igb *InstitutionGroupBy) Scan(ctx context.Context, v any) error
- func (s *InstitutionGroupBy) ScanX(ctx context.Context, v any)
- func (s *InstitutionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InstitutionGroupBy) StringX(ctx context.Context) string
- func (s *InstitutionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InstitutionGroupBy) StringsX(ctx context.Context) []string
- type InstitutionInviteLink
- func (iil *InstitutionInviteLink) QueryInstitution() *InstitutionQuery
- func (iil *InstitutionInviteLink) String() string
- func (iil *InstitutionInviteLink) Unwrap() *InstitutionInviteLink
- func (iil *InstitutionInviteLink) Update() *InstitutionInviteLinkUpdateOne
- func (iil *InstitutionInviteLink) Value(name string) (ent.Value, error)
- type InstitutionInviteLinkClient
- func (c *InstitutionInviteLinkClient) Create() *InstitutionInviteLinkCreate
- func (c *InstitutionInviteLinkClient) CreateBulk(builders ...*InstitutionInviteLinkCreate) *InstitutionInviteLinkCreateBulk
- func (c *InstitutionInviteLinkClient) Delete() *InstitutionInviteLinkDelete
- func (c *InstitutionInviteLinkClient) DeleteOne(iil *InstitutionInviteLink) *InstitutionInviteLinkDeleteOne
- func (c *InstitutionInviteLinkClient) DeleteOneID(id int) *InstitutionInviteLinkDeleteOne
- func (c *InstitutionInviteLinkClient) Get(ctx context.Context, id int) (*InstitutionInviteLink, error)
- func (c *InstitutionInviteLinkClient) GetX(ctx context.Context, id int) *InstitutionInviteLink
- func (c *InstitutionInviteLinkClient) Hooks() []Hook
- func (c *InstitutionInviteLinkClient) Intercept(interceptors ...Interceptor)
- func (c *InstitutionInviteLinkClient) Interceptors() []Interceptor
- func (c *InstitutionInviteLinkClient) Query() *InstitutionInviteLinkQuery
- func (c *InstitutionInviteLinkClient) QueryInstitution(iil *InstitutionInviteLink) *InstitutionQuery
- func (c *InstitutionInviteLinkClient) Update() *InstitutionInviteLinkUpdate
- func (c *InstitutionInviteLinkClient) UpdateOne(iil *InstitutionInviteLink) *InstitutionInviteLinkUpdateOne
- func (c *InstitutionInviteLinkClient) UpdateOneID(id int) *InstitutionInviteLinkUpdateOne
- func (c *InstitutionInviteLinkClient) Use(hooks ...Hook)
- type InstitutionInviteLinkCreate
- func (iilc *InstitutionInviteLinkCreate) Exec(ctx context.Context) error
- func (iilc *InstitutionInviteLinkCreate) ExecX(ctx context.Context)
- func (iilc *InstitutionInviteLinkCreate) Mutation() *InstitutionInviteLinkMutation
- func (iilc *InstitutionInviteLinkCreate) OnConflict(opts ...sql.ConflictOption) *InstitutionInviteLinkUpsertOne
- func (iilc *InstitutionInviteLinkCreate) OnConflictColumns(columns ...string) *InstitutionInviteLinkUpsertOne
- func (iilc *InstitutionInviteLinkCreate) Save(ctx context.Context) (*InstitutionInviteLink, error)
- func (iilc *InstitutionInviteLinkCreate) SaveX(ctx context.Context) *InstitutionInviteLink
- func (iilc *InstitutionInviteLinkCreate) SetCode(s string) *InstitutionInviteLinkCreate
- func (iilc *InstitutionInviteLinkCreate) SetInstitution(i *Institution) *InstitutionInviteLinkCreate
- func (iilc *InstitutionInviteLinkCreate) SetInstitutionID(id int) *InstitutionInviteLinkCreate
- func (iilc *InstitutionInviteLinkCreate) SetRole(i institution.Role) *InstitutionInviteLinkCreate
- type InstitutionInviteLinkCreateBulk
- func (iilcb *InstitutionInviteLinkCreateBulk) Exec(ctx context.Context) error
- func (iilcb *InstitutionInviteLinkCreateBulk) ExecX(ctx context.Context)
- func (iilcb *InstitutionInviteLinkCreateBulk) OnConflict(opts ...sql.ConflictOption) *InstitutionInviteLinkUpsertBulk
- func (iilcb *InstitutionInviteLinkCreateBulk) OnConflictColumns(columns ...string) *InstitutionInviteLinkUpsertBulk
- func (iilcb *InstitutionInviteLinkCreateBulk) Save(ctx context.Context) ([]*InstitutionInviteLink, error)
- func (iilcb *InstitutionInviteLinkCreateBulk) SaveX(ctx context.Context) []*InstitutionInviteLink
- type InstitutionInviteLinkDelete
- type InstitutionInviteLinkDeleteOne
- type InstitutionInviteLinkEdges
- type InstitutionInviteLinkGroupBy
- func (iilgb *InstitutionInviteLinkGroupBy) Aggregate(fns ...AggregateFunc) *InstitutionInviteLinkGroupBy
- func (s *InstitutionInviteLinkGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *InstitutionInviteLinkGroupBy) BoolX(ctx context.Context) bool
- func (s *InstitutionInviteLinkGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *InstitutionInviteLinkGroupBy) BoolsX(ctx context.Context) []bool
- func (s *InstitutionInviteLinkGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *InstitutionInviteLinkGroupBy) Float64X(ctx context.Context) float64
- func (s *InstitutionInviteLinkGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *InstitutionInviteLinkGroupBy) Float64sX(ctx context.Context) []float64
- func (s *InstitutionInviteLinkGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *InstitutionInviteLinkGroupBy) IntX(ctx context.Context) int
- func (s *InstitutionInviteLinkGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *InstitutionInviteLinkGroupBy) IntsX(ctx context.Context) []int
- func (iilgb *InstitutionInviteLinkGroupBy) Scan(ctx context.Context, v any) error
- func (s *InstitutionInviteLinkGroupBy) ScanX(ctx context.Context, v any)
- func (s *InstitutionInviteLinkGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *InstitutionInviteLinkGroupBy) StringX(ctx context.Context) string
- func (s *InstitutionInviteLinkGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *InstitutionInviteLinkGroupBy) StringsX(ctx context.Context) []string
- type InstitutionInviteLinkMutation
- func (m *InstitutionInviteLinkMutation) AddField(name string, value ent.Value) error
- func (m *InstitutionInviteLinkMutation) AddedEdges() []string
- func (m *InstitutionInviteLinkMutation) AddedField(name string) (ent.Value, bool)
- func (m *InstitutionInviteLinkMutation) AddedFields() []string
- func (m *InstitutionInviteLinkMutation) AddedIDs(name string) []ent.Value
- func (m *InstitutionInviteLinkMutation) ClearEdge(name string) error
- func (m *InstitutionInviteLinkMutation) ClearField(name string) error
- func (m *InstitutionInviteLinkMutation) ClearInstitution()
- func (m *InstitutionInviteLinkMutation) ClearedEdges() []string
- func (m *InstitutionInviteLinkMutation) ClearedFields() []string
- func (m InstitutionInviteLinkMutation) Client() *Client
- func (m *InstitutionInviteLinkMutation) Code() (r string, exists bool)
- func (m *InstitutionInviteLinkMutation) EdgeCleared(name string) bool
- func (m *InstitutionInviteLinkMutation) Field(name string) (ent.Value, bool)
- func (m *InstitutionInviteLinkMutation) FieldCleared(name string) bool
- func (m *InstitutionInviteLinkMutation) Fields() []string
- func (m *InstitutionInviteLinkMutation) ID() (id int, exists bool)
- func (m *InstitutionInviteLinkMutation) IDs(ctx context.Context) ([]int, error)
- func (m *InstitutionInviteLinkMutation) InstitutionCleared() bool
- func (m *InstitutionInviteLinkMutation) InstitutionID() (id int, exists bool)
- func (m *InstitutionInviteLinkMutation) InstitutionIDs() (ids []int)
- func (m *InstitutionInviteLinkMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *InstitutionInviteLinkMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InstitutionInviteLinkMutation) OldRole(ctx context.Context) (v institution.Role, err error)
- func (m *InstitutionInviteLinkMutation) Op() Op
- func (m *InstitutionInviteLinkMutation) RemovedEdges() []string
- func (m *InstitutionInviteLinkMutation) RemovedIDs(name string) []ent.Value
- func (m *InstitutionInviteLinkMutation) ResetCode()
- func (m *InstitutionInviteLinkMutation) ResetEdge(name string) error
- func (m *InstitutionInviteLinkMutation) ResetField(name string) error
- func (m *InstitutionInviteLinkMutation) ResetInstitution()
- func (m *InstitutionInviteLinkMutation) ResetRole()
- func (m *InstitutionInviteLinkMutation) Role() (r institution.Role, exists bool)
- func (m *InstitutionInviteLinkMutation) SetCode(s string)
- func (m *InstitutionInviteLinkMutation) SetField(name string, value ent.Value) error
- func (m *InstitutionInviteLinkMutation) SetInstitutionID(id int)
- func (m *InstitutionInviteLinkMutation) SetOp(op Op)
- func (m *InstitutionInviteLinkMutation) SetRole(i institution.Role)
- func (m InstitutionInviteLinkMutation) Tx() (*Tx, error)
- func (m *InstitutionInviteLinkMutation) Type() string
- func (m *InstitutionInviteLinkMutation) Where(ps ...predicate.InstitutionInviteLink)
- func (m *InstitutionInviteLinkMutation) WhereP(ps ...func(*sql.Selector))
- type InstitutionInviteLinkQuery
- func (iilq *InstitutionInviteLinkQuery) Aggregate(fns ...AggregateFunc) *InstitutionInviteLinkSelect
- func (iilq *InstitutionInviteLinkQuery) All(ctx context.Context) ([]*InstitutionInviteLink, error)
- func (iilq *InstitutionInviteLinkQuery) AllX(ctx context.Context) []*InstitutionInviteLink
- func (iilq *InstitutionInviteLinkQuery) Clone() *InstitutionInviteLinkQuery
- func (iilq *InstitutionInviteLinkQuery) Count(ctx context.Context) (int, error)
- func (iilq *InstitutionInviteLinkQuery) CountX(ctx context.Context) int
- func (iilq *InstitutionInviteLinkQuery) Exist(ctx context.Context) (bool, error)
- func (iilq *InstitutionInviteLinkQuery) ExistX(ctx context.Context) bool
- func (iilq *InstitutionInviteLinkQuery) First(ctx context.Context) (*InstitutionInviteLink, error)
- func (iilq *InstitutionInviteLinkQuery) FirstID(ctx context.Context) (id int, err error)
- func (iilq *InstitutionInviteLinkQuery) FirstIDX(ctx context.Context) int
- func (iilq *InstitutionInviteLinkQuery) FirstX(ctx context.Context) *InstitutionInviteLink
- func (iilq *InstitutionInviteLinkQuery) GroupBy(field string, fields ...string) *InstitutionInviteLinkGroupBy
- func (iilq *InstitutionInviteLinkQuery) IDs(ctx context.Context) (ids []int, err error)
- func (iilq *InstitutionInviteLinkQuery) IDsX(ctx context.Context) []int
- func (iilq *InstitutionInviteLinkQuery) Limit(limit int) *InstitutionInviteLinkQuery
- func (iilq *InstitutionInviteLinkQuery) Offset(offset int) *InstitutionInviteLinkQuery
- func (iilq *InstitutionInviteLinkQuery) Only(ctx context.Context) (*InstitutionInviteLink, error)
- func (iilq *InstitutionInviteLinkQuery) OnlyID(ctx context.Context) (id int, err error)
- func (iilq *InstitutionInviteLinkQuery) OnlyIDX(ctx context.Context) int
- func (iilq *InstitutionInviteLinkQuery) OnlyX(ctx context.Context) *InstitutionInviteLink
- func (iilq *InstitutionInviteLinkQuery) Order(o ...institutioninvitelink.OrderOption) *InstitutionInviteLinkQuery
- func (iilq *InstitutionInviteLinkQuery) QueryInstitution() *InstitutionQuery
- func (iilq *InstitutionInviteLinkQuery) Select(fields ...string) *InstitutionInviteLinkSelect
- func (iilq *InstitutionInviteLinkQuery) Unique(unique bool) *InstitutionInviteLinkQuery
- func (iilq *InstitutionInviteLinkQuery) Where(ps ...predicate.InstitutionInviteLink) *InstitutionInviteLinkQuery
- func (iilq *InstitutionInviteLinkQuery) WithInstitution(opts ...func(*InstitutionQuery)) *InstitutionInviteLinkQuery
- type InstitutionInviteLinkSelect
- func (iils *InstitutionInviteLinkSelect) Aggregate(fns ...AggregateFunc) *InstitutionInviteLinkSelect
- func (s *InstitutionInviteLinkSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InstitutionInviteLinkSelect) BoolX(ctx context.Context) bool
- func (s *InstitutionInviteLinkSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InstitutionInviteLinkSelect) BoolsX(ctx context.Context) []bool
- func (s *InstitutionInviteLinkSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InstitutionInviteLinkSelect) Float64X(ctx context.Context) float64
- func (s *InstitutionInviteLinkSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InstitutionInviteLinkSelect) Float64sX(ctx context.Context) []float64
- func (s *InstitutionInviteLinkSelect) Int(ctx context.Context) (_ int, err error)
- func (s *InstitutionInviteLinkSelect) IntX(ctx context.Context) int
- func (s *InstitutionInviteLinkSelect) Ints(ctx context.Context) ([]int, error)
- func (s *InstitutionInviteLinkSelect) IntsX(ctx context.Context) []int
- func (iils *InstitutionInviteLinkSelect) Scan(ctx context.Context, v any) error
- func (s *InstitutionInviteLinkSelect) ScanX(ctx context.Context, v any)
- func (s *InstitutionInviteLinkSelect) String(ctx context.Context) (_ string, err error)
- func (s *InstitutionInviteLinkSelect) StringX(ctx context.Context) string
- func (s *InstitutionInviteLinkSelect) Strings(ctx context.Context) ([]string, error)
- func (s *InstitutionInviteLinkSelect) StringsX(ctx context.Context) []string
- type InstitutionInviteLinkUpdate
- func (iilu *InstitutionInviteLinkUpdate) ClearInstitution() *InstitutionInviteLinkUpdate
- func (iilu *InstitutionInviteLinkUpdate) Exec(ctx context.Context) error
- func (iilu *InstitutionInviteLinkUpdate) ExecX(ctx context.Context)
- func (iilu *InstitutionInviteLinkUpdate) Mutation() *InstitutionInviteLinkMutation
- func (iilu *InstitutionInviteLinkUpdate) Save(ctx context.Context) (int, error)
- func (iilu *InstitutionInviteLinkUpdate) SaveX(ctx context.Context) int
- func (iilu *InstitutionInviteLinkUpdate) SetCode(s string) *InstitutionInviteLinkUpdate
- func (iilu *InstitutionInviteLinkUpdate) SetInstitution(i *Institution) *InstitutionInviteLinkUpdate
- func (iilu *InstitutionInviteLinkUpdate) SetInstitutionID(id int) *InstitutionInviteLinkUpdate
- func (iilu *InstitutionInviteLinkUpdate) SetRole(i institution.Role) *InstitutionInviteLinkUpdate
- func (iilu *InstitutionInviteLinkUpdate) Where(ps ...predicate.InstitutionInviteLink) *InstitutionInviteLinkUpdate
- type InstitutionInviteLinkUpdateOne
- func (iiluo *InstitutionInviteLinkUpdateOne) ClearInstitution() *InstitutionInviteLinkUpdateOne
- func (iiluo *InstitutionInviteLinkUpdateOne) Exec(ctx context.Context) error
- func (iiluo *InstitutionInviteLinkUpdateOne) ExecX(ctx context.Context)
- func (iiluo *InstitutionInviteLinkUpdateOne) Mutation() *InstitutionInviteLinkMutation
- func (iiluo *InstitutionInviteLinkUpdateOne) Save(ctx context.Context) (*InstitutionInviteLink, error)
- func (iiluo *InstitutionInviteLinkUpdateOne) SaveX(ctx context.Context) *InstitutionInviteLink
- func (iiluo *InstitutionInviteLinkUpdateOne) Select(field string, fields ...string) *InstitutionInviteLinkUpdateOne
- func (iiluo *InstitutionInviteLinkUpdateOne) SetCode(s string) *InstitutionInviteLinkUpdateOne
- func (iiluo *InstitutionInviteLinkUpdateOne) SetInstitution(i *Institution) *InstitutionInviteLinkUpdateOne
- func (iiluo *InstitutionInviteLinkUpdateOne) SetInstitutionID(id int) *InstitutionInviteLinkUpdateOne
- func (iiluo *InstitutionInviteLinkUpdateOne) SetRole(i institution.Role) *InstitutionInviteLinkUpdateOne
- func (iiluo *InstitutionInviteLinkUpdateOne) Where(ps ...predicate.InstitutionInviteLink) *InstitutionInviteLinkUpdateOne
- type InstitutionInviteLinkUpsert
- func (u *InstitutionInviteLinkUpsert) SetCode(v string) *InstitutionInviteLinkUpsert
- func (u *InstitutionInviteLinkUpsert) SetRole(v institution.Role) *InstitutionInviteLinkUpsert
- func (u *InstitutionInviteLinkUpsert) UpdateCode() *InstitutionInviteLinkUpsert
- func (u *InstitutionInviteLinkUpsert) UpdateRole() *InstitutionInviteLinkUpsert
- type InstitutionInviteLinkUpsertBulk
- func (u *InstitutionInviteLinkUpsertBulk) DoNothing() *InstitutionInviteLinkUpsertBulk
- func (u *InstitutionInviteLinkUpsertBulk) Exec(ctx context.Context) error
- func (u *InstitutionInviteLinkUpsertBulk) ExecX(ctx context.Context)
- func (u *InstitutionInviteLinkUpsertBulk) Ignore() *InstitutionInviteLinkUpsertBulk
- func (u *InstitutionInviteLinkUpsertBulk) SetCode(v string) *InstitutionInviteLinkUpsertBulk
- func (u *InstitutionInviteLinkUpsertBulk) SetRole(v institution.Role) *InstitutionInviteLinkUpsertBulk
- func (u *InstitutionInviteLinkUpsertBulk) Update(set func(*InstitutionInviteLinkUpsert)) *InstitutionInviteLinkUpsertBulk
- func (u *InstitutionInviteLinkUpsertBulk) UpdateCode() *InstitutionInviteLinkUpsertBulk
- func (u *InstitutionInviteLinkUpsertBulk) UpdateNewValues() *InstitutionInviteLinkUpsertBulk
- func (u *InstitutionInviteLinkUpsertBulk) UpdateRole() *InstitutionInviteLinkUpsertBulk
- type InstitutionInviteLinkUpsertOne
- func (u *InstitutionInviteLinkUpsertOne) DoNothing() *InstitutionInviteLinkUpsertOne
- func (u *InstitutionInviteLinkUpsertOne) Exec(ctx context.Context) error
- func (u *InstitutionInviteLinkUpsertOne) ExecX(ctx context.Context)
- func (u *InstitutionInviteLinkUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *InstitutionInviteLinkUpsertOne) IDX(ctx context.Context) int
- func (u *InstitutionInviteLinkUpsertOne) Ignore() *InstitutionInviteLinkUpsertOne
- func (u *InstitutionInviteLinkUpsertOne) SetCode(v string) *InstitutionInviteLinkUpsertOne
- func (u *InstitutionInviteLinkUpsertOne) SetRole(v institution.Role) *InstitutionInviteLinkUpsertOne
- func (u *InstitutionInviteLinkUpsertOne) Update(set func(*InstitutionInviteLinkUpsert)) *InstitutionInviteLinkUpsertOne
- func (u *InstitutionInviteLinkUpsertOne) UpdateCode() *InstitutionInviteLinkUpsertOne
- func (u *InstitutionInviteLinkUpsertOne) UpdateNewValues() *InstitutionInviteLinkUpsertOne
- func (u *InstitutionInviteLinkUpsertOne) UpdateRole() *InstitutionInviteLinkUpsertOne
- type InstitutionInviteLinks
- type InstitutionMutation
- func (m *InstitutionMutation) AccessoriesCleared() bool
- func (m *InstitutionMutation) AccessoriesIDs() (ids []int)
- func (m *InstitutionMutation) AddAccessoryIDs(ids ...int)
- func (m *InstitutionMutation) AddField(name string, value ent.Value) error
- func (m *InstitutionMutation) AddGroupIDs(ids ...int)
- func (m *InstitutionMutation) AddInviteIDs(ids ...int)
- func (m *InstitutionMutation) AddUserIDs(ids ...int)
- func (m *InstitutionMutation) AddVoucherIDs(ids ...int)
- func (m *InstitutionMutation) AddedEdges() []string
- func (m *InstitutionMutation) AddedField(name string) (ent.Value, bool)
- func (m *InstitutionMutation) AddedFields() []string
- func (m *InstitutionMutation) AddedIDs(name string) []ent.Value
- func (m *InstitutionMutation) ClearAccessories()
- func (m *InstitutionMutation) ClearEdge(name string) error
- func (m *InstitutionMutation) ClearField(name string) error
- func (m *InstitutionMutation) ClearGroups()
- func (m *InstitutionMutation) ClearInvites()
- func (m *InstitutionMutation) ClearUsers()
- func (m *InstitutionMutation) ClearVouchers()
- func (m *InstitutionMutation) ClearedEdges() []string
- func (m *InstitutionMutation) ClearedFields() []string
- func (m InstitutionMutation) Client() *Client
- func (m *InstitutionMutation) Description() (r string, exists bool)
- func (m *InstitutionMutation) EdgeCleared(name string) bool
- func (m *InstitutionMutation) Field(name string) (ent.Value, bool)
- func (m *InstitutionMutation) FieldCleared(name string) bool
- func (m *InstitutionMutation) Fields() []string
- func (m *InstitutionMutation) GroupsCleared() bool
- func (m *InstitutionMutation) GroupsIDs() (ids []int)
- func (m *InstitutionMutation) ID() (id int, exists bool)
- func (m *InstitutionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *InstitutionMutation) InvitesCleared() bool
- func (m *InstitutionMutation) InvitesIDs() (ids []int)
- func (m *InstitutionMutation) Name() (r string, exists bool)
- func (m *InstitutionMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *InstitutionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *InstitutionMutation) OldName(ctx context.Context) (v string, err error)
- func (m *InstitutionMutation) OldShortName(ctx context.Context) (v string, err error)
- func (m *InstitutionMutation) Op() Op
- func (m *InstitutionMutation) RemoveAccessoryIDs(ids ...int)
- func (m *InstitutionMutation) RemoveGroupIDs(ids ...int)
- func (m *InstitutionMutation) RemoveInviteIDs(ids ...int)
- func (m *InstitutionMutation) RemoveUserIDs(ids ...int)
- func (m *InstitutionMutation) RemoveVoucherIDs(ids ...int)
- func (m *InstitutionMutation) RemovedAccessoriesIDs() (ids []int)
- func (m *InstitutionMutation) RemovedEdges() []string
- func (m *InstitutionMutation) RemovedGroupsIDs() (ids []int)
- func (m *InstitutionMutation) RemovedIDs(name string) []ent.Value
- func (m *InstitutionMutation) RemovedInvitesIDs() (ids []int)
- func (m *InstitutionMutation) RemovedUsersIDs() (ids []int)
- func (m *InstitutionMutation) RemovedVouchersIDs() (ids []int)
- func (m *InstitutionMutation) ResetAccessories()
- func (m *InstitutionMutation) ResetDescription()
- func (m *InstitutionMutation) ResetEdge(name string) error
- func (m *InstitutionMutation) ResetField(name string) error
- func (m *InstitutionMutation) ResetGroups()
- func (m *InstitutionMutation) ResetInvites()
- func (m *InstitutionMutation) ResetName()
- func (m *InstitutionMutation) ResetShortName()
- func (m *InstitutionMutation) ResetUsers()
- func (m *InstitutionMutation) ResetVouchers()
- func (m *InstitutionMutation) SetDescription(s string)
- func (m *InstitutionMutation) SetField(name string, value ent.Value) error
- func (m *InstitutionMutation) SetName(s string)
- func (m *InstitutionMutation) SetOp(op Op)
- func (m *InstitutionMutation) SetShortName(s string)
- func (m *InstitutionMutation) ShortName() (r string, exists bool)
- func (m InstitutionMutation) Tx() (*Tx, error)
- func (m *InstitutionMutation) Type() string
- func (m *InstitutionMutation) UsersCleared() bool
- func (m *InstitutionMutation) UsersIDs() (ids []int)
- func (m *InstitutionMutation) VouchersCleared() bool
- func (m *InstitutionMutation) VouchersIDs() (ids []int)
- func (m *InstitutionMutation) Where(ps ...predicate.Institution)
- func (m *InstitutionMutation) WhereP(ps ...func(*sql.Selector))
- type InstitutionQuery
- func (iq *InstitutionQuery) Aggregate(fns ...AggregateFunc) *InstitutionSelect
- func (iq *InstitutionQuery) All(ctx context.Context) ([]*Institution, error)
- func (iq *InstitutionQuery) AllX(ctx context.Context) []*Institution
- func (iq *InstitutionQuery) Clone() *InstitutionQuery
- func (iq *InstitutionQuery) Count(ctx context.Context) (int, error)
- func (iq *InstitutionQuery) CountX(ctx context.Context) int
- func (iq *InstitutionQuery) Exist(ctx context.Context) (bool, error)
- func (iq *InstitutionQuery) ExistX(ctx context.Context) bool
- func (iq *InstitutionQuery) First(ctx context.Context) (*Institution, error)
- func (iq *InstitutionQuery) FirstID(ctx context.Context) (id int, err error)
- func (iq *InstitutionQuery) FirstIDX(ctx context.Context) int
- func (iq *InstitutionQuery) FirstX(ctx context.Context) *Institution
- func (iq *InstitutionQuery) GroupBy(field string, fields ...string) *InstitutionGroupBy
- func (iq *InstitutionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (iq *InstitutionQuery) IDsX(ctx context.Context) []int
- func (iq *InstitutionQuery) Limit(limit int) *InstitutionQuery
- func (iq *InstitutionQuery) Offset(offset int) *InstitutionQuery
- func (iq *InstitutionQuery) Only(ctx context.Context) (*Institution, error)
- func (iq *InstitutionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (iq *InstitutionQuery) OnlyIDX(ctx context.Context) int
- func (iq *InstitutionQuery) OnlyX(ctx context.Context) *Institution
- func (iq *InstitutionQuery) Order(o ...entinstitution.OrderOption) *InstitutionQuery
- func (iq *InstitutionQuery) QueryAccessories() *AccessoryQuery
- func (iq *InstitutionQuery) QueryGroups() *GroupQuery
- func (iq *InstitutionQuery) QueryInvites() *InstitutionInviteLinkQuery
- func (iq *InstitutionQuery) QueryUsers() *UserQuery
- func (iq *InstitutionQuery) QueryVouchers() *VoucherQuery
- func (iq *InstitutionQuery) Select(fields ...string) *InstitutionSelect
- func (iq *InstitutionQuery) Unique(unique bool) *InstitutionQuery
- func (iq *InstitutionQuery) Where(ps ...predicate.Institution) *InstitutionQuery
- func (iq *InstitutionQuery) WithAccessories(opts ...func(*AccessoryQuery)) *InstitutionQuery
- func (iq *InstitutionQuery) WithGroups(opts ...func(*GroupQuery)) *InstitutionQuery
- func (iq *InstitutionQuery) WithInvites(opts ...func(*InstitutionInviteLinkQuery)) *InstitutionQuery
- func (iq *InstitutionQuery) WithUsers(opts ...func(*UserQuery)) *InstitutionQuery
- func (iq *InstitutionQuery) WithVouchers(opts ...func(*VoucherQuery)) *InstitutionQuery
- type InstitutionSelect
- func (is *InstitutionSelect) Aggregate(fns ...AggregateFunc) *InstitutionSelect
- func (s *InstitutionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *InstitutionSelect) BoolX(ctx context.Context) bool
- func (s *InstitutionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *InstitutionSelect) BoolsX(ctx context.Context) []bool
- func (s *InstitutionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *InstitutionSelect) Float64X(ctx context.Context) float64
- func (s *InstitutionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *InstitutionSelect) Float64sX(ctx context.Context) []float64
- func (s *InstitutionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *InstitutionSelect) IntX(ctx context.Context) int
- func (s *InstitutionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *InstitutionSelect) IntsX(ctx context.Context) []int
- func (is *InstitutionSelect) Scan(ctx context.Context, v any) error
- func (s *InstitutionSelect) ScanX(ctx context.Context, v any)
- func (s *InstitutionSelect) String(ctx context.Context) (_ string, err error)
- func (s *InstitutionSelect) StringX(ctx context.Context) string
- func (s *InstitutionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *InstitutionSelect) StringsX(ctx context.Context) []string
- type InstitutionUpdate
- func (iu *InstitutionUpdate) AddAccessories(a ...*Accessory) *InstitutionUpdate
- func (iu *InstitutionUpdate) AddAccessoryIDs(ids ...int) *InstitutionUpdate
- func (iu *InstitutionUpdate) AddGroupIDs(ids ...int) *InstitutionUpdate
- func (iu *InstitutionUpdate) AddGroups(g ...*Group) *InstitutionUpdate
- func (iu *InstitutionUpdate) AddInviteIDs(ids ...int) *InstitutionUpdate
- func (iu *InstitutionUpdate) AddInvites(i ...*InstitutionInviteLink) *InstitutionUpdate
- func (iu *InstitutionUpdate) AddUserIDs(ids ...int) *InstitutionUpdate
- func (iu *InstitutionUpdate) AddUsers(u ...*User) *InstitutionUpdate
- func (iu *InstitutionUpdate) AddVoucherIDs(ids ...int) *InstitutionUpdate
- func (iu *InstitutionUpdate) AddVouchers(v ...*Voucher) *InstitutionUpdate
- func (iu *InstitutionUpdate) ClearAccessories() *InstitutionUpdate
- func (iu *InstitutionUpdate) ClearGroups() *InstitutionUpdate
- func (iu *InstitutionUpdate) ClearInvites() *InstitutionUpdate
- func (iu *InstitutionUpdate) ClearUsers() *InstitutionUpdate
- func (iu *InstitutionUpdate) ClearVouchers() *InstitutionUpdate
- func (iu *InstitutionUpdate) Exec(ctx context.Context) error
- func (iu *InstitutionUpdate) ExecX(ctx context.Context)
- func (iu *InstitutionUpdate) Mutation() *InstitutionMutation
- func (iu *InstitutionUpdate) RemoveAccessories(a ...*Accessory) *InstitutionUpdate
- func (iu *InstitutionUpdate) RemoveAccessoryIDs(ids ...int) *InstitutionUpdate
- func (iu *InstitutionUpdate) RemoveGroupIDs(ids ...int) *InstitutionUpdate
- func (iu *InstitutionUpdate) RemoveGroups(g ...*Group) *InstitutionUpdate
- func (iu *InstitutionUpdate) RemoveInviteIDs(ids ...int) *InstitutionUpdate
- func (iu *InstitutionUpdate) RemoveInvites(i ...*InstitutionInviteLink) *InstitutionUpdate
- func (iu *InstitutionUpdate) RemoveUserIDs(ids ...int) *InstitutionUpdate
- func (iu *InstitutionUpdate) RemoveUsers(u ...*User) *InstitutionUpdate
- func (iu *InstitutionUpdate) RemoveVoucherIDs(ids ...int) *InstitutionUpdate
- func (iu *InstitutionUpdate) RemoveVouchers(v ...*Voucher) *InstitutionUpdate
- func (iu *InstitutionUpdate) Save(ctx context.Context) (int, error)
- func (iu *InstitutionUpdate) SaveX(ctx context.Context) int
- func (iu *InstitutionUpdate) SetDescription(s string) *InstitutionUpdate
- func (iu *InstitutionUpdate) SetName(s string) *InstitutionUpdate
- func (iu *InstitutionUpdate) SetNillableDescription(s *string) *InstitutionUpdate
- func (iu *InstitutionUpdate) SetShortName(s string) *InstitutionUpdate
- func (iu *InstitutionUpdate) Where(ps ...predicate.Institution) *InstitutionUpdate
- type InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) AddAccessories(a ...*Accessory) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) AddAccessoryIDs(ids ...int) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) AddGroupIDs(ids ...int) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) AddGroups(g ...*Group) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) AddInviteIDs(ids ...int) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) AddInvites(i ...*InstitutionInviteLink) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) AddUserIDs(ids ...int) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) AddUsers(u ...*User) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) AddVoucherIDs(ids ...int) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) AddVouchers(v ...*Voucher) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) ClearAccessories() *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) ClearGroups() *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) ClearInvites() *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) ClearUsers() *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) ClearVouchers() *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) Exec(ctx context.Context) error
- func (iuo *InstitutionUpdateOne) ExecX(ctx context.Context)
- func (iuo *InstitutionUpdateOne) Mutation() *InstitutionMutation
- func (iuo *InstitutionUpdateOne) RemoveAccessories(a ...*Accessory) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) RemoveAccessoryIDs(ids ...int) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) RemoveGroupIDs(ids ...int) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) RemoveGroups(g ...*Group) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) RemoveInviteIDs(ids ...int) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) RemoveInvites(i ...*InstitutionInviteLink) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) RemoveUserIDs(ids ...int) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) RemoveUsers(u ...*User) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) RemoveVoucherIDs(ids ...int) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) RemoveVouchers(v ...*Voucher) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) Save(ctx context.Context) (*Institution, error)
- func (iuo *InstitutionUpdateOne) SaveX(ctx context.Context) *Institution
- func (iuo *InstitutionUpdateOne) Select(field string, fields ...string) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) SetDescription(s string) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) SetName(s string) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) SetNillableDescription(s *string) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) SetShortName(s string) *InstitutionUpdateOne
- func (iuo *InstitutionUpdateOne) Where(ps ...predicate.Institution) *InstitutionUpdateOne
- type InstitutionUpsert
- func (u *InstitutionUpsert) SetDescription(v string) *InstitutionUpsert
- func (u *InstitutionUpsert) SetName(v string) *InstitutionUpsert
- func (u *InstitutionUpsert) SetShortName(v string) *InstitutionUpsert
- func (u *InstitutionUpsert) UpdateDescription() *InstitutionUpsert
- func (u *InstitutionUpsert) UpdateName() *InstitutionUpsert
- func (u *InstitutionUpsert) UpdateShortName() *InstitutionUpsert
- type InstitutionUpsertBulk
- func (u *InstitutionUpsertBulk) DoNothing() *InstitutionUpsertBulk
- func (u *InstitutionUpsertBulk) Exec(ctx context.Context) error
- func (u *InstitutionUpsertBulk) ExecX(ctx context.Context)
- func (u *InstitutionUpsertBulk) Ignore() *InstitutionUpsertBulk
- func (u *InstitutionUpsertBulk) SetDescription(v string) *InstitutionUpsertBulk
- func (u *InstitutionUpsertBulk) SetName(v string) *InstitutionUpsertBulk
- func (u *InstitutionUpsertBulk) SetShortName(v string) *InstitutionUpsertBulk
- func (u *InstitutionUpsertBulk) Update(set func(*InstitutionUpsert)) *InstitutionUpsertBulk
- func (u *InstitutionUpsertBulk) UpdateDescription() *InstitutionUpsertBulk
- func (u *InstitutionUpsertBulk) UpdateName() *InstitutionUpsertBulk
- func (u *InstitutionUpsertBulk) UpdateNewValues() *InstitutionUpsertBulk
- func (u *InstitutionUpsertBulk) UpdateShortName() *InstitutionUpsertBulk
- type InstitutionUpsertOne
- func (u *InstitutionUpsertOne) DoNothing() *InstitutionUpsertOne
- func (u *InstitutionUpsertOne) Exec(ctx context.Context) error
- func (u *InstitutionUpsertOne) ExecX(ctx context.Context)
- func (u *InstitutionUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *InstitutionUpsertOne) IDX(ctx context.Context) int
- func (u *InstitutionUpsertOne) Ignore() *InstitutionUpsertOne
- func (u *InstitutionUpsertOne) SetDescription(v string) *InstitutionUpsertOne
- func (u *InstitutionUpsertOne) SetName(v string) *InstitutionUpsertOne
- func (u *InstitutionUpsertOne) SetShortName(v string) *InstitutionUpsertOne
- func (u *InstitutionUpsertOne) Update(set func(*InstitutionUpsert)) *InstitutionUpsertOne
- func (u *InstitutionUpsertOne) UpdateDescription() *InstitutionUpsertOne
- func (u *InstitutionUpsertOne) UpdateName() *InstitutionUpsertOne
- func (u *InstitutionUpsertOne) UpdateNewValues() *InstitutionUpsertOne
- func (u *InstitutionUpsertOne) UpdateShortName() *InstitutionUpsertOne
- type Institutions
- type InterceptFunc
- type Interceptor
- type JWTRevocation
- type JWTRevocationClient
- func (c *JWTRevocationClient) Create() *JWTRevocationCreate
- func (c *JWTRevocationClient) CreateBulk(builders ...*JWTRevocationCreate) *JWTRevocationCreateBulk
- func (c *JWTRevocationClient) Delete() *JWTRevocationDelete
- func (c *JWTRevocationClient) DeleteOne(jr *JWTRevocation) *JWTRevocationDeleteOne
- func (c *JWTRevocationClient) DeleteOneID(id int) *JWTRevocationDeleteOne
- func (c *JWTRevocationClient) Get(ctx context.Context, id int) (*JWTRevocation, error)
- func (c *JWTRevocationClient) GetX(ctx context.Context, id int) *JWTRevocation
- func (c *JWTRevocationClient) Hooks() []Hook
- func (c *JWTRevocationClient) Intercept(interceptors ...Interceptor)
- func (c *JWTRevocationClient) Interceptors() []Interceptor
- func (c *JWTRevocationClient) Query() *JWTRevocationQuery
- func (c *JWTRevocationClient) Update() *JWTRevocationUpdate
- func (c *JWTRevocationClient) UpdateOne(jr *JWTRevocation) *JWTRevocationUpdateOne
- func (c *JWTRevocationClient) UpdateOneID(id int) *JWTRevocationUpdateOne
- func (c *JWTRevocationClient) Use(hooks ...Hook)
- type JWTRevocationCreate
- func (jrc *JWTRevocationCreate) Exec(ctx context.Context) error
- func (jrc *JWTRevocationCreate) ExecX(ctx context.Context)
- func (jrc *JWTRevocationCreate) Mutation() *JWTRevocationMutation
- func (jrc *JWTRevocationCreate) OnConflict(opts ...sql.ConflictOption) *JWTRevocationUpsertOne
- func (jrc *JWTRevocationCreate) OnConflictColumns(columns ...string) *JWTRevocationUpsertOne
- func (jrc *JWTRevocationCreate) Save(ctx context.Context) (*JWTRevocation, error)
- func (jrc *JWTRevocationCreate) SaveX(ctx context.Context) *JWTRevocation
- func (jrc *JWTRevocationCreate) SetExpiry(t time.Time) *JWTRevocationCreate
- func (jrc *JWTRevocationCreate) SetJti(s string) *JWTRevocationCreate
- type JWTRevocationCreateBulk
- func (jrcb *JWTRevocationCreateBulk) Exec(ctx context.Context) error
- func (jrcb *JWTRevocationCreateBulk) ExecX(ctx context.Context)
- func (jrcb *JWTRevocationCreateBulk) OnConflict(opts ...sql.ConflictOption) *JWTRevocationUpsertBulk
- func (jrcb *JWTRevocationCreateBulk) OnConflictColumns(columns ...string) *JWTRevocationUpsertBulk
- func (jrcb *JWTRevocationCreateBulk) Save(ctx context.Context) ([]*JWTRevocation, error)
- func (jrcb *JWTRevocationCreateBulk) SaveX(ctx context.Context) []*JWTRevocation
- type JWTRevocationDelete
- type JWTRevocationDeleteOne
- type JWTRevocationGroupBy
- func (jrgb *JWTRevocationGroupBy) Aggregate(fns ...AggregateFunc) *JWTRevocationGroupBy
- func (s *JWTRevocationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *JWTRevocationGroupBy) BoolX(ctx context.Context) bool
- func (s *JWTRevocationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *JWTRevocationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *JWTRevocationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *JWTRevocationGroupBy) Float64X(ctx context.Context) float64
- func (s *JWTRevocationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *JWTRevocationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *JWTRevocationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *JWTRevocationGroupBy) IntX(ctx context.Context) int
- func (s *JWTRevocationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *JWTRevocationGroupBy) IntsX(ctx context.Context) []int
- func (jrgb *JWTRevocationGroupBy) Scan(ctx context.Context, v any) error
- func (s *JWTRevocationGroupBy) ScanX(ctx context.Context, v any)
- func (s *JWTRevocationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *JWTRevocationGroupBy) StringX(ctx context.Context) string
- func (s *JWTRevocationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *JWTRevocationGroupBy) StringsX(ctx context.Context) []string
- type JWTRevocationMutation
- func (m *JWTRevocationMutation) AddField(name string, value ent.Value) error
- func (m *JWTRevocationMutation) AddedEdges() []string
- func (m *JWTRevocationMutation) AddedField(name string) (ent.Value, bool)
- func (m *JWTRevocationMutation) AddedFields() []string
- func (m *JWTRevocationMutation) AddedIDs(name string) []ent.Value
- func (m *JWTRevocationMutation) ClearEdge(name string) error
- func (m *JWTRevocationMutation) ClearField(name string) error
- func (m *JWTRevocationMutation) ClearedEdges() []string
- func (m *JWTRevocationMutation) ClearedFields() []string
- func (m JWTRevocationMutation) Client() *Client
- func (m *JWTRevocationMutation) EdgeCleared(name string) bool
- func (m *JWTRevocationMutation) Expiry() (r time.Time, exists bool)
- func (m *JWTRevocationMutation) Field(name string) (ent.Value, bool)
- func (m *JWTRevocationMutation) FieldCleared(name string) bool
- func (m *JWTRevocationMutation) Fields() []string
- func (m *JWTRevocationMutation) ID() (id int, exists bool)
- func (m *JWTRevocationMutation) IDs(ctx context.Context) ([]int, error)
- func (m *JWTRevocationMutation) Jti() (r string, exists bool)
- func (m *JWTRevocationMutation) OldExpiry(ctx context.Context) (v time.Time, err error)
- func (m *JWTRevocationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *JWTRevocationMutation) OldJti(ctx context.Context) (v string, err error)
- func (m *JWTRevocationMutation) Op() Op
- func (m *JWTRevocationMutation) RemovedEdges() []string
- func (m *JWTRevocationMutation) RemovedIDs(name string) []ent.Value
- func (m *JWTRevocationMutation) ResetEdge(name string) error
- func (m *JWTRevocationMutation) ResetExpiry()
- func (m *JWTRevocationMutation) ResetField(name string) error
- func (m *JWTRevocationMutation) ResetJti()
- func (m *JWTRevocationMutation) SetExpiry(t time.Time)
- func (m *JWTRevocationMutation) SetField(name string, value ent.Value) error
- func (m *JWTRevocationMutation) SetJti(s string)
- func (m *JWTRevocationMutation) SetOp(op Op)
- func (m JWTRevocationMutation) Tx() (*Tx, error)
- func (m *JWTRevocationMutation) Type() string
- func (m *JWTRevocationMutation) Where(ps ...predicate.JWTRevocation)
- func (m *JWTRevocationMutation) WhereP(ps ...func(*sql.Selector))
- type JWTRevocationQuery
- func (jrq *JWTRevocationQuery) Aggregate(fns ...AggregateFunc) *JWTRevocationSelect
- func (jrq *JWTRevocationQuery) All(ctx context.Context) ([]*JWTRevocation, error)
- func (jrq *JWTRevocationQuery) AllX(ctx context.Context) []*JWTRevocation
- func (jrq *JWTRevocationQuery) Clone() *JWTRevocationQuery
- func (jrq *JWTRevocationQuery) Count(ctx context.Context) (int, error)
- func (jrq *JWTRevocationQuery) CountX(ctx context.Context) int
- func (jrq *JWTRevocationQuery) Exist(ctx context.Context) (bool, error)
- func (jrq *JWTRevocationQuery) ExistX(ctx context.Context) bool
- func (jrq *JWTRevocationQuery) First(ctx context.Context) (*JWTRevocation, error)
- func (jrq *JWTRevocationQuery) FirstID(ctx context.Context) (id int, err error)
- func (jrq *JWTRevocationQuery) FirstIDX(ctx context.Context) int
- func (jrq *JWTRevocationQuery) FirstX(ctx context.Context) *JWTRevocation
- func (jrq *JWTRevocationQuery) GroupBy(field string, fields ...string) *JWTRevocationGroupBy
- func (jrq *JWTRevocationQuery) IDs(ctx context.Context) (ids []int, err error)
- func (jrq *JWTRevocationQuery) IDsX(ctx context.Context) []int
- func (jrq *JWTRevocationQuery) Limit(limit int) *JWTRevocationQuery
- func (jrq *JWTRevocationQuery) Offset(offset int) *JWTRevocationQuery
- func (jrq *JWTRevocationQuery) Only(ctx context.Context) (*JWTRevocation, error)
- func (jrq *JWTRevocationQuery) OnlyID(ctx context.Context) (id int, err error)
- func (jrq *JWTRevocationQuery) OnlyIDX(ctx context.Context) int
- func (jrq *JWTRevocationQuery) OnlyX(ctx context.Context) *JWTRevocation
- func (jrq *JWTRevocationQuery) Order(o ...jwtrevocation.OrderOption) *JWTRevocationQuery
- func (jrq *JWTRevocationQuery) Select(fields ...string) *JWTRevocationSelect
- func (jrq *JWTRevocationQuery) Unique(unique bool) *JWTRevocationQuery
- func (jrq *JWTRevocationQuery) Where(ps ...predicate.JWTRevocation) *JWTRevocationQuery
- type JWTRevocationSelect
- func (jrs *JWTRevocationSelect) Aggregate(fns ...AggregateFunc) *JWTRevocationSelect
- func (s *JWTRevocationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *JWTRevocationSelect) BoolX(ctx context.Context) bool
- func (s *JWTRevocationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *JWTRevocationSelect) BoolsX(ctx context.Context) []bool
- func (s *JWTRevocationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *JWTRevocationSelect) Float64X(ctx context.Context) float64
- func (s *JWTRevocationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *JWTRevocationSelect) Float64sX(ctx context.Context) []float64
- func (s *JWTRevocationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *JWTRevocationSelect) IntX(ctx context.Context) int
- func (s *JWTRevocationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *JWTRevocationSelect) IntsX(ctx context.Context) []int
- func (jrs *JWTRevocationSelect) Scan(ctx context.Context, v any) error
- func (s *JWTRevocationSelect) ScanX(ctx context.Context, v any)
- func (s *JWTRevocationSelect) String(ctx context.Context) (_ string, err error)
- func (s *JWTRevocationSelect) StringX(ctx context.Context) string
- func (s *JWTRevocationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *JWTRevocationSelect) StringsX(ctx context.Context) []string
- type JWTRevocationUpdate
- func (jru *JWTRevocationUpdate) Exec(ctx context.Context) error
- func (jru *JWTRevocationUpdate) ExecX(ctx context.Context)
- func (jru *JWTRevocationUpdate) Mutation() *JWTRevocationMutation
- func (jru *JWTRevocationUpdate) Save(ctx context.Context) (int, error)
- func (jru *JWTRevocationUpdate) SaveX(ctx context.Context) int
- func (jru *JWTRevocationUpdate) Where(ps ...predicate.JWTRevocation) *JWTRevocationUpdate
- type JWTRevocationUpdateOne
- func (jruo *JWTRevocationUpdateOne) Exec(ctx context.Context) error
- func (jruo *JWTRevocationUpdateOne) ExecX(ctx context.Context)
- func (jruo *JWTRevocationUpdateOne) Mutation() *JWTRevocationMutation
- func (jruo *JWTRevocationUpdateOne) Save(ctx context.Context) (*JWTRevocation, error)
- func (jruo *JWTRevocationUpdateOne) SaveX(ctx context.Context) *JWTRevocation
- func (jruo *JWTRevocationUpdateOne) Select(field string, fields ...string) *JWTRevocationUpdateOne
- func (jruo *JWTRevocationUpdateOne) Where(ps ...predicate.JWTRevocation) *JWTRevocationUpdateOne
- type JWTRevocationUpsert
- type JWTRevocationUpsertBulk
- func (u *JWTRevocationUpsertBulk) DoNothing() *JWTRevocationUpsertBulk
- func (u *JWTRevocationUpsertBulk) Exec(ctx context.Context) error
- func (u *JWTRevocationUpsertBulk) ExecX(ctx context.Context)
- func (u *JWTRevocationUpsertBulk) Ignore() *JWTRevocationUpsertBulk
- func (u *JWTRevocationUpsertBulk) Update(set func(*JWTRevocationUpsert)) *JWTRevocationUpsertBulk
- func (u *JWTRevocationUpsertBulk) UpdateNewValues() *JWTRevocationUpsertBulk
- type JWTRevocationUpsertOne
- func (u *JWTRevocationUpsertOne) DoNothing() *JWTRevocationUpsertOne
- func (u *JWTRevocationUpsertOne) Exec(ctx context.Context) error
- func (u *JWTRevocationUpsertOne) ExecX(ctx context.Context)
- func (u *JWTRevocationUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *JWTRevocationUpsertOne) IDX(ctx context.Context) int
- func (u *JWTRevocationUpsertOne) Ignore() *JWTRevocationUpsertOne
- func (u *JWTRevocationUpsertOne) Update(set func(*JWTRevocationUpsert)) *JWTRevocationUpsertOne
- func (u *JWTRevocationUpsertOne) UpdateNewValues() *JWTRevocationUpsertOne
- type JWTRevocations
- type Milestone
- type MilestoneClient
- func (c *MilestoneClient) Create() *MilestoneCreate
- func (c *MilestoneClient) CreateBulk(builders ...*MilestoneCreate) *MilestoneCreateBulk
- func (c *MilestoneClient) Delete() *MilestoneDelete
- func (c *MilestoneClient) DeleteOne(m *Milestone) *MilestoneDeleteOne
- func (c *MilestoneClient) DeleteOneID(id int) *MilestoneDeleteOne
- func (c *MilestoneClient) Get(ctx context.Context, id int) (*Milestone, error)
- func (c *MilestoneClient) GetX(ctx context.Context, id int) *Milestone
- func (c *MilestoneClient) Hooks() []Hook
- func (c *MilestoneClient) Intercept(interceptors ...Interceptor)
- func (c *MilestoneClient) Interceptors() []Interceptor
- func (c *MilestoneClient) Query() *MilestoneQuery
- func (c *MilestoneClient) QueryStudyPlan(m *Milestone) *StudyPlanQuery
- func (c *MilestoneClient) Update() *MilestoneUpdate
- func (c *MilestoneClient) UpdateOne(m *Milestone) *MilestoneUpdateOne
- func (c *MilestoneClient) UpdateOneID(id int) *MilestoneUpdateOne
- func (c *MilestoneClient) Use(hooks ...Hook)
- type MilestoneCreate
- func (mc *MilestoneCreate) Exec(ctx context.Context) error
- func (mc *MilestoneCreate) ExecX(ctx context.Context)
- func (mc *MilestoneCreate) Mutation() *MilestoneMutation
- func (mc *MilestoneCreate) OnConflict(opts ...sql.ConflictOption) *MilestoneUpsertOne
- func (mc *MilestoneCreate) OnConflictColumns(columns ...string) *MilestoneUpsertOne
- func (mc *MilestoneCreate) Save(ctx context.Context) (*Milestone, error)
- func (mc *MilestoneCreate) SaveX(ctx context.Context) *Milestone
- func (mc *MilestoneCreate) SetName(s string) *MilestoneCreate
- func (mc *MilestoneCreate) SetStudyPlan(s *StudyPlan) *MilestoneCreate
- func (mc *MilestoneCreate) SetStudyPlanID(id int) *MilestoneCreate
- func (mc *MilestoneCreate) SetTargetCompletionTime(t time.Time) *MilestoneCreate
- type MilestoneCreateBulk
- func (mcb *MilestoneCreateBulk) Exec(ctx context.Context) error
- func (mcb *MilestoneCreateBulk) ExecX(ctx context.Context)
- func (mcb *MilestoneCreateBulk) OnConflict(opts ...sql.ConflictOption) *MilestoneUpsertBulk
- func (mcb *MilestoneCreateBulk) OnConflictColumns(columns ...string) *MilestoneUpsertBulk
- func (mcb *MilestoneCreateBulk) Save(ctx context.Context) ([]*Milestone, error)
- func (mcb *MilestoneCreateBulk) SaveX(ctx context.Context) []*Milestone
- type MilestoneDelete
- type MilestoneDeleteOne
- type MilestoneEdges
- type MilestoneGroupBy
- func (mgb *MilestoneGroupBy) Aggregate(fns ...AggregateFunc) *MilestoneGroupBy
- func (s *MilestoneGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MilestoneGroupBy) BoolX(ctx context.Context) bool
- func (s *MilestoneGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MilestoneGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MilestoneGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MilestoneGroupBy) Float64X(ctx context.Context) float64
- func (s *MilestoneGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MilestoneGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MilestoneGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MilestoneGroupBy) IntX(ctx context.Context) int
- func (s *MilestoneGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MilestoneGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MilestoneGroupBy) Scan(ctx context.Context, v any) error
- func (s *MilestoneGroupBy) ScanX(ctx context.Context, v any)
- func (s *MilestoneGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MilestoneGroupBy) StringX(ctx context.Context) string
- func (s *MilestoneGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MilestoneGroupBy) StringsX(ctx context.Context) []string
- type MilestoneMutation
- func (m *MilestoneMutation) AddField(name string, value ent.Value) error
- func (m *MilestoneMutation) AddedEdges() []string
- func (m *MilestoneMutation) AddedField(name string) (ent.Value, bool)
- func (m *MilestoneMutation) AddedFields() []string
- func (m *MilestoneMutation) AddedIDs(name string) []ent.Value
- func (m *MilestoneMutation) ClearEdge(name string) error
- func (m *MilestoneMutation) ClearField(name string) error
- func (m *MilestoneMutation) ClearStudyPlan()
- func (m *MilestoneMutation) ClearedEdges() []string
- func (m *MilestoneMutation) ClearedFields() []string
- func (m MilestoneMutation) Client() *Client
- func (m *MilestoneMutation) EdgeCleared(name string) bool
- func (m *MilestoneMutation) Field(name string) (ent.Value, bool)
- func (m *MilestoneMutation) FieldCleared(name string) bool
- func (m *MilestoneMutation) Fields() []string
- func (m *MilestoneMutation) ID() (id int, exists bool)
- func (m *MilestoneMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MilestoneMutation) Name() (r string, exists bool)
- func (m *MilestoneMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MilestoneMutation) OldName(ctx context.Context) (v string, err error)
- func (m *MilestoneMutation) OldTargetCompletionTime(ctx context.Context) (v time.Time, err error)
- func (m *MilestoneMutation) Op() Op
- func (m *MilestoneMutation) RemovedEdges() []string
- func (m *MilestoneMutation) RemovedIDs(name string) []ent.Value
- func (m *MilestoneMutation) ResetEdge(name string) error
- func (m *MilestoneMutation) ResetField(name string) error
- func (m *MilestoneMutation) ResetName()
- func (m *MilestoneMutation) ResetStudyPlan()
- func (m *MilestoneMutation) ResetTargetCompletionTime()
- func (m *MilestoneMutation) SetField(name string, value ent.Value) error
- func (m *MilestoneMutation) SetName(s string)
- func (m *MilestoneMutation) SetOp(op Op)
- func (m *MilestoneMutation) SetStudyPlanID(id int)
- func (m *MilestoneMutation) SetTargetCompletionTime(t time.Time)
- func (m *MilestoneMutation) StudyPlanCleared() bool
- func (m *MilestoneMutation) StudyPlanID() (id int, exists bool)
- func (m *MilestoneMutation) StudyPlanIDs() (ids []int)
- func (m *MilestoneMutation) TargetCompletionTime() (r time.Time, exists bool)
- func (m MilestoneMutation) Tx() (*Tx, error)
- func (m *MilestoneMutation) Type() string
- func (m *MilestoneMutation) Where(ps ...predicate.Milestone)
- func (m *MilestoneMutation) WhereP(ps ...func(*sql.Selector))
- type MilestoneQuery
- func (mq *MilestoneQuery) Aggregate(fns ...AggregateFunc) *MilestoneSelect
- func (mq *MilestoneQuery) All(ctx context.Context) ([]*Milestone, error)
- func (mq *MilestoneQuery) AllX(ctx context.Context) []*Milestone
- func (mq *MilestoneQuery) Clone() *MilestoneQuery
- func (mq *MilestoneQuery) Count(ctx context.Context) (int, error)
- func (mq *MilestoneQuery) CountX(ctx context.Context) int
- func (mq *MilestoneQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MilestoneQuery) ExistX(ctx context.Context) bool
- func (mq *MilestoneQuery) First(ctx context.Context) (*Milestone, error)
- func (mq *MilestoneQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MilestoneQuery) FirstIDX(ctx context.Context) int
- func (mq *MilestoneQuery) FirstX(ctx context.Context) *Milestone
- func (mq *MilestoneQuery) GroupBy(field string, fields ...string) *MilestoneGroupBy
- func (mq *MilestoneQuery) IDs(ctx context.Context) (ids []int, err error)
- func (mq *MilestoneQuery) IDsX(ctx context.Context) []int
- func (mq *MilestoneQuery) Limit(limit int) *MilestoneQuery
- func (mq *MilestoneQuery) Offset(offset int) *MilestoneQuery
- func (mq *MilestoneQuery) Only(ctx context.Context) (*Milestone, error)
- func (mq *MilestoneQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MilestoneQuery) OnlyIDX(ctx context.Context) int
- func (mq *MilestoneQuery) OnlyX(ctx context.Context) *Milestone
- func (mq *MilestoneQuery) Order(o ...milestone.OrderOption) *MilestoneQuery
- func (mq *MilestoneQuery) QueryStudyPlan() *StudyPlanQuery
- func (mq *MilestoneQuery) Select(fields ...string) *MilestoneSelect
- func (mq *MilestoneQuery) Unique(unique bool) *MilestoneQuery
- func (mq *MilestoneQuery) Where(ps ...predicate.Milestone) *MilestoneQuery
- func (mq *MilestoneQuery) WithStudyPlan(opts ...func(*StudyPlanQuery)) *MilestoneQuery
- type MilestoneSelect
- func (ms *MilestoneSelect) Aggregate(fns ...AggregateFunc) *MilestoneSelect
- func (s *MilestoneSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MilestoneSelect) BoolX(ctx context.Context) bool
- func (s *MilestoneSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MilestoneSelect) BoolsX(ctx context.Context) []bool
- func (s *MilestoneSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MilestoneSelect) Float64X(ctx context.Context) float64
- func (s *MilestoneSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MilestoneSelect) Float64sX(ctx context.Context) []float64
- func (s *MilestoneSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MilestoneSelect) IntX(ctx context.Context) int
- func (s *MilestoneSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MilestoneSelect) IntsX(ctx context.Context) []int
- func (ms *MilestoneSelect) Scan(ctx context.Context, v any) error
- func (s *MilestoneSelect) ScanX(ctx context.Context, v any)
- func (s *MilestoneSelect) String(ctx context.Context) (_ string, err error)
- func (s *MilestoneSelect) StringX(ctx context.Context) string
- func (s *MilestoneSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MilestoneSelect) StringsX(ctx context.Context) []string
- type MilestoneUpdate
- func (mu *MilestoneUpdate) ClearStudyPlan() *MilestoneUpdate
- func (mu *MilestoneUpdate) Exec(ctx context.Context) error
- func (mu *MilestoneUpdate) ExecX(ctx context.Context)
- func (mu *MilestoneUpdate) Mutation() *MilestoneMutation
- func (mu *MilestoneUpdate) Save(ctx context.Context) (int, error)
- func (mu *MilestoneUpdate) SaveX(ctx context.Context) int
- func (mu *MilestoneUpdate) SetName(s string) *MilestoneUpdate
- func (mu *MilestoneUpdate) SetStudyPlan(s *StudyPlan) *MilestoneUpdate
- func (mu *MilestoneUpdate) SetStudyPlanID(id int) *MilestoneUpdate
- func (mu *MilestoneUpdate) SetTargetCompletionTime(t time.Time) *MilestoneUpdate
- func (mu *MilestoneUpdate) Where(ps ...predicate.Milestone) *MilestoneUpdate
- type MilestoneUpdateOne
- func (muo *MilestoneUpdateOne) ClearStudyPlan() *MilestoneUpdateOne
- func (muo *MilestoneUpdateOne) Exec(ctx context.Context) error
- func (muo *MilestoneUpdateOne) ExecX(ctx context.Context)
- func (muo *MilestoneUpdateOne) Mutation() *MilestoneMutation
- func (muo *MilestoneUpdateOne) Save(ctx context.Context) (*Milestone, error)
- func (muo *MilestoneUpdateOne) SaveX(ctx context.Context) *Milestone
- func (muo *MilestoneUpdateOne) Select(field string, fields ...string) *MilestoneUpdateOne
- func (muo *MilestoneUpdateOne) SetName(s string) *MilestoneUpdateOne
- func (muo *MilestoneUpdateOne) SetStudyPlan(s *StudyPlan) *MilestoneUpdateOne
- func (muo *MilestoneUpdateOne) SetStudyPlanID(id int) *MilestoneUpdateOne
- func (muo *MilestoneUpdateOne) SetTargetCompletionTime(t time.Time) *MilestoneUpdateOne
- func (muo *MilestoneUpdateOne) Where(ps ...predicate.Milestone) *MilestoneUpdateOne
- type MilestoneUpsert
- type MilestoneUpsertBulk
- func (u *MilestoneUpsertBulk) DoNothing() *MilestoneUpsertBulk
- func (u *MilestoneUpsertBulk) Exec(ctx context.Context) error
- func (u *MilestoneUpsertBulk) ExecX(ctx context.Context)
- func (u *MilestoneUpsertBulk) Ignore() *MilestoneUpsertBulk
- func (u *MilestoneUpsertBulk) SetName(v string) *MilestoneUpsertBulk
- func (u *MilestoneUpsertBulk) SetTargetCompletionTime(v time.Time) *MilestoneUpsertBulk
- func (u *MilestoneUpsertBulk) Update(set func(*MilestoneUpsert)) *MilestoneUpsertBulk
- func (u *MilestoneUpsertBulk) UpdateName() *MilestoneUpsertBulk
- func (u *MilestoneUpsertBulk) UpdateNewValues() *MilestoneUpsertBulk
- func (u *MilestoneUpsertBulk) UpdateTargetCompletionTime() *MilestoneUpsertBulk
- type MilestoneUpsertOne
- func (u *MilestoneUpsertOne) DoNothing() *MilestoneUpsertOne
- func (u *MilestoneUpsertOne) Exec(ctx context.Context) error
- func (u *MilestoneUpsertOne) ExecX(ctx context.Context)
- func (u *MilestoneUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *MilestoneUpsertOne) IDX(ctx context.Context) int
- func (u *MilestoneUpsertOne) Ignore() *MilestoneUpsertOne
- func (u *MilestoneUpsertOne) SetName(v string) *MilestoneUpsertOne
- func (u *MilestoneUpsertOne) SetTargetCompletionTime(v time.Time) *MilestoneUpsertOne
- func (u *MilestoneUpsertOne) Update(set func(*MilestoneUpsert)) *MilestoneUpsertOne
- func (u *MilestoneUpsertOne) UpdateName() *MilestoneUpsertOne
- func (u *MilestoneUpsertOne) UpdateNewValues() *MilestoneUpsertOne
- func (u *MilestoneUpsertOne) UpdateTargetCompletionTime() *MilestoneUpsertOne
- type Milestones
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Pet
- type PetClient
- func (c *PetClient) Create() *PetCreate
- func (c *PetClient) CreateBulk(builders ...*PetCreate) *PetCreateBulk
- func (c *PetClient) Delete() *PetDelete
- func (c *PetClient) DeleteOne(pe *Pet) *PetDeleteOne
- func (c *PetClient) DeleteOneID(id int) *PetDeleteOne
- func (c *PetClient) Get(ctx context.Context, id int) (*Pet, error)
- func (c *PetClient) GetX(ctx context.Context, id int) *Pet
- func (c *PetClient) Hooks() []Hook
- func (c *PetClient) Intercept(interceptors ...Interceptor)
- func (c *PetClient) Interceptors() []Interceptor
- func (c *PetClient) Query() *PetQuery
- func (c *PetClient) QueryOwner(pe *Pet) *UserQuery
- func (c *PetClient) QueryUserPets(pe *Pet) *UserPetQuery
- func (c *PetClient) Update() *PetUpdate
- func (c *PetClient) UpdateOne(pe *Pet) *PetUpdateOne
- func (c *PetClient) UpdateOneID(id int) *PetUpdateOne
- func (c *PetClient) Use(hooks ...Hook)
- type PetCreate
- func (pc *PetCreate) AddOwner(u ...*User) *PetCreate
- func (pc *PetCreate) AddOwnerIDs(ids ...int) *PetCreate
- func (pc *PetCreate) Exec(ctx context.Context) error
- func (pc *PetCreate) ExecX(ctx context.Context)
- func (pc *PetCreate) Mutation() *PetMutation
- func (pc *PetCreate) OnConflict(opts ...sql.ConflictOption) *PetUpsertOne
- func (pc *PetCreate) OnConflictColumns(columns ...string) *PetUpsertOne
- func (pc *PetCreate) Save(ctx context.Context) (*Pet, error)
- func (pc *PetCreate) SaveX(ctx context.Context) *Pet
- func (pc *PetCreate) SetName(s string) *PetCreate
- func (pc *PetCreate) SetSvgRaw(s string) *PetCreate
- type PetCreateBulk
- func (pcb *PetCreateBulk) Exec(ctx context.Context) error
- func (pcb *PetCreateBulk) ExecX(ctx context.Context)
- func (pcb *PetCreateBulk) OnConflict(opts ...sql.ConflictOption) *PetUpsertBulk
- func (pcb *PetCreateBulk) OnConflictColumns(columns ...string) *PetUpsertBulk
- func (pcb *PetCreateBulk) Save(ctx context.Context) ([]*Pet, error)
- func (pcb *PetCreateBulk) SaveX(ctx context.Context) []*Pet
- type PetDelete
- type PetDeleteOne
- type PetEdges
- type PetGroupBy
- func (pgb *PetGroupBy) Aggregate(fns ...AggregateFunc) *PetGroupBy
- func (s *PetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PetGroupBy) BoolX(ctx context.Context) bool
- func (s *PetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PetGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PetGroupBy) Float64X(ctx context.Context) float64
- func (s *PetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PetGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PetGroupBy) IntX(ctx context.Context) int
- func (s *PetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PetGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PetGroupBy) Scan(ctx context.Context, v any) error
- func (s *PetGroupBy) ScanX(ctx context.Context, v any)
- func (s *PetGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PetGroupBy) StringX(ctx context.Context) string
- func (s *PetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PetGroupBy) StringsX(ctx context.Context) []string
- type PetMutation
- func (m *PetMutation) AddField(name string, value ent.Value) error
- func (m *PetMutation) AddOwnerIDs(ids ...int)
- func (m *PetMutation) AddedEdges() []string
- func (m *PetMutation) AddedField(name string) (ent.Value, bool)
- func (m *PetMutation) AddedFields() []string
- func (m *PetMutation) AddedIDs(name string) []ent.Value
- func (m *PetMutation) ClearEdge(name string) error
- func (m *PetMutation) ClearField(name string) error
- func (m *PetMutation) ClearOwner()
- func (m *PetMutation) ClearedEdges() []string
- func (m *PetMutation) ClearedFields() []string
- func (m PetMutation) Client() *Client
- func (m *PetMutation) EdgeCleared(name string) bool
- func (m *PetMutation) Field(name string) (ent.Value, bool)
- func (m *PetMutation) FieldCleared(name string) bool
- func (m *PetMutation) Fields() []string
- func (m *PetMutation) ID() (id int, exists bool)
- func (m *PetMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PetMutation) Name() (r string, exists bool)
- func (m *PetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PetMutation) OldName(ctx context.Context) (v string, err error)
- func (m *PetMutation) OldSvgRaw(ctx context.Context) (v string, err error)
- func (m *PetMutation) Op() Op
- func (m *PetMutation) OwnerCleared() bool
- func (m *PetMutation) OwnerIDs() (ids []int)
- func (m *PetMutation) RemoveOwnerIDs(ids ...int)
- func (m *PetMutation) RemovedEdges() []string
- func (m *PetMutation) RemovedIDs(name string) []ent.Value
- func (m *PetMutation) RemovedOwnerIDs() (ids []int)
- func (m *PetMutation) ResetEdge(name string) error
- func (m *PetMutation) ResetField(name string) error
- func (m *PetMutation) ResetName()
- func (m *PetMutation) ResetOwner()
- func (m *PetMutation) ResetSvgRaw()
- func (m *PetMutation) SetField(name string, value ent.Value) error
- func (m *PetMutation) SetName(s string)
- func (m *PetMutation) SetOp(op Op)
- func (m *PetMutation) SetSvgRaw(s string)
- func (m *PetMutation) SvgRaw() (r string, exists bool)
- func (m PetMutation) Tx() (*Tx, error)
- func (m *PetMutation) Type() string
- func (m *PetMutation) Where(ps ...predicate.Pet)
- func (m *PetMutation) WhereP(ps ...func(*sql.Selector))
- type PetQuery
- func (pq *PetQuery) Aggregate(fns ...AggregateFunc) *PetSelect
- func (pq *PetQuery) All(ctx context.Context) ([]*Pet, error)
- func (pq *PetQuery) AllX(ctx context.Context) []*Pet
- func (pq *PetQuery) Clone() *PetQuery
- func (pq *PetQuery) Count(ctx context.Context) (int, error)
- func (pq *PetQuery) CountX(ctx context.Context) int
- func (pq *PetQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PetQuery) ExistX(ctx context.Context) bool
- func (pq *PetQuery) First(ctx context.Context) (*Pet, error)
- func (pq *PetQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *PetQuery) FirstIDX(ctx context.Context) int
- func (pq *PetQuery) FirstX(ctx context.Context) *Pet
- func (pq *PetQuery) GroupBy(field string, fields ...string) *PetGroupBy
- func (pq *PetQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pq *PetQuery) IDsX(ctx context.Context) []int
- func (pq *PetQuery) Limit(limit int) *PetQuery
- func (pq *PetQuery) Offset(offset int) *PetQuery
- func (pq *PetQuery) Only(ctx context.Context) (*Pet, error)
- func (pq *PetQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *PetQuery) OnlyIDX(ctx context.Context) int
- func (pq *PetQuery) OnlyX(ctx context.Context) *Pet
- func (pq *PetQuery) Order(o ...pet.OrderOption) *PetQuery
- func (pq *PetQuery) QueryOwner() *UserQuery
- func (pq *PetQuery) QueryUserPets() *UserPetQuery
- func (pq *PetQuery) Select(fields ...string) *PetSelect
- func (pq *PetQuery) Unique(unique bool) *PetQuery
- func (pq *PetQuery) Where(ps ...predicate.Pet) *PetQuery
- func (pq *PetQuery) WithOwner(opts ...func(*UserQuery)) *PetQuery
- func (pq *PetQuery) WithUserPets(opts ...func(*UserPetQuery)) *PetQuery
- type PetSelect
- func (ps *PetSelect) Aggregate(fns ...AggregateFunc) *PetSelect
- func (s *PetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PetSelect) BoolX(ctx context.Context) bool
- func (s *PetSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PetSelect) BoolsX(ctx context.Context) []bool
- func (s *PetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PetSelect) Float64X(ctx context.Context) float64
- func (s *PetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PetSelect) Float64sX(ctx context.Context) []float64
- func (s *PetSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PetSelect) IntX(ctx context.Context) int
- func (s *PetSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PetSelect) IntsX(ctx context.Context) []int
- func (ps *PetSelect) Scan(ctx context.Context, v any) error
- func (s *PetSelect) ScanX(ctx context.Context, v any)
- func (s *PetSelect) String(ctx context.Context) (_ string, err error)
- func (s *PetSelect) StringX(ctx context.Context) string
- func (s *PetSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PetSelect) StringsX(ctx context.Context) []string
- type PetUpdate
- func (pu *PetUpdate) AddOwner(u ...*User) *PetUpdate
- func (pu *PetUpdate) AddOwnerIDs(ids ...int) *PetUpdate
- func (pu *PetUpdate) ClearOwner() *PetUpdate
- func (pu *PetUpdate) Exec(ctx context.Context) error
- func (pu *PetUpdate) ExecX(ctx context.Context)
- func (pu *PetUpdate) Mutation() *PetMutation
- func (pu *PetUpdate) RemoveOwner(u ...*User) *PetUpdate
- func (pu *PetUpdate) RemoveOwnerIDs(ids ...int) *PetUpdate
- func (pu *PetUpdate) Save(ctx context.Context) (int, error)
- func (pu *PetUpdate) SaveX(ctx context.Context) int
- func (pu *PetUpdate) SetName(s string) *PetUpdate
- func (pu *PetUpdate) SetSvgRaw(s string) *PetUpdate
- func (pu *PetUpdate) Where(ps ...predicate.Pet) *PetUpdate
- type PetUpdateOne
- func (puo *PetUpdateOne) AddOwner(u ...*User) *PetUpdateOne
- func (puo *PetUpdateOne) AddOwnerIDs(ids ...int) *PetUpdateOne
- func (puo *PetUpdateOne) ClearOwner() *PetUpdateOne
- func (puo *PetUpdateOne) Exec(ctx context.Context) error
- func (puo *PetUpdateOne) ExecX(ctx context.Context)
- func (puo *PetUpdateOne) Mutation() *PetMutation
- func (puo *PetUpdateOne) RemoveOwner(u ...*User) *PetUpdateOne
- func (puo *PetUpdateOne) RemoveOwnerIDs(ids ...int) *PetUpdateOne
- func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error)
- func (puo *PetUpdateOne) SaveX(ctx context.Context) *Pet
- func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne
- func (puo *PetUpdateOne) SetName(s string) *PetUpdateOne
- func (puo *PetUpdateOne) SetSvgRaw(s string) *PetUpdateOne
- func (puo *PetUpdateOne) Where(ps ...predicate.Pet) *PetUpdateOne
- type PetUpsert
- type PetUpsertBulk
- func (u *PetUpsertBulk) DoNothing() *PetUpsertBulk
- func (u *PetUpsertBulk) Exec(ctx context.Context) error
- func (u *PetUpsertBulk) ExecX(ctx context.Context)
- func (u *PetUpsertBulk) Ignore() *PetUpsertBulk
- func (u *PetUpsertBulk) SetName(v string) *PetUpsertBulk
- func (u *PetUpsertBulk) SetSvgRaw(v string) *PetUpsertBulk
- func (u *PetUpsertBulk) Update(set func(*PetUpsert)) *PetUpsertBulk
- func (u *PetUpsertBulk) UpdateName() *PetUpsertBulk
- func (u *PetUpsertBulk) UpdateNewValues() *PetUpsertBulk
- func (u *PetUpsertBulk) UpdateSvgRaw() *PetUpsertBulk
- type PetUpsertOne
- func (u *PetUpsertOne) DoNothing() *PetUpsertOne
- func (u *PetUpsertOne) Exec(ctx context.Context) error
- func (u *PetUpsertOne) ExecX(ctx context.Context)
- func (u *PetUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *PetUpsertOne) IDX(ctx context.Context) int
- func (u *PetUpsertOne) Ignore() *PetUpsertOne
- func (u *PetUpsertOne) SetName(v string) *PetUpsertOne
- func (u *PetUpsertOne) SetSvgRaw(v string) *PetUpsertOne
- func (u *PetUpsertOne) Update(set func(*PetUpsert)) *PetUpsertOne
- func (u *PetUpsertOne) UpdateName() *PetUpsertOne
- func (u *PetUpsertOne) UpdateNewValues() *PetUpsertOne
- func (u *PetUpsertOne) UpdateSvgRaw() *PetUpsertOne
- type Pets
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Reaction
- type ReactionClient
- func (c *ReactionClient) Create() *ReactionCreate
- func (c *ReactionClient) CreateBulk(builders ...*ReactionCreate) *ReactionCreateBulk
- func (c *ReactionClient) Delete() *ReactionDelete
- func (c *ReactionClient) Hooks() []Hook
- func (c *ReactionClient) Intercept(interceptors ...Interceptor)
- func (c *ReactionClient) Interceptors() []Interceptor
- func (c *ReactionClient) Query() *ReactionQuery
- func (c *ReactionClient) QueryForumPost(r *Reaction) *ForumPostQuery
- func (c *ReactionClient) QueryUser(r *Reaction) *UserQuery
- func (c *ReactionClient) Update() *ReactionUpdate
- func (c *ReactionClient) UpdateOne(r *Reaction) *ReactionUpdateOne
- func (c *ReactionClient) Use(hooks ...Hook)
- type ReactionCreate
- func (rc *ReactionCreate) Exec(ctx context.Context) error
- func (rc *ReactionCreate) ExecX(ctx context.Context)
- func (rc *ReactionCreate) Mutation() *ReactionMutation
- func (rc *ReactionCreate) OnConflict(opts ...sql.ConflictOption) *ReactionUpsertOne
- func (rc *ReactionCreate) OnConflictColumns(columns ...string) *ReactionUpsertOne
- func (rc *ReactionCreate) Save(ctx context.Context) (*Reaction, error)
- func (rc *ReactionCreate) SaveX(ctx context.Context) *Reaction
- func (rc *ReactionCreate) SetEmoji(s string) *ReactionCreate
- func (rc *ReactionCreate) SetForumPost(f *ForumPost) *ReactionCreate
- func (rc *ReactionCreate) SetForumPostID(i int) *ReactionCreate
- func (rc *ReactionCreate) SetUser(u *User) *ReactionCreate
- func (rc *ReactionCreate) SetUserID(i int) *ReactionCreate
- type ReactionCreateBulk
- func (rcb *ReactionCreateBulk) Exec(ctx context.Context) error
- func (rcb *ReactionCreateBulk) ExecX(ctx context.Context)
- func (rcb *ReactionCreateBulk) OnConflict(opts ...sql.ConflictOption) *ReactionUpsertBulk
- func (rcb *ReactionCreateBulk) OnConflictColumns(columns ...string) *ReactionUpsertBulk
- func (rcb *ReactionCreateBulk) Save(ctx context.Context) ([]*Reaction, error)
- func (rcb *ReactionCreateBulk) SaveX(ctx context.Context) []*Reaction
- type ReactionDelete
- type ReactionDeleteOne
- type ReactionEdges
- type ReactionGroupBy
- func (rgb *ReactionGroupBy) Aggregate(fns ...AggregateFunc) *ReactionGroupBy
- func (s *ReactionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReactionGroupBy) BoolX(ctx context.Context) bool
- func (s *ReactionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ReactionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ReactionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReactionGroupBy) Float64X(ctx context.Context) float64
- func (s *ReactionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReactionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ReactionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ReactionGroupBy) IntX(ctx context.Context) int
- func (s *ReactionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ReactionGroupBy) IntsX(ctx context.Context) []int
- func (rgb *ReactionGroupBy) Scan(ctx context.Context, v any) error
- func (s *ReactionGroupBy) ScanX(ctx context.Context, v any)
- func (s *ReactionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ReactionGroupBy) StringX(ctx context.Context) string
- func (s *ReactionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ReactionGroupBy) StringsX(ctx context.Context) []string
- type ReactionMutation
- func (m *ReactionMutation) AddField(name string, value ent.Value) error
- func (m *ReactionMutation) AddedEdges() []string
- func (m *ReactionMutation) AddedField(name string) (ent.Value, bool)
- func (m *ReactionMutation) AddedFields() []string
- func (m *ReactionMutation) AddedIDs(name string) []ent.Value
- func (m *ReactionMutation) ClearEdge(name string) error
- func (m *ReactionMutation) ClearField(name string) error
- func (m *ReactionMutation) ClearForumPost()
- func (m *ReactionMutation) ClearUser()
- func (m *ReactionMutation) ClearedEdges() []string
- func (m *ReactionMutation) ClearedFields() []string
- func (m ReactionMutation) Client() *Client
- func (m *ReactionMutation) EdgeCleared(name string) bool
- func (m *ReactionMutation) Emoji() (r string, exists bool)
- func (m *ReactionMutation) Field(name string) (ent.Value, bool)
- func (m *ReactionMutation) FieldCleared(name string) bool
- func (m *ReactionMutation) Fields() []string
- func (m *ReactionMutation) ForumPostCleared() bool
- func (m *ReactionMutation) ForumPostID() (r int, exists bool)
- func (m *ReactionMutation) ForumPostIDs() (ids []int)
- func (m *ReactionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ReactionMutation) Op() Op
- func (m *ReactionMutation) RemovedEdges() []string
- func (m *ReactionMutation) RemovedIDs(name string) []ent.Value
- func (m *ReactionMutation) ResetEdge(name string) error
- func (m *ReactionMutation) ResetEmoji()
- func (m *ReactionMutation) ResetField(name string) error
- func (m *ReactionMutation) ResetForumPost()
- func (m *ReactionMutation) ResetForumPostID()
- func (m *ReactionMutation) ResetUser()
- func (m *ReactionMutation) ResetUserID()
- func (m *ReactionMutation) SetEmoji(s string)
- func (m *ReactionMutation) SetField(name string, value ent.Value) error
- func (m *ReactionMutation) SetForumPostID(i int)
- func (m *ReactionMutation) SetOp(op Op)
- func (m *ReactionMutation) SetUserID(i int)
- func (m ReactionMutation) Tx() (*Tx, error)
- func (m *ReactionMutation) Type() string
- func (m *ReactionMutation) UserCleared() bool
- func (m *ReactionMutation) UserID() (r int, exists bool)
- func (m *ReactionMutation) UserIDs() (ids []int)
- func (m *ReactionMutation) Where(ps ...predicate.Reaction)
- func (m *ReactionMutation) WhereP(ps ...func(*sql.Selector))
- type ReactionQuery
- func (rq *ReactionQuery) Aggregate(fns ...AggregateFunc) *ReactionSelect
- func (rq *ReactionQuery) All(ctx context.Context) ([]*Reaction, error)
- func (rq *ReactionQuery) AllX(ctx context.Context) []*Reaction
- func (rq *ReactionQuery) Clone() *ReactionQuery
- func (rq *ReactionQuery) Count(ctx context.Context) (int, error)
- func (rq *ReactionQuery) CountX(ctx context.Context) int
- func (rq *ReactionQuery) Exist(ctx context.Context) (bool, error)
- func (rq *ReactionQuery) ExistX(ctx context.Context) bool
- func (rq *ReactionQuery) First(ctx context.Context) (*Reaction, error)
- func (rq *ReactionQuery) FirstX(ctx context.Context) *Reaction
- func (rq *ReactionQuery) GroupBy(field string, fields ...string) *ReactionGroupBy
- func (rq *ReactionQuery) Limit(limit int) *ReactionQuery
- func (rq *ReactionQuery) Offset(offset int) *ReactionQuery
- func (rq *ReactionQuery) Only(ctx context.Context) (*Reaction, error)
- func (rq *ReactionQuery) OnlyX(ctx context.Context) *Reaction
- func (rq *ReactionQuery) Order(o ...reaction.OrderOption) *ReactionQuery
- func (rq *ReactionQuery) QueryForumPost() *ForumPostQuery
- func (rq *ReactionQuery) QueryUser() *UserQuery
- func (rq *ReactionQuery) Select(fields ...string) *ReactionSelect
- func (rq *ReactionQuery) Unique(unique bool) *ReactionQuery
- func (rq *ReactionQuery) Where(ps ...predicate.Reaction) *ReactionQuery
- func (rq *ReactionQuery) WithForumPost(opts ...func(*ForumPostQuery)) *ReactionQuery
- func (rq *ReactionQuery) WithUser(opts ...func(*UserQuery)) *ReactionQuery
- type ReactionSelect
- func (rs *ReactionSelect) Aggregate(fns ...AggregateFunc) *ReactionSelect
- func (s *ReactionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ReactionSelect) BoolX(ctx context.Context) bool
- func (s *ReactionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ReactionSelect) BoolsX(ctx context.Context) []bool
- func (s *ReactionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ReactionSelect) Float64X(ctx context.Context) float64
- func (s *ReactionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ReactionSelect) Float64sX(ctx context.Context) []float64
- func (s *ReactionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ReactionSelect) IntX(ctx context.Context) int
- func (s *ReactionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ReactionSelect) IntsX(ctx context.Context) []int
- func (rs *ReactionSelect) Scan(ctx context.Context, v any) error
- func (s *ReactionSelect) ScanX(ctx context.Context, v any)
- func (s *ReactionSelect) String(ctx context.Context) (_ string, err error)
- func (s *ReactionSelect) StringX(ctx context.Context) string
- func (s *ReactionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ReactionSelect) StringsX(ctx context.Context) []string
- type ReactionUpdate
- func (ru *ReactionUpdate) ClearForumPost() *ReactionUpdate
- func (ru *ReactionUpdate) ClearUser() *ReactionUpdate
- func (ru *ReactionUpdate) Exec(ctx context.Context) error
- func (ru *ReactionUpdate) ExecX(ctx context.Context)
- func (ru *ReactionUpdate) Mutation() *ReactionMutation
- func (ru *ReactionUpdate) Save(ctx context.Context) (int, error)
- func (ru *ReactionUpdate) SaveX(ctx context.Context) int
- func (ru *ReactionUpdate) SetEmoji(s string) *ReactionUpdate
- func (ru *ReactionUpdate) SetForumPost(f *ForumPost) *ReactionUpdate
- func (ru *ReactionUpdate) SetForumPostID(i int) *ReactionUpdate
- func (ru *ReactionUpdate) SetUser(u *User) *ReactionUpdate
- func (ru *ReactionUpdate) SetUserID(i int) *ReactionUpdate
- func (ru *ReactionUpdate) Where(ps ...predicate.Reaction) *ReactionUpdate
- type ReactionUpdateOne
- func (ruo *ReactionUpdateOne) ClearForumPost() *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) ClearUser() *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) Exec(ctx context.Context) error
- func (ruo *ReactionUpdateOne) ExecX(ctx context.Context)
- func (ruo *ReactionUpdateOne) Mutation() *ReactionMutation
- func (ruo *ReactionUpdateOne) Save(ctx context.Context) (*Reaction, error)
- func (ruo *ReactionUpdateOne) SaveX(ctx context.Context) *Reaction
- func (ruo *ReactionUpdateOne) Select(field string, fields ...string) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetEmoji(s string) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetForumPost(f *ForumPost) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetForumPostID(i int) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetUser(u *User) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) SetUserID(i int) *ReactionUpdateOne
- func (ruo *ReactionUpdateOne) Where(ps ...predicate.Reaction) *ReactionUpdateOne
- type ReactionUpsert
- func (u *ReactionUpsert) SetEmoji(v string) *ReactionUpsert
- func (u *ReactionUpsert) SetForumPostID(v int) *ReactionUpsert
- func (u *ReactionUpsert) SetUserID(v int) *ReactionUpsert
- func (u *ReactionUpsert) UpdateEmoji() *ReactionUpsert
- func (u *ReactionUpsert) UpdateForumPostID() *ReactionUpsert
- func (u *ReactionUpsert) UpdateUserID() *ReactionUpsert
- type ReactionUpsertBulk
- func (u *ReactionUpsertBulk) DoNothing() *ReactionUpsertBulk
- func (u *ReactionUpsertBulk) Exec(ctx context.Context) error
- func (u *ReactionUpsertBulk) ExecX(ctx context.Context)
- func (u *ReactionUpsertBulk) Ignore() *ReactionUpsertBulk
- func (u *ReactionUpsertBulk) SetEmoji(v string) *ReactionUpsertBulk
- func (u *ReactionUpsertBulk) SetForumPostID(v int) *ReactionUpsertBulk
- func (u *ReactionUpsertBulk) SetUserID(v int) *ReactionUpsertBulk
- func (u *ReactionUpsertBulk) Update(set func(*ReactionUpsert)) *ReactionUpsertBulk
- func (u *ReactionUpsertBulk) UpdateEmoji() *ReactionUpsertBulk
- func (u *ReactionUpsertBulk) UpdateForumPostID() *ReactionUpsertBulk
- func (u *ReactionUpsertBulk) UpdateNewValues() *ReactionUpsertBulk
- func (u *ReactionUpsertBulk) UpdateUserID() *ReactionUpsertBulk
- type ReactionUpsertOne
- func (u *ReactionUpsertOne) DoNothing() *ReactionUpsertOne
- func (u *ReactionUpsertOne) Exec(ctx context.Context) error
- func (u *ReactionUpsertOne) ExecX(ctx context.Context)
- func (u *ReactionUpsertOne) Ignore() *ReactionUpsertOne
- func (u *ReactionUpsertOne) SetEmoji(v string) *ReactionUpsertOne
- func (u *ReactionUpsertOne) SetForumPostID(v int) *ReactionUpsertOne
- func (u *ReactionUpsertOne) SetUserID(v int) *ReactionUpsertOne
- func (u *ReactionUpsertOne) Update(set func(*ReactionUpsert)) *ReactionUpsertOne
- func (u *ReactionUpsertOne) UpdateEmoji() *ReactionUpsertOne
- func (u *ReactionUpsertOne) UpdateForumPostID() *ReactionUpsertOne
- func (u *ReactionUpsertOne) UpdateNewValues() *ReactionUpsertOne
- func (u *ReactionUpsertOne) UpdateUserID() *ReactionUpsertOne
- type Reactions
- type Redemption
- func (r *Redemption) QueryAccessory() *AccessoryQuery
- func (r *Redemption) QueryUser() *UserQuery
- func (r *Redemption) QueryVoucher() *VoucherQuery
- func (r *Redemption) String() string
- func (r *Redemption) Unwrap() *Redemption
- func (r *Redemption) Update() *RedemptionUpdateOne
- func (r *Redemption) Value(name string) (ent.Value, error)
- type RedemptionClient
- func (c *RedemptionClient) Create() *RedemptionCreate
- func (c *RedemptionClient) CreateBulk(builders ...*RedemptionCreate) *RedemptionCreateBulk
- func (c *RedemptionClient) Delete() *RedemptionDelete
- func (c *RedemptionClient) DeleteOne(r *Redemption) *RedemptionDeleteOne
- func (c *RedemptionClient) DeleteOneID(id int) *RedemptionDeleteOne
- func (c *RedemptionClient) Get(ctx context.Context, id int) (*Redemption, error)
- func (c *RedemptionClient) GetX(ctx context.Context, id int) *Redemption
- func (c *RedemptionClient) Hooks() []Hook
- func (c *RedemptionClient) Intercept(interceptors ...Interceptor)
- func (c *RedemptionClient) Interceptors() []Interceptor
- func (c *RedemptionClient) Query() *RedemptionQuery
- func (c *RedemptionClient) QueryAccessory(r *Redemption) *AccessoryQuery
- func (c *RedemptionClient) QueryUser(r *Redemption) *UserQuery
- func (c *RedemptionClient) QueryVoucher(r *Redemption) *VoucherQuery
- func (c *RedemptionClient) Update() *RedemptionUpdate
- func (c *RedemptionClient) UpdateOne(r *Redemption) *RedemptionUpdateOne
- func (c *RedemptionClient) UpdateOneID(id int) *RedemptionUpdateOne
- func (c *RedemptionClient) Use(hooks ...Hook)
- type RedemptionCreate
- func (rc *RedemptionCreate) Exec(ctx context.Context) error
- func (rc *RedemptionCreate) ExecX(ctx context.Context)
- func (rc *RedemptionCreate) Mutation() *RedemptionMutation
- func (rc *RedemptionCreate) OnConflict(opts ...sql.ConflictOption) *RedemptionUpsertOne
- func (rc *RedemptionCreate) OnConflictColumns(columns ...string) *RedemptionUpsertOne
- func (rc *RedemptionCreate) Save(ctx context.Context) (*Redemption, error)
- func (rc *RedemptionCreate) SaveX(ctx context.Context) *Redemption
- func (rc *RedemptionCreate) SetAccessory(a *Accessory) *RedemptionCreate
- func (rc *RedemptionCreate) SetAccessoryID(id int) *RedemptionCreate
- func (rc *RedemptionCreate) SetNillableAccessoryID(id *int) *RedemptionCreate
- func (rc *RedemptionCreate) SetNillableVoucherID(id *int) *RedemptionCreate
- func (rc *RedemptionCreate) SetRedeemedAt(t time.Time) *RedemptionCreate
- func (rc *RedemptionCreate) SetUser(u *User) *RedemptionCreate
- func (rc *RedemptionCreate) SetUserID(id int) *RedemptionCreate
- func (rc *RedemptionCreate) SetVoucher(v *Voucher) *RedemptionCreate
- func (rc *RedemptionCreate) SetVoucherID(id int) *RedemptionCreate
- type RedemptionCreateBulk
- func (rcb *RedemptionCreateBulk) Exec(ctx context.Context) error
- func (rcb *RedemptionCreateBulk) ExecX(ctx context.Context)
- func (rcb *RedemptionCreateBulk) OnConflict(opts ...sql.ConflictOption) *RedemptionUpsertBulk
- func (rcb *RedemptionCreateBulk) OnConflictColumns(columns ...string) *RedemptionUpsertBulk
- func (rcb *RedemptionCreateBulk) Save(ctx context.Context) ([]*Redemption, error)
- func (rcb *RedemptionCreateBulk) SaveX(ctx context.Context) []*Redemption
- type RedemptionDelete
- type RedemptionDeleteOne
- type RedemptionEdges
- type RedemptionGroupBy
- func (rgb *RedemptionGroupBy) Aggregate(fns ...AggregateFunc) *RedemptionGroupBy
- func (s *RedemptionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RedemptionGroupBy) BoolX(ctx context.Context) bool
- func (s *RedemptionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RedemptionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RedemptionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RedemptionGroupBy) Float64X(ctx context.Context) float64
- func (s *RedemptionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RedemptionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RedemptionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RedemptionGroupBy) IntX(ctx context.Context) int
- func (s *RedemptionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RedemptionGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RedemptionGroupBy) Scan(ctx context.Context, v any) error
- func (s *RedemptionGroupBy) ScanX(ctx context.Context, v any)
- func (s *RedemptionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RedemptionGroupBy) StringX(ctx context.Context) string
- func (s *RedemptionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RedemptionGroupBy) StringsX(ctx context.Context) []string
- type RedemptionMutation
- func (m *RedemptionMutation) AccessoryCleared() bool
- func (m *RedemptionMutation) AccessoryID() (id int, exists bool)
- func (m *RedemptionMutation) AccessoryIDs() (ids []int)
- func (m *RedemptionMutation) AddField(name string, value ent.Value) error
- func (m *RedemptionMutation) AddedEdges() []string
- func (m *RedemptionMutation) AddedField(name string) (ent.Value, bool)
- func (m *RedemptionMutation) AddedFields() []string
- func (m *RedemptionMutation) AddedIDs(name string) []ent.Value
- func (m *RedemptionMutation) ClearAccessory()
- func (m *RedemptionMutation) ClearEdge(name string) error
- func (m *RedemptionMutation) ClearField(name string) error
- func (m *RedemptionMutation) ClearUser()
- func (m *RedemptionMutation) ClearVoucher()
- func (m *RedemptionMutation) ClearedEdges() []string
- func (m *RedemptionMutation) ClearedFields() []string
- func (m RedemptionMutation) Client() *Client
- func (m *RedemptionMutation) EdgeCleared(name string) bool
- func (m *RedemptionMutation) Field(name string) (ent.Value, bool)
- func (m *RedemptionMutation) FieldCleared(name string) bool
- func (m *RedemptionMutation) Fields() []string
- func (m *RedemptionMutation) ID() (id int, exists bool)
- func (m *RedemptionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *RedemptionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RedemptionMutation) OldRedeemedAt(ctx context.Context) (v time.Time, err error)
- func (m *RedemptionMutation) Op() Op
- func (m *RedemptionMutation) RedeemedAt() (r time.Time, exists bool)
- func (m *RedemptionMutation) RemovedEdges() []string
- func (m *RedemptionMutation) RemovedIDs(name string) []ent.Value
- func (m *RedemptionMutation) ResetAccessory()
- func (m *RedemptionMutation) ResetEdge(name string) error
- func (m *RedemptionMutation) ResetField(name string) error
- func (m *RedemptionMutation) ResetRedeemedAt()
- func (m *RedemptionMutation) ResetUser()
- func (m *RedemptionMutation) ResetVoucher()
- func (m *RedemptionMutation) SetAccessoryID(id int)
- func (m *RedemptionMutation) SetField(name string, value ent.Value) error
- func (m *RedemptionMutation) SetOp(op Op)
- func (m *RedemptionMutation) SetRedeemedAt(t time.Time)
- func (m *RedemptionMutation) SetUserID(id int)
- func (m *RedemptionMutation) SetVoucherID(id int)
- func (m RedemptionMutation) Tx() (*Tx, error)
- func (m *RedemptionMutation) Type() string
- func (m *RedemptionMutation) UserCleared() bool
- func (m *RedemptionMutation) UserID() (id int, exists bool)
- func (m *RedemptionMutation) UserIDs() (ids []int)
- func (m *RedemptionMutation) VoucherCleared() bool
- func (m *RedemptionMutation) VoucherID() (id int, exists bool)
- func (m *RedemptionMutation) VoucherIDs() (ids []int)
- func (m *RedemptionMutation) Where(ps ...predicate.Redemption)
- func (m *RedemptionMutation) WhereP(ps ...func(*sql.Selector))
- type RedemptionQuery
- func (rq *RedemptionQuery) Aggregate(fns ...AggregateFunc) *RedemptionSelect
- func (rq *RedemptionQuery) All(ctx context.Context) ([]*Redemption, error)
- func (rq *RedemptionQuery) AllX(ctx context.Context) []*Redemption
- func (rq *RedemptionQuery) Clone() *RedemptionQuery
- func (rq *RedemptionQuery) Count(ctx context.Context) (int, error)
- func (rq *RedemptionQuery) CountX(ctx context.Context) int
- func (rq *RedemptionQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RedemptionQuery) ExistX(ctx context.Context) bool
- func (rq *RedemptionQuery) First(ctx context.Context) (*Redemption, error)
- func (rq *RedemptionQuery) FirstID(ctx context.Context) (id int, err error)
- func (rq *RedemptionQuery) FirstIDX(ctx context.Context) int
- func (rq *RedemptionQuery) FirstX(ctx context.Context) *Redemption
- func (rq *RedemptionQuery) GroupBy(field string, fields ...string) *RedemptionGroupBy
- func (rq *RedemptionQuery) IDs(ctx context.Context) (ids []int, err error)
- func (rq *RedemptionQuery) IDsX(ctx context.Context) []int
- func (rq *RedemptionQuery) Limit(limit int) *RedemptionQuery
- func (rq *RedemptionQuery) Offset(offset int) *RedemptionQuery
- func (rq *RedemptionQuery) Only(ctx context.Context) (*Redemption, error)
- func (rq *RedemptionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rq *RedemptionQuery) OnlyIDX(ctx context.Context) int
- func (rq *RedemptionQuery) OnlyX(ctx context.Context) *Redemption
- func (rq *RedemptionQuery) Order(o ...redemption.OrderOption) *RedemptionQuery
- func (rq *RedemptionQuery) QueryAccessory() *AccessoryQuery
- func (rq *RedemptionQuery) QueryUser() *UserQuery
- func (rq *RedemptionQuery) QueryVoucher() *VoucherQuery
- func (rq *RedemptionQuery) Select(fields ...string) *RedemptionSelect
- func (rq *RedemptionQuery) Unique(unique bool) *RedemptionQuery
- func (rq *RedemptionQuery) Where(ps ...predicate.Redemption) *RedemptionQuery
- func (rq *RedemptionQuery) WithAccessory(opts ...func(*AccessoryQuery)) *RedemptionQuery
- func (rq *RedemptionQuery) WithUser(opts ...func(*UserQuery)) *RedemptionQuery
- func (rq *RedemptionQuery) WithVoucher(opts ...func(*VoucherQuery)) *RedemptionQuery
- type RedemptionSelect
- func (rs *RedemptionSelect) Aggregate(fns ...AggregateFunc) *RedemptionSelect
- func (s *RedemptionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RedemptionSelect) BoolX(ctx context.Context) bool
- func (s *RedemptionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RedemptionSelect) BoolsX(ctx context.Context) []bool
- func (s *RedemptionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RedemptionSelect) Float64X(ctx context.Context) float64
- func (s *RedemptionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RedemptionSelect) Float64sX(ctx context.Context) []float64
- func (s *RedemptionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RedemptionSelect) IntX(ctx context.Context) int
- func (s *RedemptionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RedemptionSelect) IntsX(ctx context.Context) []int
- func (rs *RedemptionSelect) Scan(ctx context.Context, v any) error
- func (s *RedemptionSelect) ScanX(ctx context.Context, v any)
- func (s *RedemptionSelect) String(ctx context.Context) (_ string, err error)
- func (s *RedemptionSelect) StringX(ctx context.Context) string
- func (s *RedemptionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RedemptionSelect) StringsX(ctx context.Context) []string
- type RedemptionUpdate
- func (ru *RedemptionUpdate) ClearAccessory() *RedemptionUpdate
- func (ru *RedemptionUpdate) ClearUser() *RedemptionUpdate
- func (ru *RedemptionUpdate) ClearVoucher() *RedemptionUpdate
- func (ru *RedemptionUpdate) Exec(ctx context.Context) error
- func (ru *RedemptionUpdate) ExecX(ctx context.Context)
- func (ru *RedemptionUpdate) Mutation() *RedemptionMutation
- func (ru *RedemptionUpdate) Save(ctx context.Context) (int, error)
- func (ru *RedemptionUpdate) SaveX(ctx context.Context) int
- func (ru *RedemptionUpdate) SetAccessory(a *Accessory) *RedemptionUpdate
- func (ru *RedemptionUpdate) SetAccessoryID(id int) *RedemptionUpdate
- func (ru *RedemptionUpdate) SetNillableAccessoryID(id *int) *RedemptionUpdate
- func (ru *RedemptionUpdate) SetNillableVoucherID(id *int) *RedemptionUpdate
- func (ru *RedemptionUpdate) SetRedeemedAt(t time.Time) *RedemptionUpdate
- func (ru *RedemptionUpdate) SetUser(u *User) *RedemptionUpdate
- func (ru *RedemptionUpdate) SetUserID(id int) *RedemptionUpdate
- func (ru *RedemptionUpdate) SetVoucher(v *Voucher) *RedemptionUpdate
- func (ru *RedemptionUpdate) SetVoucherID(id int) *RedemptionUpdate
- func (ru *RedemptionUpdate) Where(ps ...predicate.Redemption) *RedemptionUpdate
- type RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) ClearAccessory() *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) ClearUser() *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) ClearVoucher() *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) Exec(ctx context.Context) error
- func (ruo *RedemptionUpdateOne) ExecX(ctx context.Context)
- func (ruo *RedemptionUpdateOne) Mutation() *RedemptionMutation
- func (ruo *RedemptionUpdateOne) Save(ctx context.Context) (*Redemption, error)
- func (ruo *RedemptionUpdateOne) SaveX(ctx context.Context) *Redemption
- func (ruo *RedemptionUpdateOne) Select(field string, fields ...string) *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) SetAccessory(a *Accessory) *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) SetAccessoryID(id int) *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) SetNillableAccessoryID(id *int) *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) SetNillableVoucherID(id *int) *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) SetRedeemedAt(t time.Time) *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) SetUser(u *User) *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) SetUserID(id int) *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) SetVoucher(v *Voucher) *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) SetVoucherID(id int) *RedemptionUpdateOne
- func (ruo *RedemptionUpdateOne) Where(ps ...predicate.Redemption) *RedemptionUpdateOne
- type RedemptionUpsert
- type RedemptionUpsertBulk
- func (u *RedemptionUpsertBulk) DoNothing() *RedemptionUpsertBulk
- func (u *RedemptionUpsertBulk) Exec(ctx context.Context) error
- func (u *RedemptionUpsertBulk) ExecX(ctx context.Context)
- func (u *RedemptionUpsertBulk) Ignore() *RedemptionUpsertBulk
- func (u *RedemptionUpsertBulk) SetRedeemedAt(v time.Time) *RedemptionUpsertBulk
- func (u *RedemptionUpsertBulk) Update(set func(*RedemptionUpsert)) *RedemptionUpsertBulk
- func (u *RedemptionUpsertBulk) UpdateNewValues() *RedemptionUpsertBulk
- func (u *RedemptionUpsertBulk) UpdateRedeemedAt() *RedemptionUpsertBulk
- type RedemptionUpsertOne
- func (u *RedemptionUpsertOne) DoNothing() *RedemptionUpsertOne
- func (u *RedemptionUpsertOne) Exec(ctx context.Context) error
- func (u *RedemptionUpsertOne) ExecX(ctx context.Context)
- func (u *RedemptionUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *RedemptionUpsertOne) IDX(ctx context.Context) int
- func (u *RedemptionUpsertOne) Ignore() *RedemptionUpsertOne
- func (u *RedemptionUpsertOne) SetRedeemedAt(v time.Time) *RedemptionUpsertOne
- func (u *RedemptionUpsertOne) Update(set func(*RedemptionUpsert)) *RedemptionUpsertOne
- func (u *RedemptionUpsertOne) UpdateNewValues() *RedemptionUpsertOne
- func (u *RedemptionUpsertOne) UpdateRedeemedAt() *RedemptionUpsertOne
- type Redemptions
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type StudyPlan
- type StudyPlanClient
- func (c *StudyPlanClient) Create() *StudyPlanCreate
- func (c *StudyPlanClient) CreateBulk(builders ...*StudyPlanCreate) *StudyPlanCreateBulk
- func (c *StudyPlanClient) Delete() *StudyPlanDelete
- func (c *StudyPlanClient) DeleteOne(sp *StudyPlan) *StudyPlanDeleteOne
- func (c *StudyPlanClient) DeleteOneID(id int) *StudyPlanDeleteOne
- func (c *StudyPlanClient) Get(ctx context.Context, id int) (*StudyPlan, error)
- func (c *StudyPlanClient) GetX(ctx context.Context, id int) *StudyPlan
- func (c *StudyPlanClient) Hooks() []Hook
- func (c *StudyPlanClient) Intercept(interceptors ...Interceptor)
- func (c *StudyPlanClient) Interceptors() []Interceptor
- func (c *StudyPlanClient) Query() *StudyPlanQuery
- func (c *StudyPlanClient) QueryAuthor(sp *StudyPlan) *UserQuery
- func (c *StudyPlanClient) QueryMilestones(sp *StudyPlan) *MilestoneQuery
- func (c *StudyPlanClient) Update() *StudyPlanUpdate
- func (c *StudyPlanClient) UpdateOne(sp *StudyPlan) *StudyPlanUpdateOne
- func (c *StudyPlanClient) UpdateOneID(id int) *StudyPlanUpdateOne
- func (c *StudyPlanClient) Use(hooks ...Hook)
- type StudyPlanCreate
- func (spc *StudyPlanCreate) AddMilestoneIDs(ids ...int) *StudyPlanCreate
- func (spc *StudyPlanCreate) AddMilestones(m ...*Milestone) *StudyPlanCreate
- func (spc *StudyPlanCreate) Exec(ctx context.Context) error
- func (spc *StudyPlanCreate) ExecX(ctx context.Context)
- func (spc *StudyPlanCreate) Mutation() *StudyPlanMutation
- func (spc *StudyPlanCreate) OnConflict(opts ...sql.ConflictOption) *StudyPlanUpsertOne
- func (spc *StudyPlanCreate) OnConflictColumns(columns ...string) *StudyPlanUpsertOne
- func (spc *StudyPlanCreate) Save(ctx context.Context) (*StudyPlan, error)
- func (spc *StudyPlanCreate) SaveX(ctx context.Context) *StudyPlan
- func (spc *StudyPlanCreate) SetAuthor(u *User) *StudyPlanCreate
- func (spc *StudyPlanCreate) SetAuthorID(id int) *StudyPlanCreate
- func (spc *StudyPlanCreate) SetCode(s string) *StudyPlanCreate
- func (spc *StudyPlanCreate) SetName(s string) *StudyPlanCreate
- func (spc *StudyPlanCreate) SetNillableCode(s *string) *StudyPlanCreate
- type StudyPlanCreateBulk
- func (spcb *StudyPlanCreateBulk) Exec(ctx context.Context) error
- func (spcb *StudyPlanCreateBulk) ExecX(ctx context.Context)
- func (spcb *StudyPlanCreateBulk) OnConflict(opts ...sql.ConflictOption) *StudyPlanUpsertBulk
- func (spcb *StudyPlanCreateBulk) OnConflictColumns(columns ...string) *StudyPlanUpsertBulk
- func (spcb *StudyPlanCreateBulk) Save(ctx context.Context) ([]*StudyPlan, error)
- func (spcb *StudyPlanCreateBulk) SaveX(ctx context.Context) []*StudyPlan
- type StudyPlanDelete
- type StudyPlanDeleteOne
- type StudyPlanEdges
- type StudyPlanGroupBy
- func (spgb *StudyPlanGroupBy) Aggregate(fns ...AggregateFunc) *StudyPlanGroupBy
- func (s *StudyPlanGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *StudyPlanGroupBy) BoolX(ctx context.Context) bool
- func (s *StudyPlanGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *StudyPlanGroupBy) BoolsX(ctx context.Context) []bool
- func (s *StudyPlanGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *StudyPlanGroupBy) Float64X(ctx context.Context) float64
- func (s *StudyPlanGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *StudyPlanGroupBy) Float64sX(ctx context.Context) []float64
- func (s *StudyPlanGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *StudyPlanGroupBy) IntX(ctx context.Context) int
- func (s *StudyPlanGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *StudyPlanGroupBy) IntsX(ctx context.Context) []int
- func (spgb *StudyPlanGroupBy) Scan(ctx context.Context, v any) error
- func (s *StudyPlanGroupBy) ScanX(ctx context.Context, v any)
- func (s *StudyPlanGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *StudyPlanGroupBy) StringX(ctx context.Context) string
- func (s *StudyPlanGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *StudyPlanGroupBy) StringsX(ctx context.Context) []string
- type StudyPlanMutation
- func (m *StudyPlanMutation) AddField(name string, value ent.Value) error
- func (m *StudyPlanMutation) AddMilestoneIDs(ids ...int)
- func (m *StudyPlanMutation) AddedEdges() []string
- func (m *StudyPlanMutation) AddedField(name string) (ent.Value, bool)
- func (m *StudyPlanMutation) AddedFields() []string
- func (m *StudyPlanMutation) AddedIDs(name string) []ent.Value
- func (m *StudyPlanMutation) AuthorCleared() bool
- func (m *StudyPlanMutation) AuthorID() (id int, exists bool)
- func (m *StudyPlanMutation) AuthorIDs() (ids []int)
- func (m *StudyPlanMutation) ClearAuthor()
- func (m *StudyPlanMutation) ClearCode()
- func (m *StudyPlanMutation) ClearEdge(name string) error
- func (m *StudyPlanMutation) ClearField(name string) error
- func (m *StudyPlanMutation) ClearMilestones()
- func (m *StudyPlanMutation) ClearedEdges() []string
- func (m *StudyPlanMutation) ClearedFields() []string
- func (m StudyPlanMutation) Client() *Client
- func (m *StudyPlanMutation) Code() (r string, exists bool)
- func (m *StudyPlanMutation) CodeCleared() bool
- func (m *StudyPlanMutation) EdgeCleared(name string) bool
- func (m *StudyPlanMutation) Field(name string) (ent.Value, bool)
- func (m *StudyPlanMutation) FieldCleared(name string) bool
- func (m *StudyPlanMutation) Fields() []string
- func (m *StudyPlanMutation) ID() (id int, exists bool)
- func (m *StudyPlanMutation) IDs(ctx context.Context) ([]int, error)
- func (m *StudyPlanMutation) MilestonesCleared() bool
- func (m *StudyPlanMutation) MilestonesIDs() (ids []int)
- func (m *StudyPlanMutation) Name() (r string, exists bool)
- func (m *StudyPlanMutation) OldCode(ctx context.Context) (v string, err error)
- func (m *StudyPlanMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *StudyPlanMutation) OldName(ctx context.Context) (v string, err error)
- func (m *StudyPlanMutation) Op() Op
- func (m *StudyPlanMutation) RemoveMilestoneIDs(ids ...int)
- func (m *StudyPlanMutation) RemovedEdges() []string
- func (m *StudyPlanMutation) RemovedIDs(name string) []ent.Value
- func (m *StudyPlanMutation) RemovedMilestonesIDs() (ids []int)
- func (m *StudyPlanMutation) ResetAuthor()
- func (m *StudyPlanMutation) ResetCode()
- func (m *StudyPlanMutation) ResetEdge(name string) error
- func (m *StudyPlanMutation) ResetField(name string) error
- func (m *StudyPlanMutation) ResetMilestones()
- func (m *StudyPlanMutation) ResetName()
- func (m *StudyPlanMutation) SetAuthorID(id int)
- func (m *StudyPlanMutation) SetCode(s string)
- func (m *StudyPlanMutation) SetField(name string, value ent.Value) error
- func (m *StudyPlanMutation) SetName(s string)
- func (m *StudyPlanMutation) SetOp(op Op)
- func (m StudyPlanMutation) Tx() (*Tx, error)
- func (m *StudyPlanMutation) Type() string
- func (m *StudyPlanMutation) Where(ps ...predicate.StudyPlan)
- func (m *StudyPlanMutation) WhereP(ps ...func(*sql.Selector))
- type StudyPlanQuery
- func (spq *StudyPlanQuery) Aggregate(fns ...AggregateFunc) *StudyPlanSelect
- func (spq *StudyPlanQuery) All(ctx context.Context) ([]*StudyPlan, error)
- func (spq *StudyPlanQuery) AllX(ctx context.Context) []*StudyPlan
- func (spq *StudyPlanQuery) Clone() *StudyPlanQuery
- func (spq *StudyPlanQuery) Count(ctx context.Context) (int, error)
- func (spq *StudyPlanQuery) CountX(ctx context.Context) int
- func (spq *StudyPlanQuery) Exist(ctx context.Context) (bool, error)
- func (spq *StudyPlanQuery) ExistX(ctx context.Context) bool
- func (spq *StudyPlanQuery) First(ctx context.Context) (*StudyPlan, error)
- func (spq *StudyPlanQuery) FirstID(ctx context.Context) (id int, err error)
- func (spq *StudyPlanQuery) FirstIDX(ctx context.Context) int
- func (spq *StudyPlanQuery) FirstX(ctx context.Context) *StudyPlan
- func (spq *StudyPlanQuery) GroupBy(field string, fields ...string) *StudyPlanGroupBy
- func (spq *StudyPlanQuery) IDs(ctx context.Context) (ids []int, err error)
- func (spq *StudyPlanQuery) IDsX(ctx context.Context) []int
- func (spq *StudyPlanQuery) Limit(limit int) *StudyPlanQuery
- func (spq *StudyPlanQuery) Offset(offset int) *StudyPlanQuery
- func (spq *StudyPlanQuery) Only(ctx context.Context) (*StudyPlan, error)
- func (spq *StudyPlanQuery) OnlyID(ctx context.Context) (id int, err error)
- func (spq *StudyPlanQuery) OnlyIDX(ctx context.Context) int
- func (spq *StudyPlanQuery) OnlyX(ctx context.Context) *StudyPlan
- func (spq *StudyPlanQuery) Order(o ...studyplan.OrderOption) *StudyPlanQuery
- func (spq *StudyPlanQuery) QueryAuthor() *UserQuery
- func (spq *StudyPlanQuery) QueryMilestones() *MilestoneQuery
- func (spq *StudyPlanQuery) Select(fields ...string) *StudyPlanSelect
- func (spq *StudyPlanQuery) Unique(unique bool) *StudyPlanQuery
- func (spq *StudyPlanQuery) Where(ps ...predicate.StudyPlan) *StudyPlanQuery
- func (spq *StudyPlanQuery) WithAuthor(opts ...func(*UserQuery)) *StudyPlanQuery
- func (spq *StudyPlanQuery) WithMilestones(opts ...func(*MilestoneQuery)) *StudyPlanQuery
- type StudyPlanSelect
- func (sps *StudyPlanSelect) Aggregate(fns ...AggregateFunc) *StudyPlanSelect
- func (s *StudyPlanSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *StudyPlanSelect) BoolX(ctx context.Context) bool
- func (s *StudyPlanSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *StudyPlanSelect) BoolsX(ctx context.Context) []bool
- func (s *StudyPlanSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *StudyPlanSelect) Float64X(ctx context.Context) float64
- func (s *StudyPlanSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *StudyPlanSelect) Float64sX(ctx context.Context) []float64
- func (s *StudyPlanSelect) Int(ctx context.Context) (_ int, err error)
- func (s *StudyPlanSelect) IntX(ctx context.Context) int
- func (s *StudyPlanSelect) Ints(ctx context.Context) ([]int, error)
- func (s *StudyPlanSelect) IntsX(ctx context.Context) []int
- func (sps *StudyPlanSelect) Scan(ctx context.Context, v any) error
- func (s *StudyPlanSelect) ScanX(ctx context.Context, v any)
- func (s *StudyPlanSelect) String(ctx context.Context) (_ string, err error)
- func (s *StudyPlanSelect) StringX(ctx context.Context) string
- func (s *StudyPlanSelect) Strings(ctx context.Context) ([]string, error)
- func (s *StudyPlanSelect) StringsX(ctx context.Context) []string
- type StudyPlanUpdate
- func (spu *StudyPlanUpdate) AddMilestoneIDs(ids ...int) *StudyPlanUpdate
- func (spu *StudyPlanUpdate) AddMilestones(m ...*Milestone) *StudyPlanUpdate
- func (spu *StudyPlanUpdate) ClearAuthor() *StudyPlanUpdate
- func (spu *StudyPlanUpdate) ClearCode() *StudyPlanUpdate
- func (spu *StudyPlanUpdate) ClearMilestones() *StudyPlanUpdate
- func (spu *StudyPlanUpdate) Exec(ctx context.Context) error
- func (spu *StudyPlanUpdate) ExecX(ctx context.Context)
- func (spu *StudyPlanUpdate) Mutation() *StudyPlanMutation
- func (spu *StudyPlanUpdate) RemoveMilestoneIDs(ids ...int) *StudyPlanUpdate
- func (spu *StudyPlanUpdate) RemoveMilestones(m ...*Milestone) *StudyPlanUpdate
- func (spu *StudyPlanUpdate) Save(ctx context.Context) (int, error)
- func (spu *StudyPlanUpdate) SaveX(ctx context.Context) int
- func (spu *StudyPlanUpdate) SetAuthor(u *User) *StudyPlanUpdate
- func (spu *StudyPlanUpdate) SetAuthorID(id int) *StudyPlanUpdate
- func (spu *StudyPlanUpdate) SetCode(s string) *StudyPlanUpdate
- func (spu *StudyPlanUpdate) SetName(s string) *StudyPlanUpdate
- func (spu *StudyPlanUpdate) SetNillableCode(s *string) *StudyPlanUpdate
- func (spu *StudyPlanUpdate) Where(ps ...predicate.StudyPlan) *StudyPlanUpdate
- type StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) AddMilestoneIDs(ids ...int) *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) AddMilestones(m ...*Milestone) *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) ClearAuthor() *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) ClearCode() *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) ClearMilestones() *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) Exec(ctx context.Context) error
- func (spuo *StudyPlanUpdateOne) ExecX(ctx context.Context)
- func (spuo *StudyPlanUpdateOne) Mutation() *StudyPlanMutation
- func (spuo *StudyPlanUpdateOne) RemoveMilestoneIDs(ids ...int) *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) RemoveMilestones(m ...*Milestone) *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) Save(ctx context.Context) (*StudyPlan, error)
- func (spuo *StudyPlanUpdateOne) SaveX(ctx context.Context) *StudyPlan
- func (spuo *StudyPlanUpdateOne) Select(field string, fields ...string) *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) SetAuthor(u *User) *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) SetAuthorID(id int) *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) SetCode(s string) *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) SetName(s string) *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) SetNillableCode(s *string) *StudyPlanUpdateOne
- func (spuo *StudyPlanUpdateOne) Where(ps ...predicate.StudyPlan) *StudyPlanUpdateOne
- type StudyPlanUpsert
- type StudyPlanUpsertBulk
- func (u *StudyPlanUpsertBulk) ClearCode() *StudyPlanUpsertBulk
- func (u *StudyPlanUpsertBulk) DoNothing() *StudyPlanUpsertBulk
- func (u *StudyPlanUpsertBulk) Exec(ctx context.Context) error
- func (u *StudyPlanUpsertBulk) ExecX(ctx context.Context)
- func (u *StudyPlanUpsertBulk) Ignore() *StudyPlanUpsertBulk
- func (u *StudyPlanUpsertBulk) SetCode(v string) *StudyPlanUpsertBulk
- func (u *StudyPlanUpsertBulk) SetName(v string) *StudyPlanUpsertBulk
- func (u *StudyPlanUpsertBulk) Update(set func(*StudyPlanUpsert)) *StudyPlanUpsertBulk
- func (u *StudyPlanUpsertBulk) UpdateCode() *StudyPlanUpsertBulk
- func (u *StudyPlanUpsertBulk) UpdateName() *StudyPlanUpsertBulk
- func (u *StudyPlanUpsertBulk) UpdateNewValues() *StudyPlanUpsertBulk
- type StudyPlanUpsertOne
- func (u *StudyPlanUpsertOne) ClearCode() *StudyPlanUpsertOne
- func (u *StudyPlanUpsertOne) DoNothing() *StudyPlanUpsertOne
- func (u *StudyPlanUpsertOne) Exec(ctx context.Context) error
- func (u *StudyPlanUpsertOne) ExecX(ctx context.Context)
- func (u *StudyPlanUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *StudyPlanUpsertOne) IDX(ctx context.Context) int
- func (u *StudyPlanUpsertOne) Ignore() *StudyPlanUpsertOne
- func (u *StudyPlanUpsertOne) SetCode(v string) *StudyPlanUpsertOne
- func (u *StudyPlanUpsertOne) SetName(v string) *StudyPlanUpsertOne
- func (u *StudyPlanUpsertOne) Update(set func(*StudyPlanUpsert)) *StudyPlanUpsertOne
- func (u *StudyPlanUpsertOne) UpdateCode() *StudyPlanUpsertOne
- func (u *StudyPlanUpsertOne) UpdateName() *StudyPlanUpsertOne
- func (u *StudyPlanUpsertOne) UpdateNewValues() *StudyPlanUpsertOne
- type StudyPlans
- type TraverseFunc
- type Traverser
- type Tx
- type User
- func (u *User) QueryAuthoredDeadlines() *DeadlineQuery
- func (u *User) QueryForumPosts() *ForumPostQuery
- func (u *User) QueryGroupUsers() *GroupUserQuery
- func (u *User) QueryGroups() *GroupQuery
- func (u *User) QueryInstitution() *InstitutionQuery
- func (u *User) QueryPet() *PetQuery
- func (u *User) QueryReactedPosts() *ForumPostQuery
- func (u *User) QueryReactions() *ReactionQuery
- func (u *User) QueryRedemptions() *RedemptionQuery
- func (u *User) QueryUserPets() *UserPetQuery
- func (u *User) QueryVotedDeadlines() *DeadlineQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryAuthoredDeadlines(u *User) *DeadlineQuery
- func (c *UserClient) QueryForumPosts(u *User) *ForumPostQuery
- func (c *UserClient) QueryGroupUsers(u *User) *GroupUserQuery
- func (c *UserClient) QueryGroups(u *User) *GroupQuery
- func (c *UserClient) QueryInstitution(u *User) *InstitutionQuery
- func (c *UserClient) QueryPet(u *User) *PetQuery
- func (c *UserClient) QueryReactedPosts(u *User) *ForumPostQuery
- func (c *UserClient) QueryReactions(u *User) *ReactionQuery
- func (c *UserClient) QueryRedemptions(u *User) *RedemptionQuery
- func (c *UserClient) QueryUserPets(u *User) *UserPetQuery
- func (c *UserClient) QueryVotedDeadlines(u *User) *DeadlineQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddAuthoredDeadlineIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddAuthoredDeadlines(d ...*Deadline) *UserCreate
- func (uc *UserCreate) AddForumPostIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddForumPosts(f ...*ForumPost) *UserCreate
- func (uc *UserCreate) AddGroupIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddGroups(g ...*Group) *UserCreate
- func (uc *UserCreate) AddPet(p ...*Pet) *UserCreate
- func (uc *UserCreate) AddPetIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddReactedPostIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddReactedPosts(f ...*ForumPost) *UserCreate
- func (uc *UserCreate) AddRedemptionIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddRedemptions(r ...*Redemption) *UserCreate
- func (uc *UserCreate) AddVotedDeadlineIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddVotedDeadlines(d ...*Deadline) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetFirstName(s string) *UserCreate
- func (uc *UserCreate) SetGodMode(b bool) *UserCreate
- func (uc *UserCreate) SetInstitution(i *Institution) *UserCreate
- func (uc *UserCreate) SetInstitutionID(id int) *UserCreate
- func (uc *UserCreate) SetLastName(s string) *UserCreate
- func (uc *UserCreate) SetNillablePoints(i *int) *UserCreate
- func (uc *UserCreate) SetNillablePointsAwardedCount(i *int) *UserCreate
- func (uc *UserCreate) SetNillablePointsAwardedResetTime(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(h hash.Encoded) *UserCreate
- func (uc *UserCreate) SetPoints(i int) *UserCreate
- func (uc *UserCreate) SetPointsAwardedCount(i int) *UserCreate
- func (uc *UserCreate) SetPointsAwardedResetTime(t time.Time) *UserCreate
- func (uc *UserCreate) SetRole(i institution.Role) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- type UserDeleteOne
- type UserEdges
- func (e UserEdges) AuthoredDeadlinesOrErr() ([]*Deadline, error)
- func (e UserEdges) ForumPostsOrErr() ([]*ForumPost, error)
- func (e UserEdges) GroupUsersOrErr() ([]*GroupUser, error)
- func (e UserEdges) GroupsOrErr() ([]*Group, error)
- func (e UserEdges) InstitutionOrErr() (*Institution, error)
- func (e UserEdges) PetOrErr() ([]*Pet, error)
- func (e UserEdges) ReactedPostsOrErr() ([]*ForumPost, error)
- func (e UserEdges) ReactionsOrErr() ([]*Reaction, error)
- func (e UserEdges) RedemptionsOrErr() ([]*Redemption, error)
- func (e UserEdges) UserPetsOrErr() ([]*UserPet, error)
- func (e UserEdges) VotedDeadlinesOrErr() ([]*Deadline, error)
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddAuthoredDeadlineIDs(ids ...int)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddForumPostIDs(ids ...int)
- func (m *UserMutation) AddGroupIDs(ids ...int)
- func (m *UserMutation) AddPetIDs(ids ...int)
- func (m *UserMutation) AddPoints(i int)
- func (m *UserMutation) AddPointsAwardedCount(i int)
- func (m *UserMutation) AddReactedPostIDs(ids ...int)
- func (m *UserMutation) AddRedemptionIDs(ids ...int)
- func (m *UserMutation) AddVotedDeadlineIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) AddedPoints() (r int, exists bool)
- func (m *UserMutation) AddedPointsAwardedCount() (r int, exists bool)
- func (m *UserMutation) AuthoredDeadlinesCleared() bool
- func (m *UserMutation) AuthoredDeadlinesIDs() (ids []int)
- func (m *UserMutation) ClearAuthoredDeadlines()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearForumPosts()
- func (m *UserMutation) ClearGroups()
- func (m *UserMutation) ClearInstitution()
- func (m *UserMutation) ClearPet()
- func (m *UserMutation) ClearPointsAwardedResetTime()
- func (m *UserMutation) ClearReactedPosts()
- func (m *UserMutation) ClearRedemptions()
- func (m *UserMutation) ClearVotedDeadlines()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) FirstName() (r string, exists bool)
- func (m *UserMutation) ForumPostsCleared() bool
- func (m *UserMutation) ForumPostsIDs() (ids []int)
- func (m *UserMutation) GodMode() (r bool, exists bool)
- func (m *UserMutation) GroupsCleared() bool
- func (m *UserMutation) GroupsIDs() (ids []int)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) InstitutionCleared() bool
- func (m *UserMutation) InstitutionID() (id int, exists bool)
- func (m *UserMutation) InstitutionIDs() (ids []int)
- func (m *UserMutation) LastName() (r string, exists bool)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldGodMode(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v hash.Encoded, err error)
- func (m *UserMutation) OldPoints(ctx context.Context) (v int, err error)
- func (m *UserMutation) OldPointsAwardedCount(ctx context.Context) (v int, err error)
- func (m *UserMutation) OldPointsAwardedResetTime(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldRole(ctx context.Context) (v institution.Role, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r hash.Encoded, exists bool)
- func (m *UserMutation) PetCleared() bool
- func (m *UserMutation) PetIDs() (ids []int)
- func (m *UserMutation) Points() (r int, exists bool)
- func (m *UserMutation) PointsAwardedCount() (r int, exists bool)
- func (m *UserMutation) PointsAwardedResetTime() (r time.Time, exists bool)
- func (m *UserMutation) PointsAwardedResetTimeCleared() bool
- func (m *UserMutation) ReactedPostsCleared() bool
- func (m *UserMutation) ReactedPostsIDs() (ids []int)
- func (m *UserMutation) RedemptionsCleared() bool
- func (m *UserMutation) RedemptionsIDs() (ids []int)
- func (m *UserMutation) RemoveAuthoredDeadlineIDs(ids ...int)
- func (m *UserMutation) RemoveForumPostIDs(ids ...int)
- func (m *UserMutation) RemoveGroupIDs(ids ...int)
- func (m *UserMutation) RemovePetIDs(ids ...int)
- func (m *UserMutation) RemoveReactedPostIDs(ids ...int)
- func (m *UserMutation) RemoveRedemptionIDs(ids ...int)
- func (m *UserMutation) RemoveVotedDeadlineIDs(ids ...int)
- func (m *UserMutation) RemovedAuthoredDeadlinesIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedForumPostsIDs() (ids []int)
- func (m *UserMutation) RemovedGroupsIDs() (ids []int)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedPetIDs() (ids []int)
- func (m *UserMutation) RemovedReactedPostsIDs() (ids []int)
- func (m *UserMutation) RemovedRedemptionsIDs() (ids []int)
- func (m *UserMutation) RemovedVotedDeadlinesIDs() (ids []int)
- func (m *UserMutation) ResetAuthoredDeadlines()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFirstName()
- func (m *UserMutation) ResetForumPosts()
- func (m *UserMutation) ResetGodMode()
- func (m *UserMutation) ResetGroups()
- func (m *UserMutation) ResetInstitution()
- func (m *UserMutation) ResetLastName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetPet()
- func (m *UserMutation) ResetPoints()
- func (m *UserMutation) ResetPointsAwardedCount()
- func (m *UserMutation) ResetPointsAwardedResetTime()
- func (m *UserMutation) ResetReactedPosts()
- func (m *UserMutation) ResetRedemptions()
- func (m *UserMutation) ResetRole()
- func (m *UserMutation) ResetVotedDeadlines()
- func (m *UserMutation) Role() (r institution.Role, exists bool)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetFirstName(s string)
- func (m *UserMutation) SetGodMode(b bool)
- func (m *UserMutation) SetInstitutionID(id int)
- func (m *UserMutation) SetLastName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(h hash.Encoded)
- func (m *UserMutation) SetPoints(i int)
- func (m *UserMutation) SetPointsAwardedCount(i int)
- func (m *UserMutation) SetPointsAwardedResetTime(t time.Time)
- func (m *UserMutation) SetRole(i institution.Role)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) VotedDeadlinesCleared() bool
- func (m *UserMutation) VotedDeadlinesIDs() (ids []int)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserPet
- type UserPetClient
- func (c *UserPetClient) Create() *UserPetCreate
- func (c *UserPetClient) CreateBulk(builders ...*UserPetCreate) *UserPetCreateBulk
- func (c *UserPetClient) Delete() *UserPetDelete
- func (c *UserPetClient) Hooks() []Hook
- func (c *UserPetClient) Intercept(interceptors ...Interceptor)
- func (c *UserPetClient) Interceptors() []Interceptor
- func (c *UserPetClient) Query() *UserPetQuery
- func (c *UserPetClient) QueryPet(up *UserPet) *PetQuery
- func (c *UserPetClient) QueryUser(up *UserPet) *UserQuery
- func (c *UserPetClient) Update() *UserPetUpdate
- func (c *UserPetClient) UpdateOne(up *UserPet) *UserPetUpdateOne
- func (c *UserPetClient) Use(hooks ...Hook)
- type UserPetCreate
- func (upc *UserPetCreate) Exec(ctx context.Context) error
- func (upc *UserPetCreate) ExecX(ctx context.Context)
- func (upc *UserPetCreate) Mutation() *UserPetMutation
- func (upc *UserPetCreate) OnConflict(opts ...sql.ConflictOption) *UserPetUpsertOne
- func (upc *UserPetCreate) OnConflictColumns(columns ...string) *UserPetUpsertOne
- func (upc *UserPetCreate) Save(ctx context.Context) (*UserPet, error)
- func (upc *UserPetCreate) SaveX(ctx context.Context) *UserPet
- func (upc *UserPetCreate) SetEnabledSvgGroupElementIds(m map[string]bool) *UserPetCreate
- func (upc *UserPetCreate) SetHungerPercentage(f float64) *UserPetCreate
- func (upc *UserPetCreate) SetPet(p *Pet) *UserPetCreate
- func (upc *UserPetCreate) SetPetID(i int) *UserPetCreate
- func (upc *UserPetCreate) SetUser(u *User) *UserPetCreate
- func (upc *UserPetCreate) SetUserID(i int) *UserPetCreate
- type UserPetCreateBulk
- func (upcb *UserPetCreateBulk) Exec(ctx context.Context) error
- func (upcb *UserPetCreateBulk) ExecX(ctx context.Context)
- func (upcb *UserPetCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserPetUpsertBulk
- func (upcb *UserPetCreateBulk) OnConflictColumns(columns ...string) *UserPetUpsertBulk
- func (upcb *UserPetCreateBulk) Save(ctx context.Context) ([]*UserPet, error)
- func (upcb *UserPetCreateBulk) SaveX(ctx context.Context) []*UserPet
- type UserPetDelete
- type UserPetDeleteOne
- type UserPetEdges
- type UserPetGroupBy
- func (upgb *UserPetGroupBy) Aggregate(fns ...AggregateFunc) *UserPetGroupBy
- func (s *UserPetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserPetGroupBy) BoolX(ctx context.Context) bool
- func (s *UserPetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserPetGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserPetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserPetGroupBy) Float64X(ctx context.Context) float64
- func (s *UserPetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserPetGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserPetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserPetGroupBy) IntX(ctx context.Context) int
- func (s *UserPetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserPetGroupBy) IntsX(ctx context.Context) []int
- func (upgb *UserPetGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserPetGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserPetGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserPetGroupBy) StringX(ctx context.Context) string
- func (s *UserPetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserPetGroupBy) StringsX(ctx context.Context) []string
- type UserPetMutation
- func (m *UserPetMutation) AddField(name string, value ent.Value) error
- func (m *UserPetMutation) AddHungerPercentage(f float64)
- func (m *UserPetMutation) AddedEdges() []string
- func (m *UserPetMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserPetMutation) AddedFields() []string
- func (m *UserPetMutation) AddedHungerPercentage() (r float64, exists bool)
- func (m *UserPetMutation) AddedIDs(name string) []ent.Value
- func (m *UserPetMutation) ClearEdge(name string) error
- func (m *UserPetMutation) ClearField(name string) error
- func (m *UserPetMutation) ClearPet()
- func (m *UserPetMutation) ClearUser()
- func (m *UserPetMutation) ClearedEdges() []string
- func (m *UserPetMutation) ClearedFields() []string
- func (m UserPetMutation) Client() *Client
- func (m *UserPetMutation) EdgeCleared(name string) bool
- func (m *UserPetMutation) EnabledSvgGroupElementIds() (r map[string]bool, exists bool)
- func (m *UserPetMutation) Field(name string) (ent.Value, bool)
- func (m *UserPetMutation) FieldCleared(name string) bool
- func (m *UserPetMutation) Fields() []string
- func (m *UserPetMutation) HungerPercentage() (r float64, exists bool)
- func (m *UserPetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserPetMutation) Op() Op
- func (m *UserPetMutation) PetCleared() bool
- func (m *UserPetMutation) PetID() (r int, exists bool)
- func (m *UserPetMutation) PetIDs() (ids []int)
- func (m *UserPetMutation) RemovedEdges() []string
- func (m *UserPetMutation) RemovedIDs(name string) []ent.Value
- func (m *UserPetMutation) ResetEdge(name string) error
- func (m *UserPetMutation) ResetEnabledSvgGroupElementIds()
- func (m *UserPetMutation) ResetField(name string) error
- func (m *UserPetMutation) ResetHungerPercentage()
- func (m *UserPetMutation) ResetPet()
- func (m *UserPetMutation) ResetPetID()
- func (m *UserPetMutation) ResetUser()
- func (m *UserPetMutation) ResetUserID()
- func (m *UserPetMutation) SetEnabledSvgGroupElementIds(value map[string]bool)
- func (m *UserPetMutation) SetField(name string, value ent.Value) error
- func (m *UserPetMutation) SetHungerPercentage(f float64)
- func (m *UserPetMutation) SetOp(op Op)
- func (m *UserPetMutation) SetPetID(i int)
- func (m *UserPetMutation) SetUserID(i int)
- func (m UserPetMutation) Tx() (*Tx, error)
- func (m *UserPetMutation) Type() string
- func (m *UserPetMutation) UserCleared() bool
- func (m *UserPetMutation) UserID() (r int, exists bool)
- func (m *UserPetMutation) UserIDs() (ids []int)
- func (m *UserPetMutation) Where(ps ...predicate.UserPet)
- func (m *UserPetMutation) WhereP(ps ...func(*sql.Selector))
- type UserPetQuery
- func (upq *UserPetQuery) Aggregate(fns ...AggregateFunc) *UserPetSelect
- func (upq *UserPetQuery) All(ctx context.Context) ([]*UserPet, error)
- func (upq *UserPetQuery) AllX(ctx context.Context) []*UserPet
- func (upq *UserPetQuery) Clone() *UserPetQuery
- func (upq *UserPetQuery) Count(ctx context.Context) (int, error)
- func (upq *UserPetQuery) CountX(ctx context.Context) int
- func (upq *UserPetQuery) Exist(ctx context.Context) (bool, error)
- func (upq *UserPetQuery) ExistX(ctx context.Context) bool
- func (upq *UserPetQuery) First(ctx context.Context) (*UserPet, error)
- func (upq *UserPetQuery) FirstX(ctx context.Context) *UserPet
- func (upq *UserPetQuery) GroupBy(field string, fields ...string) *UserPetGroupBy
- func (upq *UserPetQuery) Limit(limit int) *UserPetQuery
- func (upq *UserPetQuery) Offset(offset int) *UserPetQuery
- func (upq *UserPetQuery) Only(ctx context.Context) (*UserPet, error)
- func (upq *UserPetQuery) OnlyX(ctx context.Context) *UserPet
- func (upq *UserPetQuery) Order(o ...userpet.OrderOption) *UserPetQuery
- func (upq *UserPetQuery) QueryPet() *PetQuery
- func (upq *UserPetQuery) QueryUser() *UserQuery
- func (upq *UserPetQuery) Select(fields ...string) *UserPetSelect
- func (upq *UserPetQuery) Unique(unique bool) *UserPetQuery
- func (upq *UserPetQuery) Where(ps ...predicate.UserPet) *UserPetQuery
- func (upq *UserPetQuery) WithPet(opts ...func(*PetQuery)) *UserPetQuery
- func (upq *UserPetQuery) WithUser(opts ...func(*UserQuery)) *UserPetQuery
- type UserPetSelect
- func (ups *UserPetSelect) Aggregate(fns ...AggregateFunc) *UserPetSelect
- func (s *UserPetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserPetSelect) BoolX(ctx context.Context) bool
- func (s *UserPetSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserPetSelect) BoolsX(ctx context.Context) []bool
- func (s *UserPetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserPetSelect) Float64X(ctx context.Context) float64
- func (s *UserPetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserPetSelect) Float64sX(ctx context.Context) []float64
- func (s *UserPetSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserPetSelect) IntX(ctx context.Context) int
- func (s *UserPetSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserPetSelect) IntsX(ctx context.Context) []int
- func (ups *UserPetSelect) Scan(ctx context.Context, v any) error
- func (s *UserPetSelect) ScanX(ctx context.Context, v any)
- func (s *UserPetSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserPetSelect) StringX(ctx context.Context) string
- func (s *UserPetSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserPetSelect) StringsX(ctx context.Context) []string
- type UserPetUpdate
- func (upu *UserPetUpdate) AddHungerPercentage(f float64) *UserPetUpdate
- func (upu *UserPetUpdate) ClearPet() *UserPetUpdate
- func (upu *UserPetUpdate) ClearUser() *UserPetUpdate
- func (upu *UserPetUpdate) Exec(ctx context.Context) error
- func (upu *UserPetUpdate) ExecX(ctx context.Context)
- func (upu *UserPetUpdate) Mutation() *UserPetMutation
- func (upu *UserPetUpdate) Save(ctx context.Context) (int, error)
- func (upu *UserPetUpdate) SaveX(ctx context.Context) int
- func (upu *UserPetUpdate) SetEnabledSvgGroupElementIds(m map[string]bool) *UserPetUpdate
- func (upu *UserPetUpdate) SetHungerPercentage(f float64) *UserPetUpdate
- func (upu *UserPetUpdate) SetPet(p *Pet) *UserPetUpdate
- func (upu *UserPetUpdate) SetPetID(i int) *UserPetUpdate
- func (upu *UserPetUpdate) SetUser(u *User) *UserPetUpdate
- func (upu *UserPetUpdate) SetUserID(i int) *UserPetUpdate
- func (upu *UserPetUpdate) Where(ps ...predicate.UserPet) *UserPetUpdate
- type UserPetUpdateOne
- func (upuo *UserPetUpdateOne) AddHungerPercentage(f float64) *UserPetUpdateOne
- func (upuo *UserPetUpdateOne) ClearPet() *UserPetUpdateOne
- func (upuo *UserPetUpdateOne) ClearUser() *UserPetUpdateOne
- func (upuo *UserPetUpdateOne) Exec(ctx context.Context) error
- func (upuo *UserPetUpdateOne) ExecX(ctx context.Context)
- func (upuo *UserPetUpdateOne) Mutation() *UserPetMutation
- func (upuo *UserPetUpdateOne) Save(ctx context.Context) (*UserPet, error)
- func (upuo *UserPetUpdateOne) SaveX(ctx context.Context) *UserPet
- func (upuo *UserPetUpdateOne) Select(field string, fields ...string) *UserPetUpdateOne
- func (upuo *UserPetUpdateOne) SetEnabledSvgGroupElementIds(m map[string]bool) *UserPetUpdateOne
- func (upuo *UserPetUpdateOne) SetHungerPercentage(f float64) *UserPetUpdateOne
- func (upuo *UserPetUpdateOne) SetPet(p *Pet) *UserPetUpdateOne
- func (upuo *UserPetUpdateOne) SetPetID(i int) *UserPetUpdateOne
- func (upuo *UserPetUpdateOne) SetUser(u *User) *UserPetUpdateOne
- func (upuo *UserPetUpdateOne) SetUserID(i int) *UserPetUpdateOne
- func (upuo *UserPetUpdateOne) Where(ps ...predicate.UserPet) *UserPetUpdateOne
- type UserPetUpsert
- func (u *UserPetUpsert) AddHungerPercentage(v float64) *UserPetUpsert
- func (u *UserPetUpsert) SetEnabledSvgGroupElementIds(v map[string]bool) *UserPetUpsert
- func (u *UserPetUpsert) SetHungerPercentage(v float64) *UserPetUpsert
- func (u *UserPetUpsert) SetPetID(v int) *UserPetUpsert
- func (u *UserPetUpsert) SetUserID(v int) *UserPetUpsert
- func (u *UserPetUpsert) UpdateEnabledSvgGroupElementIds() *UserPetUpsert
- func (u *UserPetUpsert) UpdateHungerPercentage() *UserPetUpsert
- func (u *UserPetUpsert) UpdatePetID() *UserPetUpsert
- func (u *UserPetUpsert) UpdateUserID() *UserPetUpsert
- type UserPetUpsertBulk
- func (u *UserPetUpsertBulk) AddHungerPercentage(v float64) *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) DoNothing() *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) Exec(ctx context.Context) error
- func (u *UserPetUpsertBulk) ExecX(ctx context.Context)
- func (u *UserPetUpsertBulk) Ignore() *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) SetEnabledSvgGroupElementIds(v map[string]bool) *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) SetHungerPercentage(v float64) *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) SetPetID(v int) *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) SetUserID(v int) *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) Update(set func(*UserPetUpsert)) *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) UpdateEnabledSvgGroupElementIds() *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) UpdateHungerPercentage() *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) UpdateNewValues() *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) UpdatePetID() *UserPetUpsertBulk
- func (u *UserPetUpsertBulk) UpdateUserID() *UserPetUpsertBulk
- type UserPetUpsertOne
- func (u *UserPetUpsertOne) AddHungerPercentage(v float64) *UserPetUpsertOne
- func (u *UserPetUpsertOne) DoNothing() *UserPetUpsertOne
- func (u *UserPetUpsertOne) Exec(ctx context.Context) error
- func (u *UserPetUpsertOne) ExecX(ctx context.Context)
- func (u *UserPetUpsertOne) Ignore() *UserPetUpsertOne
- func (u *UserPetUpsertOne) SetEnabledSvgGroupElementIds(v map[string]bool) *UserPetUpsertOne
- func (u *UserPetUpsertOne) SetHungerPercentage(v float64) *UserPetUpsertOne
- func (u *UserPetUpsertOne) SetPetID(v int) *UserPetUpsertOne
- func (u *UserPetUpsertOne) SetUserID(v int) *UserPetUpsertOne
- func (u *UserPetUpsertOne) Update(set func(*UserPetUpsert)) *UserPetUpsertOne
- func (u *UserPetUpsertOne) UpdateEnabledSvgGroupElementIds() *UserPetUpsertOne
- func (u *UserPetUpsertOne) UpdateHungerPercentage() *UserPetUpsertOne
- func (u *UserPetUpsertOne) UpdateNewValues() *UserPetUpsertOne
- func (u *UserPetUpsertOne) UpdatePetID() *UserPetUpsertOne
- func (u *UserPetUpsertOne) UpdateUserID() *UserPetUpsertOne
- type UserPets
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryAuthoredDeadlines() *DeadlineQuery
- func (uq *UserQuery) QueryForumPosts() *ForumPostQuery
- func (uq *UserQuery) QueryGroupUsers() *GroupUserQuery
- func (uq *UserQuery) QueryGroups() *GroupQuery
- func (uq *UserQuery) QueryInstitution() *InstitutionQuery
- func (uq *UserQuery) QueryPet() *PetQuery
- func (uq *UserQuery) QueryReactedPosts() *ForumPostQuery
- func (uq *UserQuery) QueryReactions() *ReactionQuery
- func (uq *UserQuery) QueryRedemptions() *RedemptionQuery
- func (uq *UserQuery) QueryUserPets() *UserPetQuery
- func (uq *UserQuery) QueryVotedDeadlines() *DeadlineQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithAuthoredDeadlines(opts ...func(*DeadlineQuery)) *UserQuery
- func (uq *UserQuery) WithForumPosts(opts ...func(*ForumPostQuery)) *UserQuery
- func (uq *UserQuery) WithGroupUsers(opts ...func(*GroupUserQuery)) *UserQuery
- func (uq *UserQuery) WithGroups(opts ...func(*GroupQuery)) *UserQuery
- func (uq *UserQuery) WithInstitution(opts ...func(*InstitutionQuery)) *UserQuery
- func (uq *UserQuery) WithPet(opts ...func(*PetQuery)) *UserQuery
- func (uq *UserQuery) WithReactedPosts(opts ...func(*ForumPostQuery)) *UserQuery
- func (uq *UserQuery) WithReactions(opts ...func(*ReactionQuery)) *UserQuery
- func (uq *UserQuery) WithRedemptions(opts ...func(*RedemptionQuery)) *UserQuery
- func (uq *UserQuery) WithUserPets(opts ...func(*UserPetQuery)) *UserQuery
- func (uq *UserQuery) WithVotedDeadlines(opts ...func(*DeadlineQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddAuthoredDeadlineIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddAuthoredDeadlines(d ...*Deadline) *UserUpdate
- func (uu *UserUpdate) AddForumPostIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddForumPosts(f ...*ForumPost) *UserUpdate
- func (uu *UserUpdate) AddGroupIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddGroups(g ...*Group) *UserUpdate
- func (uu *UserUpdate) AddPet(p ...*Pet) *UserUpdate
- func (uu *UserUpdate) AddPetIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddPoints(i int) *UserUpdate
- func (uu *UserUpdate) AddPointsAwardedCount(i int) *UserUpdate
- func (uu *UserUpdate) AddReactedPostIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddReactedPosts(f ...*ForumPost) *UserUpdate
- func (uu *UserUpdate) AddRedemptionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddRedemptions(r ...*Redemption) *UserUpdate
- func (uu *UserUpdate) AddVotedDeadlineIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddVotedDeadlines(d ...*Deadline) *UserUpdate
- func (uu *UserUpdate) ClearAuthoredDeadlines() *UserUpdate
- func (uu *UserUpdate) ClearForumPosts() *UserUpdate
- func (uu *UserUpdate) ClearGroups() *UserUpdate
- func (uu *UserUpdate) ClearInstitution() *UserUpdate
- func (uu *UserUpdate) ClearPet() *UserUpdate
- func (uu *UserUpdate) ClearPointsAwardedResetTime() *UserUpdate
- func (uu *UserUpdate) ClearReactedPosts() *UserUpdate
- func (uu *UserUpdate) ClearRedemptions() *UserUpdate
- func (uu *UserUpdate) ClearVotedDeadlines() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveAuthoredDeadlineIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveAuthoredDeadlines(d ...*Deadline) *UserUpdate
- func (uu *UserUpdate) RemoveForumPostIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveForumPosts(f ...*ForumPost) *UserUpdate
- func (uu *UserUpdate) RemoveGroupIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveGroups(g ...*Group) *UserUpdate
- func (uu *UserUpdate) RemovePet(p ...*Pet) *UserUpdate
- func (uu *UserUpdate) RemovePetIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveReactedPostIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveReactedPosts(f ...*ForumPost) *UserUpdate
- func (uu *UserUpdate) RemoveRedemptionIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveRedemptions(r ...*Redemption) *UserUpdate
- func (uu *UserUpdate) RemoveVotedDeadlineIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveVotedDeadlines(d ...*Deadline) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetFirstName(s string) *UserUpdate
- func (uu *UserUpdate) SetGodMode(b bool) *UserUpdate
- func (uu *UserUpdate) SetInstitution(i *Institution) *UserUpdate
- func (uu *UserUpdate) SetInstitutionID(id int) *UserUpdate
- func (uu *UserUpdate) SetLastName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillablePoints(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillablePointsAwardedCount(i *int) *UserUpdate
- func (uu *UserUpdate) SetNillablePointsAwardedResetTime(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetPassword(h hash.Encoded) *UserUpdate
- func (uu *UserUpdate) SetPoints(i int) *UserUpdate
- func (uu *UserUpdate) SetPointsAwardedCount(i int) *UserUpdate
- func (uu *UserUpdate) SetPointsAwardedResetTime(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetRole(i institution.Role) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddAuthoredDeadlineIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddAuthoredDeadlines(d ...*Deadline) *UserUpdateOne
- func (uuo *UserUpdateOne) AddForumPostIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddForumPosts(f ...*ForumPost) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroupIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroups(g ...*Group) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPet(p ...*Pet) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPetIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPoints(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddPointsAwardedCount(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddReactedPostIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddReactedPosts(f ...*ForumPost) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRedemptionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRedemptions(r ...*Redemption) *UserUpdateOne
- func (uuo *UserUpdateOne) AddVotedDeadlineIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddVotedDeadlines(d ...*Deadline) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearAuthoredDeadlines() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearForumPosts() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearInstitution() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPet() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearPointsAwardedResetTime() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearReactedPosts() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRedemptions() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearVotedDeadlines() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveAuthoredDeadlineIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveAuthoredDeadlines(d ...*Deadline) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveForumPostIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveForumPosts(f ...*ForumPost) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroups(g ...*Group) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePet(p ...*Pet) *UserUpdateOne
- func (uuo *UserUpdateOne) RemovePetIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveReactedPostIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveReactedPosts(f ...*ForumPost) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRedemptionIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRedemptions(r ...*Redemption) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveVotedDeadlineIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveVotedDeadlines(d ...*Deadline) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetGodMode(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetInstitution(i *Institution) *UserUpdateOne
- func (uuo *UserUpdateOne) SetInstitutionID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePoints(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePointsAwardedCount(i *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePointsAwardedResetTime(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(h hash.Encoded) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPoints(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPointsAwardedCount(i int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPointsAwardedResetTime(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRole(i institution.Role) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) AddPoints(v int) *UserUpsert
- func (u *UserUpsert) AddPointsAwardedCount(v int) *UserUpsert
- func (u *UserUpsert) ClearPointsAwardedResetTime() *UserUpsert
- func (u *UserUpsert) SetEmail(v string) *UserUpsert
- func (u *UserUpsert) SetFirstName(v string) *UserUpsert
- func (u *UserUpsert) SetGodMode(v bool) *UserUpsert
- func (u *UserUpsert) SetLastName(v string) *UserUpsert
- func (u *UserUpsert) SetPassword(v hash.Encoded) *UserUpsert
- func (u *UserUpsert) SetPoints(v int) *UserUpsert
- func (u *UserUpsert) SetPointsAwardedCount(v int) *UserUpsert
- func (u *UserUpsert) SetPointsAwardedResetTime(v time.Time) *UserUpsert
- func (u *UserUpsert) SetRole(v institution.Role) *UserUpsert
- func (u *UserUpsert) UpdateEmail() *UserUpsert
- func (u *UserUpsert) UpdateFirstName() *UserUpsert
- func (u *UserUpsert) UpdateGodMode() *UserUpsert
- func (u *UserUpsert) UpdateLastName() *UserUpsert
- func (u *UserUpsert) UpdatePassword() *UserUpsert
- func (u *UserUpsert) UpdatePoints() *UserUpsert
- func (u *UserUpsert) UpdatePointsAwardedCount() *UserUpsert
- func (u *UserUpsert) UpdatePointsAwardedResetTime() *UserUpsert
- func (u *UserUpsert) UpdateRole() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) AddPoints(v int) *UserUpsertBulk
- func (u *UserUpsertBulk) AddPointsAwardedCount(v int) *UserUpsertBulk
- func (u *UserUpsertBulk) ClearPointsAwardedResetTime() *UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetFirstName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetGodMode(v bool) *UserUpsertBulk
- func (u *UserUpsertBulk) SetLastName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPassword(v hash.Encoded) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPoints(v int) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPointsAwardedCount(v int) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPointsAwardedResetTime(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetRole(v institution.Role) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateFirstName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateGodMode() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateLastName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePoints() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePointsAwardedCount() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePointsAwardedResetTime() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateRole() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) AddPoints(v int) *UserUpsertOne
- func (u *UserUpsertOne) AddPointsAwardedCount(v int) *UserUpsertOne
- func (u *UserUpsertOne) ClearPointsAwardedResetTime() *UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) int
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetFirstName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetGodMode(v bool) *UserUpsertOne
- func (u *UserUpsertOne) SetLastName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetPassword(v hash.Encoded) *UserUpsertOne
- func (u *UserUpsertOne) SetPoints(v int) *UserUpsertOne
- func (u *UserUpsertOne) SetPointsAwardedCount(v int) *UserUpsertOne
- func (u *UserUpsertOne) SetPointsAwardedResetTime(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetRole(v institution.Role) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
- func (u *UserUpsertOne) UpdateFirstName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateGodMode() *UserUpsertOne
- func (u *UserUpsertOne) UpdateLastName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePoints() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePointsAwardedCount() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePointsAwardedResetTime() *UserUpsertOne
- func (u *UserUpsertOne) UpdateRole() *UserUpsertOne
- type Users
- type ValidationError
- type Value
- type Voucher
- type VoucherClient
- func (c *VoucherClient) Create() *VoucherCreate
- func (c *VoucherClient) CreateBulk(builders ...*VoucherCreate) *VoucherCreateBulk
- func (c *VoucherClient) Delete() *VoucherDelete
- func (c *VoucherClient) DeleteOne(v *Voucher) *VoucherDeleteOne
- func (c *VoucherClient) DeleteOneID(id int) *VoucherDeleteOne
- func (c *VoucherClient) Get(ctx context.Context, id int) (*Voucher, error)
- func (c *VoucherClient) GetX(ctx context.Context, id int) *Voucher
- func (c *VoucherClient) Hooks() []Hook
- func (c *VoucherClient) Intercept(interceptors ...Interceptor)
- func (c *VoucherClient) Interceptors() []Interceptor
- func (c *VoucherClient) Query() *VoucherQuery
- func (c *VoucherClient) QueryInstitution(v *Voucher) *InstitutionQuery
- func (c *VoucherClient) QueryRedemptions(v *Voucher) *RedemptionQuery
- func (c *VoucherClient) Update() *VoucherUpdate
- func (c *VoucherClient) UpdateOne(v *Voucher) *VoucherUpdateOne
- func (c *VoucherClient) UpdateOneID(id int) *VoucherUpdateOne
- func (c *VoucherClient) Use(hooks ...Hook)
- type VoucherCreate
- func (vc *VoucherCreate) AddRedemptionIDs(ids ...int) *VoucherCreate
- func (vc *VoucherCreate) AddRedemptions(r ...*Redemption) *VoucherCreate
- func (vc *VoucherCreate) Exec(ctx context.Context) error
- func (vc *VoucherCreate) ExecX(ctx context.Context)
- func (vc *VoucherCreate) Mutation() *VoucherMutation
- func (vc *VoucherCreate) OnConflict(opts ...sql.ConflictOption) *VoucherUpsertOne
- func (vc *VoucherCreate) OnConflictColumns(columns ...string) *VoucherUpsertOne
- func (vc *VoucherCreate) Save(ctx context.Context) (*Voucher, error)
- func (vc *VoucherCreate) SaveX(ctx context.Context) *Voucher
- func (vc *VoucherCreate) SetDescription(s string) *VoucherCreate
- func (vc *VoucherCreate) SetInstitution(i *Institution) *VoucherCreate
- func (vc *VoucherCreate) SetInstitutionID(id int) *VoucherCreate
- func (vc *VoucherCreate) SetName(s string) *VoucherCreate
- func (vc *VoucherCreate) SetPointsRequired(i int) *VoucherCreate
- type VoucherCreateBulk
- func (vcb *VoucherCreateBulk) Exec(ctx context.Context) error
- func (vcb *VoucherCreateBulk) ExecX(ctx context.Context)
- func (vcb *VoucherCreateBulk) OnConflict(opts ...sql.ConflictOption) *VoucherUpsertBulk
- func (vcb *VoucherCreateBulk) OnConflictColumns(columns ...string) *VoucherUpsertBulk
- func (vcb *VoucherCreateBulk) Save(ctx context.Context) ([]*Voucher, error)
- func (vcb *VoucherCreateBulk) SaveX(ctx context.Context) []*Voucher
- type VoucherDelete
- type VoucherDeleteOne
- type VoucherEdges
- type VoucherGroupBy
- func (vgb *VoucherGroupBy) Aggregate(fns ...AggregateFunc) *VoucherGroupBy
- func (s *VoucherGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *VoucherGroupBy) BoolX(ctx context.Context) bool
- func (s *VoucherGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *VoucherGroupBy) BoolsX(ctx context.Context) []bool
- func (s *VoucherGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *VoucherGroupBy) Float64X(ctx context.Context) float64
- func (s *VoucherGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *VoucherGroupBy) Float64sX(ctx context.Context) []float64
- func (s *VoucherGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *VoucherGroupBy) IntX(ctx context.Context) int
- func (s *VoucherGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *VoucherGroupBy) IntsX(ctx context.Context) []int
- func (vgb *VoucherGroupBy) Scan(ctx context.Context, v any) error
- func (s *VoucherGroupBy) ScanX(ctx context.Context, v any)
- func (s *VoucherGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *VoucherGroupBy) StringX(ctx context.Context) string
- func (s *VoucherGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *VoucherGroupBy) StringsX(ctx context.Context) []string
- type VoucherMutation
- func (m *VoucherMutation) AddField(name string, value ent.Value) error
- func (m *VoucherMutation) AddPointsRequired(i int)
- func (m *VoucherMutation) AddRedemptionIDs(ids ...int)
- func (m *VoucherMutation) AddedEdges() []string
- func (m *VoucherMutation) AddedField(name string) (ent.Value, bool)
- func (m *VoucherMutation) AddedFields() []string
- func (m *VoucherMutation) AddedIDs(name string) []ent.Value
- func (m *VoucherMutation) AddedPointsRequired() (r int, exists bool)
- func (m *VoucherMutation) ClearEdge(name string) error
- func (m *VoucherMutation) ClearField(name string) error
- func (m *VoucherMutation) ClearInstitution()
- func (m *VoucherMutation) ClearRedemptions()
- func (m *VoucherMutation) ClearedEdges() []string
- func (m *VoucherMutation) ClearedFields() []string
- func (m VoucherMutation) Client() *Client
- func (m *VoucherMutation) Description() (r string, exists bool)
- func (m *VoucherMutation) EdgeCleared(name string) bool
- func (m *VoucherMutation) Field(name string) (ent.Value, bool)
- func (m *VoucherMutation) FieldCleared(name string) bool
- func (m *VoucherMutation) Fields() []string
- func (m *VoucherMutation) ID() (id int, exists bool)
- func (m *VoucherMutation) IDs(ctx context.Context) ([]int, error)
- func (m *VoucherMutation) InstitutionCleared() bool
- func (m *VoucherMutation) InstitutionID() (id int, exists bool)
- func (m *VoucherMutation) InstitutionIDs() (ids []int)
- func (m *VoucherMutation) Name() (r string, exists bool)
- func (m *VoucherMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *VoucherMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *VoucherMutation) OldName(ctx context.Context) (v string, err error)
- func (m *VoucherMutation) OldPointsRequired(ctx context.Context) (v int, err error)
- func (m *VoucherMutation) Op() Op
- func (m *VoucherMutation) PointsRequired() (r int, exists bool)
- func (m *VoucherMutation) RedemptionsCleared() bool
- func (m *VoucherMutation) RedemptionsIDs() (ids []int)
- func (m *VoucherMutation) RemoveRedemptionIDs(ids ...int)
- func (m *VoucherMutation) RemovedEdges() []string
- func (m *VoucherMutation) RemovedIDs(name string) []ent.Value
- func (m *VoucherMutation) RemovedRedemptionsIDs() (ids []int)
- func (m *VoucherMutation) ResetDescription()
- func (m *VoucherMutation) ResetEdge(name string) error
- func (m *VoucherMutation) ResetField(name string) error
- func (m *VoucherMutation) ResetInstitution()
- func (m *VoucherMutation) ResetName()
- func (m *VoucherMutation) ResetPointsRequired()
- func (m *VoucherMutation) ResetRedemptions()
- func (m *VoucherMutation) SetDescription(s string)
- func (m *VoucherMutation) SetField(name string, value ent.Value) error
- func (m *VoucherMutation) SetInstitutionID(id int)
- func (m *VoucherMutation) SetName(s string)
- func (m *VoucherMutation) SetOp(op Op)
- func (m *VoucherMutation) SetPointsRequired(i int)
- func (m VoucherMutation) Tx() (*Tx, error)
- func (m *VoucherMutation) Type() string
- func (m *VoucherMutation) Where(ps ...predicate.Voucher)
- func (m *VoucherMutation) WhereP(ps ...func(*sql.Selector))
- type VoucherQuery
- func (vq *VoucherQuery) Aggregate(fns ...AggregateFunc) *VoucherSelect
- func (vq *VoucherQuery) All(ctx context.Context) ([]*Voucher, error)
- func (vq *VoucherQuery) AllX(ctx context.Context) []*Voucher
- func (vq *VoucherQuery) Clone() *VoucherQuery
- func (vq *VoucherQuery) Count(ctx context.Context) (int, error)
- func (vq *VoucherQuery) CountX(ctx context.Context) int
- func (vq *VoucherQuery) Exist(ctx context.Context) (bool, error)
- func (vq *VoucherQuery) ExistX(ctx context.Context) bool
- func (vq *VoucherQuery) First(ctx context.Context) (*Voucher, error)
- func (vq *VoucherQuery) FirstID(ctx context.Context) (id int, err error)
- func (vq *VoucherQuery) FirstIDX(ctx context.Context) int
- func (vq *VoucherQuery) FirstX(ctx context.Context) *Voucher
- func (vq *VoucherQuery) GroupBy(field string, fields ...string) *VoucherGroupBy
- func (vq *VoucherQuery) IDs(ctx context.Context) (ids []int, err error)
- func (vq *VoucherQuery) IDsX(ctx context.Context) []int
- func (vq *VoucherQuery) Limit(limit int) *VoucherQuery
- func (vq *VoucherQuery) Offset(offset int) *VoucherQuery
- func (vq *VoucherQuery) Only(ctx context.Context) (*Voucher, error)
- func (vq *VoucherQuery) OnlyID(ctx context.Context) (id int, err error)
- func (vq *VoucherQuery) OnlyIDX(ctx context.Context) int
- func (vq *VoucherQuery) OnlyX(ctx context.Context) *Voucher
- func (vq *VoucherQuery) Order(o ...voucher.OrderOption) *VoucherQuery
- func (vq *VoucherQuery) QueryInstitution() *InstitutionQuery
- func (vq *VoucherQuery) QueryRedemptions() *RedemptionQuery
- func (vq *VoucherQuery) Select(fields ...string) *VoucherSelect
- func (vq *VoucherQuery) Unique(unique bool) *VoucherQuery
- func (vq *VoucherQuery) Where(ps ...predicate.Voucher) *VoucherQuery
- func (vq *VoucherQuery) WithInstitution(opts ...func(*InstitutionQuery)) *VoucherQuery
- func (vq *VoucherQuery) WithRedemptions(opts ...func(*RedemptionQuery)) *VoucherQuery
- type VoucherSelect
- func (vs *VoucherSelect) Aggregate(fns ...AggregateFunc) *VoucherSelect
- func (s *VoucherSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *VoucherSelect) BoolX(ctx context.Context) bool
- func (s *VoucherSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *VoucherSelect) BoolsX(ctx context.Context) []bool
- func (s *VoucherSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *VoucherSelect) Float64X(ctx context.Context) float64
- func (s *VoucherSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *VoucherSelect) Float64sX(ctx context.Context) []float64
- func (s *VoucherSelect) Int(ctx context.Context) (_ int, err error)
- func (s *VoucherSelect) IntX(ctx context.Context) int
- func (s *VoucherSelect) Ints(ctx context.Context) ([]int, error)
- func (s *VoucherSelect) IntsX(ctx context.Context) []int
- func (vs *VoucherSelect) Scan(ctx context.Context, v any) error
- func (s *VoucherSelect) ScanX(ctx context.Context, v any)
- func (s *VoucherSelect) String(ctx context.Context) (_ string, err error)
- func (s *VoucherSelect) StringX(ctx context.Context) string
- func (s *VoucherSelect) Strings(ctx context.Context) ([]string, error)
- func (s *VoucherSelect) StringsX(ctx context.Context) []string
- type VoucherUpdate
- func (vu *VoucherUpdate) AddPointsRequired(i int) *VoucherUpdate
- func (vu *VoucherUpdate) AddRedemptionIDs(ids ...int) *VoucherUpdate
- func (vu *VoucherUpdate) AddRedemptions(r ...*Redemption) *VoucherUpdate
- func (vu *VoucherUpdate) ClearInstitution() *VoucherUpdate
- func (vu *VoucherUpdate) ClearRedemptions() *VoucherUpdate
- func (vu *VoucherUpdate) Exec(ctx context.Context) error
- func (vu *VoucherUpdate) ExecX(ctx context.Context)
- func (vu *VoucherUpdate) Mutation() *VoucherMutation
- func (vu *VoucherUpdate) RemoveRedemptionIDs(ids ...int) *VoucherUpdate
- func (vu *VoucherUpdate) RemoveRedemptions(r ...*Redemption) *VoucherUpdate
- func (vu *VoucherUpdate) Save(ctx context.Context) (int, error)
- func (vu *VoucherUpdate) SaveX(ctx context.Context) int
- func (vu *VoucherUpdate) SetDescription(s string) *VoucherUpdate
- func (vu *VoucherUpdate) SetInstitution(i *Institution) *VoucherUpdate
- func (vu *VoucherUpdate) SetInstitutionID(id int) *VoucherUpdate
- func (vu *VoucherUpdate) SetName(s string) *VoucherUpdate
- func (vu *VoucherUpdate) SetPointsRequired(i int) *VoucherUpdate
- func (vu *VoucherUpdate) Where(ps ...predicate.Voucher) *VoucherUpdate
- type VoucherUpdateOne
- func (vuo *VoucherUpdateOne) AddPointsRequired(i int) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) AddRedemptionIDs(ids ...int) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) AddRedemptions(r ...*Redemption) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) ClearInstitution() *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) ClearRedemptions() *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) Exec(ctx context.Context) error
- func (vuo *VoucherUpdateOne) ExecX(ctx context.Context)
- func (vuo *VoucherUpdateOne) Mutation() *VoucherMutation
- func (vuo *VoucherUpdateOne) RemoveRedemptionIDs(ids ...int) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) RemoveRedemptions(r ...*Redemption) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) Save(ctx context.Context) (*Voucher, error)
- func (vuo *VoucherUpdateOne) SaveX(ctx context.Context) *Voucher
- func (vuo *VoucherUpdateOne) Select(field string, fields ...string) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) SetDescription(s string) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) SetInstitution(i *Institution) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) SetInstitutionID(id int) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) SetName(s string) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) SetPointsRequired(i int) *VoucherUpdateOne
- func (vuo *VoucherUpdateOne) Where(ps ...predicate.Voucher) *VoucherUpdateOne
- type VoucherUpsert
- func (u *VoucherUpsert) AddPointsRequired(v int) *VoucherUpsert
- func (u *VoucherUpsert) SetDescription(v string) *VoucherUpsert
- func (u *VoucherUpsert) SetName(v string) *VoucherUpsert
- func (u *VoucherUpsert) SetPointsRequired(v int) *VoucherUpsert
- func (u *VoucherUpsert) UpdateDescription() *VoucherUpsert
- func (u *VoucherUpsert) UpdateName() *VoucherUpsert
- func (u *VoucherUpsert) UpdatePointsRequired() *VoucherUpsert
- type VoucherUpsertBulk
- func (u *VoucherUpsertBulk) AddPointsRequired(v int) *VoucherUpsertBulk
- func (u *VoucherUpsertBulk) DoNothing() *VoucherUpsertBulk
- func (u *VoucherUpsertBulk) Exec(ctx context.Context) error
- func (u *VoucherUpsertBulk) ExecX(ctx context.Context)
- func (u *VoucherUpsertBulk) Ignore() *VoucherUpsertBulk
- func (u *VoucherUpsertBulk) SetDescription(v string) *VoucherUpsertBulk
- func (u *VoucherUpsertBulk) SetName(v string) *VoucherUpsertBulk
- func (u *VoucherUpsertBulk) SetPointsRequired(v int) *VoucherUpsertBulk
- func (u *VoucherUpsertBulk) Update(set func(*VoucherUpsert)) *VoucherUpsertBulk
- func (u *VoucherUpsertBulk) UpdateDescription() *VoucherUpsertBulk
- func (u *VoucherUpsertBulk) UpdateName() *VoucherUpsertBulk
- func (u *VoucherUpsertBulk) UpdateNewValues() *VoucherUpsertBulk
- func (u *VoucherUpsertBulk) UpdatePointsRequired() *VoucherUpsertBulk
- type VoucherUpsertOne
- func (u *VoucherUpsertOne) AddPointsRequired(v int) *VoucherUpsertOne
- func (u *VoucherUpsertOne) DoNothing() *VoucherUpsertOne
- func (u *VoucherUpsertOne) Exec(ctx context.Context) error
- func (u *VoucherUpsertOne) ExecX(ctx context.Context)
- func (u *VoucherUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *VoucherUpsertOne) IDX(ctx context.Context) int
- func (u *VoucherUpsertOne) Ignore() *VoucherUpsertOne
- func (u *VoucherUpsertOne) SetDescription(v string) *VoucherUpsertOne
- func (u *VoucherUpsertOne) SetName(v string) *VoucherUpsertOne
- func (u *VoucherUpsertOne) SetPointsRequired(v int) *VoucherUpsertOne
- func (u *VoucherUpsertOne) Update(set func(*VoucherUpsert)) *VoucherUpsertOne
- func (u *VoucherUpsertOne) UpdateDescription() *VoucherUpsertOne
- func (u *VoucherUpsertOne) UpdateName() *VoucherUpsertOne
- func (u *VoucherUpsertOne) UpdateNewValues() *VoucherUpsertOne
- func (u *VoucherUpsertOne) UpdatePointsRequired() *VoucherUpsertOne
- type Vouchers
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAccessory = "Accessory" TypeDeadline = "Deadline" TypeEvent = "Event" TypeForum = "Forum" TypeForumPost = "ForumPost" TypeGroup = "Group" TypeGroupInviteLink = "GroupInviteLink" TypeGroupUser = "GroupUser" TypeInstitution = "Institution" TypeInstitutionInviteLink = "InstitutionInviteLink" TypeJWTRevocation = "JWTRevocation" TypeMilestone = "Milestone" TypePet = "Pet" TypeReaction = "Reaction" TypeRedemption = "Redemption" TypeStudyPlan = "StudyPlan" TypeUser = "User" TypeUserPet = "UserPet" TypeVoucher = "Voucher" )
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 Accessory ¶
type Accessory struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the prize Name string `json:"name,omitempty"` // Description of the prize Description string `json:"description,omitempty"` // Points required to redeem the prize PointsRequired int `json:"points_required,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AccessoryQuery when eager-loading is set. Edges AccessoryEdges `json:"edges"` // contains filtered or unexported fields }
Accessory is the model entity for the Accessory schema.
func (*Accessory) QueryInstitution ¶
func (a *Accessory) QueryInstitution() *InstitutionQuery
QueryInstitution queries the "institution" edge of the Accessory entity.
func (*Accessory) QueryRedemptions ¶
func (a *Accessory) QueryRedemptions() *RedemptionQuery
QueryRedemptions queries the "redemptions" edge of the Accessory entity.
func (*Accessory) Unwrap ¶
Unwrap unwraps the Accessory 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 (*Accessory) Update ¶
func (a *Accessory) Update() *AccessoryUpdateOne
Update returns a builder for updating this Accessory. Note that you need to call Accessory.Unwrap() before calling this method if this Accessory was returned from a transaction, and the transaction was committed or rolled back.
type AccessoryClient ¶
type AccessoryClient struct {
// contains filtered or unexported fields
}
AccessoryClient is a client for the Accessory schema.
func NewAccessoryClient ¶
func NewAccessoryClient(c config) *AccessoryClient
NewAccessoryClient returns a client for the Accessory from the given config.
func (*AccessoryClient) Create ¶
func (c *AccessoryClient) Create() *AccessoryCreate
Create returns a builder for creating a Accessory entity.
func (*AccessoryClient) CreateBulk ¶
func (c *AccessoryClient) CreateBulk(builders ...*AccessoryCreate) *AccessoryCreateBulk
CreateBulk returns a builder for creating a bulk of Accessory entities.
func (*AccessoryClient) Delete ¶
func (c *AccessoryClient) Delete() *AccessoryDelete
Delete returns a delete builder for Accessory.
func (*AccessoryClient) DeleteOne ¶
func (c *AccessoryClient) DeleteOne(a *Accessory) *AccessoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AccessoryClient) DeleteOneID ¶
func (c *AccessoryClient) DeleteOneID(id int) *AccessoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AccessoryClient) GetX ¶
func (c *AccessoryClient) GetX(ctx context.Context, id int) *Accessory
GetX is like Get, but panics if an error occurs.
func (*AccessoryClient) Hooks ¶
func (c *AccessoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AccessoryClient) Intercept ¶
func (c *AccessoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `accessory.Intercept(f(g(h())))`.
func (*AccessoryClient) Interceptors ¶
func (c *AccessoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AccessoryClient) Query ¶
func (c *AccessoryClient) Query() *AccessoryQuery
Query returns a query builder for Accessory.
func (*AccessoryClient) QueryInstitution ¶
func (c *AccessoryClient) QueryInstitution(a *Accessory) *InstitutionQuery
QueryInstitution queries the institution edge of a Accessory.
func (*AccessoryClient) QueryRedemptions ¶
func (c *AccessoryClient) QueryRedemptions(a *Accessory) *RedemptionQuery
QueryRedemptions queries the redemptions edge of a Accessory.
func (*AccessoryClient) Update ¶
func (c *AccessoryClient) Update() *AccessoryUpdate
Update returns an update builder for Accessory.
func (*AccessoryClient) UpdateOne ¶
func (c *AccessoryClient) UpdateOne(a *Accessory) *AccessoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AccessoryClient) UpdateOneID ¶
func (c *AccessoryClient) UpdateOneID(id int) *AccessoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AccessoryClient) Use ¶
func (c *AccessoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `accessory.Hooks(f(g(h())))`.
type AccessoryCreate ¶
type AccessoryCreate struct {
// contains filtered or unexported fields
}
AccessoryCreate is the builder for creating a Accessory entity.
func (*AccessoryCreate) AddRedemptionIDs ¶
func (ac *AccessoryCreate) AddRedemptionIDs(ids ...int) *AccessoryCreate
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by IDs.
func (*AccessoryCreate) AddRedemptions ¶
func (ac *AccessoryCreate) AddRedemptions(r ...*Redemption) *AccessoryCreate
AddRedemptions adds the "redemptions" edges to the Redemption entity.
func (*AccessoryCreate) Exec ¶
func (ac *AccessoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccessoryCreate) ExecX ¶
func (ac *AccessoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessoryCreate) Mutation ¶
func (ac *AccessoryCreate) Mutation() *AccessoryMutation
Mutation returns the AccessoryMutation object of the builder.
func (*AccessoryCreate) OnConflict ¶
func (ac *AccessoryCreate) OnConflict(opts ...sql.ConflictOption) *AccessoryUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Accessory.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AccessoryUpsert) { SetName(v+v). }). Exec(ctx)
func (*AccessoryCreate) OnConflictColumns ¶
func (ac *AccessoryCreate) OnConflictColumns(columns ...string) *AccessoryUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Accessory.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AccessoryCreate) Save ¶
func (ac *AccessoryCreate) Save(ctx context.Context) (*Accessory, error)
Save creates the Accessory in the database.
func (*AccessoryCreate) SaveX ¶
func (ac *AccessoryCreate) SaveX(ctx context.Context) *Accessory
SaveX calls Save and panics if Save returns an error.
func (*AccessoryCreate) SetDescription ¶
func (ac *AccessoryCreate) SetDescription(s string) *AccessoryCreate
SetDescription sets the "description" field.
func (*AccessoryCreate) SetInstitution ¶
func (ac *AccessoryCreate) SetInstitution(i *Institution) *AccessoryCreate
SetInstitution sets the "institution" edge to the Institution entity.
func (*AccessoryCreate) SetInstitutionID ¶
func (ac *AccessoryCreate) SetInstitutionID(id int) *AccessoryCreate
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*AccessoryCreate) SetName ¶
func (ac *AccessoryCreate) SetName(s string) *AccessoryCreate
SetName sets the "name" field.
func (*AccessoryCreate) SetPointsRequired ¶
func (ac *AccessoryCreate) SetPointsRequired(i int) *AccessoryCreate
SetPointsRequired sets the "points_required" field.
type AccessoryCreateBulk ¶
type AccessoryCreateBulk struct {
// contains filtered or unexported fields
}
AccessoryCreateBulk is the builder for creating many Accessory entities in bulk.
func (*AccessoryCreateBulk) Exec ¶
func (acb *AccessoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccessoryCreateBulk) ExecX ¶
func (acb *AccessoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessoryCreateBulk) OnConflict ¶
func (acb *AccessoryCreateBulk) OnConflict(opts ...sql.ConflictOption) *AccessoryUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Accessory.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AccessoryUpsert) { SetName(v+v). }). Exec(ctx)
func (*AccessoryCreateBulk) OnConflictColumns ¶
func (acb *AccessoryCreateBulk) OnConflictColumns(columns ...string) *AccessoryUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Accessory.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type AccessoryDelete ¶
type AccessoryDelete struct {
// contains filtered or unexported fields
}
AccessoryDelete is the builder for deleting a Accessory entity.
func (*AccessoryDelete) Exec ¶
func (ad *AccessoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AccessoryDelete) ExecX ¶
func (ad *AccessoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AccessoryDelete) Where ¶
func (ad *AccessoryDelete) Where(ps ...predicate.Accessory) *AccessoryDelete
Where appends a list predicates to the AccessoryDelete builder.
type AccessoryDeleteOne ¶
type AccessoryDeleteOne struct {
// contains filtered or unexported fields
}
AccessoryDeleteOne is the builder for deleting a single Accessory entity.
func (*AccessoryDeleteOne) Exec ¶
func (ado *AccessoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AccessoryDeleteOne) ExecX ¶
func (ado *AccessoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessoryDeleteOne) Where ¶
func (ado *AccessoryDeleteOne) Where(ps ...predicate.Accessory) *AccessoryDeleteOne
Where appends a list predicates to the AccessoryDelete builder.
type AccessoryEdges ¶
type AccessoryEdges struct { // Redemptions that involve this prize Redemptions []*Redemption `json:"redemptions,omitempty"` // Institution that owns this accessory Institution *Institution `json:"institution,omitempty"` // contains filtered or unexported fields }
AccessoryEdges holds the relations/edges for other nodes in the graph.
func (AccessoryEdges) InstitutionOrErr ¶
func (e AccessoryEdges) InstitutionOrErr() (*Institution, error)
InstitutionOrErr returns the Institution value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (AccessoryEdges) RedemptionsOrErr ¶
func (e AccessoryEdges) RedemptionsOrErr() ([]*Redemption, error)
RedemptionsOrErr returns the Redemptions value or an error if the edge was not loaded in eager-loading.
type AccessoryGroupBy ¶
type AccessoryGroupBy struct {
// contains filtered or unexported fields
}
AccessoryGroupBy is the group-by builder for Accessory entities.
func (*AccessoryGroupBy) Aggregate ¶
func (agb *AccessoryGroupBy) Aggregate(fns ...AggregateFunc) *AccessoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AccessoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccessoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccessoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccessoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccessoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccessoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccessoryGroupBy) Scan ¶
func (agb *AccessoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccessoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccessoryMutation ¶
type AccessoryMutation struct {
// contains filtered or unexported fields
}
AccessoryMutation represents an operation that mutates the Accessory nodes in the graph.
func (*AccessoryMutation) AddField ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) AddPointsRequired ¶
func (m *AccessoryMutation) AddPointsRequired(i int)
AddPointsRequired adds i to the "points_required" field.
func (*AccessoryMutation) AddRedemptionIDs ¶
func (m *AccessoryMutation) AddRedemptionIDs(ids ...int)
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by ids.
func (*AccessoryMutation) AddedEdges ¶
func (m *AccessoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AccessoryMutation) AddedField ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) AddedFields ¶
func (m *AccessoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AccessoryMutation) AddedIDs ¶
func (m *AccessoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AccessoryMutation) AddedPointsRequired ¶
func (m *AccessoryMutation) AddedPointsRequired() (r int, exists bool)
AddedPointsRequired returns the value that was added to the "points_required" field in this mutation.
func (*AccessoryMutation) ClearEdge ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) ClearField ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) ClearInstitution ¶
func (m *AccessoryMutation) ClearInstitution()
ClearInstitution clears the "institution" edge to the Institution entity.
func (*AccessoryMutation) ClearRedemptions ¶
func (m *AccessoryMutation) ClearRedemptions()
ClearRedemptions clears the "redemptions" edge to the Redemption entity.
func (*AccessoryMutation) ClearedEdges ¶
func (m *AccessoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AccessoryMutation) ClearedFields ¶
func (m *AccessoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AccessoryMutation) Client ¶
func (m AccessoryMutation) 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 (*AccessoryMutation) Description ¶
func (m *AccessoryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*AccessoryMutation) EdgeCleared ¶
func (m *AccessoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AccessoryMutation) Field ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) FieldCleared ¶
func (m *AccessoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AccessoryMutation) Fields ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) ID ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) IDs ¶
func (m *AccessoryMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AccessoryMutation) InstitutionCleared ¶
func (m *AccessoryMutation) InstitutionCleared() bool
InstitutionCleared reports if the "institution" edge to the Institution entity was cleared.
func (*AccessoryMutation) InstitutionID ¶
func (m *AccessoryMutation) InstitutionID() (id int, exists bool)
InstitutionID returns the "institution" edge ID in the mutation.
func (*AccessoryMutation) InstitutionIDs ¶
func (m *AccessoryMutation) InstitutionIDs() (ids []int)
InstitutionIDs returns the "institution" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InstitutionID instead. It exists only for internal usage by the builders.
func (*AccessoryMutation) Name ¶
func (m *AccessoryMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AccessoryMutation) OldDescription ¶
func (m *AccessoryMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Accessory entity. If the Accessory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccessoryMutation) 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 (*AccessoryMutation) OldName ¶
func (m *AccessoryMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Accessory entity. If the Accessory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccessoryMutation) OldPointsRequired ¶
func (m *AccessoryMutation) OldPointsRequired(ctx context.Context) (v int, err error)
OldPointsRequired returns the old "points_required" field's value of the Accessory entity. If the Accessory object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AccessoryMutation) PointsRequired ¶
func (m *AccessoryMutation) PointsRequired() (r int, exists bool)
PointsRequired returns the value of the "points_required" field in the mutation.
func (*AccessoryMutation) RedemptionsCleared ¶
func (m *AccessoryMutation) RedemptionsCleared() bool
RedemptionsCleared reports if the "redemptions" edge to the Redemption entity was cleared.
func (*AccessoryMutation) RedemptionsIDs ¶
func (m *AccessoryMutation) RedemptionsIDs() (ids []int)
RedemptionsIDs returns the "redemptions" edge IDs in the mutation.
func (*AccessoryMutation) RemoveRedemptionIDs ¶
func (m *AccessoryMutation) RemoveRedemptionIDs(ids ...int)
RemoveRedemptionIDs removes the "redemptions" edge to the Redemption entity by IDs.
func (*AccessoryMutation) RemovedEdges ¶
func (m *AccessoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AccessoryMutation) RemovedIDs ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) RemovedRedemptionsIDs ¶
func (m *AccessoryMutation) RemovedRedemptionsIDs() (ids []int)
RemovedRedemptions returns the removed IDs of the "redemptions" edge to the Redemption entity.
func (*AccessoryMutation) ResetDescription ¶
func (m *AccessoryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*AccessoryMutation) ResetEdge ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) ResetField ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) ResetInstitution ¶
func (m *AccessoryMutation) ResetInstitution()
ResetInstitution resets all changes to the "institution" edge.
func (*AccessoryMutation) ResetName ¶
func (m *AccessoryMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AccessoryMutation) ResetPointsRequired ¶
func (m *AccessoryMutation) ResetPointsRequired()
ResetPointsRequired resets all changes to the "points_required" field.
func (*AccessoryMutation) ResetRedemptions ¶
func (m *AccessoryMutation) ResetRedemptions()
ResetRedemptions resets all changes to the "redemptions" edge.
func (*AccessoryMutation) SetDescription ¶
func (m *AccessoryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*AccessoryMutation) SetField ¶
func (m *AccessoryMutation) 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 (*AccessoryMutation) SetInstitutionID ¶
func (m *AccessoryMutation) SetInstitutionID(id int)
SetInstitutionID sets the "institution" edge to the Institution entity by id.
func (*AccessoryMutation) SetName ¶
func (m *AccessoryMutation) SetName(s string)
SetName sets the "name" field.
func (*AccessoryMutation) SetOp ¶
func (m *AccessoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AccessoryMutation) SetPointsRequired ¶
func (m *AccessoryMutation) SetPointsRequired(i int)
SetPointsRequired sets the "points_required" field.
func (AccessoryMutation) Tx ¶
func (m AccessoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AccessoryMutation) Type ¶
func (m *AccessoryMutation) Type() string
Type returns the node type of this mutation (Accessory).
func (*AccessoryMutation) Where ¶
func (m *AccessoryMutation) Where(ps ...predicate.Accessory)
Where appends a list predicates to the AccessoryMutation builder.
func (*AccessoryMutation) WhereP ¶
func (m *AccessoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AccessoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AccessoryQuery ¶
type AccessoryQuery struct {
// contains filtered or unexported fields
}
AccessoryQuery is the builder for querying Accessory entities.
func (*AccessoryQuery) Aggregate ¶
func (aq *AccessoryQuery) Aggregate(fns ...AggregateFunc) *AccessorySelect
Aggregate returns a AccessorySelect configured with the given aggregations.
func (*AccessoryQuery) All ¶
func (aq *AccessoryQuery) All(ctx context.Context) ([]*Accessory, error)
All executes the query and returns a list of Accessories.
func (*AccessoryQuery) AllX ¶
func (aq *AccessoryQuery) AllX(ctx context.Context) []*Accessory
AllX is like All, but panics if an error occurs.
func (*AccessoryQuery) Clone ¶
func (aq *AccessoryQuery) Clone() *AccessoryQuery
Clone returns a duplicate of the AccessoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AccessoryQuery) Count ¶
func (aq *AccessoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AccessoryQuery) CountX ¶
func (aq *AccessoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AccessoryQuery) Exist ¶
func (aq *AccessoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AccessoryQuery) ExistX ¶
func (aq *AccessoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AccessoryQuery) First ¶
func (aq *AccessoryQuery) First(ctx context.Context) (*Accessory, error)
First returns the first Accessory entity from the query. Returns a *NotFoundError when no Accessory was found.
func (*AccessoryQuery) FirstID ¶
func (aq *AccessoryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Accessory ID from the query. Returns a *NotFoundError when no Accessory ID was found.
func (*AccessoryQuery) FirstIDX ¶
func (aq *AccessoryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AccessoryQuery) FirstX ¶
func (aq *AccessoryQuery) FirstX(ctx context.Context) *Accessory
FirstX is like First, but panics if an error occurs.
func (*AccessoryQuery) GroupBy ¶
func (aq *AccessoryQuery) GroupBy(field string, fields ...string) *AccessoryGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Accessory.Query(). GroupBy(accessory.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AccessoryQuery) IDs ¶
func (aq *AccessoryQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Accessory IDs.
func (*AccessoryQuery) IDsX ¶
func (aq *AccessoryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AccessoryQuery) Limit ¶
func (aq *AccessoryQuery) Limit(limit int) *AccessoryQuery
Limit the number of records to be returned by this query.
func (*AccessoryQuery) Offset ¶
func (aq *AccessoryQuery) Offset(offset int) *AccessoryQuery
Offset to start from.
func (*AccessoryQuery) Only ¶
func (aq *AccessoryQuery) Only(ctx context.Context) (*Accessory, error)
Only returns a single Accessory entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Accessory entity is found. Returns a *NotFoundError when no Accessory entities are found.
func (*AccessoryQuery) OnlyID ¶
func (aq *AccessoryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Accessory ID in the query. Returns a *NotSingularError when more than one Accessory ID is found. Returns a *NotFoundError when no entities are found.
func (*AccessoryQuery) OnlyIDX ¶
func (aq *AccessoryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AccessoryQuery) OnlyX ¶
func (aq *AccessoryQuery) OnlyX(ctx context.Context) *Accessory
OnlyX is like Only, but panics if an error occurs.
func (*AccessoryQuery) Order ¶
func (aq *AccessoryQuery) Order(o ...accessory.OrderOption) *AccessoryQuery
Order specifies how the records should be ordered.
func (*AccessoryQuery) QueryInstitution ¶
func (aq *AccessoryQuery) QueryInstitution() *InstitutionQuery
QueryInstitution chains the current query on the "institution" edge.
func (*AccessoryQuery) QueryRedemptions ¶
func (aq *AccessoryQuery) QueryRedemptions() *RedemptionQuery
QueryRedemptions chains the current query on the "redemptions" edge.
func (*AccessoryQuery) Select ¶
func (aq *AccessoryQuery) Select(fields ...string) *AccessorySelect
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 { Name string `json:"name,omitempty"` } client.Accessory.Query(). Select(accessory.FieldName). Scan(ctx, &v)
func (*AccessoryQuery) Unique ¶
func (aq *AccessoryQuery) Unique(unique bool) *AccessoryQuery
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 (*AccessoryQuery) Where ¶
func (aq *AccessoryQuery) Where(ps ...predicate.Accessory) *AccessoryQuery
Where adds a new predicate for the AccessoryQuery builder.
func (*AccessoryQuery) WithInstitution ¶
func (aq *AccessoryQuery) WithInstitution(opts ...func(*InstitutionQuery)) *AccessoryQuery
WithInstitution tells the query-builder to eager-load the nodes that are connected to the "institution" edge. The optional arguments are used to configure the query builder of the edge.
func (*AccessoryQuery) WithRedemptions ¶
func (aq *AccessoryQuery) WithRedemptions(opts ...func(*RedemptionQuery)) *AccessoryQuery
WithRedemptions tells the query-builder to eager-load the nodes that are connected to the "redemptions" edge. The optional arguments are used to configure the query builder of the edge.
type AccessorySelect ¶
type AccessorySelect struct { *AccessoryQuery // contains filtered or unexported fields }
AccessorySelect is the builder for selecting fields of Accessory entities.
func (*AccessorySelect) Aggregate ¶
func (as *AccessorySelect) Aggregate(fns ...AggregateFunc) *AccessorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*AccessorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccessorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccessorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccessorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccessorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccessorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccessorySelect) Scan ¶
func (as *AccessorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccessorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccessoryUpdate ¶
type AccessoryUpdate struct {
// contains filtered or unexported fields
}
AccessoryUpdate is the builder for updating Accessory entities.
func (*AccessoryUpdate) AddPointsRequired ¶
func (au *AccessoryUpdate) AddPointsRequired(i int) *AccessoryUpdate
AddPointsRequired adds i to the "points_required" field.
func (*AccessoryUpdate) AddRedemptionIDs ¶
func (au *AccessoryUpdate) AddRedemptionIDs(ids ...int) *AccessoryUpdate
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by IDs.
func (*AccessoryUpdate) AddRedemptions ¶
func (au *AccessoryUpdate) AddRedemptions(r ...*Redemption) *AccessoryUpdate
AddRedemptions adds the "redemptions" edges to the Redemption entity.
func (*AccessoryUpdate) ClearInstitution ¶
func (au *AccessoryUpdate) ClearInstitution() *AccessoryUpdate
ClearInstitution clears the "institution" edge to the Institution entity.
func (*AccessoryUpdate) ClearRedemptions ¶
func (au *AccessoryUpdate) ClearRedemptions() *AccessoryUpdate
ClearRedemptions clears all "redemptions" edges to the Redemption entity.
func (*AccessoryUpdate) Exec ¶
func (au *AccessoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccessoryUpdate) ExecX ¶
func (au *AccessoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessoryUpdate) Mutation ¶
func (au *AccessoryUpdate) Mutation() *AccessoryMutation
Mutation returns the AccessoryMutation object of the builder.
func (*AccessoryUpdate) RemoveRedemptionIDs ¶
func (au *AccessoryUpdate) RemoveRedemptionIDs(ids ...int) *AccessoryUpdate
RemoveRedemptionIDs removes the "redemptions" edge to Redemption entities by IDs.
func (*AccessoryUpdate) RemoveRedemptions ¶
func (au *AccessoryUpdate) RemoveRedemptions(r ...*Redemption) *AccessoryUpdate
RemoveRedemptions removes "redemptions" edges to Redemption entities.
func (*AccessoryUpdate) Save ¶
func (au *AccessoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AccessoryUpdate) SaveX ¶
func (au *AccessoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AccessoryUpdate) SetDescription ¶
func (au *AccessoryUpdate) SetDescription(s string) *AccessoryUpdate
SetDescription sets the "description" field.
func (*AccessoryUpdate) SetInstitution ¶
func (au *AccessoryUpdate) SetInstitution(i *Institution) *AccessoryUpdate
SetInstitution sets the "institution" edge to the Institution entity.
func (*AccessoryUpdate) SetInstitutionID ¶
func (au *AccessoryUpdate) SetInstitutionID(id int) *AccessoryUpdate
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*AccessoryUpdate) SetName ¶
func (au *AccessoryUpdate) SetName(s string) *AccessoryUpdate
SetName sets the "name" field.
func (*AccessoryUpdate) SetPointsRequired ¶
func (au *AccessoryUpdate) SetPointsRequired(i int) *AccessoryUpdate
SetPointsRequired sets the "points_required" field.
func (*AccessoryUpdate) Where ¶
func (au *AccessoryUpdate) Where(ps ...predicate.Accessory) *AccessoryUpdate
Where appends a list predicates to the AccessoryUpdate builder.
type AccessoryUpdateOne ¶
type AccessoryUpdateOne struct {
// contains filtered or unexported fields
}
AccessoryUpdateOne is the builder for updating a single Accessory entity.
func (*AccessoryUpdateOne) AddPointsRequired ¶
func (auo *AccessoryUpdateOne) AddPointsRequired(i int) *AccessoryUpdateOne
AddPointsRequired adds i to the "points_required" field.
func (*AccessoryUpdateOne) AddRedemptionIDs ¶
func (auo *AccessoryUpdateOne) AddRedemptionIDs(ids ...int) *AccessoryUpdateOne
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by IDs.
func (*AccessoryUpdateOne) AddRedemptions ¶
func (auo *AccessoryUpdateOne) AddRedemptions(r ...*Redemption) *AccessoryUpdateOne
AddRedemptions adds the "redemptions" edges to the Redemption entity.
func (*AccessoryUpdateOne) ClearInstitution ¶
func (auo *AccessoryUpdateOne) ClearInstitution() *AccessoryUpdateOne
ClearInstitution clears the "institution" edge to the Institution entity.
func (*AccessoryUpdateOne) ClearRedemptions ¶
func (auo *AccessoryUpdateOne) ClearRedemptions() *AccessoryUpdateOne
ClearRedemptions clears all "redemptions" edges to the Redemption entity.
func (*AccessoryUpdateOne) Exec ¶
func (auo *AccessoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AccessoryUpdateOne) ExecX ¶
func (auo *AccessoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessoryUpdateOne) Mutation ¶
func (auo *AccessoryUpdateOne) Mutation() *AccessoryMutation
Mutation returns the AccessoryMutation object of the builder.
func (*AccessoryUpdateOne) RemoveRedemptionIDs ¶
func (auo *AccessoryUpdateOne) RemoveRedemptionIDs(ids ...int) *AccessoryUpdateOne
RemoveRedemptionIDs removes the "redemptions" edge to Redemption entities by IDs.
func (*AccessoryUpdateOne) RemoveRedemptions ¶
func (auo *AccessoryUpdateOne) RemoveRedemptions(r ...*Redemption) *AccessoryUpdateOne
RemoveRedemptions removes "redemptions" edges to Redemption entities.
func (*AccessoryUpdateOne) Save ¶
func (auo *AccessoryUpdateOne) Save(ctx context.Context) (*Accessory, error)
Save executes the query and returns the updated Accessory entity.
func (*AccessoryUpdateOne) SaveX ¶
func (auo *AccessoryUpdateOne) SaveX(ctx context.Context) *Accessory
SaveX is like Save, but panics if an error occurs.
func (*AccessoryUpdateOne) Select ¶
func (auo *AccessoryUpdateOne) Select(field string, fields ...string) *AccessoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AccessoryUpdateOne) SetDescription ¶
func (auo *AccessoryUpdateOne) SetDescription(s string) *AccessoryUpdateOne
SetDescription sets the "description" field.
func (*AccessoryUpdateOne) SetInstitution ¶
func (auo *AccessoryUpdateOne) SetInstitution(i *Institution) *AccessoryUpdateOne
SetInstitution sets the "institution" edge to the Institution entity.
func (*AccessoryUpdateOne) SetInstitutionID ¶
func (auo *AccessoryUpdateOne) SetInstitutionID(id int) *AccessoryUpdateOne
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*AccessoryUpdateOne) SetName ¶
func (auo *AccessoryUpdateOne) SetName(s string) *AccessoryUpdateOne
SetName sets the "name" field.
func (*AccessoryUpdateOne) SetPointsRequired ¶
func (auo *AccessoryUpdateOne) SetPointsRequired(i int) *AccessoryUpdateOne
SetPointsRequired sets the "points_required" field.
func (*AccessoryUpdateOne) Where ¶
func (auo *AccessoryUpdateOne) Where(ps ...predicate.Accessory) *AccessoryUpdateOne
Where appends a list predicates to the AccessoryUpdate builder.
type AccessoryUpsert ¶
AccessoryUpsert is the "OnConflict" setter.
func (*AccessoryUpsert) AddPointsRequired ¶
func (u *AccessoryUpsert) AddPointsRequired(v int) *AccessoryUpsert
AddPointsRequired adds v to the "points_required" field.
func (*AccessoryUpsert) SetDescription ¶
func (u *AccessoryUpsert) SetDescription(v string) *AccessoryUpsert
SetDescription sets the "description" field.
func (*AccessoryUpsert) SetName ¶
func (u *AccessoryUpsert) SetName(v string) *AccessoryUpsert
SetName sets the "name" field.
func (*AccessoryUpsert) SetPointsRequired ¶
func (u *AccessoryUpsert) SetPointsRequired(v int) *AccessoryUpsert
SetPointsRequired sets the "points_required" field.
func (*AccessoryUpsert) UpdateDescription ¶
func (u *AccessoryUpsert) UpdateDescription() *AccessoryUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*AccessoryUpsert) UpdateName ¶
func (u *AccessoryUpsert) UpdateName() *AccessoryUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*AccessoryUpsert) UpdatePointsRequired ¶
func (u *AccessoryUpsert) UpdatePointsRequired() *AccessoryUpsert
UpdatePointsRequired sets the "points_required" field to the value that was provided on create.
type AccessoryUpsertBulk ¶
type AccessoryUpsertBulk struct {
// contains filtered or unexported fields
}
AccessoryUpsertBulk is the builder for "upsert"-ing a bulk of Accessory nodes.
func (*AccessoryUpsertBulk) AddPointsRequired ¶
func (u *AccessoryUpsertBulk) AddPointsRequired(v int) *AccessoryUpsertBulk
AddPointsRequired adds v to the "points_required" field.
func (*AccessoryUpsertBulk) DoNothing ¶
func (u *AccessoryUpsertBulk) DoNothing() *AccessoryUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AccessoryUpsertBulk) Exec ¶
func (u *AccessoryUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccessoryUpsertBulk) ExecX ¶
func (u *AccessoryUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessoryUpsertBulk) Ignore ¶
func (u *AccessoryUpsertBulk) Ignore() *AccessoryUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Accessory.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AccessoryUpsertBulk) SetDescription ¶
func (u *AccessoryUpsertBulk) SetDescription(v string) *AccessoryUpsertBulk
SetDescription sets the "description" field.
func (*AccessoryUpsertBulk) SetName ¶
func (u *AccessoryUpsertBulk) SetName(v string) *AccessoryUpsertBulk
SetName sets the "name" field.
func (*AccessoryUpsertBulk) SetPointsRequired ¶
func (u *AccessoryUpsertBulk) SetPointsRequired(v int) *AccessoryUpsertBulk
SetPointsRequired sets the "points_required" field.
func (*AccessoryUpsertBulk) Update ¶
func (u *AccessoryUpsertBulk) Update(set func(*AccessoryUpsert)) *AccessoryUpsertBulk
Update allows overriding fields `UPDATE` values. See the AccessoryCreateBulk.OnConflict documentation for more info.
func (*AccessoryUpsertBulk) UpdateDescription ¶
func (u *AccessoryUpsertBulk) UpdateDescription() *AccessoryUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*AccessoryUpsertBulk) UpdateName ¶
func (u *AccessoryUpsertBulk) UpdateName() *AccessoryUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*AccessoryUpsertBulk) UpdateNewValues ¶
func (u *AccessoryUpsertBulk) UpdateNewValues() *AccessoryUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Accessory.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AccessoryUpsertBulk) UpdatePointsRequired ¶
func (u *AccessoryUpsertBulk) UpdatePointsRequired() *AccessoryUpsertBulk
UpdatePointsRequired sets the "points_required" field to the value that was provided on create.
type AccessoryUpsertOne ¶
type AccessoryUpsertOne struct {
// contains filtered or unexported fields
}
AccessoryUpsertOne is the builder for "upsert"-ing
one Accessory node.
func (*AccessoryUpsertOne) AddPointsRequired ¶
func (u *AccessoryUpsertOne) AddPointsRequired(v int) *AccessoryUpsertOne
AddPointsRequired adds v to the "points_required" field.
func (*AccessoryUpsertOne) DoNothing ¶
func (u *AccessoryUpsertOne) DoNothing() *AccessoryUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AccessoryUpsertOne) Exec ¶
func (u *AccessoryUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AccessoryUpsertOne) ExecX ¶
func (u *AccessoryUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessoryUpsertOne) ID ¶
func (u *AccessoryUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*AccessoryUpsertOne) IDX ¶
func (u *AccessoryUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*AccessoryUpsertOne) Ignore ¶
func (u *AccessoryUpsertOne) Ignore() *AccessoryUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Accessory.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AccessoryUpsertOne) SetDescription ¶
func (u *AccessoryUpsertOne) SetDescription(v string) *AccessoryUpsertOne
SetDescription sets the "description" field.
func (*AccessoryUpsertOne) SetName ¶
func (u *AccessoryUpsertOne) SetName(v string) *AccessoryUpsertOne
SetName sets the "name" field.
func (*AccessoryUpsertOne) SetPointsRequired ¶
func (u *AccessoryUpsertOne) SetPointsRequired(v int) *AccessoryUpsertOne
SetPointsRequired sets the "points_required" field.
func (*AccessoryUpsertOne) Update ¶
func (u *AccessoryUpsertOne) Update(set func(*AccessoryUpsert)) *AccessoryUpsertOne
Update allows overriding fields `UPDATE` values. See the AccessoryCreate.OnConflict documentation for more info.
func (*AccessoryUpsertOne) UpdateDescription ¶
func (u *AccessoryUpsertOne) UpdateDescription() *AccessoryUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*AccessoryUpsertOne) UpdateName ¶
func (u *AccessoryUpsertOne) UpdateName() *AccessoryUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*AccessoryUpsertOne) UpdateNewValues ¶
func (u *AccessoryUpsertOne) UpdateNewValues() *AccessoryUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Accessory.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AccessoryUpsertOne) UpdatePointsRequired ¶
func (u *AccessoryUpsertOne) UpdatePointsRequired() *AccessoryUpsertOne
UpdatePointsRequired sets the "points_required" field to the value that was provided on create.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Accessory is the client for interacting with the Accessory builders. Accessory *AccessoryClient // Deadline is the client for interacting with the Deadline builders. Deadline *DeadlineClient // Event is the client for interacting with the Event builders. Event *EventClient // Forum is the client for interacting with the Forum builders. Forum *ForumClient // ForumPost is the client for interacting with the ForumPost builders. ForumPost *ForumPostClient // Group is the client for interacting with the Group builders. Group *GroupClient // GroupInviteLink is the client for interacting with the GroupInviteLink builders. GroupInviteLink *GroupInviteLinkClient // GroupUser is the client for interacting with the GroupUser builders. GroupUser *GroupUserClient // Institution is the client for interacting with the Institution builders. Institution *InstitutionClient // InstitutionInviteLink is the client for interacting with the InstitutionInviteLink builders. InstitutionInviteLink *InstitutionInviteLinkClient // JWTRevocation is the client for interacting with the JWTRevocation builders. JWTRevocation *JWTRevocationClient // Milestone is the client for interacting with the Milestone builders. Milestone *MilestoneClient // Pet is the client for interacting with the Pet builders. Pet *PetClient // Reaction is the client for interacting with the Reaction builders. Reaction *ReactionClient // Redemption is the client for interacting with the Redemption builders. Redemption *RedemptionClient // StudyPlan is the client for interacting with the StudyPlan builders. StudyPlan *StudyPlanClient // User is the client for interacting with the User builders. User *UserClient // UserPet is the client for interacting with the UserPet builders. UserPet *UserPetClient // Voucher is the client for interacting with the Voucher builders. Voucher *VoucherClient // 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(). Accessory. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Deadline ¶
type Deadline struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the deadline Name string `json:"name,omitempty"` // Time when the deadline is due. // If there is no due time, set to nil DueTime *time.Time `json:"due_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DeadlineQuery when eager-loading is set. Edges DeadlineEdges `json:"edges"` // contains filtered or unexported fields }
Deadline is the model entity for the Deadline schema.
func (*Deadline) QueryAuthor ¶
QueryAuthor queries the "author" edge of the Deadline entity.
func (*Deadline) QueryGroup ¶
func (d *Deadline) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the Deadline entity.
func (*Deadline) QueryVotedUsers ¶
QueryVotedUsers queries the "voted_users" edge of the Deadline entity.
func (*Deadline) Unwrap ¶
Unwrap unwraps the Deadline 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 (*Deadline) Update ¶
func (d *Deadline) Update() *DeadlineUpdateOne
Update returns a builder for updating this Deadline. Note that you need to call Deadline.Unwrap() before calling this method if this Deadline was returned from a transaction, and the transaction was committed or rolled back.
type DeadlineClient ¶
type DeadlineClient struct {
// contains filtered or unexported fields
}
DeadlineClient is a client for the Deadline schema.
func NewDeadlineClient ¶
func NewDeadlineClient(c config) *DeadlineClient
NewDeadlineClient returns a client for the Deadline from the given config.
func (*DeadlineClient) Create ¶
func (c *DeadlineClient) Create() *DeadlineCreate
Create returns a builder for creating a Deadline entity.
func (*DeadlineClient) CreateBulk ¶
func (c *DeadlineClient) CreateBulk(builders ...*DeadlineCreate) *DeadlineCreateBulk
CreateBulk returns a builder for creating a bulk of Deadline entities.
func (*DeadlineClient) Delete ¶
func (c *DeadlineClient) Delete() *DeadlineDelete
Delete returns a delete builder for Deadline.
func (*DeadlineClient) DeleteOne ¶
func (c *DeadlineClient) DeleteOne(d *Deadline) *DeadlineDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DeadlineClient) DeleteOneID ¶
func (c *DeadlineClient) DeleteOneID(id int) *DeadlineDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DeadlineClient) GetX ¶
func (c *DeadlineClient) GetX(ctx context.Context, id int) *Deadline
GetX is like Get, but panics if an error occurs.
func (*DeadlineClient) Hooks ¶
func (c *DeadlineClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DeadlineClient) Intercept ¶
func (c *DeadlineClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `deadline.Intercept(f(g(h())))`.
func (*DeadlineClient) Interceptors ¶
func (c *DeadlineClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DeadlineClient) Query ¶
func (c *DeadlineClient) Query() *DeadlineQuery
Query returns a query builder for Deadline.
func (*DeadlineClient) QueryAuthor ¶
func (c *DeadlineClient) QueryAuthor(d *Deadline) *UserQuery
QueryAuthor queries the author edge of a Deadline.
func (*DeadlineClient) QueryGroup ¶
func (c *DeadlineClient) QueryGroup(d *Deadline) *GroupQuery
QueryGroup queries the group edge of a Deadline.
func (*DeadlineClient) QueryVotedUsers ¶
func (c *DeadlineClient) QueryVotedUsers(d *Deadline) *UserQuery
QueryVotedUsers queries the voted_users edge of a Deadline.
func (*DeadlineClient) Update ¶
func (c *DeadlineClient) Update() *DeadlineUpdate
Update returns an update builder for Deadline.
func (*DeadlineClient) UpdateOne ¶
func (c *DeadlineClient) UpdateOne(d *Deadline) *DeadlineUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DeadlineClient) UpdateOneID ¶
func (c *DeadlineClient) UpdateOneID(id int) *DeadlineUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DeadlineClient) Use ¶
func (c *DeadlineClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deadline.Hooks(f(g(h())))`.
type DeadlineCreate ¶
type DeadlineCreate struct {
// contains filtered or unexported fields
}
DeadlineCreate is the builder for creating a Deadline entity.
func (*DeadlineCreate) AddVotedUserIDs ¶
func (dc *DeadlineCreate) AddVotedUserIDs(ids ...int) *DeadlineCreate
AddVotedUserIDs adds the "voted_users" edge to the User entity by IDs.
func (*DeadlineCreate) AddVotedUsers ¶
func (dc *DeadlineCreate) AddVotedUsers(u ...*User) *DeadlineCreate
AddVotedUsers adds the "voted_users" edges to the User entity.
func (*DeadlineCreate) Exec ¶
func (dc *DeadlineCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DeadlineCreate) ExecX ¶
func (dc *DeadlineCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeadlineCreate) Mutation ¶
func (dc *DeadlineCreate) Mutation() *DeadlineMutation
Mutation returns the DeadlineMutation object of the builder.
func (*DeadlineCreate) OnConflict ¶
func (dc *DeadlineCreate) OnConflict(opts ...sql.ConflictOption) *DeadlineUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Deadline.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.DeadlineUpsert) { SetName(v+v). }). Exec(ctx)
func (*DeadlineCreate) OnConflictColumns ¶
func (dc *DeadlineCreate) OnConflictColumns(columns ...string) *DeadlineUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Deadline.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*DeadlineCreate) Save ¶
func (dc *DeadlineCreate) Save(ctx context.Context) (*Deadline, error)
Save creates the Deadline in the database.
func (*DeadlineCreate) SaveX ¶
func (dc *DeadlineCreate) SaveX(ctx context.Context) *Deadline
SaveX calls Save and panics if Save returns an error.
func (*DeadlineCreate) SetAuthor ¶
func (dc *DeadlineCreate) SetAuthor(u *User) *DeadlineCreate
SetAuthor sets the "author" edge to the User entity.
func (*DeadlineCreate) SetAuthorID ¶
func (dc *DeadlineCreate) SetAuthorID(id int) *DeadlineCreate
SetAuthorID sets the "author" edge to the User entity by ID.
func (*DeadlineCreate) SetDueTime ¶
func (dc *DeadlineCreate) SetDueTime(t time.Time) *DeadlineCreate
SetDueTime sets the "due_time" field.
func (*DeadlineCreate) SetGroup ¶
func (dc *DeadlineCreate) SetGroup(g *Group) *DeadlineCreate
SetGroup sets the "group" edge to the Group entity.
func (*DeadlineCreate) SetGroupID ¶
func (dc *DeadlineCreate) SetGroupID(id int) *DeadlineCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*DeadlineCreate) SetName ¶
func (dc *DeadlineCreate) SetName(s string) *DeadlineCreate
SetName sets the "name" field.
func (*DeadlineCreate) SetNillableDueTime ¶
func (dc *DeadlineCreate) SetNillableDueTime(t *time.Time) *DeadlineCreate
SetNillableDueTime sets the "due_time" field if the given value is not nil.
type DeadlineCreateBulk ¶
type DeadlineCreateBulk struct {
// contains filtered or unexported fields
}
DeadlineCreateBulk is the builder for creating many Deadline entities in bulk.
func (*DeadlineCreateBulk) Exec ¶
func (dcb *DeadlineCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DeadlineCreateBulk) ExecX ¶
func (dcb *DeadlineCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeadlineCreateBulk) OnConflict ¶
func (dcb *DeadlineCreateBulk) OnConflict(opts ...sql.ConflictOption) *DeadlineUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Deadline.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.DeadlineUpsert) { SetName(v+v). }). Exec(ctx)
func (*DeadlineCreateBulk) OnConflictColumns ¶
func (dcb *DeadlineCreateBulk) OnConflictColumns(columns ...string) *DeadlineUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Deadline.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type DeadlineDelete ¶
type DeadlineDelete struct {
// contains filtered or unexported fields
}
DeadlineDelete is the builder for deleting a Deadline entity.
func (*DeadlineDelete) Exec ¶
func (dd *DeadlineDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DeadlineDelete) ExecX ¶
func (dd *DeadlineDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DeadlineDelete) Where ¶
func (dd *DeadlineDelete) Where(ps ...predicate.Deadline) *DeadlineDelete
Where appends a list predicates to the DeadlineDelete builder.
type DeadlineDeleteOne ¶
type DeadlineDeleteOne struct {
// contains filtered or unexported fields
}
DeadlineDeleteOne is the builder for deleting a single Deadline entity.
func (*DeadlineDeleteOne) Exec ¶
func (ddo *DeadlineDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DeadlineDeleteOne) ExecX ¶
func (ddo *DeadlineDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeadlineDeleteOne) Where ¶
func (ddo *DeadlineDeleteOne) Where(ps ...predicate.Deadline) *DeadlineDeleteOne
Where appends a list predicates to the DeadlineDelete builder.
type DeadlineEdges ¶
type DeadlineEdges struct { // Author holds the value of the author edge. Author *User `json:"author,omitempty"` // Users who voted for this deadline VotedUsers []*User `json:"voted_users,omitempty"` // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // contains filtered or unexported fields }
DeadlineEdges holds the relations/edges for other nodes in the graph.
func (DeadlineEdges) AuthorOrErr ¶
func (e DeadlineEdges) AuthorOrErr() (*User, error)
AuthorOrErr returns the Author value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (DeadlineEdges) GroupOrErr ¶
func (e DeadlineEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (DeadlineEdges) VotedUsersOrErr ¶
func (e DeadlineEdges) VotedUsersOrErr() ([]*User, error)
VotedUsersOrErr returns the VotedUsers value or an error if the edge was not loaded in eager-loading.
type DeadlineGroupBy ¶
type DeadlineGroupBy struct {
// contains filtered or unexported fields
}
DeadlineGroupBy is the group-by builder for Deadline entities.
func (*DeadlineGroupBy) Aggregate ¶
func (dgb *DeadlineGroupBy) Aggregate(fns ...AggregateFunc) *DeadlineGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DeadlineGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DeadlineGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DeadlineGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DeadlineGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DeadlineGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DeadlineGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DeadlineGroupBy) Scan ¶
func (dgb *DeadlineGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DeadlineGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DeadlineMutation ¶
type DeadlineMutation struct {
// contains filtered or unexported fields
}
DeadlineMutation represents an operation that mutates the Deadline nodes in the graph.
func (*DeadlineMutation) AddField ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) AddVotedUserIDs ¶
func (m *DeadlineMutation) AddVotedUserIDs(ids ...int)
AddVotedUserIDs adds the "voted_users" edge to the User entity by ids.
func (*DeadlineMutation) AddedEdges ¶
func (m *DeadlineMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DeadlineMutation) AddedField ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) AddedFields ¶
func (m *DeadlineMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DeadlineMutation) AddedIDs ¶
func (m *DeadlineMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DeadlineMutation) AuthorCleared ¶
func (m *DeadlineMutation) AuthorCleared() bool
AuthorCleared reports if the "author" edge to the User entity was cleared.
func (*DeadlineMutation) AuthorID ¶
func (m *DeadlineMutation) AuthorID() (id int, exists bool)
AuthorID returns the "author" edge ID in the mutation.
func (*DeadlineMutation) AuthorIDs ¶
func (m *DeadlineMutation) AuthorIDs() (ids []int)
AuthorIDs returns the "author" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AuthorID instead. It exists only for internal usage by the builders.
func (*DeadlineMutation) ClearAuthor ¶
func (m *DeadlineMutation) ClearAuthor()
ClearAuthor clears the "author" edge to the User entity.
func (*DeadlineMutation) ClearDueTime ¶
func (m *DeadlineMutation) ClearDueTime()
ClearDueTime clears the value of the "due_time" field.
func (*DeadlineMutation) ClearEdge ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) ClearField ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) ClearGroup ¶
func (m *DeadlineMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*DeadlineMutation) ClearVotedUsers ¶
func (m *DeadlineMutation) ClearVotedUsers()
ClearVotedUsers clears the "voted_users" edge to the User entity.
func (*DeadlineMutation) ClearedEdges ¶
func (m *DeadlineMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DeadlineMutation) ClearedFields ¶
func (m *DeadlineMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DeadlineMutation) Client ¶
func (m DeadlineMutation) 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 (*DeadlineMutation) DueTime ¶
func (m *DeadlineMutation) DueTime() (r time.Time, exists bool)
DueTime returns the value of the "due_time" field in the mutation.
func (*DeadlineMutation) DueTimeCleared ¶
func (m *DeadlineMutation) DueTimeCleared() bool
DueTimeCleared returns if the "due_time" field was cleared in this mutation.
func (*DeadlineMutation) EdgeCleared ¶
func (m *DeadlineMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DeadlineMutation) Field ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) FieldCleared ¶
func (m *DeadlineMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DeadlineMutation) Fields ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) GroupCleared ¶
func (m *DeadlineMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*DeadlineMutation) GroupID ¶
func (m *DeadlineMutation) GroupID() (id int, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*DeadlineMutation) GroupIDs ¶
func (m *DeadlineMutation) GroupIDs() (ids []int)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*DeadlineMutation) ID ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) IDs ¶
func (m *DeadlineMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DeadlineMutation) Name ¶
func (m *DeadlineMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*DeadlineMutation) OldDueTime ¶
OldDueTime returns the old "due_time" field's value of the Deadline entity. If the Deadline object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeadlineMutation) 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 (*DeadlineMutation) OldName ¶
func (m *DeadlineMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Deadline entity. If the Deadline object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DeadlineMutation) RemoveVotedUserIDs ¶
func (m *DeadlineMutation) RemoveVotedUserIDs(ids ...int)
RemoveVotedUserIDs removes the "voted_users" edge to the User entity by IDs.
func (*DeadlineMutation) RemovedEdges ¶
func (m *DeadlineMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DeadlineMutation) RemovedIDs ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) RemovedVotedUsersIDs ¶
func (m *DeadlineMutation) RemovedVotedUsersIDs() (ids []int)
RemovedVotedUsers returns the removed IDs of the "voted_users" edge to the User entity.
func (*DeadlineMutation) ResetAuthor ¶
func (m *DeadlineMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" edge.
func (*DeadlineMutation) ResetDueTime ¶
func (m *DeadlineMutation) ResetDueTime()
ResetDueTime resets all changes to the "due_time" field.
func (*DeadlineMutation) ResetEdge ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) ResetField ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) ResetGroup ¶
func (m *DeadlineMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*DeadlineMutation) ResetName ¶
func (m *DeadlineMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*DeadlineMutation) ResetVotedUsers ¶
func (m *DeadlineMutation) ResetVotedUsers()
ResetVotedUsers resets all changes to the "voted_users" edge.
func (*DeadlineMutation) SetAuthorID ¶
func (m *DeadlineMutation) SetAuthorID(id int)
SetAuthorID sets the "author" edge to the User entity by id.
func (*DeadlineMutation) SetDueTime ¶
func (m *DeadlineMutation) SetDueTime(t time.Time)
SetDueTime sets the "due_time" field.
func (*DeadlineMutation) SetField ¶
func (m *DeadlineMutation) 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 (*DeadlineMutation) SetGroupID ¶
func (m *DeadlineMutation) SetGroupID(id int)
SetGroupID sets the "group" edge to the Group entity by id.
func (*DeadlineMutation) SetName ¶
func (m *DeadlineMutation) SetName(s string)
SetName sets the "name" field.
func (*DeadlineMutation) SetOp ¶
func (m *DeadlineMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (DeadlineMutation) Tx ¶
func (m DeadlineMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DeadlineMutation) Type ¶
func (m *DeadlineMutation) Type() string
Type returns the node type of this mutation (Deadline).
func (*DeadlineMutation) VotedUsersCleared ¶
func (m *DeadlineMutation) VotedUsersCleared() bool
VotedUsersCleared reports if the "voted_users" edge to the User entity was cleared.
func (*DeadlineMutation) VotedUsersIDs ¶
func (m *DeadlineMutation) VotedUsersIDs() (ids []int)
VotedUsersIDs returns the "voted_users" edge IDs in the mutation.
func (*DeadlineMutation) Where ¶
func (m *DeadlineMutation) Where(ps ...predicate.Deadline)
Where appends a list predicates to the DeadlineMutation builder.
func (*DeadlineMutation) WhereP ¶
func (m *DeadlineMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DeadlineMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DeadlineQuery ¶
type DeadlineQuery struct {
// contains filtered or unexported fields
}
DeadlineQuery is the builder for querying Deadline entities.
func (*DeadlineQuery) Aggregate ¶
func (dq *DeadlineQuery) Aggregate(fns ...AggregateFunc) *DeadlineSelect
Aggregate returns a DeadlineSelect configured with the given aggregations.
func (*DeadlineQuery) All ¶
func (dq *DeadlineQuery) All(ctx context.Context) ([]*Deadline, error)
All executes the query and returns a list of Deadlines.
func (*DeadlineQuery) AllX ¶
func (dq *DeadlineQuery) AllX(ctx context.Context) []*Deadline
AllX is like All, but panics if an error occurs.
func (*DeadlineQuery) Clone ¶
func (dq *DeadlineQuery) Clone() *DeadlineQuery
Clone returns a duplicate of the DeadlineQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DeadlineQuery) Count ¶
func (dq *DeadlineQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DeadlineQuery) CountX ¶
func (dq *DeadlineQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DeadlineQuery) Exist ¶
func (dq *DeadlineQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DeadlineQuery) ExistX ¶
func (dq *DeadlineQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DeadlineQuery) First ¶
func (dq *DeadlineQuery) First(ctx context.Context) (*Deadline, error)
First returns the first Deadline entity from the query. Returns a *NotFoundError when no Deadline was found.
func (*DeadlineQuery) FirstID ¶
func (dq *DeadlineQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Deadline ID from the query. Returns a *NotFoundError when no Deadline ID was found.
func (*DeadlineQuery) FirstIDX ¶
func (dq *DeadlineQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DeadlineQuery) FirstX ¶
func (dq *DeadlineQuery) FirstX(ctx context.Context) *Deadline
FirstX is like First, but panics if an error occurs.
func (*DeadlineQuery) GroupBy ¶
func (dq *DeadlineQuery) GroupBy(field string, fields ...string) *DeadlineGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Deadline.Query(). GroupBy(deadline.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DeadlineQuery) IDs ¶
func (dq *DeadlineQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Deadline IDs.
func (*DeadlineQuery) IDsX ¶
func (dq *DeadlineQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DeadlineQuery) Limit ¶
func (dq *DeadlineQuery) Limit(limit int) *DeadlineQuery
Limit the number of records to be returned by this query.
func (*DeadlineQuery) Offset ¶
func (dq *DeadlineQuery) Offset(offset int) *DeadlineQuery
Offset to start from.
func (*DeadlineQuery) Only ¶
func (dq *DeadlineQuery) Only(ctx context.Context) (*Deadline, error)
Only returns a single Deadline entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Deadline entity is found. Returns a *NotFoundError when no Deadline entities are found.
func (*DeadlineQuery) OnlyID ¶
func (dq *DeadlineQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Deadline ID in the query. Returns a *NotSingularError when more than one Deadline ID is found. Returns a *NotFoundError when no entities are found.
func (*DeadlineQuery) OnlyIDX ¶
func (dq *DeadlineQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DeadlineQuery) OnlyX ¶
func (dq *DeadlineQuery) OnlyX(ctx context.Context) *Deadline
OnlyX is like Only, but panics if an error occurs.
func (*DeadlineQuery) Order ¶
func (dq *DeadlineQuery) Order(o ...deadline.OrderOption) *DeadlineQuery
Order specifies how the records should be ordered.
func (*DeadlineQuery) QueryAuthor ¶
func (dq *DeadlineQuery) QueryAuthor() *UserQuery
QueryAuthor chains the current query on the "author" edge.
func (*DeadlineQuery) QueryGroup ¶
func (dq *DeadlineQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*DeadlineQuery) QueryVotedUsers ¶
func (dq *DeadlineQuery) QueryVotedUsers() *UserQuery
QueryVotedUsers chains the current query on the "voted_users" edge.
func (*DeadlineQuery) Select ¶
func (dq *DeadlineQuery) Select(fields ...string) *DeadlineSelect
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 { Name string `json:"name,omitempty"` } client.Deadline.Query(). Select(deadline.FieldName). Scan(ctx, &v)
func (*DeadlineQuery) Unique ¶
func (dq *DeadlineQuery) Unique(unique bool) *DeadlineQuery
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 (*DeadlineQuery) Where ¶
func (dq *DeadlineQuery) Where(ps ...predicate.Deadline) *DeadlineQuery
Where adds a new predicate for the DeadlineQuery builder.
func (*DeadlineQuery) WithAuthor ¶
func (dq *DeadlineQuery) WithAuthor(opts ...func(*UserQuery)) *DeadlineQuery
WithAuthor tells the query-builder to eager-load the nodes that are connected to the "author" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeadlineQuery) WithGroup ¶
func (dq *DeadlineQuery) WithGroup(opts ...func(*GroupQuery)) *DeadlineQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*DeadlineQuery) WithVotedUsers ¶
func (dq *DeadlineQuery) WithVotedUsers(opts ...func(*UserQuery)) *DeadlineQuery
WithVotedUsers tells the query-builder to eager-load the nodes that are connected to the "voted_users" edge. The optional arguments are used to configure the query builder of the edge.
type DeadlineSelect ¶
type DeadlineSelect struct { *DeadlineQuery // contains filtered or unexported fields }
DeadlineSelect is the builder for selecting fields of Deadline entities.
func (*DeadlineSelect) Aggregate ¶
func (ds *DeadlineSelect) Aggregate(fns ...AggregateFunc) *DeadlineSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DeadlineSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DeadlineSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DeadlineSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DeadlineSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DeadlineSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DeadlineSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DeadlineSelect) Scan ¶
func (ds *DeadlineSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DeadlineSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DeadlineUpdate ¶
type DeadlineUpdate struct {
// contains filtered or unexported fields
}
DeadlineUpdate is the builder for updating Deadline entities.
func (*DeadlineUpdate) AddVotedUserIDs ¶
func (du *DeadlineUpdate) AddVotedUserIDs(ids ...int) *DeadlineUpdate
AddVotedUserIDs adds the "voted_users" edge to the User entity by IDs.
func (*DeadlineUpdate) AddVotedUsers ¶
func (du *DeadlineUpdate) AddVotedUsers(u ...*User) *DeadlineUpdate
AddVotedUsers adds the "voted_users" edges to the User entity.
func (*DeadlineUpdate) ClearAuthor ¶
func (du *DeadlineUpdate) ClearAuthor() *DeadlineUpdate
ClearAuthor clears the "author" edge to the User entity.
func (*DeadlineUpdate) ClearDueTime ¶
func (du *DeadlineUpdate) ClearDueTime() *DeadlineUpdate
ClearDueTime clears the value of the "due_time" field.
func (*DeadlineUpdate) ClearGroup ¶
func (du *DeadlineUpdate) ClearGroup() *DeadlineUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*DeadlineUpdate) ClearVotedUsers ¶
func (du *DeadlineUpdate) ClearVotedUsers() *DeadlineUpdate
ClearVotedUsers clears all "voted_users" edges to the User entity.
func (*DeadlineUpdate) Exec ¶
func (du *DeadlineUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DeadlineUpdate) ExecX ¶
func (du *DeadlineUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeadlineUpdate) Mutation ¶
func (du *DeadlineUpdate) Mutation() *DeadlineMutation
Mutation returns the DeadlineMutation object of the builder.
func (*DeadlineUpdate) RemoveVotedUserIDs ¶
func (du *DeadlineUpdate) RemoveVotedUserIDs(ids ...int) *DeadlineUpdate
RemoveVotedUserIDs removes the "voted_users" edge to User entities by IDs.
func (*DeadlineUpdate) RemoveVotedUsers ¶
func (du *DeadlineUpdate) RemoveVotedUsers(u ...*User) *DeadlineUpdate
RemoveVotedUsers removes "voted_users" edges to User entities.
func (*DeadlineUpdate) Save ¶
func (du *DeadlineUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DeadlineUpdate) SaveX ¶
func (du *DeadlineUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DeadlineUpdate) SetAuthor ¶
func (du *DeadlineUpdate) SetAuthor(u *User) *DeadlineUpdate
SetAuthor sets the "author" edge to the User entity.
func (*DeadlineUpdate) SetAuthorID ¶
func (du *DeadlineUpdate) SetAuthorID(id int) *DeadlineUpdate
SetAuthorID sets the "author" edge to the User entity by ID.
func (*DeadlineUpdate) SetDueTime ¶
func (du *DeadlineUpdate) SetDueTime(t time.Time) *DeadlineUpdate
SetDueTime sets the "due_time" field.
func (*DeadlineUpdate) SetGroup ¶
func (du *DeadlineUpdate) SetGroup(g *Group) *DeadlineUpdate
SetGroup sets the "group" edge to the Group entity.
func (*DeadlineUpdate) SetGroupID ¶
func (du *DeadlineUpdate) SetGroupID(id int) *DeadlineUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*DeadlineUpdate) SetName ¶
func (du *DeadlineUpdate) SetName(s string) *DeadlineUpdate
SetName sets the "name" field.
func (*DeadlineUpdate) SetNillableDueTime ¶
func (du *DeadlineUpdate) SetNillableDueTime(t *time.Time) *DeadlineUpdate
SetNillableDueTime sets the "due_time" field if the given value is not nil.
func (*DeadlineUpdate) Where ¶
func (du *DeadlineUpdate) Where(ps ...predicate.Deadline) *DeadlineUpdate
Where appends a list predicates to the DeadlineUpdate builder.
type DeadlineUpdateOne ¶
type DeadlineUpdateOne struct {
// contains filtered or unexported fields
}
DeadlineUpdateOne is the builder for updating a single Deadline entity.
func (*DeadlineUpdateOne) AddVotedUserIDs ¶
func (duo *DeadlineUpdateOne) AddVotedUserIDs(ids ...int) *DeadlineUpdateOne
AddVotedUserIDs adds the "voted_users" edge to the User entity by IDs.
func (*DeadlineUpdateOne) AddVotedUsers ¶
func (duo *DeadlineUpdateOne) AddVotedUsers(u ...*User) *DeadlineUpdateOne
AddVotedUsers adds the "voted_users" edges to the User entity.
func (*DeadlineUpdateOne) ClearAuthor ¶
func (duo *DeadlineUpdateOne) ClearAuthor() *DeadlineUpdateOne
ClearAuthor clears the "author" edge to the User entity.
func (*DeadlineUpdateOne) ClearDueTime ¶
func (duo *DeadlineUpdateOne) ClearDueTime() *DeadlineUpdateOne
ClearDueTime clears the value of the "due_time" field.
func (*DeadlineUpdateOne) ClearGroup ¶
func (duo *DeadlineUpdateOne) ClearGroup() *DeadlineUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*DeadlineUpdateOne) ClearVotedUsers ¶
func (duo *DeadlineUpdateOne) ClearVotedUsers() *DeadlineUpdateOne
ClearVotedUsers clears all "voted_users" edges to the User entity.
func (*DeadlineUpdateOne) Exec ¶
func (duo *DeadlineUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DeadlineUpdateOne) ExecX ¶
func (duo *DeadlineUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeadlineUpdateOne) Mutation ¶
func (duo *DeadlineUpdateOne) Mutation() *DeadlineMutation
Mutation returns the DeadlineMutation object of the builder.
func (*DeadlineUpdateOne) RemoveVotedUserIDs ¶
func (duo *DeadlineUpdateOne) RemoveVotedUserIDs(ids ...int) *DeadlineUpdateOne
RemoveVotedUserIDs removes the "voted_users" edge to User entities by IDs.
func (*DeadlineUpdateOne) RemoveVotedUsers ¶
func (duo *DeadlineUpdateOne) RemoveVotedUsers(u ...*User) *DeadlineUpdateOne
RemoveVotedUsers removes "voted_users" edges to User entities.
func (*DeadlineUpdateOne) Save ¶
func (duo *DeadlineUpdateOne) Save(ctx context.Context) (*Deadline, error)
Save executes the query and returns the updated Deadline entity.
func (*DeadlineUpdateOne) SaveX ¶
func (duo *DeadlineUpdateOne) SaveX(ctx context.Context) *Deadline
SaveX is like Save, but panics if an error occurs.
func (*DeadlineUpdateOne) Select ¶
func (duo *DeadlineUpdateOne) Select(field string, fields ...string) *DeadlineUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DeadlineUpdateOne) SetAuthor ¶
func (duo *DeadlineUpdateOne) SetAuthor(u *User) *DeadlineUpdateOne
SetAuthor sets the "author" edge to the User entity.
func (*DeadlineUpdateOne) SetAuthorID ¶
func (duo *DeadlineUpdateOne) SetAuthorID(id int) *DeadlineUpdateOne
SetAuthorID sets the "author" edge to the User entity by ID.
func (*DeadlineUpdateOne) SetDueTime ¶
func (duo *DeadlineUpdateOne) SetDueTime(t time.Time) *DeadlineUpdateOne
SetDueTime sets the "due_time" field.
func (*DeadlineUpdateOne) SetGroup ¶
func (duo *DeadlineUpdateOne) SetGroup(g *Group) *DeadlineUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*DeadlineUpdateOne) SetGroupID ¶
func (duo *DeadlineUpdateOne) SetGroupID(id int) *DeadlineUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*DeadlineUpdateOne) SetName ¶
func (duo *DeadlineUpdateOne) SetName(s string) *DeadlineUpdateOne
SetName sets the "name" field.
func (*DeadlineUpdateOne) SetNillableDueTime ¶
func (duo *DeadlineUpdateOne) SetNillableDueTime(t *time.Time) *DeadlineUpdateOne
SetNillableDueTime sets the "due_time" field if the given value is not nil.
func (*DeadlineUpdateOne) Where ¶
func (duo *DeadlineUpdateOne) Where(ps ...predicate.Deadline) *DeadlineUpdateOne
Where appends a list predicates to the DeadlineUpdate builder.
type DeadlineUpsert ¶
DeadlineUpsert is the "OnConflict" setter.
func (*DeadlineUpsert) ClearDueTime ¶
func (u *DeadlineUpsert) ClearDueTime() *DeadlineUpsert
ClearDueTime clears the value of the "due_time" field.
func (*DeadlineUpsert) SetDueTime ¶
func (u *DeadlineUpsert) SetDueTime(v time.Time) *DeadlineUpsert
SetDueTime sets the "due_time" field.
func (*DeadlineUpsert) SetName ¶
func (u *DeadlineUpsert) SetName(v string) *DeadlineUpsert
SetName sets the "name" field.
func (*DeadlineUpsert) UpdateDueTime ¶
func (u *DeadlineUpsert) UpdateDueTime() *DeadlineUpsert
UpdateDueTime sets the "due_time" field to the value that was provided on create.
func (*DeadlineUpsert) UpdateName ¶
func (u *DeadlineUpsert) UpdateName() *DeadlineUpsert
UpdateName sets the "name" field to the value that was provided on create.
type DeadlineUpsertBulk ¶
type DeadlineUpsertBulk struct {
// contains filtered or unexported fields
}
DeadlineUpsertBulk is the builder for "upsert"-ing a bulk of Deadline nodes.
func (*DeadlineUpsertBulk) ClearDueTime ¶
func (u *DeadlineUpsertBulk) ClearDueTime() *DeadlineUpsertBulk
ClearDueTime clears the value of the "due_time" field.
func (*DeadlineUpsertBulk) DoNothing ¶
func (u *DeadlineUpsertBulk) DoNothing() *DeadlineUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DeadlineUpsertBulk) Exec ¶
func (u *DeadlineUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DeadlineUpsertBulk) ExecX ¶
func (u *DeadlineUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeadlineUpsertBulk) Ignore ¶
func (u *DeadlineUpsertBulk) Ignore() *DeadlineUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Deadline.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DeadlineUpsertBulk) SetDueTime ¶
func (u *DeadlineUpsertBulk) SetDueTime(v time.Time) *DeadlineUpsertBulk
SetDueTime sets the "due_time" field.
func (*DeadlineUpsertBulk) SetName ¶
func (u *DeadlineUpsertBulk) SetName(v string) *DeadlineUpsertBulk
SetName sets the "name" field.
func (*DeadlineUpsertBulk) Update ¶
func (u *DeadlineUpsertBulk) Update(set func(*DeadlineUpsert)) *DeadlineUpsertBulk
Update allows overriding fields `UPDATE` values. See the DeadlineCreateBulk.OnConflict documentation for more info.
func (*DeadlineUpsertBulk) UpdateDueTime ¶
func (u *DeadlineUpsertBulk) UpdateDueTime() *DeadlineUpsertBulk
UpdateDueTime sets the "due_time" field to the value that was provided on create.
func (*DeadlineUpsertBulk) UpdateName ¶
func (u *DeadlineUpsertBulk) UpdateName() *DeadlineUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*DeadlineUpsertBulk) UpdateNewValues ¶
func (u *DeadlineUpsertBulk) UpdateNewValues() *DeadlineUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Deadline.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type DeadlineUpsertOne ¶
type DeadlineUpsertOne struct {
// contains filtered or unexported fields
}
DeadlineUpsertOne is the builder for "upsert"-ing
one Deadline node.
func (*DeadlineUpsertOne) ClearDueTime ¶
func (u *DeadlineUpsertOne) ClearDueTime() *DeadlineUpsertOne
ClearDueTime clears the value of the "due_time" field.
func (*DeadlineUpsertOne) DoNothing ¶
func (u *DeadlineUpsertOne) DoNothing() *DeadlineUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*DeadlineUpsertOne) Exec ¶
func (u *DeadlineUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*DeadlineUpsertOne) ExecX ¶
func (u *DeadlineUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DeadlineUpsertOne) ID ¶
func (u *DeadlineUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*DeadlineUpsertOne) IDX ¶
func (u *DeadlineUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*DeadlineUpsertOne) Ignore ¶
func (u *DeadlineUpsertOne) Ignore() *DeadlineUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Deadline.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*DeadlineUpsertOne) SetDueTime ¶
func (u *DeadlineUpsertOne) SetDueTime(v time.Time) *DeadlineUpsertOne
SetDueTime sets the "due_time" field.
func (*DeadlineUpsertOne) SetName ¶
func (u *DeadlineUpsertOne) SetName(v string) *DeadlineUpsertOne
SetName sets the "name" field.
func (*DeadlineUpsertOne) Update ¶
func (u *DeadlineUpsertOne) Update(set func(*DeadlineUpsert)) *DeadlineUpsertOne
Update allows overriding fields `UPDATE` values. See the DeadlineCreate.OnConflict documentation for more info.
func (*DeadlineUpsertOne) UpdateDueTime ¶
func (u *DeadlineUpsertOne) UpdateDueTime() *DeadlineUpsertOne
UpdateDueTime sets the "due_time" field to the value that was provided on create.
func (*DeadlineUpsertOne) UpdateName ¶
func (u *DeadlineUpsertOne) UpdateName() *DeadlineUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*DeadlineUpsertOne) UpdateNewValues ¶
func (u *DeadlineUpsertOne) UpdateNewValues() *DeadlineUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Deadline.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type Event ¶
type Event struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the event Name string `json:"name,omitempty"` // Start time of the event StartTime time.Time `json:"start_time,omitempty"` // End time of the event. // If event is all-day, set to nil EndTime *time.Time `json:"end_time,omitempty"` // Location of the event Location string `json:"location,omitempty"` // Repeat pattern of the event using cron syntax RepeatPattern string `json:"repeat_pattern,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the EventQuery when eager-loading is set. Edges EventEdges `json:"edges"` // contains filtered or unexported fields }
Event is the model entity for the Event schema.
func (*Event) QueryGroup ¶
func (e *Event) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the Event entity.
func (*Event) Unwrap ¶
Unwrap unwraps the Event 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 (*Event) Update ¶
func (e *Event) Update() *EventUpdateOne
Update returns a builder for updating this Event. Note that you need to call Event.Unwrap() before calling this method if this Event was returned from a transaction, and the transaction was committed or rolled back.
type EventClient ¶
type EventClient struct {
// contains filtered or unexported fields
}
EventClient is a client for the Event schema.
func NewEventClient ¶
func NewEventClient(c config) *EventClient
NewEventClient returns a client for the Event from the given config.
func (*EventClient) Create ¶
func (c *EventClient) Create() *EventCreate
Create returns a builder for creating a Event entity.
func (*EventClient) CreateBulk ¶
func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk
CreateBulk returns a builder for creating a bulk of Event entities.
func (*EventClient) Delete ¶
func (c *EventClient) Delete() *EventDelete
Delete returns a delete builder for Event.
func (*EventClient) DeleteOne ¶
func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EventClient) DeleteOneID ¶
func (c *EventClient) DeleteOneID(id int) *EventDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EventClient) GetX ¶
func (c *EventClient) GetX(ctx context.Context, id int) *Event
GetX is like Get, but panics if an error occurs.
func (*EventClient) Intercept ¶
func (c *EventClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `event.Intercept(f(g(h())))`.
func (*EventClient) Interceptors ¶
func (c *EventClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EventClient) Query ¶
func (c *EventClient) Query() *EventQuery
Query returns a query builder for Event.
func (*EventClient) QueryGroup ¶
func (c *EventClient) QueryGroup(e *Event) *GroupQuery
QueryGroup queries the group edge of a Event.
func (*EventClient) Update ¶
func (c *EventClient) Update() *EventUpdate
Update returns an update builder for Event.
func (*EventClient) UpdateOne ¶
func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EventClient) UpdateOneID ¶
func (c *EventClient) UpdateOneID(id int) *EventUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EventClient) Use ¶
func (c *EventClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `event.Hooks(f(g(h())))`.
type EventCreate ¶
type EventCreate struct {
// contains filtered or unexported fields
}
EventCreate is the builder for creating a Event entity.
func (*EventCreate) Exec ¶
func (ec *EventCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EventCreate) ExecX ¶
func (ec *EventCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventCreate) Mutation ¶
func (ec *EventCreate) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventCreate) OnConflict ¶
func (ec *EventCreate) OnConflict(opts ...sql.ConflictOption) *EventUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Event.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.EventUpsert) { SetName(v+v). }). Exec(ctx)
func (*EventCreate) OnConflictColumns ¶
func (ec *EventCreate) OnConflictColumns(columns ...string) *EventUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Event.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*EventCreate) Save ¶
func (ec *EventCreate) Save(ctx context.Context) (*Event, error)
Save creates the Event in the database.
func (*EventCreate) SaveX ¶
func (ec *EventCreate) SaveX(ctx context.Context) *Event
SaveX calls Save and panics if Save returns an error.
func (*EventCreate) SetEndTime ¶
func (ec *EventCreate) SetEndTime(t time.Time) *EventCreate
SetEndTime sets the "end_time" field.
func (*EventCreate) SetGroup ¶
func (ec *EventCreate) SetGroup(g *Group) *EventCreate
SetGroup sets the "group" edge to the Group entity.
func (*EventCreate) SetGroupID ¶
func (ec *EventCreate) SetGroupID(id int) *EventCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*EventCreate) SetLocation ¶
func (ec *EventCreate) SetLocation(s string) *EventCreate
SetLocation sets the "location" field.
func (*EventCreate) SetName ¶
func (ec *EventCreate) SetName(s string) *EventCreate
SetName sets the "name" field.
func (*EventCreate) SetNillableEndTime ¶
func (ec *EventCreate) SetNillableEndTime(t *time.Time) *EventCreate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*EventCreate) SetNillableLocation ¶
func (ec *EventCreate) SetNillableLocation(s *string) *EventCreate
SetNillableLocation sets the "location" field if the given value is not nil.
func (*EventCreate) SetNillableRepeatPattern ¶
func (ec *EventCreate) SetNillableRepeatPattern(s *string) *EventCreate
SetNillableRepeatPattern sets the "repeat_pattern" field if the given value is not nil.
func (*EventCreate) SetRepeatPattern ¶
func (ec *EventCreate) SetRepeatPattern(s string) *EventCreate
SetRepeatPattern sets the "repeat_pattern" field.
func (*EventCreate) SetStartTime ¶
func (ec *EventCreate) SetStartTime(t time.Time) *EventCreate
SetStartTime sets the "start_time" field.
type EventCreateBulk ¶
type EventCreateBulk struct {
// contains filtered or unexported fields
}
EventCreateBulk is the builder for creating many Event entities in bulk.
func (*EventCreateBulk) Exec ¶
func (ecb *EventCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EventCreateBulk) ExecX ¶
func (ecb *EventCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventCreateBulk) OnConflict ¶
func (ecb *EventCreateBulk) OnConflict(opts ...sql.ConflictOption) *EventUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Event.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.EventUpsert) { SetName(v+v). }). Exec(ctx)
func (*EventCreateBulk) OnConflictColumns ¶
func (ecb *EventCreateBulk) OnConflictColumns(columns ...string) *EventUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Event.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type EventDelete ¶
type EventDelete struct {
// contains filtered or unexported fields
}
EventDelete is the builder for deleting a Event entity.
func (*EventDelete) Exec ¶
func (ed *EventDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EventDelete) ExecX ¶
func (ed *EventDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EventDelete) Where ¶
func (ed *EventDelete) Where(ps ...predicate.Event) *EventDelete
Where appends a list predicates to the EventDelete builder.
type EventDeleteOne ¶
type EventDeleteOne struct {
// contains filtered or unexported fields
}
EventDeleteOne is the builder for deleting a single Event entity.
func (*EventDeleteOne) Exec ¶
func (edo *EventDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EventDeleteOne) ExecX ¶
func (edo *EventDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventDeleteOne) Where ¶
func (edo *EventDeleteOne) Where(ps ...predicate.Event) *EventDeleteOne
Where appends a list predicates to the EventDelete builder.
type EventEdges ¶
type EventEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // contains filtered or unexported fields }
EventEdges holds the relations/edges for other nodes in the graph.
func (EventEdges) GroupOrErr ¶
func (e EventEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type EventGroupBy ¶
type EventGroupBy struct {
// contains filtered or unexported fields
}
EventGroupBy is the group-by builder for Event entities.
func (*EventGroupBy) Aggregate ¶
func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EventGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Scan ¶
func (egb *EventGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EventGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EventMutation ¶
type EventMutation struct {
// contains filtered or unexported fields
}
EventMutation represents an operation that mutates the Event nodes in the graph.
func (*EventMutation) AddField ¶
func (m *EventMutation) 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 (*EventMutation) AddedEdges ¶
func (m *EventMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EventMutation) AddedField ¶
func (m *EventMutation) 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 (*EventMutation) AddedFields ¶
func (m *EventMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EventMutation) AddedIDs ¶
func (m *EventMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EventMutation) ClearEdge ¶
func (m *EventMutation) 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 (*EventMutation) ClearEndTime ¶
func (m *EventMutation) ClearEndTime()
ClearEndTime clears the value of the "end_time" field.
func (*EventMutation) ClearField ¶
func (m *EventMutation) 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 (*EventMutation) ClearGroup ¶
func (m *EventMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*EventMutation) ClearLocation ¶
func (m *EventMutation) ClearLocation()
ClearLocation clears the value of the "location" field.
func (*EventMutation) ClearRepeatPattern ¶
func (m *EventMutation) ClearRepeatPattern()
ClearRepeatPattern clears the value of the "repeat_pattern" field.
func (*EventMutation) ClearedEdges ¶
func (m *EventMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EventMutation) ClearedFields ¶
func (m *EventMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EventMutation) Client ¶
func (m EventMutation) 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 (*EventMutation) EdgeCleared ¶
func (m *EventMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EventMutation) EndTime ¶
func (m *EventMutation) EndTime() (r time.Time, exists bool)
EndTime returns the value of the "end_time" field in the mutation.
func (*EventMutation) EndTimeCleared ¶
func (m *EventMutation) EndTimeCleared() bool
EndTimeCleared returns if the "end_time" field was cleared in this mutation.
func (*EventMutation) Field ¶
func (m *EventMutation) 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 (*EventMutation) FieldCleared ¶
func (m *EventMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EventMutation) Fields ¶
func (m *EventMutation) 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 (*EventMutation) GroupCleared ¶
func (m *EventMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*EventMutation) GroupID ¶
func (m *EventMutation) GroupID() (id int, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*EventMutation) GroupIDs ¶
func (m *EventMutation) GroupIDs() (ids []int)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*EventMutation) ID ¶
func (m *EventMutation) 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 (*EventMutation) IDs ¶
func (m *EventMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*EventMutation) Location ¶
func (m *EventMutation) Location() (r string, exists bool)
Location returns the value of the "location" field in the mutation.
func (*EventMutation) LocationCleared ¶
func (m *EventMutation) LocationCleared() bool
LocationCleared returns if the "location" field was cleared in this mutation.
func (*EventMutation) Name ¶
func (m *EventMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*EventMutation) OldEndTime ¶
OldEndTime returns the old "end_time" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EventMutation) 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 (*EventMutation) OldLocation ¶
func (m *EventMutation) OldLocation(ctx context.Context) (v string, err error)
OldLocation returns the old "location" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EventMutation) OldName ¶
func (m *EventMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EventMutation) OldRepeatPattern ¶
func (m *EventMutation) OldRepeatPattern(ctx context.Context) (v string, err error)
OldRepeatPattern returns the old "repeat_pattern" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EventMutation) OldStartTime ¶
OldStartTime returns the old "start_time" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EventMutation) RemovedEdges ¶
func (m *EventMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EventMutation) RemovedIDs ¶
func (m *EventMutation) 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 (*EventMutation) RepeatPattern ¶
func (m *EventMutation) RepeatPattern() (r string, exists bool)
RepeatPattern returns the value of the "repeat_pattern" field in the mutation.
func (*EventMutation) RepeatPatternCleared ¶
func (m *EventMutation) RepeatPatternCleared() bool
RepeatPatternCleared returns if the "repeat_pattern" field was cleared in this mutation.
func (*EventMutation) ResetEdge ¶
func (m *EventMutation) 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 (*EventMutation) ResetEndTime ¶
func (m *EventMutation) ResetEndTime()
ResetEndTime resets all changes to the "end_time" field.
func (*EventMutation) ResetField ¶
func (m *EventMutation) 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 (*EventMutation) ResetGroup ¶
func (m *EventMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*EventMutation) ResetLocation ¶
func (m *EventMutation) ResetLocation()
ResetLocation resets all changes to the "location" field.
func (*EventMutation) ResetName ¶
func (m *EventMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*EventMutation) ResetRepeatPattern ¶
func (m *EventMutation) ResetRepeatPattern()
ResetRepeatPattern resets all changes to the "repeat_pattern" field.
func (*EventMutation) ResetStartTime ¶
func (m *EventMutation) ResetStartTime()
ResetStartTime resets all changes to the "start_time" field.
func (*EventMutation) SetEndTime ¶
func (m *EventMutation) SetEndTime(t time.Time)
SetEndTime sets the "end_time" field.
func (*EventMutation) SetField ¶
func (m *EventMutation) 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 (*EventMutation) SetGroupID ¶
func (m *EventMutation) SetGroupID(id int)
SetGroupID sets the "group" edge to the Group entity by id.
func (*EventMutation) SetLocation ¶
func (m *EventMutation) SetLocation(s string)
SetLocation sets the "location" field.
func (*EventMutation) SetName ¶
func (m *EventMutation) SetName(s string)
SetName sets the "name" field.
func (*EventMutation) SetOp ¶
func (m *EventMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*EventMutation) SetRepeatPattern ¶
func (m *EventMutation) SetRepeatPattern(s string)
SetRepeatPattern sets the "repeat_pattern" field.
func (*EventMutation) SetStartTime ¶
func (m *EventMutation) SetStartTime(t time.Time)
SetStartTime sets the "start_time" field.
func (*EventMutation) StartTime ¶
func (m *EventMutation) StartTime() (r time.Time, exists bool)
StartTime returns the value of the "start_time" field in the mutation.
func (EventMutation) Tx ¶
func (m EventMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EventMutation) Type ¶
func (m *EventMutation) Type() string
Type returns the node type of this mutation (Event).
func (*EventMutation) Where ¶
func (m *EventMutation) Where(ps ...predicate.Event)
Where appends a list predicates to the EventMutation builder.
func (*EventMutation) WhereP ¶
func (m *EventMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EventMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EventQuery ¶
type EventQuery struct {
// contains filtered or unexported fields
}
EventQuery is the builder for querying Event entities.
func (*EventQuery) Aggregate ¶
func (eq *EventQuery) Aggregate(fns ...AggregateFunc) *EventSelect
Aggregate returns a EventSelect configured with the given aggregations.
func (*EventQuery) All ¶
func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)
All executes the query and returns a list of Events.
func (*EventQuery) AllX ¶
func (eq *EventQuery) AllX(ctx context.Context) []*Event
AllX is like All, but panics if an error occurs.
func (*EventQuery) Clone ¶
func (eq *EventQuery) Clone() *EventQuery
Clone returns a duplicate of the EventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EventQuery) Count ¶
func (eq *EventQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EventQuery) CountX ¶
func (eq *EventQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EventQuery) Exist ¶
func (eq *EventQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EventQuery) ExistX ¶
func (eq *EventQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EventQuery) First ¶
func (eq *EventQuery) First(ctx context.Context) (*Event, error)
First returns the first Event entity from the query. Returns a *NotFoundError when no Event was found.
func (*EventQuery) FirstID ¶
func (eq *EventQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Event ID from the query. Returns a *NotFoundError when no Event ID was found.
func (*EventQuery) FirstIDX ¶
func (eq *EventQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EventQuery) FirstX ¶
func (eq *EventQuery) FirstX(ctx context.Context) *Event
FirstX is like First, but panics if an error occurs.
func (*EventQuery) GroupBy ¶
func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Event.Query(). GroupBy(event.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EventQuery) IDs ¶
func (eq *EventQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Event IDs.
func (*EventQuery) IDsX ¶
func (eq *EventQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EventQuery) Limit ¶
func (eq *EventQuery) Limit(limit int) *EventQuery
Limit the number of records to be returned by this query.
func (*EventQuery) Offset ¶
func (eq *EventQuery) Offset(offset int) *EventQuery
Offset to start from.
func (*EventQuery) Only ¶
func (eq *EventQuery) Only(ctx context.Context) (*Event, error)
Only returns a single Event entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Event entity is found. Returns a *NotFoundError when no Event entities are found.
func (*EventQuery) OnlyID ¶
func (eq *EventQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Event ID in the query. Returns a *NotSingularError when more than one Event ID is found. Returns a *NotFoundError when no entities are found.
func (*EventQuery) OnlyIDX ¶
func (eq *EventQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EventQuery) OnlyX ¶
func (eq *EventQuery) OnlyX(ctx context.Context) *Event
OnlyX is like Only, but panics if an error occurs.
func (*EventQuery) Order ¶
func (eq *EventQuery) Order(o ...event.OrderOption) *EventQuery
Order specifies how the records should be ordered.
func (*EventQuery) QueryGroup ¶
func (eq *EventQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*EventQuery) Select ¶
func (eq *EventQuery) Select(fields ...string) *EventSelect
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 { Name string `json:"name,omitempty"` } client.Event.Query(). Select(event.FieldName). Scan(ctx, &v)
func (*EventQuery) Unique ¶
func (eq *EventQuery) Unique(unique bool) *EventQuery
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 (*EventQuery) Where ¶
func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery
Where adds a new predicate for the EventQuery builder.
func (*EventQuery) WithGroup ¶
func (eq *EventQuery) WithGroup(opts ...func(*GroupQuery)) *EventQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
type EventSelect ¶
type EventSelect struct { *EventQuery // contains filtered or unexported fields }
EventSelect is the builder for selecting fields of Event entities.
func (*EventSelect) Aggregate ¶
func (es *EventSelect) Aggregate(fns ...AggregateFunc) *EventSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EventSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EventSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EventSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EventSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EventSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EventSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EventSelect) Scan ¶
func (es *EventSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EventSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EventUpdate ¶
type EventUpdate struct {
// contains filtered or unexported fields
}
EventUpdate is the builder for updating Event entities.
func (*EventUpdate) ClearEndTime ¶
func (eu *EventUpdate) ClearEndTime() *EventUpdate
ClearEndTime clears the value of the "end_time" field.
func (*EventUpdate) ClearGroup ¶
func (eu *EventUpdate) ClearGroup() *EventUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*EventUpdate) ClearLocation ¶
func (eu *EventUpdate) ClearLocation() *EventUpdate
ClearLocation clears the value of the "location" field.
func (*EventUpdate) ClearRepeatPattern ¶
func (eu *EventUpdate) ClearRepeatPattern() *EventUpdate
ClearRepeatPattern clears the value of the "repeat_pattern" field.
func (*EventUpdate) Exec ¶
func (eu *EventUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EventUpdate) ExecX ¶
func (eu *EventUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpdate) Mutation ¶
func (eu *EventUpdate) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventUpdate) Save ¶
func (eu *EventUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EventUpdate) SaveX ¶
func (eu *EventUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EventUpdate) SetEndTime ¶
func (eu *EventUpdate) SetEndTime(t time.Time) *EventUpdate
SetEndTime sets the "end_time" field.
func (*EventUpdate) SetGroup ¶
func (eu *EventUpdate) SetGroup(g *Group) *EventUpdate
SetGroup sets the "group" edge to the Group entity.
func (*EventUpdate) SetGroupID ¶
func (eu *EventUpdate) SetGroupID(id int) *EventUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*EventUpdate) SetLocation ¶
func (eu *EventUpdate) SetLocation(s string) *EventUpdate
SetLocation sets the "location" field.
func (*EventUpdate) SetName ¶
func (eu *EventUpdate) SetName(s string) *EventUpdate
SetName sets the "name" field.
func (*EventUpdate) SetNillableEndTime ¶
func (eu *EventUpdate) SetNillableEndTime(t *time.Time) *EventUpdate
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*EventUpdate) SetNillableLocation ¶
func (eu *EventUpdate) SetNillableLocation(s *string) *EventUpdate
SetNillableLocation sets the "location" field if the given value is not nil.
func (*EventUpdate) SetNillableRepeatPattern ¶
func (eu *EventUpdate) SetNillableRepeatPattern(s *string) *EventUpdate
SetNillableRepeatPattern sets the "repeat_pattern" field if the given value is not nil.
func (*EventUpdate) SetRepeatPattern ¶
func (eu *EventUpdate) SetRepeatPattern(s string) *EventUpdate
SetRepeatPattern sets the "repeat_pattern" field.
func (*EventUpdate) SetStartTime ¶
func (eu *EventUpdate) SetStartTime(t time.Time) *EventUpdate
SetStartTime sets the "start_time" field.
func (*EventUpdate) Where ¶
func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate
Where appends a list predicates to the EventUpdate builder.
type EventUpdateOne ¶
type EventUpdateOne struct {
// contains filtered or unexported fields
}
EventUpdateOne is the builder for updating a single Event entity.
func (*EventUpdateOne) ClearEndTime ¶
func (euo *EventUpdateOne) ClearEndTime() *EventUpdateOne
ClearEndTime clears the value of the "end_time" field.
func (*EventUpdateOne) ClearGroup ¶
func (euo *EventUpdateOne) ClearGroup() *EventUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*EventUpdateOne) ClearLocation ¶
func (euo *EventUpdateOne) ClearLocation() *EventUpdateOne
ClearLocation clears the value of the "location" field.
func (*EventUpdateOne) ClearRepeatPattern ¶
func (euo *EventUpdateOne) ClearRepeatPattern() *EventUpdateOne
ClearRepeatPattern clears the value of the "repeat_pattern" field.
func (*EventUpdateOne) Exec ¶
func (euo *EventUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EventUpdateOne) ExecX ¶
func (euo *EventUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpdateOne) Mutation ¶
func (euo *EventUpdateOne) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventUpdateOne) Save ¶
func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)
Save executes the query and returns the updated Event entity.
func (*EventUpdateOne) SaveX ¶
func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event
SaveX is like Save, but panics if an error occurs.
func (*EventUpdateOne) Select ¶
func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EventUpdateOne) SetEndTime ¶
func (euo *EventUpdateOne) SetEndTime(t time.Time) *EventUpdateOne
SetEndTime sets the "end_time" field.
func (*EventUpdateOne) SetGroup ¶
func (euo *EventUpdateOne) SetGroup(g *Group) *EventUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*EventUpdateOne) SetGroupID ¶
func (euo *EventUpdateOne) SetGroupID(id int) *EventUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*EventUpdateOne) SetLocation ¶
func (euo *EventUpdateOne) SetLocation(s string) *EventUpdateOne
SetLocation sets the "location" field.
func (*EventUpdateOne) SetName ¶
func (euo *EventUpdateOne) SetName(s string) *EventUpdateOne
SetName sets the "name" field.
func (*EventUpdateOne) SetNillableEndTime ¶
func (euo *EventUpdateOne) SetNillableEndTime(t *time.Time) *EventUpdateOne
SetNillableEndTime sets the "end_time" field if the given value is not nil.
func (*EventUpdateOne) SetNillableLocation ¶
func (euo *EventUpdateOne) SetNillableLocation(s *string) *EventUpdateOne
SetNillableLocation sets the "location" field if the given value is not nil.
func (*EventUpdateOne) SetNillableRepeatPattern ¶
func (euo *EventUpdateOne) SetNillableRepeatPattern(s *string) *EventUpdateOne
SetNillableRepeatPattern sets the "repeat_pattern" field if the given value is not nil.
func (*EventUpdateOne) SetRepeatPattern ¶
func (euo *EventUpdateOne) SetRepeatPattern(s string) *EventUpdateOne
SetRepeatPattern sets the "repeat_pattern" field.
func (*EventUpdateOne) SetStartTime ¶
func (euo *EventUpdateOne) SetStartTime(t time.Time) *EventUpdateOne
SetStartTime sets the "start_time" field.
func (*EventUpdateOne) Where ¶
func (euo *EventUpdateOne) Where(ps ...predicate.Event) *EventUpdateOne
Where appends a list predicates to the EventUpdate builder.
type EventUpsert ¶
EventUpsert is the "OnConflict" setter.
func (*EventUpsert) ClearEndTime ¶
func (u *EventUpsert) ClearEndTime() *EventUpsert
ClearEndTime clears the value of the "end_time" field.
func (*EventUpsert) ClearLocation ¶
func (u *EventUpsert) ClearLocation() *EventUpsert
ClearLocation clears the value of the "location" field.
func (*EventUpsert) ClearRepeatPattern ¶
func (u *EventUpsert) ClearRepeatPattern() *EventUpsert
ClearRepeatPattern clears the value of the "repeat_pattern" field.
func (*EventUpsert) SetEndTime ¶
func (u *EventUpsert) SetEndTime(v time.Time) *EventUpsert
SetEndTime sets the "end_time" field.
func (*EventUpsert) SetLocation ¶
func (u *EventUpsert) SetLocation(v string) *EventUpsert
SetLocation sets the "location" field.
func (*EventUpsert) SetName ¶
func (u *EventUpsert) SetName(v string) *EventUpsert
SetName sets the "name" field.
func (*EventUpsert) SetRepeatPattern ¶
func (u *EventUpsert) SetRepeatPattern(v string) *EventUpsert
SetRepeatPattern sets the "repeat_pattern" field.
func (*EventUpsert) SetStartTime ¶
func (u *EventUpsert) SetStartTime(v time.Time) *EventUpsert
SetStartTime sets the "start_time" field.
func (*EventUpsert) UpdateEndTime ¶
func (u *EventUpsert) UpdateEndTime() *EventUpsert
UpdateEndTime sets the "end_time" field to the value that was provided on create.
func (*EventUpsert) UpdateLocation ¶
func (u *EventUpsert) UpdateLocation() *EventUpsert
UpdateLocation sets the "location" field to the value that was provided on create.
func (*EventUpsert) UpdateName ¶
func (u *EventUpsert) UpdateName() *EventUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*EventUpsert) UpdateRepeatPattern ¶
func (u *EventUpsert) UpdateRepeatPattern() *EventUpsert
UpdateRepeatPattern sets the "repeat_pattern" field to the value that was provided on create.
func (*EventUpsert) UpdateStartTime ¶
func (u *EventUpsert) UpdateStartTime() *EventUpsert
UpdateStartTime sets the "start_time" field to the value that was provided on create.
type EventUpsertBulk ¶
type EventUpsertBulk struct {
// contains filtered or unexported fields
}
EventUpsertBulk is the builder for "upsert"-ing a bulk of Event nodes.
func (*EventUpsertBulk) ClearEndTime ¶
func (u *EventUpsertBulk) ClearEndTime() *EventUpsertBulk
ClearEndTime clears the value of the "end_time" field.
func (*EventUpsertBulk) ClearLocation ¶
func (u *EventUpsertBulk) ClearLocation() *EventUpsertBulk
ClearLocation clears the value of the "location" field.
func (*EventUpsertBulk) ClearRepeatPattern ¶
func (u *EventUpsertBulk) ClearRepeatPattern() *EventUpsertBulk
ClearRepeatPattern clears the value of the "repeat_pattern" field.
func (*EventUpsertBulk) DoNothing ¶
func (u *EventUpsertBulk) DoNothing() *EventUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*EventUpsertBulk) Exec ¶
func (u *EventUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EventUpsertBulk) ExecX ¶
func (u *EventUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpsertBulk) Ignore ¶
func (u *EventUpsertBulk) Ignore() *EventUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Event.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*EventUpsertBulk) SetEndTime ¶
func (u *EventUpsertBulk) SetEndTime(v time.Time) *EventUpsertBulk
SetEndTime sets the "end_time" field.
func (*EventUpsertBulk) SetLocation ¶
func (u *EventUpsertBulk) SetLocation(v string) *EventUpsertBulk
SetLocation sets the "location" field.
func (*EventUpsertBulk) SetName ¶
func (u *EventUpsertBulk) SetName(v string) *EventUpsertBulk
SetName sets the "name" field.
func (*EventUpsertBulk) SetRepeatPattern ¶
func (u *EventUpsertBulk) SetRepeatPattern(v string) *EventUpsertBulk
SetRepeatPattern sets the "repeat_pattern" field.
func (*EventUpsertBulk) SetStartTime ¶
func (u *EventUpsertBulk) SetStartTime(v time.Time) *EventUpsertBulk
SetStartTime sets the "start_time" field.
func (*EventUpsertBulk) Update ¶
func (u *EventUpsertBulk) Update(set func(*EventUpsert)) *EventUpsertBulk
Update allows overriding fields `UPDATE` values. See the EventCreateBulk.OnConflict documentation for more info.
func (*EventUpsertBulk) UpdateEndTime ¶
func (u *EventUpsertBulk) UpdateEndTime() *EventUpsertBulk
UpdateEndTime sets the "end_time" field to the value that was provided on create.
func (*EventUpsertBulk) UpdateLocation ¶
func (u *EventUpsertBulk) UpdateLocation() *EventUpsertBulk
UpdateLocation sets the "location" field to the value that was provided on create.
func (*EventUpsertBulk) UpdateName ¶
func (u *EventUpsertBulk) UpdateName() *EventUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*EventUpsertBulk) UpdateNewValues ¶
func (u *EventUpsertBulk) UpdateNewValues() *EventUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Event.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*EventUpsertBulk) UpdateRepeatPattern ¶
func (u *EventUpsertBulk) UpdateRepeatPattern() *EventUpsertBulk
UpdateRepeatPattern sets the "repeat_pattern" field to the value that was provided on create.
func (*EventUpsertBulk) UpdateStartTime ¶
func (u *EventUpsertBulk) UpdateStartTime() *EventUpsertBulk
UpdateStartTime sets the "start_time" field to the value that was provided on create.
type EventUpsertOne ¶
type EventUpsertOne struct {
// contains filtered or unexported fields
}
EventUpsertOne is the builder for "upsert"-ing
one Event node.
func (*EventUpsertOne) ClearEndTime ¶
func (u *EventUpsertOne) ClearEndTime() *EventUpsertOne
ClearEndTime clears the value of the "end_time" field.
func (*EventUpsertOne) ClearLocation ¶
func (u *EventUpsertOne) ClearLocation() *EventUpsertOne
ClearLocation clears the value of the "location" field.
func (*EventUpsertOne) ClearRepeatPattern ¶
func (u *EventUpsertOne) ClearRepeatPattern() *EventUpsertOne
ClearRepeatPattern clears the value of the "repeat_pattern" field.
func (*EventUpsertOne) DoNothing ¶
func (u *EventUpsertOne) DoNothing() *EventUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*EventUpsertOne) Exec ¶
func (u *EventUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*EventUpsertOne) ExecX ¶
func (u *EventUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpsertOne) ID ¶
func (u *EventUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*EventUpsertOne) IDX ¶
func (u *EventUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*EventUpsertOne) Ignore ¶
func (u *EventUpsertOne) Ignore() *EventUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Event.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*EventUpsertOne) SetEndTime ¶
func (u *EventUpsertOne) SetEndTime(v time.Time) *EventUpsertOne
SetEndTime sets the "end_time" field.
func (*EventUpsertOne) SetLocation ¶
func (u *EventUpsertOne) SetLocation(v string) *EventUpsertOne
SetLocation sets the "location" field.
func (*EventUpsertOne) SetName ¶
func (u *EventUpsertOne) SetName(v string) *EventUpsertOne
SetName sets the "name" field.
func (*EventUpsertOne) SetRepeatPattern ¶
func (u *EventUpsertOne) SetRepeatPattern(v string) *EventUpsertOne
SetRepeatPattern sets the "repeat_pattern" field.
func (*EventUpsertOne) SetStartTime ¶
func (u *EventUpsertOne) SetStartTime(v time.Time) *EventUpsertOne
SetStartTime sets the "start_time" field.
func (*EventUpsertOne) Update ¶
func (u *EventUpsertOne) Update(set func(*EventUpsert)) *EventUpsertOne
Update allows overriding fields `UPDATE` values. See the EventCreate.OnConflict documentation for more info.
func (*EventUpsertOne) UpdateEndTime ¶
func (u *EventUpsertOne) UpdateEndTime() *EventUpsertOne
UpdateEndTime sets the "end_time" field to the value that was provided on create.
func (*EventUpsertOne) UpdateLocation ¶
func (u *EventUpsertOne) UpdateLocation() *EventUpsertOne
UpdateLocation sets the "location" field to the value that was provided on create.
func (*EventUpsertOne) UpdateName ¶
func (u *EventUpsertOne) UpdateName() *EventUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*EventUpsertOne) UpdateNewValues ¶
func (u *EventUpsertOne) UpdateNewValues() *EventUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Event.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*EventUpsertOne) UpdateRepeatPattern ¶
func (u *EventUpsertOne) UpdateRepeatPattern() *EventUpsertOne
UpdateRepeatPattern sets the "repeat_pattern" field to the value that was provided on create.
func (*EventUpsertOne) UpdateStartTime ¶
func (u *EventUpsertOne) UpdateStartTime() *EventUpsertOne
UpdateStartTime sets the "start_time" field to the value that was provided on create.
type Forum ¶
type Forum struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the forum (example: General) Name string `json:"name,omitempty"` // Short name of the forum (example: general) ShortName string `json:"short_name,omitempty"` // Description of the forum Description string `json:"description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ForumQuery when eager-loading is set. Edges ForumEdges `json:"edges"` // contains filtered or unexported fields }
Forum is the model entity for the Forum schema.
func (*Forum) QueryGroup ¶
func (f *Forum) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the Forum entity.
func (*Forum) QueryPosts ¶
func (f *Forum) QueryPosts() *ForumPostQuery
QueryPosts queries the "posts" edge of the Forum entity.
func (*Forum) Unwrap ¶
Unwrap unwraps the Forum 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 (*Forum) Update ¶
func (f *Forum) Update() *ForumUpdateOne
Update returns a builder for updating this Forum. Note that you need to call Forum.Unwrap() before calling this method if this Forum was returned from a transaction, and the transaction was committed or rolled back.
type ForumClient ¶
type ForumClient struct {
// contains filtered or unexported fields
}
ForumClient is a client for the Forum schema.
func NewForumClient ¶
func NewForumClient(c config) *ForumClient
NewForumClient returns a client for the Forum from the given config.
func (*ForumClient) Create ¶
func (c *ForumClient) Create() *ForumCreate
Create returns a builder for creating a Forum entity.
func (*ForumClient) CreateBulk ¶
func (c *ForumClient) CreateBulk(builders ...*ForumCreate) *ForumCreateBulk
CreateBulk returns a builder for creating a bulk of Forum entities.
func (*ForumClient) Delete ¶
func (c *ForumClient) Delete() *ForumDelete
Delete returns a delete builder for Forum.
func (*ForumClient) DeleteOne ¶
func (c *ForumClient) DeleteOne(f *Forum) *ForumDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ForumClient) DeleteOneID ¶
func (c *ForumClient) DeleteOneID(id int) *ForumDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ForumClient) GetX ¶
func (c *ForumClient) GetX(ctx context.Context, id int) *Forum
GetX is like Get, but panics if an error occurs.
func (*ForumClient) Intercept ¶
func (c *ForumClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `forum.Intercept(f(g(h())))`.
func (*ForumClient) Interceptors ¶
func (c *ForumClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ForumClient) Query ¶
func (c *ForumClient) Query() *ForumQuery
Query returns a query builder for Forum.
func (*ForumClient) QueryGroup ¶
func (c *ForumClient) QueryGroup(f *Forum) *GroupQuery
QueryGroup queries the group edge of a Forum.
func (*ForumClient) QueryPosts ¶
func (c *ForumClient) QueryPosts(f *Forum) *ForumPostQuery
QueryPosts queries the posts edge of a Forum.
func (*ForumClient) Update ¶
func (c *ForumClient) Update() *ForumUpdate
Update returns an update builder for Forum.
func (*ForumClient) UpdateOne ¶
func (c *ForumClient) UpdateOne(f *Forum) *ForumUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ForumClient) UpdateOneID ¶
func (c *ForumClient) UpdateOneID(id int) *ForumUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ForumClient) Use ¶
func (c *ForumClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `forum.Hooks(f(g(h())))`.
type ForumCreate ¶
type ForumCreate struct {
// contains filtered or unexported fields
}
ForumCreate is the builder for creating a Forum entity.
func (*ForumCreate) AddPostIDs ¶
func (fc *ForumCreate) AddPostIDs(ids ...int) *ForumCreate
AddPostIDs adds the "posts" edge to the ForumPost entity by IDs.
func (*ForumCreate) AddPosts ¶
func (fc *ForumCreate) AddPosts(f ...*ForumPost) *ForumCreate
AddPosts adds the "posts" edges to the ForumPost entity.
func (*ForumCreate) Exec ¶
func (fc *ForumCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ForumCreate) ExecX ¶
func (fc *ForumCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumCreate) Mutation ¶
func (fc *ForumCreate) Mutation() *ForumMutation
Mutation returns the ForumMutation object of the builder.
func (*ForumCreate) OnConflict ¶
func (fc *ForumCreate) OnConflict(opts ...sql.ConflictOption) *ForumUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Forum.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ForumUpsert) { SetName(v+v). }). Exec(ctx)
func (*ForumCreate) OnConflictColumns ¶
func (fc *ForumCreate) OnConflictColumns(columns ...string) *ForumUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Forum.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ForumCreate) Save ¶
func (fc *ForumCreate) Save(ctx context.Context) (*Forum, error)
Save creates the Forum in the database.
func (*ForumCreate) SaveX ¶
func (fc *ForumCreate) SaveX(ctx context.Context) *Forum
SaveX calls Save and panics if Save returns an error.
func (*ForumCreate) SetDescription ¶
func (fc *ForumCreate) SetDescription(s string) *ForumCreate
SetDescription sets the "description" field.
func (*ForumCreate) SetGroup ¶
func (fc *ForumCreate) SetGroup(g *Group) *ForumCreate
SetGroup sets the "group" edge to the Group entity.
func (*ForumCreate) SetGroupID ¶
func (fc *ForumCreate) SetGroupID(id int) *ForumCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*ForumCreate) SetName ¶
func (fc *ForumCreate) SetName(s string) *ForumCreate
SetName sets the "name" field.
func (*ForumCreate) SetShortName ¶
func (fc *ForumCreate) SetShortName(s string) *ForumCreate
SetShortName sets the "short_name" field.
type ForumCreateBulk ¶
type ForumCreateBulk struct {
// contains filtered or unexported fields
}
ForumCreateBulk is the builder for creating many Forum entities in bulk.
func (*ForumCreateBulk) Exec ¶
func (fcb *ForumCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ForumCreateBulk) ExecX ¶
func (fcb *ForumCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumCreateBulk) OnConflict ¶
func (fcb *ForumCreateBulk) OnConflict(opts ...sql.ConflictOption) *ForumUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Forum.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ForumUpsert) { SetName(v+v). }). Exec(ctx)
func (*ForumCreateBulk) OnConflictColumns ¶
func (fcb *ForumCreateBulk) OnConflictColumns(columns ...string) *ForumUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Forum.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ForumDelete ¶
type ForumDelete struct {
// contains filtered or unexported fields
}
ForumDelete is the builder for deleting a Forum entity.
func (*ForumDelete) Exec ¶
func (fd *ForumDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ForumDelete) ExecX ¶
func (fd *ForumDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ForumDelete) Where ¶
func (fd *ForumDelete) Where(ps ...predicate.Forum) *ForumDelete
Where appends a list predicates to the ForumDelete builder.
type ForumDeleteOne ¶
type ForumDeleteOne struct {
// contains filtered or unexported fields
}
ForumDeleteOne is the builder for deleting a single Forum entity.
func (*ForumDeleteOne) Exec ¶
func (fdo *ForumDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ForumDeleteOne) ExecX ¶
func (fdo *ForumDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumDeleteOne) Where ¶
func (fdo *ForumDeleteOne) Where(ps ...predicate.Forum) *ForumDeleteOne
Where appends a list predicates to the ForumDelete builder.
type ForumEdges ¶
type ForumEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // Posts in the forum Posts []*ForumPost `json:"posts,omitempty"` // contains filtered or unexported fields }
ForumEdges holds the relations/edges for other nodes in the graph.
func (ForumEdges) GroupOrErr ¶
func (e ForumEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ForumEdges) PostsOrErr ¶
func (e ForumEdges) PostsOrErr() ([]*ForumPost, error)
PostsOrErr returns the Posts value or an error if the edge was not loaded in eager-loading.
type ForumGroupBy ¶
type ForumGroupBy struct {
// contains filtered or unexported fields
}
ForumGroupBy is the group-by builder for Forum entities.
func (*ForumGroupBy) Aggregate ¶
func (fgb *ForumGroupBy) Aggregate(fns ...AggregateFunc) *ForumGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ForumGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ForumGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ForumGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ForumGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ForumGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ForumGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ForumGroupBy) Scan ¶
func (fgb *ForumGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ForumGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ForumMutation ¶
type ForumMutation struct {
// contains filtered or unexported fields
}
ForumMutation represents an operation that mutates the Forum nodes in the graph.
func (*ForumMutation) AddField ¶
func (m *ForumMutation) 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 (*ForumMutation) AddPostIDs ¶
func (m *ForumMutation) AddPostIDs(ids ...int)
AddPostIDs adds the "posts" edge to the ForumPost entity by ids.
func (*ForumMutation) AddedEdges ¶
func (m *ForumMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ForumMutation) AddedField ¶
func (m *ForumMutation) 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 (*ForumMutation) AddedFields ¶
func (m *ForumMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ForumMutation) AddedIDs ¶
func (m *ForumMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ForumMutation) ClearEdge ¶
func (m *ForumMutation) 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 (*ForumMutation) ClearField ¶
func (m *ForumMutation) 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 (*ForumMutation) ClearGroup ¶
func (m *ForumMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*ForumMutation) ClearPosts ¶
func (m *ForumMutation) ClearPosts()
ClearPosts clears the "posts" edge to the ForumPost entity.
func (*ForumMutation) ClearedEdges ¶
func (m *ForumMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ForumMutation) ClearedFields ¶
func (m *ForumMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ForumMutation) Client ¶
func (m ForumMutation) 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 (*ForumMutation) Description ¶
func (m *ForumMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ForumMutation) EdgeCleared ¶
func (m *ForumMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ForumMutation) Field ¶
func (m *ForumMutation) 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 (*ForumMutation) FieldCleared ¶
func (m *ForumMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ForumMutation) Fields ¶
func (m *ForumMutation) 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 (*ForumMutation) GroupCleared ¶
func (m *ForumMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*ForumMutation) GroupID ¶
func (m *ForumMutation) GroupID() (id int, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*ForumMutation) GroupIDs ¶
func (m *ForumMutation) GroupIDs() (ids []int)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*ForumMutation) ID ¶
func (m *ForumMutation) 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 (*ForumMutation) IDs ¶
func (m *ForumMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ForumMutation) Name ¶
func (m *ForumMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ForumMutation) OldDescription ¶
func (m *ForumMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Forum entity. If the Forum object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ForumMutation) 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 (*ForumMutation) OldName ¶
func (m *ForumMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Forum entity. If the Forum object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ForumMutation) OldShortName ¶
func (m *ForumMutation) OldShortName(ctx context.Context) (v string, err error)
OldShortName returns the old "short_name" field's value of the Forum entity. If the Forum object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ForumMutation) PostsCleared ¶
func (m *ForumMutation) PostsCleared() bool
PostsCleared reports if the "posts" edge to the ForumPost entity was cleared.
func (*ForumMutation) PostsIDs ¶
func (m *ForumMutation) PostsIDs() (ids []int)
PostsIDs returns the "posts" edge IDs in the mutation.
func (*ForumMutation) RemovePostIDs ¶
func (m *ForumMutation) RemovePostIDs(ids ...int)
RemovePostIDs removes the "posts" edge to the ForumPost entity by IDs.
func (*ForumMutation) RemovedEdges ¶
func (m *ForumMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ForumMutation) RemovedIDs ¶
func (m *ForumMutation) 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 (*ForumMutation) RemovedPostsIDs ¶
func (m *ForumMutation) RemovedPostsIDs() (ids []int)
RemovedPosts returns the removed IDs of the "posts" edge to the ForumPost entity.
func (*ForumMutation) ResetDescription ¶
func (m *ForumMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ForumMutation) ResetEdge ¶
func (m *ForumMutation) 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 (*ForumMutation) ResetField ¶
func (m *ForumMutation) 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 (*ForumMutation) ResetGroup ¶
func (m *ForumMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*ForumMutation) ResetName ¶
func (m *ForumMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ForumMutation) ResetPosts ¶
func (m *ForumMutation) ResetPosts()
ResetPosts resets all changes to the "posts" edge.
func (*ForumMutation) ResetShortName ¶
func (m *ForumMutation) ResetShortName()
ResetShortName resets all changes to the "short_name" field.
func (*ForumMutation) SetDescription ¶
func (m *ForumMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ForumMutation) SetField ¶
func (m *ForumMutation) 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 (*ForumMutation) SetGroupID ¶
func (m *ForumMutation) SetGroupID(id int)
SetGroupID sets the "group" edge to the Group entity by id.
func (*ForumMutation) SetName ¶
func (m *ForumMutation) SetName(s string)
SetName sets the "name" field.
func (*ForumMutation) SetOp ¶
func (m *ForumMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ForumMutation) SetShortName ¶
func (m *ForumMutation) SetShortName(s string)
SetShortName sets the "short_name" field.
func (*ForumMutation) ShortName ¶
func (m *ForumMutation) ShortName() (r string, exists bool)
ShortName returns the value of the "short_name" field in the mutation.
func (ForumMutation) Tx ¶
func (m ForumMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ForumMutation) Type ¶
func (m *ForumMutation) Type() string
Type returns the node type of this mutation (Forum).
func (*ForumMutation) Where ¶
func (m *ForumMutation) Where(ps ...predicate.Forum)
Where appends a list predicates to the ForumMutation builder.
func (*ForumMutation) WhereP ¶
func (m *ForumMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ForumMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ForumPost ¶
type ForumPost struct { // ID of the ent. ID int `json:"id,omitempty"` // Title of the forum post Title string `json:"title,omitempty"` // Content of the forum post Content string `json:"content,omitempty"` // Slice of user IDs that were mentioned MentionedUsersJSON []int `json:"mentioned_users_json,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ForumPostQuery when eager-loading is set. Edges ForumPostEdges `json:"edges"` // contains filtered or unexported fields }
ForumPost is the model entity for the ForumPost schema.
func (*ForumPost) QueryAuthor ¶
QueryAuthor queries the "author" edge of the ForumPost entity.
func (*ForumPost) QueryChildren ¶
func (fp *ForumPost) QueryChildren() *ForumPostQuery
QueryChildren queries the "children" edge of the ForumPost entity.
func (*ForumPost) QueryForum ¶
func (fp *ForumPost) QueryForum() *ForumQuery
QueryForum queries the "forum" edge of the ForumPost entity.
func (*ForumPost) QueryParent ¶
func (fp *ForumPost) QueryParent() *ForumPostQuery
QueryParent queries the "parent" edge of the ForumPost entity.
func (*ForumPost) QueryReactedUsers ¶
QueryReactedUsers queries the "reacted_users" edge of the ForumPost entity.
func (*ForumPost) QueryReactions ¶
func (fp *ForumPost) QueryReactions() *ReactionQuery
QueryReactions queries the "reactions" edge of the ForumPost entity.
func (*ForumPost) Unwrap ¶
Unwrap unwraps the ForumPost 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 (*ForumPost) Update ¶
func (fp *ForumPost) Update() *ForumPostUpdateOne
Update returns a builder for updating this ForumPost. Note that you need to call ForumPost.Unwrap() before calling this method if this ForumPost was returned from a transaction, and the transaction was committed or rolled back.
type ForumPostClient ¶
type ForumPostClient struct {
// contains filtered or unexported fields
}
ForumPostClient is a client for the ForumPost schema.
func NewForumPostClient ¶
func NewForumPostClient(c config) *ForumPostClient
NewForumPostClient returns a client for the ForumPost from the given config.
func (*ForumPostClient) Create ¶
func (c *ForumPostClient) Create() *ForumPostCreate
Create returns a builder for creating a ForumPost entity.
func (*ForumPostClient) CreateBulk ¶
func (c *ForumPostClient) CreateBulk(builders ...*ForumPostCreate) *ForumPostCreateBulk
CreateBulk returns a builder for creating a bulk of ForumPost entities.
func (*ForumPostClient) Delete ¶
func (c *ForumPostClient) Delete() *ForumPostDelete
Delete returns a delete builder for ForumPost.
func (*ForumPostClient) DeleteOne ¶
func (c *ForumPostClient) DeleteOne(fp *ForumPost) *ForumPostDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ForumPostClient) DeleteOneID ¶
func (c *ForumPostClient) DeleteOneID(id int) *ForumPostDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ForumPostClient) GetX ¶
func (c *ForumPostClient) GetX(ctx context.Context, id int) *ForumPost
GetX is like Get, but panics if an error occurs.
func (*ForumPostClient) Hooks ¶
func (c *ForumPostClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ForumPostClient) Intercept ¶
func (c *ForumPostClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `forumpost.Intercept(f(g(h())))`.
func (*ForumPostClient) Interceptors ¶
func (c *ForumPostClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ForumPostClient) Query ¶
func (c *ForumPostClient) Query() *ForumPostQuery
Query returns a query builder for ForumPost.
func (*ForumPostClient) QueryAuthor ¶
func (c *ForumPostClient) QueryAuthor(fp *ForumPost) *UserQuery
QueryAuthor queries the author edge of a ForumPost.
func (*ForumPostClient) QueryChildren ¶
func (c *ForumPostClient) QueryChildren(fp *ForumPost) *ForumPostQuery
QueryChildren queries the children edge of a ForumPost.
func (*ForumPostClient) QueryForum ¶
func (c *ForumPostClient) QueryForum(fp *ForumPost) *ForumQuery
QueryForum queries the forum edge of a ForumPost.
func (*ForumPostClient) QueryParent ¶
func (c *ForumPostClient) QueryParent(fp *ForumPost) *ForumPostQuery
QueryParent queries the parent edge of a ForumPost.
func (*ForumPostClient) QueryReactedUsers ¶
func (c *ForumPostClient) QueryReactedUsers(fp *ForumPost) *UserQuery
QueryReactedUsers queries the reacted_users edge of a ForumPost.
func (*ForumPostClient) QueryReactions ¶
func (c *ForumPostClient) QueryReactions(fp *ForumPost) *ReactionQuery
QueryReactions queries the reactions edge of a ForumPost.
func (*ForumPostClient) Update ¶
func (c *ForumPostClient) Update() *ForumPostUpdate
Update returns an update builder for ForumPost.
func (*ForumPostClient) UpdateOne ¶
func (c *ForumPostClient) UpdateOne(fp *ForumPost) *ForumPostUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ForumPostClient) UpdateOneID ¶
func (c *ForumPostClient) UpdateOneID(id int) *ForumPostUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ForumPostClient) Use ¶
func (c *ForumPostClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `forumpost.Hooks(f(g(h())))`.
type ForumPostCreate ¶
type ForumPostCreate struct {
// contains filtered or unexported fields
}
ForumPostCreate is the builder for creating a ForumPost entity.
func (*ForumPostCreate) AddChildIDs ¶
func (fpc *ForumPostCreate) AddChildIDs(ids ...int) *ForumPostCreate
AddChildIDs adds the "children" edge to the ForumPost entity by IDs.
func (*ForumPostCreate) AddChildren ¶
func (fpc *ForumPostCreate) AddChildren(f ...*ForumPost) *ForumPostCreate
AddChildren adds the "children" edges to the ForumPost entity.
func (*ForumPostCreate) AddReactedUserIDs ¶
func (fpc *ForumPostCreate) AddReactedUserIDs(ids ...int) *ForumPostCreate
AddReactedUserIDs adds the "reacted_users" edge to the User entity by IDs.
func (*ForumPostCreate) AddReactedUsers ¶
func (fpc *ForumPostCreate) AddReactedUsers(u ...*User) *ForumPostCreate
AddReactedUsers adds the "reacted_users" edges to the User entity.
func (*ForumPostCreate) Exec ¶
func (fpc *ForumPostCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ForumPostCreate) ExecX ¶
func (fpc *ForumPostCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumPostCreate) Mutation ¶
func (fpc *ForumPostCreate) Mutation() *ForumPostMutation
Mutation returns the ForumPostMutation object of the builder.
func (*ForumPostCreate) OnConflict ¶
func (fpc *ForumPostCreate) OnConflict(opts ...sql.ConflictOption) *ForumPostUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.ForumPost.Create(). SetTitle(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ForumPostUpsert) { SetTitle(v+v). }). Exec(ctx)
func (*ForumPostCreate) OnConflictColumns ¶
func (fpc *ForumPostCreate) OnConflictColumns(columns ...string) *ForumPostUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.ForumPost.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ForumPostCreate) Save ¶
func (fpc *ForumPostCreate) Save(ctx context.Context) (*ForumPost, error)
Save creates the ForumPost in the database.
func (*ForumPostCreate) SaveX ¶
func (fpc *ForumPostCreate) SaveX(ctx context.Context) *ForumPost
SaveX calls Save and panics if Save returns an error.
func (*ForumPostCreate) SetAuthor ¶
func (fpc *ForumPostCreate) SetAuthor(u *User) *ForumPostCreate
SetAuthor sets the "author" edge to the User entity.
func (*ForumPostCreate) SetAuthorID ¶
func (fpc *ForumPostCreate) SetAuthorID(id int) *ForumPostCreate
SetAuthorID sets the "author" edge to the User entity by ID.
func (*ForumPostCreate) SetContent ¶
func (fpc *ForumPostCreate) SetContent(s string) *ForumPostCreate
SetContent sets the "content" field.
func (*ForumPostCreate) SetForum ¶
func (fpc *ForumPostCreate) SetForum(f *Forum) *ForumPostCreate
SetForum sets the "forum" edge to the Forum entity.
func (*ForumPostCreate) SetForumID ¶
func (fpc *ForumPostCreate) SetForumID(id int) *ForumPostCreate
SetForumID sets the "forum" edge to the Forum entity by ID.
func (*ForumPostCreate) SetMentionedUsersJSON ¶
func (fpc *ForumPostCreate) SetMentionedUsersJSON(i []int) *ForumPostCreate
SetMentionedUsersJSON sets the "mentioned_users_json" field.
func (*ForumPostCreate) SetNillableParentID ¶
func (fpc *ForumPostCreate) SetNillableParentID(id *int) *ForumPostCreate
SetNillableParentID sets the "parent" edge to the ForumPost entity by ID if the given value is not nil.
func (*ForumPostCreate) SetParent ¶
func (fpc *ForumPostCreate) SetParent(f *ForumPost) *ForumPostCreate
SetParent sets the "parent" edge to the ForumPost entity.
func (*ForumPostCreate) SetParentID ¶
func (fpc *ForumPostCreate) SetParentID(id int) *ForumPostCreate
SetParentID sets the "parent" edge to the ForumPost entity by ID.
func (*ForumPostCreate) SetTitle ¶
func (fpc *ForumPostCreate) SetTitle(s string) *ForumPostCreate
SetTitle sets the "title" field.
type ForumPostCreateBulk ¶
type ForumPostCreateBulk struct {
// contains filtered or unexported fields
}
ForumPostCreateBulk is the builder for creating many ForumPost entities in bulk.
func (*ForumPostCreateBulk) Exec ¶
func (fpcb *ForumPostCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ForumPostCreateBulk) ExecX ¶
func (fpcb *ForumPostCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumPostCreateBulk) OnConflict ¶
func (fpcb *ForumPostCreateBulk) OnConflict(opts ...sql.ConflictOption) *ForumPostUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.ForumPost.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ForumPostUpsert) { SetTitle(v+v). }). Exec(ctx)
func (*ForumPostCreateBulk) OnConflictColumns ¶
func (fpcb *ForumPostCreateBulk) OnConflictColumns(columns ...string) *ForumPostUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.ForumPost.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ForumPostDelete ¶
type ForumPostDelete struct {
// contains filtered or unexported fields
}
ForumPostDelete is the builder for deleting a ForumPost entity.
func (*ForumPostDelete) Exec ¶
func (fpd *ForumPostDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ForumPostDelete) ExecX ¶
func (fpd *ForumPostDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ForumPostDelete) Where ¶
func (fpd *ForumPostDelete) Where(ps ...predicate.ForumPost) *ForumPostDelete
Where appends a list predicates to the ForumPostDelete builder.
type ForumPostDeleteOne ¶
type ForumPostDeleteOne struct {
// contains filtered or unexported fields
}
ForumPostDeleteOne is the builder for deleting a single ForumPost entity.
func (*ForumPostDeleteOne) Exec ¶
func (fpdo *ForumPostDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ForumPostDeleteOne) ExecX ¶
func (fpdo *ForumPostDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumPostDeleteOne) Where ¶
func (fpdo *ForumPostDeleteOne) Where(ps ...predicate.ForumPost) *ForumPostDeleteOne
Where appends a list predicates to the ForumPostDelete builder.
type ForumPostEdges ¶
type ForumPostEdges struct { // Author of the forum post Author *User `json:"author,omitempty"` // Forum holds the value of the forum edge. Forum *Forum `json:"forum,omitempty"` // Parent holds the value of the parent edge. Parent *ForumPost `json:"parent,omitempty"` // Children holds the value of the children edge. Children []*ForumPost `json:"children,omitempty"` // ReactedUsers holds the value of the reacted_users edge. ReactedUsers []*User `json:"reacted_users,omitempty"` // Reactions holds the value of the reactions edge. Reactions []*Reaction `json:"reactions,omitempty"` // contains filtered or unexported fields }
ForumPostEdges holds the relations/edges for other nodes in the graph.
func (ForumPostEdges) AuthorOrErr ¶
func (e ForumPostEdges) AuthorOrErr() (*User, error)
AuthorOrErr returns the Author value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ForumPostEdges) ChildrenOrErr ¶
func (e ForumPostEdges) ChildrenOrErr() ([]*ForumPost, error)
ChildrenOrErr returns the Children value or an error if the edge was not loaded in eager-loading.
func (ForumPostEdges) ForumOrErr ¶
func (e ForumPostEdges) ForumOrErr() (*Forum, error)
ForumOrErr returns the Forum value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ForumPostEdges) ParentOrErr ¶
func (e ForumPostEdges) ParentOrErr() (*ForumPost, error)
ParentOrErr returns the Parent value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ForumPostEdges) ReactedUsersOrErr ¶
func (e ForumPostEdges) ReactedUsersOrErr() ([]*User, error)
ReactedUsersOrErr returns the ReactedUsers value or an error if the edge was not loaded in eager-loading.
func (ForumPostEdges) ReactionsOrErr ¶
func (e ForumPostEdges) ReactionsOrErr() ([]*Reaction, error)
ReactionsOrErr returns the Reactions value or an error if the edge was not loaded in eager-loading.
type ForumPostGroupBy ¶
type ForumPostGroupBy struct {
// contains filtered or unexported fields
}
ForumPostGroupBy is the group-by builder for ForumPost entities.
func (*ForumPostGroupBy) Aggregate ¶
func (fpgb *ForumPostGroupBy) Aggregate(fns ...AggregateFunc) *ForumPostGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ForumPostGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ForumPostGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ForumPostGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ForumPostGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ForumPostGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ForumPostGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ForumPostGroupBy) Scan ¶
func (fpgb *ForumPostGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ForumPostGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ForumPostMutation ¶
type ForumPostMutation struct {
// contains filtered or unexported fields
}
ForumPostMutation represents an operation that mutates the ForumPost nodes in the graph.
func (*ForumPostMutation) AddChildIDs ¶
func (m *ForumPostMutation) AddChildIDs(ids ...int)
AddChildIDs adds the "children" edge to the ForumPost entity by ids.
func (*ForumPostMutation) AddField ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) AddReactedUserIDs ¶
func (m *ForumPostMutation) AddReactedUserIDs(ids ...int)
AddReactedUserIDs adds the "reacted_users" edge to the User entity by ids.
func (*ForumPostMutation) AddedEdges ¶
func (m *ForumPostMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ForumPostMutation) AddedField ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) AddedFields ¶
func (m *ForumPostMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ForumPostMutation) AddedIDs ¶
func (m *ForumPostMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ForumPostMutation) AppendMentionedUsersJSON ¶
func (m *ForumPostMutation) AppendMentionedUsersJSON(i []int)
AppendMentionedUsersJSON adds i to the "mentioned_users_json" field.
func (*ForumPostMutation) AppendedMentionedUsersJSON ¶
func (m *ForumPostMutation) AppendedMentionedUsersJSON() ([]int, bool)
AppendedMentionedUsersJSON returns the list of values that were appended to the "mentioned_users_json" field in this mutation.
func (*ForumPostMutation) AuthorCleared ¶
func (m *ForumPostMutation) AuthorCleared() bool
AuthorCleared reports if the "author" edge to the User entity was cleared.
func (*ForumPostMutation) AuthorID ¶
func (m *ForumPostMutation) AuthorID() (id int, exists bool)
AuthorID returns the "author" edge ID in the mutation.
func (*ForumPostMutation) AuthorIDs ¶
func (m *ForumPostMutation) AuthorIDs() (ids []int)
AuthorIDs returns the "author" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AuthorID instead. It exists only for internal usage by the builders.
func (*ForumPostMutation) ChildrenCleared ¶
func (m *ForumPostMutation) ChildrenCleared() bool
ChildrenCleared reports if the "children" edge to the ForumPost entity was cleared.
func (*ForumPostMutation) ChildrenIDs ¶
func (m *ForumPostMutation) ChildrenIDs() (ids []int)
ChildrenIDs returns the "children" edge IDs in the mutation.
func (*ForumPostMutation) ClearAuthor ¶
func (m *ForumPostMutation) ClearAuthor()
ClearAuthor clears the "author" edge to the User entity.
func (*ForumPostMutation) ClearChildren ¶
func (m *ForumPostMutation) ClearChildren()
ClearChildren clears the "children" edge to the ForumPost entity.
func (*ForumPostMutation) ClearEdge ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) ClearField ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) ClearForum ¶
func (m *ForumPostMutation) ClearForum()
ClearForum clears the "forum" edge to the Forum entity.
func (*ForumPostMutation) ClearParent ¶
func (m *ForumPostMutation) ClearParent()
ClearParent clears the "parent" edge to the ForumPost entity.
func (*ForumPostMutation) ClearReactedUsers ¶
func (m *ForumPostMutation) ClearReactedUsers()
ClearReactedUsers clears the "reacted_users" edge to the User entity.
func (*ForumPostMutation) ClearedEdges ¶
func (m *ForumPostMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ForumPostMutation) ClearedFields ¶
func (m *ForumPostMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ForumPostMutation) Client ¶
func (m ForumPostMutation) 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 (*ForumPostMutation) Content ¶
func (m *ForumPostMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*ForumPostMutation) EdgeCleared ¶
func (m *ForumPostMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ForumPostMutation) Field ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) FieldCleared ¶
func (m *ForumPostMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ForumPostMutation) Fields ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) ForumCleared ¶
func (m *ForumPostMutation) ForumCleared() bool
ForumCleared reports if the "forum" edge to the Forum entity was cleared.
func (*ForumPostMutation) ForumID ¶
func (m *ForumPostMutation) ForumID() (id int, exists bool)
ForumID returns the "forum" edge ID in the mutation.
func (*ForumPostMutation) ForumIDs ¶
func (m *ForumPostMutation) ForumIDs() (ids []int)
ForumIDs returns the "forum" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ForumID instead. It exists only for internal usage by the builders.
func (*ForumPostMutation) ID ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) IDs ¶
func (m *ForumPostMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ForumPostMutation) MentionedUsersJSON ¶
func (m *ForumPostMutation) MentionedUsersJSON() (r []int, exists bool)
MentionedUsersJSON returns the value of the "mentioned_users_json" field in the mutation.
func (*ForumPostMutation) OldContent ¶
func (m *ForumPostMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the ForumPost entity. If the ForumPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ForumPostMutation) 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 (*ForumPostMutation) OldMentionedUsersJSON ¶
func (m *ForumPostMutation) OldMentionedUsersJSON(ctx context.Context) (v []int, err error)
OldMentionedUsersJSON returns the old "mentioned_users_json" field's value of the ForumPost entity. If the ForumPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ForumPostMutation) OldTitle ¶
func (m *ForumPostMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the ForumPost entity. If the ForumPost object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ForumPostMutation) ParentCleared ¶
func (m *ForumPostMutation) ParentCleared() bool
ParentCleared reports if the "parent" edge to the ForumPost entity was cleared.
func (*ForumPostMutation) ParentID ¶
func (m *ForumPostMutation) ParentID() (id int, exists bool)
ParentID returns the "parent" edge ID in the mutation.
func (*ForumPostMutation) ParentIDs ¶
func (m *ForumPostMutation) ParentIDs() (ids []int)
ParentIDs returns the "parent" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ParentID instead. It exists only for internal usage by the builders.
func (*ForumPostMutation) ReactedUsersCleared ¶
func (m *ForumPostMutation) ReactedUsersCleared() bool
ReactedUsersCleared reports if the "reacted_users" edge to the User entity was cleared.
func (*ForumPostMutation) ReactedUsersIDs ¶
func (m *ForumPostMutation) ReactedUsersIDs() (ids []int)
ReactedUsersIDs returns the "reacted_users" edge IDs in the mutation.
func (*ForumPostMutation) RemoveChildIDs ¶
func (m *ForumPostMutation) RemoveChildIDs(ids ...int)
RemoveChildIDs removes the "children" edge to the ForumPost entity by IDs.
func (*ForumPostMutation) RemoveReactedUserIDs ¶
func (m *ForumPostMutation) RemoveReactedUserIDs(ids ...int)
RemoveReactedUserIDs removes the "reacted_users" edge to the User entity by IDs.
func (*ForumPostMutation) RemovedChildrenIDs ¶
func (m *ForumPostMutation) RemovedChildrenIDs() (ids []int)
RemovedChildren returns the removed IDs of the "children" edge to the ForumPost entity.
func (*ForumPostMutation) RemovedEdges ¶
func (m *ForumPostMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ForumPostMutation) RemovedIDs ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) RemovedReactedUsersIDs ¶
func (m *ForumPostMutation) RemovedReactedUsersIDs() (ids []int)
RemovedReactedUsers returns the removed IDs of the "reacted_users" edge to the User entity.
func (*ForumPostMutation) ResetAuthor ¶
func (m *ForumPostMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" edge.
func (*ForumPostMutation) ResetChildren ¶
func (m *ForumPostMutation) ResetChildren()
ResetChildren resets all changes to the "children" edge.
func (*ForumPostMutation) ResetContent ¶
func (m *ForumPostMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*ForumPostMutation) ResetEdge ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) ResetField ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) ResetForum ¶
func (m *ForumPostMutation) ResetForum()
ResetForum resets all changes to the "forum" edge.
func (*ForumPostMutation) ResetMentionedUsersJSON ¶
func (m *ForumPostMutation) ResetMentionedUsersJSON()
ResetMentionedUsersJSON resets all changes to the "mentioned_users_json" field.
func (*ForumPostMutation) ResetParent ¶
func (m *ForumPostMutation) ResetParent()
ResetParent resets all changes to the "parent" edge.
func (*ForumPostMutation) ResetReactedUsers ¶
func (m *ForumPostMutation) ResetReactedUsers()
ResetReactedUsers resets all changes to the "reacted_users" edge.
func (*ForumPostMutation) ResetTitle ¶
func (m *ForumPostMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*ForumPostMutation) SetAuthorID ¶
func (m *ForumPostMutation) SetAuthorID(id int)
SetAuthorID sets the "author" edge to the User entity by id.
func (*ForumPostMutation) SetContent ¶
func (m *ForumPostMutation) SetContent(s string)
SetContent sets the "content" field.
func (*ForumPostMutation) SetField ¶
func (m *ForumPostMutation) 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 (*ForumPostMutation) SetForumID ¶
func (m *ForumPostMutation) SetForumID(id int)
SetForumID sets the "forum" edge to the Forum entity by id.
func (*ForumPostMutation) SetMentionedUsersJSON ¶
func (m *ForumPostMutation) SetMentionedUsersJSON(i []int)
SetMentionedUsersJSON sets the "mentioned_users_json" field.
func (*ForumPostMutation) SetOp ¶
func (m *ForumPostMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ForumPostMutation) SetParentID ¶
func (m *ForumPostMutation) SetParentID(id int)
SetParentID sets the "parent" edge to the ForumPost entity by id.
func (*ForumPostMutation) SetTitle ¶
func (m *ForumPostMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*ForumPostMutation) Title ¶
func (m *ForumPostMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (ForumPostMutation) Tx ¶
func (m ForumPostMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ForumPostMutation) Type ¶
func (m *ForumPostMutation) Type() string
Type returns the node type of this mutation (ForumPost).
func (*ForumPostMutation) Where ¶
func (m *ForumPostMutation) Where(ps ...predicate.ForumPost)
Where appends a list predicates to the ForumPostMutation builder.
func (*ForumPostMutation) WhereP ¶
func (m *ForumPostMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ForumPostMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ForumPostQuery ¶
type ForumPostQuery struct {
// contains filtered or unexported fields
}
ForumPostQuery is the builder for querying ForumPost entities.
func (*ForumPostQuery) Aggregate ¶
func (fpq *ForumPostQuery) Aggregate(fns ...AggregateFunc) *ForumPostSelect
Aggregate returns a ForumPostSelect configured with the given aggregations.
func (*ForumPostQuery) All ¶
func (fpq *ForumPostQuery) All(ctx context.Context) ([]*ForumPost, error)
All executes the query and returns a list of ForumPosts.
func (*ForumPostQuery) AllX ¶
func (fpq *ForumPostQuery) AllX(ctx context.Context) []*ForumPost
AllX is like All, but panics if an error occurs.
func (*ForumPostQuery) Clone ¶
func (fpq *ForumPostQuery) Clone() *ForumPostQuery
Clone returns a duplicate of the ForumPostQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ForumPostQuery) Count ¶
func (fpq *ForumPostQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ForumPostQuery) CountX ¶
func (fpq *ForumPostQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ForumPostQuery) Exist ¶
func (fpq *ForumPostQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ForumPostQuery) ExistX ¶
func (fpq *ForumPostQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ForumPostQuery) First ¶
func (fpq *ForumPostQuery) First(ctx context.Context) (*ForumPost, error)
First returns the first ForumPost entity from the query. Returns a *NotFoundError when no ForumPost was found.
func (*ForumPostQuery) FirstID ¶
func (fpq *ForumPostQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ForumPost ID from the query. Returns a *NotFoundError when no ForumPost ID was found.
func (*ForumPostQuery) FirstIDX ¶
func (fpq *ForumPostQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ForumPostQuery) FirstX ¶
func (fpq *ForumPostQuery) FirstX(ctx context.Context) *ForumPost
FirstX is like First, but panics if an error occurs.
func (*ForumPostQuery) GroupBy ¶
func (fpq *ForumPostQuery) GroupBy(field string, fields ...string) *ForumPostGroupBy
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 { Title string `json:"title,omitempty"` Count int `json:"count,omitempty"` } client.ForumPost.Query(). GroupBy(forumpost.FieldTitle). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ForumPostQuery) IDs ¶
func (fpq *ForumPostQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of ForumPost IDs.
func (*ForumPostQuery) IDsX ¶
func (fpq *ForumPostQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ForumPostQuery) Limit ¶
func (fpq *ForumPostQuery) Limit(limit int) *ForumPostQuery
Limit the number of records to be returned by this query.
func (*ForumPostQuery) Offset ¶
func (fpq *ForumPostQuery) Offset(offset int) *ForumPostQuery
Offset to start from.
func (*ForumPostQuery) Only ¶
func (fpq *ForumPostQuery) Only(ctx context.Context) (*ForumPost, error)
Only returns a single ForumPost entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ForumPost entity is found. Returns a *NotFoundError when no ForumPost entities are found.
func (*ForumPostQuery) OnlyID ¶
func (fpq *ForumPostQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ForumPost ID in the query. Returns a *NotSingularError when more than one ForumPost ID is found. Returns a *NotFoundError when no entities are found.
func (*ForumPostQuery) OnlyIDX ¶
func (fpq *ForumPostQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ForumPostQuery) OnlyX ¶
func (fpq *ForumPostQuery) OnlyX(ctx context.Context) *ForumPost
OnlyX is like Only, but panics if an error occurs.
func (*ForumPostQuery) Order ¶
func (fpq *ForumPostQuery) Order(o ...forumpost.OrderOption) *ForumPostQuery
Order specifies how the records should be ordered.
func (*ForumPostQuery) QueryAuthor ¶
func (fpq *ForumPostQuery) QueryAuthor() *UserQuery
QueryAuthor chains the current query on the "author" edge.
func (*ForumPostQuery) QueryChildren ¶
func (fpq *ForumPostQuery) QueryChildren() *ForumPostQuery
QueryChildren chains the current query on the "children" edge.
func (*ForumPostQuery) QueryForum ¶
func (fpq *ForumPostQuery) QueryForum() *ForumQuery
QueryForum chains the current query on the "forum" edge.
func (*ForumPostQuery) QueryParent ¶
func (fpq *ForumPostQuery) QueryParent() *ForumPostQuery
QueryParent chains the current query on the "parent" edge.
func (*ForumPostQuery) QueryReactedUsers ¶
func (fpq *ForumPostQuery) QueryReactedUsers() *UserQuery
QueryReactedUsers chains the current query on the "reacted_users" edge.
func (*ForumPostQuery) QueryReactions ¶
func (fpq *ForumPostQuery) QueryReactions() *ReactionQuery
QueryReactions chains the current query on the "reactions" edge.
func (*ForumPostQuery) Select ¶
func (fpq *ForumPostQuery) Select(fields ...string) *ForumPostSelect
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 { Title string `json:"title,omitempty"` } client.ForumPost.Query(). Select(forumpost.FieldTitle). Scan(ctx, &v)
func (*ForumPostQuery) Unique ¶
func (fpq *ForumPostQuery) Unique(unique bool) *ForumPostQuery
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 (*ForumPostQuery) Where ¶
func (fpq *ForumPostQuery) Where(ps ...predicate.ForumPost) *ForumPostQuery
Where adds a new predicate for the ForumPostQuery builder.
func (*ForumPostQuery) WithAuthor ¶
func (fpq *ForumPostQuery) WithAuthor(opts ...func(*UserQuery)) *ForumPostQuery
WithAuthor tells the query-builder to eager-load the nodes that are connected to the "author" edge. The optional arguments are used to configure the query builder of the edge.
func (*ForumPostQuery) WithChildren ¶
func (fpq *ForumPostQuery) WithChildren(opts ...func(*ForumPostQuery)) *ForumPostQuery
WithChildren tells the query-builder to eager-load the nodes that are connected to the "children" edge. The optional arguments are used to configure the query builder of the edge.
func (*ForumPostQuery) WithForum ¶
func (fpq *ForumPostQuery) WithForum(opts ...func(*ForumQuery)) *ForumPostQuery
WithForum tells the query-builder to eager-load the nodes that are connected to the "forum" edge. The optional arguments are used to configure the query builder of the edge.
func (*ForumPostQuery) WithParent ¶
func (fpq *ForumPostQuery) WithParent(opts ...func(*ForumPostQuery)) *ForumPostQuery
WithParent tells the query-builder to eager-load the nodes that are connected to the "parent" edge. The optional arguments are used to configure the query builder of the edge.
func (*ForumPostQuery) WithReactedUsers ¶
func (fpq *ForumPostQuery) WithReactedUsers(opts ...func(*UserQuery)) *ForumPostQuery
WithReactedUsers tells the query-builder to eager-load the nodes that are connected to the "reacted_users" edge. The optional arguments are used to configure the query builder of the edge.
func (*ForumPostQuery) WithReactions ¶
func (fpq *ForumPostQuery) WithReactions(opts ...func(*ReactionQuery)) *ForumPostQuery
WithReactions tells the query-builder to eager-load the nodes that are connected to the "reactions" edge. The optional arguments are used to configure the query builder of the edge.
type ForumPostSelect ¶
type ForumPostSelect struct { *ForumPostQuery // contains filtered or unexported fields }
ForumPostSelect is the builder for selecting fields of ForumPost entities.
func (*ForumPostSelect) Aggregate ¶
func (fps *ForumPostSelect) Aggregate(fns ...AggregateFunc) *ForumPostSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ForumPostSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ForumPostSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ForumPostSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ForumPostSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ForumPostSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ForumPostSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ForumPostSelect) Scan ¶
func (fps *ForumPostSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ForumPostSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ForumPostUpdate ¶
type ForumPostUpdate struct {
// contains filtered or unexported fields
}
ForumPostUpdate is the builder for updating ForumPost entities.
func (*ForumPostUpdate) AddChildIDs ¶
func (fpu *ForumPostUpdate) AddChildIDs(ids ...int) *ForumPostUpdate
AddChildIDs adds the "children" edge to the ForumPost entity by IDs.
func (*ForumPostUpdate) AddChildren ¶
func (fpu *ForumPostUpdate) AddChildren(f ...*ForumPost) *ForumPostUpdate
AddChildren adds the "children" edges to the ForumPost entity.
func (*ForumPostUpdate) AddReactedUserIDs ¶
func (fpu *ForumPostUpdate) AddReactedUserIDs(ids ...int) *ForumPostUpdate
AddReactedUserIDs adds the "reacted_users" edge to the User entity by IDs.
func (*ForumPostUpdate) AddReactedUsers ¶
func (fpu *ForumPostUpdate) AddReactedUsers(u ...*User) *ForumPostUpdate
AddReactedUsers adds the "reacted_users" edges to the User entity.
func (*ForumPostUpdate) AppendMentionedUsersJSON ¶
func (fpu *ForumPostUpdate) AppendMentionedUsersJSON(i []int) *ForumPostUpdate
AppendMentionedUsersJSON appends i to the "mentioned_users_json" field.
func (*ForumPostUpdate) ClearAuthor ¶
func (fpu *ForumPostUpdate) ClearAuthor() *ForumPostUpdate
ClearAuthor clears the "author" edge to the User entity.
func (*ForumPostUpdate) ClearChildren ¶
func (fpu *ForumPostUpdate) ClearChildren() *ForumPostUpdate
ClearChildren clears all "children" edges to the ForumPost entity.
func (*ForumPostUpdate) ClearForum ¶
func (fpu *ForumPostUpdate) ClearForum() *ForumPostUpdate
ClearForum clears the "forum" edge to the Forum entity.
func (*ForumPostUpdate) ClearParent ¶
func (fpu *ForumPostUpdate) ClearParent() *ForumPostUpdate
ClearParent clears the "parent" edge to the ForumPost entity.
func (*ForumPostUpdate) ClearReactedUsers ¶
func (fpu *ForumPostUpdate) ClearReactedUsers() *ForumPostUpdate
ClearReactedUsers clears all "reacted_users" edges to the User entity.
func (*ForumPostUpdate) Exec ¶
func (fpu *ForumPostUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ForumPostUpdate) ExecX ¶
func (fpu *ForumPostUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumPostUpdate) Mutation ¶
func (fpu *ForumPostUpdate) Mutation() *ForumPostMutation
Mutation returns the ForumPostMutation object of the builder.
func (*ForumPostUpdate) RemoveChildIDs ¶
func (fpu *ForumPostUpdate) RemoveChildIDs(ids ...int) *ForumPostUpdate
RemoveChildIDs removes the "children" edge to ForumPost entities by IDs.
func (*ForumPostUpdate) RemoveChildren ¶
func (fpu *ForumPostUpdate) RemoveChildren(f ...*ForumPost) *ForumPostUpdate
RemoveChildren removes "children" edges to ForumPost entities.
func (*ForumPostUpdate) RemoveReactedUserIDs ¶
func (fpu *ForumPostUpdate) RemoveReactedUserIDs(ids ...int) *ForumPostUpdate
RemoveReactedUserIDs removes the "reacted_users" edge to User entities by IDs.
func (*ForumPostUpdate) RemoveReactedUsers ¶
func (fpu *ForumPostUpdate) RemoveReactedUsers(u ...*User) *ForumPostUpdate
RemoveReactedUsers removes "reacted_users" edges to User entities.
func (*ForumPostUpdate) Save ¶
func (fpu *ForumPostUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ForumPostUpdate) SaveX ¶
func (fpu *ForumPostUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ForumPostUpdate) SetAuthor ¶
func (fpu *ForumPostUpdate) SetAuthor(u *User) *ForumPostUpdate
SetAuthor sets the "author" edge to the User entity.
func (*ForumPostUpdate) SetAuthorID ¶
func (fpu *ForumPostUpdate) SetAuthorID(id int) *ForumPostUpdate
SetAuthorID sets the "author" edge to the User entity by ID.
func (*ForumPostUpdate) SetContent ¶
func (fpu *ForumPostUpdate) SetContent(s string) *ForumPostUpdate
SetContent sets the "content" field.
func (*ForumPostUpdate) SetForum ¶
func (fpu *ForumPostUpdate) SetForum(f *Forum) *ForumPostUpdate
SetForum sets the "forum" edge to the Forum entity.
func (*ForumPostUpdate) SetForumID ¶
func (fpu *ForumPostUpdate) SetForumID(id int) *ForumPostUpdate
SetForumID sets the "forum" edge to the Forum entity by ID.
func (*ForumPostUpdate) SetMentionedUsersJSON ¶
func (fpu *ForumPostUpdate) SetMentionedUsersJSON(i []int) *ForumPostUpdate
SetMentionedUsersJSON sets the "mentioned_users_json" field.
func (*ForumPostUpdate) SetNillableParentID ¶
func (fpu *ForumPostUpdate) SetNillableParentID(id *int) *ForumPostUpdate
SetNillableParentID sets the "parent" edge to the ForumPost entity by ID if the given value is not nil.
func (*ForumPostUpdate) SetParent ¶
func (fpu *ForumPostUpdate) SetParent(f *ForumPost) *ForumPostUpdate
SetParent sets the "parent" edge to the ForumPost entity.
func (*ForumPostUpdate) SetParentID ¶
func (fpu *ForumPostUpdate) SetParentID(id int) *ForumPostUpdate
SetParentID sets the "parent" edge to the ForumPost entity by ID.
func (*ForumPostUpdate) SetTitle ¶
func (fpu *ForumPostUpdate) SetTitle(s string) *ForumPostUpdate
SetTitle sets the "title" field.
func (*ForumPostUpdate) Where ¶
func (fpu *ForumPostUpdate) Where(ps ...predicate.ForumPost) *ForumPostUpdate
Where appends a list predicates to the ForumPostUpdate builder.
type ForumPostUpdateOne ¶
type ForumPostUpdateOne struct {
// contains filtered or unexported fields
}
ForumPostUpdateOne is the builder for updating a single ForumPost entity.
func (*ForumPostUpdateOne) AddChildIDs ¶
func (fpuo *ForumPostUpdateOne) AddChildIDs(ids ...int) *ForumPostUpdateOne
AddChildIDs adds the "children" edge to the ForumPost entity by IDs.
func (*ForumPostUpdateOne) AddChildren ¶
func (fpuo *ForumPostUpdateOne) AddChildren(f ...*ForumPost) *ForumPostUpdateOne
AddChildren adds the "children" edges to the ForumPost entity.
func (*ForumPostUpdateOne) AddReactedUserIDs ¶
func (fpuo *ForumPostUpdateOne) AddReactedUserIDs(ids ...int) *ForumPostUpdateOne
AddReactedUserIDs adds the "reacted_users" edge to the User entity by IDs.
func (*ForumPostUpdateOne) AddReactedUsers ¶
func (fpuo *ForumPostUpdateOne) AddReactedUsers(u ...*User) *ForumPostUpdateOne
AddReactedUsers adds the "reacted_users" edges to the User entity.
func (*ForumPostUpdateOne) AppendMentionedUsersJSON ¶
func (fpuo *ForumPostUpdateOne) AppendMentionedUsersJSON(i []int) *ForumPostUpdateOne
AppendMentionedUsersJSON appends i to the "mentioned_users_json" field.
func (*ForumPostUpdateOne) ClearAuthor ¶
func (fpuo *ForumPostUpdateOne) ClearAuthor() *ForumPostUpdateOne
ClearAuthor clears the "author" edge to the User entity.
func (*ForumPostUpdateOne) ClearChildren ¶
func (fpuo *ForumPostUpdateOne) ClearChildren() *ForumPostUpdateOne
ClearChildren clears all "children" edges to the ForumPost entity.
func (*ForumPostUpdateOne) ClearForum ¶
func (fpuo *ForumPostUpdateOne) ClearForum() *ForumPostUpdateOne
ClearForum clears the "forum" edge to the Forum entity.
func (*ForumPostUpdateOne) ClearParent ¶
func (fpuo *ForumPostUpdateOne) ClearParent() *ForumPostUpdateOne
ClearParent clears the "parent" edge to the ForumPost entity.
func (*ForumPostUpdateOne) ClearReactedUsers ¶
func (fpuo *ForumPostUpdateOne) ClearReactedUsers() *ForumPostUpdateOne
ClearReactedUsers clears all "reacted_users" edges to the User entity.
func (*ForumPostUpdateOne) Exec ¶
func (fpuo *ForumPostUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ForumPostUpdateOne) ExecX ¶
func (fpuo *ForumPostUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumPostUpdateOne) Mutation ¶
func (fpuo *ForumPostUpdateOne) Mutation() *ForumPostMutation
Mutation returns the ForumPostMutation object of the builder.
func (*ForumPostUpdateOne) RemoveChildIDs ¶
func (fpuo *ForumPostUpdateOne) RemoveChildIDs(ids ...int) *ForumPostUpdateOne
RemoveChildIDs removes the "children" edge to ForumPost entities by IDs.
func (*ForumPostUpdateOne) RemoveChildren ¶
func (fpuo *ForumPostUpdateOne) RemoveChildren(f ...*ForumPost) *ForumPostUpdateOne
RemoveChildren removes "children" edges to ForumPost entities.
func (*ForumPostUpdateOne) RemoveReactedUserIDs ¶
func (fpuo *ForumPostUpdateOne) RemoveReactedUserIDs(ids ...int) *ForumPostUpdateOne
RemoveReactedUserIDs removes the "reacted_users" edge to User entities by IDs.
func (*ForumPostUpdateOne) RemoveReactedUsers ¶
func (fpuo *ForumPostUpdateOne) RemoveReactedUsers(u ...*User) *ForumPostUpdateOne
RemoveReactedUsers removes "reacted_users" edges to User entities.
func (*ForumPostUpdateOne) Save ¶
func (fpuo *ForumPostUpdateOne) Save(ctx context.Context) (*ForumPost, error)
Save executes the query and returns the updated ForumPost entity.
func (*ForumPostUpdateOne) SaveX ¶
func (fpuo *ForumPostUpdateOne) SaveX(ctx context.Context) *ForumPost
SaveX is like Save, but panics if an error occurs.
func (*ForumPostUpdateOne) Select ¶
func (fpuo *ForumPostUpdateOne) Select(field string, fields ...string) *ForumPostUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ForumPostUpdateOne) SetAuthor ¶
func (fpuo *ForumPostUpdateOne) SetAuthor(u *User) *ForumPostUpdateOne
SetAuthor sets the "author" edge to the User entity.
func (*ForumPostUpdateOne) SetAuthorID ¶
func (fpuo *ForumPostUpdateOne) SetAuthorID(id int) *ForumPostUpdateOne
SetAuthorID sets the "author" edge to the User entity by ID.
func (*ForumPostUpdateOne) SetContent ¶
func (fpuo *ForumPostUpdateOne) SetContent(s string) *ForumPostUpdateOne
SetContent sets the "content" field.
func (*ForumPostUpdateOne) SetForum ¶
func (fpuo *ForumPostUpdateOne) SetForum(f *Forum) *ForumPostUpdateOne
SetForum sets the "forum" edge to the Forum entity.
func (*ForumPostUpdateOne) SetForumID ¶
func (fpuo *ForumPostUpdateOne) SetForumID(id int) *ForumPostUpdateOne
SetForumID sets the "forum" edge to the Forum entity by ID.
func (*ForumPostUpdateOne) SetMentionedUsersJSON ¶
func (fpuo *ForumPostUpdateOne) SetMentionedUsersJSON(i []int) *ForumPostUpdateOne
SetMentionedUsersJSON sets the "mentioned_users_json" field.
func (*ForumPostUpdateOne) SetNillableParentID ¶
func (fpuo *ForumPostUpdateOne) SetNillableParentID(id *int) *ForumPostUpdateOne
SetNillableParentID sets the "parent" edge to the ForumPost entity by ID if the given value is not nil.
func (*ForumPostUpdateOne) SetParent ¶
func (fpuo *ForumPostUpdateOne) SetParent(f *ForumPost) *ForumPostUpdateOne
SetParent sets the "parent" edge to the ForumPost entity.
func (*ForumPostUpdateOne) SetParentID ¶
func (fpuo *ForumPostUpdateOne) SetParentID(id int) *ForumPostUpdateOne
SetParentID sets the "parent" edge to the ForumPost entity by ID.
func (*ForumPostUpdateOne) SetTitle ¶
func (fpuo *ForumPostUpdateOne) SetTitle(s string) *ForumPostUpdateOne
SetTitle sets the "title" field.
func (*ForumPostUpdateOne) Where ¶
func (fpuo *ForumPostUpdateOne) Where(ps ...predicate.ForumPost) *ForumPostUpdateOne
Where appends a list predicates to the ForumPostUpdate builder.
type ForumPostUpsert ¶
ForumPostUpsert is the "OnConflict" setter.
func (*ForumPostUpsert) SetContent ¶
func (u *ForumPostUpsert) SetContent(v string) *ForumPostUpsert
SetContent sets the "content" field.
func (*ForumPostUpsert) SetMentionedUsersJSON ¶
func (u *ForumPostUpsert) SetMentionedUsersJSON(v []int) *ForumPostUpsert
SetMentionedUsersJSON sets the "mentioned_users_json" field.
func (*ForumPostUpsert) SetTitle ¶
func (u *ForumPostUpsert) SetTitle(v string) *ForumPostUpsert
SetTitle sets the "title" field.
func (*ForumPostUpsert) UpdateContent ¶
func (u *ForumPostUpsert) UpdateContent() *ForumPostUpsert
UpdateContent sets the "content" field to the value that was provided on create.
func (*ForumPostUpsert) UpdateMentionedUsersJSON ¶
func (u *ForumPostUpsert) UpdateMentionedUsersJSON() *ForumPostUpsert
UpdateMentionedUsersJSON sets the "mentioned_users_json" field to the value that was provided on create.
func (*ForumPostUpsert) UpdateTitle ¶
func (u *ForumPostUpsert) UpdateTitle() *ForumPostUpsert
UpdateTitle sets the "title" field to the value that was provided on create.
type ForumPostUpsertBulk ¶
type ForumPostUpsertBulk struct {
// contains filtered or unexported fields
}
ForumPostUpsertBulk is the builder for "upsert"-ing a bulk of ForumPost nodes.
func (*ForumPostUpsertBulk) DoNothing ¶
func (u *ForumPostUpsertBulk) DoNothing() *ForumPostUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ForumPostUpsertBulk) Exec ¶
func (u *ForumPostUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ForumPostUpsertBulk) ExecX ¶
func (u *ForumPostUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumPostUpsertBulk) Ignore ¶
func (u *ForumPostUpsertBulk) Ignore() *ForumPostUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.ForumPost.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ForumPostUpsertBulk) SetContent ¶
func (u *ForumPostUpsertBulk) SetContent(v string) *ForumPostUpsertBulk
SetContent sets the "content" field.
func (*ForumPostUpsertBulk) SetMentionedUsersJSON ¶
func (u *ForumPostUpsertBulk) SetMentionedUsersJSON(v []int) *ForumPostUpsertBulk
SetMentionedUsersJSON sets the "mentioned_users_json" field.
func (*ForumPostUpsertBulk) SetTitle ¶
func (u *ForumPostUpsertBulk) SetTitle(v string) *ForumPostUpsertBulk
SetTitle sets the "title" field.
func (*ForumPostUpsertBulk) Update ¶
func (u *ForumPostUpsertBulk) Update(set func(*ForumPostUpsert)) *ForumPostUpsertBulk
Update allows overriding fields `UPDATE` values. See the ForumPostCreateBulk.OnConflict documentation for more info.
func (*ForumPostUpsertBulk) UpdateContent ¶
func (u *ForumPostUpsertBulk) UpdateContent() *ForumPostUpsertBulk
UpdateContent sets the "content" field to the value that was provided on create.
func (*ForumPostUpsertBulk) UpdateMentionedUsersJSON ¶
func (u *ForumPostUpsertBulk) UpdateMentionedUsersJSON() *ForumPostUpsertBulk
UpdateMentionedUsersJSON sets the "mentioned_users_json" field to the value that was provided on create.
func (*ForumPostUpsertBulk) UpdateNewValues ¶
func (u *ForumPostUpsertBulk) UpdateNewValues() *ForumPostUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.ForumPost.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ForumPostUpsertBulk) UpdateTitle ¶
func (u *ForumPostUpsertBulk) UpdateTitle() *ForumPostUpsertBulk
UpdateTitle sets the "title" field to the value that was provided on create.
type ForumPostUpsertOne ¶
type ForumPostUpsertOne struct {
// contains filtered or unexported fields
}
ForumPostUpsertOne is the builder for "upsert"-ing
one ForumPost node.
func (*ForumPostUpsertOne) DoNothing ¶
func (u *ForumPostUpsertOne) DoNothing() *ForumPostUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ForumPostUpsertOne) Exec ¶
func (u *ForumPostUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ForumPostUpsertOne) ExecX ¶
func (u *ForumPostUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumPostUpsertOne) ID ¶
func (u *ForumPostUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ForumPostUpsertOne) IDX ¶
func (u *ForumPostUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*ForumPostUpsertOne) Ignore ¶
func (u *ForumPostUpsertOne) Ignore() *ForumPostUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.ForumPost.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ForumPostUpsertOne) SetContent ¶
func (u *ForumPostUpsertOne) SetContent(v string) *ForumPostUpsertOne
SetContent sets the "content" field.
func (*ForumPostUpsertOne) SetMentionedUsersJSON ¶
func (u *ForumPostUpsertOne) SetMentionedUsersJSON(v []int) *ForumPostUpsertOne
SetMentionedUsersJSON sets the "mentioned_users_json" field.
func (*ForumPostUpsertOne) SetTitle ¶
func (u *ForumPostUpsertOne) SetTitle(v string) *ForumPostUpsertOne
SetTitle sets the "title" field.
func (*ForumPostUpsertOne) Update ¶
func (u *ForumPostUpsertOne) Update(set func(*ForumPostUpsert)) *ForumPostUpsertOne
Update allows overriding fields `UPDATE` values. See the ForumPostCreate.OnConflict documentation for more info.
func (*ForumPostUpsertOne) UpdateContent ¶
func (u *ForumPostUpsertOne) UpdateContent() *ForumPostUpsertOne
UpdateContent sets the "content" field to the value that was provided on create.
func (*ForumPostUpsertOne) UpdateMentionedUsersJSON ¶
func (u *ForumPostUpsertOne) UpdateMentionedUsersJSON() *ForumPostUpsertOne
UpdateMentionedUsersJSON sets the "mentioned_users_json" field to the value that was provided on create.
func (*ForumPostUpsertOne) UpdateNewValues ¶
func (u *ForumPostUpsertOne) UpdateNewValues() *ForumPostUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.ForumPost.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ForumPostUpsertOne) UpdateTitle ¶
func (u *ForumPostUpsertOne) UpdateTitle() *ForumPostUpsertOne
UpdateTitle sets the "title" field to the value that was provided on create.
type ForumQuery ¶
type ForumQuery struct {
// contains filtered or unexported fields
}
ForumQuery is the builder for querying Forum entities.
func (*ForumQuery) Aggregate ¶
func (fq *ForumQuery) Aggregate(fns ...AggregateFunc) *ForumSelect
Aggregate returns a ForumSelect configured with the given aggregations.
func (*ForumQuery) All ¶
func (fq *ForumQuery) All(ctx context.Context) ([]*Forum, error)
All executes the query and returns a list of Forums.
func (*ForumQuery) AllX ¶
func (fq *ForumQuery) AllX(ctx context.Context) []*Forum
AllX is like All, but panics if an error occurs.
func (*ForumQuery) Clone ¶
func (fq *ForumQuery) Clone() *ForumQuery
Clone returns a duplicate of the ForumQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ForumQuery) Count ¶
func (fq *ForumQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ForumQuery) CountX ¶
func (fq *ForumQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ForumQuery) Exist ¶
func (fq *ForumQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ForumQuery) ExistX ¶
func (fq *ForumQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ForumQuery) First ¶
func (fq *ForumQuery) First(ctx context.Context) (*Forum, error)
First returns the first Forum entity from the query. Returns a *NotFoundError when no Forum was found.
func (*ForumQuery) FirstID ¶
func (fq *ForumQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Forum ID from the query. Returns a *NotFoundError when no Forum ID was found.
func (*ForumQuery) FirstIDX ¶
func (fq *ForumQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ForumQuery) FirstX ¶
func (fq *ForumQuery) FirstX(ctx context.Context) *Forum
FirstX is like First, but panics if an error occurs.
func (*ForumQuery) GroupBy ¶
func (fq *ForumQuery) GroupBy(field string, fields ...string) *ForumGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Forum.Query(). GroupBy(forum.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ForumQuery) IDs ¶
func (fq *ForumQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Forum IDs.
func (*ForumQuery) IDsX ¶
func (fq *ForumQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ForumQuery) Limit ¶
func (fq *ForumQuery) Limit(limit int) *ForumQuery
Limit the number of records to be returned by this query.
func (*ForumQuery) Offset ¶
func (fq *ForumQuery) Offset(offset int) *ForumQuery
Offset to start from.
func (*ForumQuery) Only ¶
func (fq *ForumQuery) Only(ctx context.Context) (*Forum, error)
Only returns a single Forum entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Forum entity is found. Returns a *NotFoundError when no Forum entities are found.
func (*ForumQuery) OnlyID ¶
func (fq *ForumQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Forum ID in the query. Returns a *NotSingularError when more than one Forum ID is found. Returns a *NotFoundError when no entities are found.
func (*ForumQuery) OnlyIDX ¶
func (fq *ForumQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ForumQuery) OnlyX ¶
func (fq *ForumQuery) OnlyX(ctx context.Context) *Forum
OnlyX is like Only, but panics if an error occurs.
func (*ForumQuery) Order ¶
func (fq *ForumQuery) Order(o ...forum.OrderOption) *ForumQuery
Order specifies how the records should be ordered.
func (*ForumQuery) QueryGroup ¶
func (fq *ForumQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*ForumQuery) QueryPosts ¶
func (fq *ForumQuery) QueryPosts() *ForumPostQuery
QueryPosts chains the current query on the "posts" edge.
func (*ForumQuery) Select ¶
func (fq *ForumQuery) Select(fields ...string) *ForumSelect
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 { Name string `json:"name,omitempty"` } client.Forum.Query(). Select(forum.FieldName). Scan(ctx, &v)
func (*ForumQuery) Unique ¶
func (fq *ForumQuery) Unique(unique bool) *ForumQuery
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 (*ForumQuery) Where ¶
func (fq *ForumQuery) Where(ps ...predicate.Forum) *ForumQuery
Where adds a new predicate for the ForumQuery builder.
func (*ForumQuery) WithGroup ¶
func (fq *ForumQuery) WithGroup(opts ...func(*GroupQuery)) *ForumQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*ForumQuery) WithPosts ¶
func (fq *ForumQuery) WithPosts(opts ...func(*ForumPostQuery)) *ForumQuery
WithPosts tells the query-builder to eager-load the nodes that are connected to the "posts" edge. The optional arguments are used to configure the query builder of the edge.
type ForumSelect ¶
type ForumSelect struct { *ForumQuery // contains filtered or unexported fields }
ForumSelect is the builder for selecting fields of Forum entities.
func (*ForumSelect) Aggregate ¶
func (fs *ForumSelect) Aggregate(fns ...AggregateFunc) *ForumSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ForumSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ForumSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ForumSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ForumSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ForumSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ForumSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ForumSelect) Scan ¶
func (fs *ForumSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ForumSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ForumUpdate ¶
type ForumUpdate struct {
// contains filtered or unexported fields
}
ForumUpdate is the builder for updating Forum entities.
func (*ForumUpdate) AddPostIDs ¶
func (fu *ForumUpdate) AddPostIDs(ids ...int) *ForumUpdate
AddPostIDs adds the "posts" edge to the ForumPost entity by IDs.
func (*ForumUpdate) AddPosts ¶
func (fu *ForumUpdate) AddPosts(f ...*ForumPost) *ForumUpdate
AddPosts adds the "posts" edges to the ForumPost entity.
func (*ForumUpdate) ClearGroup ¶
func (fu *ForumUpdate) ClearGroup() *ForumUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*ForumUpdate) ClearPosts ¶
func (fu *ForumUpdate) ClearPosts() *ForumUpdate
ClearPosts clears all "posts" edges to the ForumPost entity.
func (*ForumUpdate) Exec ¶
func (fu *ForumUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ForumUpdate) ExecX ¶
func (fu *ForumUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumUpdate) Mutation ¶
func (fu *ForumUpdate) Mutation() *ForumMutation
Mutation returns the ForumMutation object of the builder.
func (*ForumUpdate) RemovePostIDs ¶
func (fu *ForumUpdate) RemovePostIDs(ids ...int) *ForumUpdate
RemovePostIDs removes the "posts" edge to ForumPost entities by IDs.
func (*ForumUpdate) RemovePosts ¶
func (fu *ForumUpdate) RemovePosts(f ...*ForumPost) *ForumUpdate
RemovePosts removes "posts" edges to ForumPost entities.
func (*ForumUpdate) Save ¶
func (fu *ForumUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ForumUpdate) SaveX ¶
func (fu *ForumUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ForumUpdate) SetDescription ¶
func (fu *ForumUpdate) SetDescription(s string) *ForumUpdate
SetDescription sets the "description" field.
func (*ForumUpdate) SetGroup ¶
func (fu *ForumUpdate) SetGroup(g *Group) *ForumUpdate
SetGroup sets the "group" edge to the Group entity.
func (*ForumUpdate) SetGroupID ¶
func (fu *ForumUpdate) SetGroupID(id int) *ForumUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*ForumUpdate) SetName ¶
func (fu *ForumUpdate) SetName(s string) *ForumUpdate
SetName sets the "name" field.
func (*ForumUpdate) SetShortName ¶
func (fu *ForumUpdate) SetShortName(s string) *ForumUpdate
SetShortName sets the "short_name" field.
func (*ForumUpdate) Where ¶
func (fu *ForumUpdate) Where(ps ...predicate.Forum) *ForumUpdate
Where appends a list predicates to the ForumUpdate builder.
type ForumUpdateOne ¶
type ForumUpdateOne struct {
// contains filtered or unexported fields
}
ForumUpdateOne is the builder for updating a single Forum entity.
func (*ForumUpdateOne) AddPostIDs ¶
func (fuo *ForumUpdateOne) AddPostIDs(ids ...int) *ForumUpdateOne
AddPostIDs adds the "posts" edge to the ForumPost entity by IDs.
func (*ForumUpdateOne) AddPosts ¶
func (fuo *ForumUpdateOne) AddPosts(f ...*ForumPost) *ForumUpdateOne
AddPosts adds the "posts" edges to the ForumPost entity.
func (*ForumUpdateOne) ClearGroup ¶
func (fuo *ForumUpdateOne) ClearGroup() *ForumUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*ForumUpdateOne) ClearPosts ¶
func (fuo *ForumUpdateOne) ClearPosts() *ForumUpdateOne
ClearPosts clears all "posts" edges to the ForumPost entity.
func (*ForumUpdateOne) Exec ¶
func (fuo *ForumUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ForumUpdateOne) ExecX ¶
func (fuo *ForumUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumUpdateOne) Mutation ¶
func (fuo *ForumUpdateOne) Mutation() *ForumMutation
Mutation returns the ForumMutation object of the builder.
func (*ForumUpdateOne) RemovePostIDs ¶
func (fuo *ForumUpdateOne) RemovePostIDs(ids ...int) *ForumUpdateOne
RemovePostIDs removes the "posts" edge to ForumPost entities by IDs.
func (*ForumUpdateOne) RemovePosts ¶
func (fuo *ForumUpdateOne) RemovePosts(f ...*ForumPost) *ForumUpdateOne
RemovePosts removes "posts" edges to ForumPost entities.
func (*ForumUpdateOne) Save ¶
func (fuo *ForumUpdateOne) Save(ctx context.Context) (*Forum, error)
Save executes the query and returns the updated Forum entity.
func (*ForumUpdateOne) SaveX ¶
func (fuo *ForumUpdateOne) SaveX(ctx context.Context) *Forum
SaveX is like Save, but panics if an error occurs.
func (*ForumUpdateOne) Select ¶
func (fuo *ForumUpdateOne) Select(field string, fields ...string) *ForumUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ForumUpdateOne) SetDescription ¶
func (fuo *ForumUpdateOne) SetDescription(s string) *ForumUpdateOne
SetDescription sets the "description" field.
func (*ForumUpdateOne) SetGroup ¶
func (fuo *ForumUpdateOne) SetGroup(g *Group) *ForumUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*ForumUpdateOne) SetGroupID ¶
func (fuo *ForumUpdateOne) SetGroupID(id int) *ForumUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*ForumUpdateOne) SetName ¶
func (fuo *ForumUpdateOne) SetName(s string) *ForumUpdateOne
SetName sets the "name" field.
func (*ForumUpdateOne) SetShortName ¶
func (fuo *ForumUpdateOne) SetShortName(s string) *ForumUpdateOne
SetShortName sets the "short_name" field.
func (*ForumUpdateOne) Where ¶
func (fuo *ForumUpdateOne) Where(ps ...predicate.Forum) *ForumUpdateOne
Where appends a list predicates to the ForumUpdate builder.
type ForumUpsert ¶
ForumUpsert is the "OnConflict" setter.
func (*ForumUpsert) SetDescription ¶
func (u *ForumUpsert) SetDescription(v string) *ForumUpsert
SetDescription sets the "description" field.
func (*ForumUpsert) SetName ¶
func (u *ForumUpsert) SetName(v string) *ForumUpsert
SetName sets the "name" field.
func (*ForumUpsert) SetShortName ¶
func (u *ForumUpsert) SetShortName(v string) *ForumUpsert
SetShortName sets the "short_name" field.
func (*ForumUpsert) UpdateDescription ¶
func (u *ForumUpsert) UpdateDescription() *ForumUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ForumUpsert) UpdateName ¶
func (u *ForumUpsert) UpdateName() *ForumUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*ForumUpsert) UpdateShortName ¶
func (u *ForumUpsert) UpdateShortName() *ForumUpsert
UpdateShortName sets the "short_name" field to the value that was provided on create.
type ForumUpsertBulk ¶
type ForumUpsertBulk struct {
// contains filtered or unexported fields
}
ForumUpsertBulk is the builder for "upsert"-ing a bulk of Forum nodes.
func (*ForumUpsertBulk) DoNothing ¶
func (u *ForumUpsertBulk) DoNothing() *ForumUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ForumUpsertBulk) Exec ¶
func (u *ForumUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ForumUpsertBulk) ExecX ¶
func (u *ForumUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumUpsertBulk) Ignore ¶
func (u *ForumUpsertBulk) Ignore() *ForumUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Forum.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ForumUpsertBulk) SetDescription ¶
func (u *ForumUpsertBulk) SetDescription(v string) *ForumUpsertBulk
SetDescription sets the "description" field.
func (*ForumUpsertBulk) SetName ¶
func (u *ForumUpsertBulk) SetName(v string) *ForumUpsertBulk
SetName sets the "name" field.
func (*ForumUpsertBulk) SetShortName ¶
func (u *ForumUpsertBulk) SetShortName(v string) *ForumUpsertBulk
SetShortName sets the "short_name" field.
func (*ForumUpsertBulk) Update ¶
func (u *ForumUpsertBulk) Update(set func(*ForumUpsert)) *ForumUpsertBulk
Update allows overriding fields `UPDATE` values. See the ForumCreateBulk.OnConflict documentation for more info.
func (*ForumUpsertBulk) UpdateDescription ¶
func (u *ForumUpsertBulk) UpdateDescription() *ForumUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ForumUpsertBulk) UpdateName ¶
func (u *ForumUpsertBulk) UpdateName() *ForumUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*ForumUpsertBulk) UpdateNewValues ¶
func (u *ForumUpsertBulk) UpdateNewValues() *ForumUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Forum.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ForumUpsertBulk) UpdateShortName ¶
func (u *ForumUpsertBulk) UpdateShortName() *ForumUpsertBulk
UpdateShortName sets the "short_name" field to the value that was provided on create.
type ForumUpsertOne ¶
type ForumUpsertOne struct {
// contains filtered or unexported fields
}
ForumUpsertOne is the builder for "upsert"-ing
one Forum node.
func (*ForumUpsertOne) DoNothing ¶
func (u *ForumUpsertOne) DoNothing() *ForumUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ForumUpsertOne) Exec ¶
func (u *ForumUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ForumUpsertOne) ExecX ¶
func (u *ForumUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ForumUpsertOne) ID ¶
func (u *ForumUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ForumUpsertOne) IDX ¶
func (u *ForumUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*ForumUpsertOne) Ignore ¶
func (u *ForumUpsertOne) Ignore() *ForumUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Forum.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ForumUpsertOne) SetDescription ¶
func (u *ForumUpsertOne) SetDescription(v string) *ForumUpsertOne
SetDescription sets the "description" field.
func (*ForumUpsertOne) SetName ¶
func (u *ForumUpsertOne) SetName(v string) *ForumUpsertOne
SetName sets the "name" field.
func (*ForumUpsertOne) SetShortName ¶
func (u *ForumUpsertOne) SetShortName(v string) *ForumUpsertOne
SetShortName sets the "short_name" field.
func (*ForumUpsertOne) Update ¶
func (u *ForumUpsertOne) Update(set func(*ForumUpsert)) *ForumUpsertOne
Update allows overriding fields `UPDATE` values. See the ForumCreate.OnConflict documentation for more info.
func (*ForumUpsertOne) UpdateDescription ¶
func (u *ForumUpsertOne) UpdateDescription() *ForumUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*ForumUpsertOne) UpdateName ¶
func (u *ForumUpsertOne) UpdateName() *ForumUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*ForumUpsertOne) UpdateNewValues ¶
func (u *ForumUpsertOne) UpdateNewValues() *ForumUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Forum.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ForumUpsertOne) UpdateShortName ¶
func (u *ForumUpsertOne) UpdateShortName() *ForumUpsertOne
UpdateShortName sets the "short_name" field to the value that was provided on create.
type Group ¶
type Group struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the group (example: CSF01 2023) Name string `json:"name,omitempty"` // Short name of the group (example: csf01-2023) ShortName string `json:"short_name,omitempty"` // Description of the group Description string `json:"description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupQuery when eager-loading is set. Edges GroupEdges `json:"edges"` // contains filtered or unexported fields }
Group is the model entity for the Group schema.
func (*Group) QueryDeadlines ¶
func (gr *Group) QueryDeadlines() *DeadlineQuery
QueryDeadlines queries the "deadlines" edge of the Group entity.
func (*Group) QueryEvents ¶
func (gr *Group) QueryEvents() *EventQuery
QueryEvents queries the "events" edge of the Group entity.
func (*Group) QueryForums ¶
func (gr *Group) QueryForums() *ForumQuery
QueryForums queries the "forums" edge of the Group entity.
func (*Group) QueryGroupUsers ¶
func (gr *Group) QueryGroupUsers() *GroupUserQuery
QueryGroupUsers queries the "group_users" edge of the Group entity.
func (*Group) QueryInstitution ¶
func (gr *Group) QueryInstitution() *InstitutionQuery
QueryInstitution queries the "institution" edge of the Group entity.
func (*Group) QueryInvites ¶
func (gr *Group) QueryInvites() *GroupInviteLinkQuery
QueryInvites queries the "invites" edge of the Group entity.
func (*Group) QueryUsers ¶
QueryUsers queries the "users" edge of the Group entity.
func (*Group) Unwrap ¶
Unwrap unwraps the Group 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 (*Group) Update ¶
func (gr *Group) Update() *GroupUpdateOne
Update returns a builder for updating this Group. Note that you need to call Group.Unwrap() before calling this method if this Group was returned from a transaction, and the transaction was committed or rolled back.
type GroupClient ¶
type GroupClient struct {
// contains filtered or unexported fields
}
GroupClient is a client for the Group schema.
func NewGroupClient ¶
func NewGroupClient(c config) *GroupClient
NewGroupClient returns a client for the Group from the given config.
func (*GroupClient) Create ¶
func (c *GroupClient) Create() *GroupCreate
Create returns a builder for creating a Group entity.
func (*GroupClient) CreateBulk ¶
func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
CreateBulk returns a builder for creating a bulk of Group entities.
func (*GroupClient) Delete ¶
func (c *GroupClient) Delete() *GroupDelete
Delete returns a delete builder for Group.
func (*GroupClient) DeleteOne ¶
func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroupClient) DeleteOneID ¶
func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroupClient) GetX ¶
func (c *GroupClient) GetX(ctx context.Context, id int) *Group
GetX is like Get, but panics if an error occurs.
func (*GroupClient) Intercept ¶
func (c *GroupClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `entgroup.Intercept(f(g(h())))`.
func (*GroupClient) Interceptors ¶
func (c *GroupClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroupClient) Query ¶
func (c *GroupClient) Query() *GroupQuery
Query returns a query builder for Group.
func (*GroupClient) QueryDeadlines ¶
func (c *GroupClient) QueryDeadlines(gr *Group) *DeadlineQuery
QueryDeadlines queries the deadlines edge of a Group.
func (*GroupClient) QueryEvents ¶
func (c *GroupClient) QueryEvents(gr *Group) *EventQuery
QueryEvents queries the events edge of a Group.
func (*GroupClient) QueryForums ¶
func (c *GroupClient) QueryForums(gr *Group) *ForumQuery
QueryForums queries the forums edge of a Group.
func (*GroupClient) QueryGroupUsers ¶
func (c *GroupClient) QueryGroupUsers(gr *Group) *GroupUserQuery
QueryGroupUsers queries the group_users edge of a Group.
func (*GroupClient) QueryInstitution ¶
func (c *GroupClient) QueryInstitution(gr *Group) *InstitutionQuery
QueryInstitution queries the institution edge of a Group.
func (*GroupClient) QueryInvites ¶
func (c *GroupClient) QueryInvites(gr *Group) *GroupInviteLinkQuery
QueryInvites queries the invites edge of a Group.
func (*GroupClient) QueryUsers ¶
func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
QueryUsers queries the users edge of a Group.
func (*GroupClient) Update ¶
func (c *GroupClient) Update() *GroupUpdate
Update returns an update builder for Group.
func (*GroupClient) UpdateOne ¶
func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupClient) UpdateOneID ¶
func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupClient) Use ¶
func (c *GroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `entgroup.Hooks(f(g(h())))`.
type GroupCreate ¶
type GroupCreate struct {
// contains filtered or unexported fields
}
GroupCreate is the builder for creating a Group entity.
func (*GroupCreate) AddDeadlineIDs ¶
func (gc *GroupCreate) AddDeadlineIDs(ids ...int) *GroupCreate
AddDeadlineIDs adds the "deadlines" edge to the Deadline entity by IDs.
func (*GroupCreate) AddDeadlines ¶
func (gc *GroupCreate) AddDeadlines(d ...*Deadline) *GroupCreate
AddDeadlines adds the "deadlines" edges to the Deadline entity.
func (*GroupCreate) AddEventIDs ¶
func (gc *GroupCreate) AddEventIDs(ids ...int) *GroupCreate
AddEventIDs adds the "events" edge to the Event entity by IDs.
func (*GroupCreate) AddEvents ¶
func (gc *GroupCreate) AddEvents(e ...*Event) *GroupCreate
AddEvents adds the "events" edges to the Event entity.
func (*GroupCreate) AddForumIDs ¶
func (gc *GroupCreate) AddForumIDs(ids ...int) *GroupCreate
AddForumIDs adds the "forums" edge to the Forum entity by IDs.
func (*GroupCreate) AddForums ¶
func (gc *GroupCreate) AddForums(f ...*Forum) *GroupCreate
AddForums adds the "forums" edges to the Forum entity.
func (*GroupCreate) AddInviteIDs ¶
func (gc *GroupCreate) AddInviteIDs(ids ...int) *GroupCreate
AddInviteIDs adds the "invites" edge to the GroupInviteLink entity by IDs.
func (*GroupCreate) AddInvites ¶
func (gc *GroupCreate) AddInvites(g ...*GroupInviteLink) *GroupCreate
AddInvites adds the "invites" edges to the GroupInviteLink entity.
func (*GroupCreate) AddUserIDs ¶
func (gc *GroupCreate) AddUserIDs(ids ...int) *GroupCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupCreate) AddUsers ¶
func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
AddUsers adds the "users" edges to the User entity.
func (*GroupCreate) Exec ¶
func (gc *GroupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreate) ExecX ¶
func (gc *GroupCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupCreate) Mutation ¶
func (gc *GroupCreate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupCreate) OnConflict ¶
func (gc *GroupCreate) OnConflict(opts ...sql.ConflictOption) *GroupUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Group.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GroupUpsert) { SetName(v+v). }). Exec(ctx)
func (*GroupCreate) OnConflictColumns ¶
func (gc *GroupCreate) OnConflictColumns(columns ...string) *GroupUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GroupCreate) Save ¶
func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
Save creates the Group in the database.
func (*GroupCreate) SaveX ¶
func (gc *GroupCreate) SaveX(ctx context.Context) *Group
SaveX calls Save and panics if Save returns an error.
func (*GroupCreate) SetDescription ¶
func (gc *GroupCreate) SetDescription(s string) *GroupCreate
SetDescription sets the "description" field.
func (*GroupCreate) SetInstitution ¶
func (gc *GroupCreate) SetInstitution(i *Institution) *GroupCreate
SetInstitution sets the "institution" edge to the Institution entity.
func (*GroupCreate) SetInstitutionID ¶
func (gc *GroupCreate) SetInstitutionID(id int) *GroupCreate
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*GroupCreate) SetName ¶
func (gc *GroupCreate) SetName(s string) *GroupCreate
SetName sets the "name" field.
func (*GroupCreate) SetShortName ¶
func (gc *GroupCreate) SetShortName(s string) *GroupCreate
SetShortName sets the "short_name" field.
type GroupCreateBulk ¶
type GroupCreateBulk struct {
// contains filtered or unexported fields
}
GroupCreateBulk is the builder for creating many Group entities in bulk.
func (*GroupCreateBulk) Exec ¶
func (gcb *GroupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreateBulk) ExecX ¶
func (gcb *GroupCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupCreateBulk) OnConflict ¶
func (gcb *GroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Group.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GroupUpsert) { SetName(v+v). }). Exec(ctx)
func (*GroupCreateBulk) OnConflictColumns ¶
func (gcb *GroupCreateBulk) OnConflictColumns(columns ...string) *GroupUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type GroupDelete ¶
type GroupDelete struct {
// contains filtered or unexported fields
}
GroupDelete is the builder for deleting a Group entity.
func (*GroupDelete) Exec ¶
func (gd *GroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupDelete) ExecX ¶
func (gd *GroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupDelete) Where ¶
func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete
Where appends a list predicates to the GroupDelete builder.
type GroupDeleteOne ¶
type GroupDeleteOne struct {
// contains filtered or unexported fields
}
GroupDeleteOne is the builder for deleting a single Group entity.
func (*GroupDeleteOne) Exec ¶
func (gdo *GroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupDeleteOne) ExecX ¶
func (gdo *GroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupDeleteOne) Where ¶
func (gdo *GroupDeleteOne) Where(ps ...predicate.Group) *GroupDeleteOne
Where appends a list predicates to the GroupDelete builder.
type GroupEdges ¶
type GroupEdges struct { // Users that are in the group Users []*User `json:"users,omitempty"` // Events from the group Events []*Event `json:"events,omitempty"` // Forum from the group Forums []*Forum `json:"forums,omitempty"` // Deadlines created by users from the group Deadlines []*Deadline `json:"deadlines,omitempty"` // Invites for the group Invites []*GroupInviteLink `json:"invites,omitempty"` // Institution owning this group Institution *Institution `json:"institution,omitempty"` // GroupUsers holds the value of the group_users edge. GroupUsers []*GroupUser `json:"group_users,omitempty"` // contains filtered or unexported fields }
GroupEdges holds the relations/edges for other nodes in the graph.
func (GroupEdges) DeadlinesOrErr ¶
func (e GroupEdges) DeadlinesOrErr() ([]*Deadline, error)
DeadlinesOrErr returns the Deadlines value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) EventsOrErr ¶
func (e GroupEdges) EventsOrErr() ([]*Event, error)
EventsOrErr returns the Events value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) ForumsOrErr ¶
func (e GroupEdges) ForumsOrErr() ([]*Forum, error)
ForumsOrErr returns the Forums value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) GroupUsersOrErr ¶
func (e GroupEdges) GroupUsersOrErr() ([]*GroupUser, error)
GroupUsersOrErr returns the GroupUsers value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) InstitutionOrErr ¶
func (e GroupEdges) InstitutionOrErr() (*Institution, error)
InstitutionOrErr returns the Institution value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GroupEdges) InvitesOrErr ¶
func (e GroupEdges) InvitesOrErr() ([]*GroupInviteLink, error)
InvitesOrErr returns the Invites value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) UsersOrErr ¶
func (e GroupEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type GroupGroupBy ¶
type GroupGroupBy struct {
// contains filtered or unexported fields
}
GroupGroupBy is the group-by builder for Group entities.
func (*GroupGroupBy) Aggregate ¶
func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Scan ¶
func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupInviteLink ¶
type GroupInviteLink struct { // ID of the ent. ID int `json:"id,omitempty"` // Code used in the invite link Code string `json:"code,omitempty"` // Role granted in the invite Role group.Role `json:"role,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupInviteLinkQuery when eager-loading is set. Edges GroupInviteLinkEdges `json:"edges"` // contains filtered or unexported fields }
GroupInviteLink is the model entity for the GroupInviteLink schema.
func (*GroupInviteLink) QueryGroup ¶
func (gil *GroupInviteLink) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the GroupInviteLink entity.
func (*GroupInviteLink) String ¶
func (gil *GroupInviteLink) String() string
String implements the fmt.Stringer.
func (*GroupInviteLink) Unwrap ¶
func (gil *GroupInviteLink) Unwrap() *GroupInviteLink
Unwrap unwraps the GroupInviteLink 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 (*GroupInviteLink) Update ¶
func (gil *GroupInviteLink) Update() *GroupInviteLinkUpdateOne
Update returns a builder for updating this GroupInviteLink. Note that you need to call GroupInviteLink.Unwrap() before calling this method if this GroupInviteLink was returned from a transaction, and the transaction was committed or rolled back.
type GroupInviteLinkClient ¶
type GroupInviteLinkClient struct {
// contains filtered or unexported fields
}
GroupInviteLinkClient is a client for the GroupInviteLink schema.
func NewGroupInviteLinkClient ¶
func NewGroupInviteLinkClient(c config) *GroupInviteLinkClient
NewGroupInviteLinkClient returns a client for the GroupInviteLink from the given config.
func (*GroupInviteLinkClient) Create ¶
func (c *GroupInviteLinkClient) Create() *GroupInviteLinkCreate
Create returns a builder for creating a GroupInviteLink entity.
func (*GroupInviteLinkClient) CreateBulk ¶
func (c *GroupInviteLinkClient) CreateBulk(builders ...*GroupInviteLinkCreate) *GroupInviteLinkCreateBulk
CreateBulk returns a builder for creating a bulk of GroupInviteLink entities.
func (*GroupInviteLinkClient) Delete ¶
func (c *GroupInviteLinkClient) Delete() *GroupInviteLinkDelete
Delete returns a delete builder for GroupInviteLink.
func (*GroupInviteLinkClient) DeleteOne ¶
func (c *GroupInviteLinkClient) DeleteOne(gil *GroupInviteLink) *GroupInviteLinkDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroupInviteLinkClient) DeleteOneID ¶
func (c *GroupInviteLinkClient) DeleteOneID(id int) *GroupInviteLinkDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroupInviteLinkClient) Get ¶
func (c *GroupInviteLinkClient) Get(ctx context.Context, id int) (*GroupInviteLink, error)
Get returns a GroupInviteLink entity by its id.
func (*GroupInviteLinkClient) GetX ¶
func (c *GroupInviteLinkClient) GetX(ctx context.Context, id int) *GroupInviteLink
GetX is like Get, but panics if an error occurs.
func (*GroupInviteLinkClient) Hooks ¶
func (c *GroupInviteLinkClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroupInviteLinkClient) Intercept ¶
func (c *GroupInviteLinkClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `groupinvitelink.Intercept(f(g(h())))`.
func (*GroupInviteLinkClient) Interceptors ¶
func (c *GroupInviteLinkClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroupInviteLinkClient) Query ¶
func (c *GroupInviteLinkClient) Query() *GroupInviteLinkQuery
Query returns a query builder for GroupInviteLink.
func (*GroupInviteLinkClient) QueryGroup ¶
func (c *GroupInviteLinkClient) QueryGroup(gil *GroupInviteLink) *GroupQuery
QueryGroup queries the group edge of a GroupInviteLink.
func (*GroupInviteLinkClient) Update ¶
func (c *GroupInviteLinkClient) Update() *GroupInviteLinkUpdate
Update returns an update builder for GroupInviteLink.
func (*GroupInviteLinkClient) UpdateOne ¶
func (c *GroupInviteLinkClient) UpdateOne(gil *GroupInviteLink) *GroupInviteLinkUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupInviteLinkClient) UpdateOneID ¶
func (c *GroupInviteLinkClient) UpdateOneID(id int) *GroupInviteLinkUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupInviteLinkClient) Use ¶
func (c *GroupInviteLinkClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `groupinvitelink.Hooks(f(g(h())))`.
type GroupInviteLinkCreate ¶
type GroupInviteLinkCreate struct {
// contains filtered or unexported fields
}
GroupInviteLinkCreate is the builder for creating a GroupInviteLink entity.
func (*GroupInviteLinkCreate) Exec ¶
func (gilc *GroupInviteLinkCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupInviteLinkCreate) ExecX ¶
func (gilc *GroupInviteLinkCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInviteLinkCreate) Mutation ¶
func (gilc *GroupInviteLinkCreate) Mutation() *GroupInviteLinkMutation
Mutation returns the GroupInviteLinkMutation object of the builder.
func (*GroupInviteLinkCreate) OnConflict ¶
func (gilc *GroupInviteLinkCreate) OnConflict(opts ...sql.ConflictOption) *GroupInviteLinkUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GroupInviteLink.Create(). SetCode(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GroupInviteLinkUpsert) { SetCode(v+v). }). Exec(ctx)
func (*GroupInviteLinkCreate) OnConflictColumns ¶
func (gilc *GroupInviteLinkCreate) OnConflictColumns(columns ...string) *GroupInviteLinkUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GroupInviteLink.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GroupInviteLinkCreate) Save ¶
func (gilc *GroupInviteLinkCreate) Save(ctx context.Context) (*GroupInviteLink, error)
Save creates the GroupInviteLink in the database.
func (*GroupInviteLinkCreate) SaveX ¶
func (gilc *GroupInviteLinkCreate) SaveX(ctx context.Context) *GroupInviteLink
SaveX calls Save and panics if Save returns an error.
func (*GroupInviteLinkCreate) SetCode ¶
func (gilc *GroupInviteLinkCreate) SetCode(s string) *GroupInviteLinkCreate
SetCode sets the "code" field.
func (*GroupInviteLinkCreate) SetGroup ¶
func (gilc *GroupInviteLinkCreate) SetGroup(g *Group) *GroupInviteLinkCreate
SetGroup sets the "group" edge to the Group entity.
func (*GroupInviteLinkCreate) SetGroupID ¶
func (gilc *GroupInviteLinkCreate) SetGroupID(id int) *GroupInviteLinkCreate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*GroupInviteLinkCreate) SetRole ¶
func (gilc *GroupInviteLinkCreate) SetRole(gr group.Role) *GroupInviteLinkCreate
SetRole sets the "role" field.
type GroupInviteLinkCreateBulk ¶
type GroupInviteLinkCreateBulk struct {
// contains filtered or unexported fields
}
GroupInviteLinkCreateBulk is the builder for creating many GroupInviteLink entities in bulk.
func (*GroupInviteLinkCreateBulk) Exec ¶
func (gilcb *GroupInviteLinkCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupInviteLinkCreateBulk) ExecX ¶
func (gilcb *GroupInviteLinkCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInviteLinkCreateBulk) OnConflict ¶
func (gilcb *GroupInviteLinkCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupInviteLinkUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GroupInviteLink.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GroupInviteLinkUpsert) { SetCode(v+v). }). Exec(ctx)
func (*GroupInviteLinkCreateBulk) OnConflictColumns ¶
func (gilcb *GroupInviteLinkCreateBulk) OnConflictColumns(columns ...string) *GroupInviteLinkUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GroupInviteLink.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GroupInviteLinkCreateBulk) Save ¶
func (gilcb *GroupInviteLinkCreateBulk) Save(ctx context.Context) ([]*GroupInviteLink, error)
Save creates the GroupInviteLink entities in the database.
func (*GroupInviteLinkCreateBulk) SaveX ¶
func (gilcb *GroupInviteLinkCreateBulk) SaveX(ctx context.Context) []*GroupInviteLink
SaveX is like Save, but panics if an error occurs.
type GroupInviteLinkDelete ¶
type GroupInviteLinkDelete struct {
// contains filtered or unexported fields
}
GroupInviteLinkDelete is the builder for deleting a GroupInviteLink entity.
func (*GroupInviteLinkDelete) Exec ¶
func (gild *GroupInviteLinkDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupInviteLinkDelete) ExecX ¶
func (gild *GroupInviteLinkDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupInviteLinkDelete) Where ¶
func (gild *GroupInviteLinkDelete) Where(ps ...predicate.GroupInviteLink) *GroupInviteLinkDelete
Where appends a list predicates to the GroupInviteLinkDelete builder.
type GroupInviteLinkDeleteOne ¶
type GroupInviteLinkDeleteOne struct {
// contains filtered or unexported fields
}
GroupInviteLinkDeleteOne is the builder for deleting a single GroupInviteLink entity.
func (*GroupInviteLinkDeleteOne) Exec ¶
func (gildo *GroupInviteLinkDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupInviteLinkDeleteOne) ExecX ¶
func (gildo *GroupInviteLinkDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInviteLinkDeleteOne) Where ¶
func (gildo *GroupInviteLinkDeleteOne) Where(ps ...predicate.GroupInviteLink) *GroupInviteLinkDeleteOne
Where appends a list predicates to the GroupInviteLinkDelete builder.
type GroupInviteLinkEdges ¶
type GroupInviteLinkEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // contains filtered or unexported fields }
GroupInviteLinkEdges holds the relations/edges for other nodes in the graph.
func (GroupInviteLinkEdges) GroupOrErr ¶
func (e GroupInviteLinkEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GroupInviteLinkGroupBy ¶
type GroupInviteLinkGroupBy struct {
// contains filtered or unexported fields
}
GroupInviteLinkGroupBy is the group-by builder for GroupInviteLink entities.
func (*GroupInviteLinkGroupBy) Aggregate ¶
func (gilgb *GroupInviteLinkGroupBy) Aggregate(fns ...AggregateFunc) *GroupInviteLinkGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupInviteLinkGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupInviteLinkGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkGroupBy) Scan ¶
func (gilgb *GroupInviteLinkGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupInviteLinkGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupInviteLinkMutation ¶
type GroupInviteLinkMutation struct {
// contains filtered or unexported fields
}
GroupInviteLinkMutation represents an operation that mutates the GroupInviteLink nodes in the graph.
func (*GroupInviteLinkMutation) AddField ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) AddedEdges ¶
func (m *GroupInviteLinkMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupInviteLinkMutation) AddedField ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) AddedFields ¶
func (m *GroupInviteLinkMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupInviteLinkMutation) AddedIDs ¶
func (m *GroupInviteLinkMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupInviteLinkMutation) ClearEdge ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) ClearField ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) ClearGroup ¶
func (m *GroupInviteLinkMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*GroupInviteLinkMutation) ClearedEdges ¶
func (m *GroupInviteLinkMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupInviteLinkMutation) ClearedFields ¶
func (m *GroupInviteLinkMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupInviteLinkMutation) Client ¶
func (m GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) Code ¶
func (m *GroupInviteLinkMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*GroupInviteLinkMutation) EdgeCleared ¶
func (m *GroupInviteLinkMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupInviteLinkMutation) Field ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) FieldCleared ¶
func (m *GroupInviteLinkMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupInviteLinkMutation) Fields ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) GroupCleared ¶
func (m *GroupInviteLinkMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*GroupInviteLinkMutation) GroupID ¶
func (m *GroupInviteLinkMutation) GroupID() (id int, exists bool)
GroupID returns the "group" edge ID in the mutation.
func (*GroupInviteLinkMutation) GroupIDs ¶
func (m *GroupInviteLinkMutation) GroupIDs() (ids []int)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*GroupInviteLinkMutation) ID ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) IDs ¶
func (m *GroupInviteLinkMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GroupInviteLinkMutation) OldCode ¶
func (m *GroupInviteLinkMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the GroupInviteLink entity. If the GroupInviteLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) OldRole ¶
OldRole returns the old "role" field's value of the GroupInviteLink entity. If the GroupInviteLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupInviteLinkMutation) Op ¶
func (m *GroupInviteLinkMutation) Op() Op
Op returns the operation name.
func (*GroupInviteLinkMutation) RemovedEdges ¶
func (m *GroupInviteLinkMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupInviteLinkMutation) RemovedIDs ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) ResetCode ¶
func (m *GroupInviteLinkMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*GroupInviteLinkMutation) ResetEdge ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) ResetField ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) ResetGroup ¶
func (m *GroupInviteLinkMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*GroupInviteLinkMutation) ResetRole ¶
func (m *GroupInviteLinkMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*GroupInviteLinkMutation) Role ¶
func (m *GroupInviteLinkMutation) Role() (r group.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*GroupInviteLinkMutation) SetCode ¶
func (m *GroupInviteLinkMutation) SetCode(s string)
SetCode sets the "code" field.
func (*GroupInviteLinkMutation) SetField ¶
func (m *GroupInviteLinkMutation) 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 (*GroupInviteLinkMutation) SetGroupID ¶
func (m *GroupInviteLinkMutation) SetGroupID(id int)
SetGroupID sets the "group" edge to the Group entity by id.
func (*GroupInviteLinkMutation) SetOp ¶
func (m *GroupInviteLinkMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroupInviteLinkMutation) SetRole ¶
func (m *GroupInviteLinkMutation) SetRole(gr group.Role)
SetRole sets the "role" field.
func (GroupInviteLinkMutation) Tx ¶
func (m GroupInviteLinkMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupInviteLinkMutation) Type ¶
func (m *GroupInviteLinkMutation) Type() string
Type returns the node type of this mutation (GroupInviteLink).
func (*GroupInviteLinkMutation) Where ¶
func (m *GroupInviteLinkMutation) Where(ps ...predicate.GroupInviteLink)
Where appends a list predicates to the GroupInviteLinkMutation builder.
func (*GroupInviteLinkMutation) WhereP ¶
func (m *GroupInviteLinkMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroupInviteLinkMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroupInviteLinkQuery ¶
type GroupInviteLinkQuery struct {
// contains filtered or unexported fields
}
GroupInviteLinkQuery is the builder for querying GroupInviteLink entities.
func (*GroupInviteLinkQuery) Aggregate ¶
func (gilq *GroupInviteLinkQuery) Aggregate(fns ...AggregateFunc) *GroupInviteLinkSelect
Aggregate returns a GroupInviteLinkSelect configured with the given aggregations.
func (*GroupInviteLinkQuery) All ¶
func (gilq *GroupInviteLinkQuery) All(ctx context.Context) ([]*GroupInviteLink, error)
All executes the query and returns a list of GroupInviteLinks.
func (*GroupInviteLinkQuery) AllX ¶
func (gilq *GroupInviteLinkQuery) AllX(ctx context.Context) []*GroupInviteLink
AllX is like All, but panics if an error occurs.
func (*GroupInviteLinkQuery) Clone ¶
func (gilq *GroupInviteLinkQuery) Clone() *GroupInviteLinkQuery
Clone returns a duplicate of the GroupInviteLinkQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupInviteLinkQuery) Count ¶
func (gilq *GroupInviteLinkQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupInviteLinkQuery) CountX ¶
func (gilq *GroupInviteLinkQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupInviteLinkQuery) Exist ¶
func (gilq *GroupInviteLinkQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupInviteLinkQuery) ExistX ¶
func (gilq *GroupInviteLinkQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupInviteLinkQuery) First ¶
func (gilq *GroupInviteLinkQuery) First(ctx context.Context) (*GroupInviteLink, error)
First returns the first GroupInviteLink entity from the query. Returns a *NotFoundError when no GroupInviteLink was found.
func (*GroupInviteLinkQuery) FirstID ¶
func (gilq *GroupInviteLinkQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first GroupInviteLink ID from the query. Returns a *NotFoundError when no GroupInviteLink ID was found.
func (*GroupInviteLinkQuery) FirstIDX ¶
func (gilq *GroupInviteLinkQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupInviteLinkQuery) FirstX ¶
func (gilq *GroupInviteLinkQuery) FirstX(ctx context.Context) *GroupInviteLink
FirstX is like First, but panics if an error occurs.
func (*GroupInviteLinkQuery) GroupBy ¶
func (gilq *GroupInviteLinkQuery) GroupBy(field string, fields ...string) *GroupInviteLinkGroupBy
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 { Code string `json:"code,omitempty"` Count int `json:"count,omitempty"` } client.GroupInviteLink.Query(). GroupBy(groupinvitelink.FieldCode). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupInviteLinkQuery) IDs ¶
func (gilq *GroupInviteLinkQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of GroupInviteLink IDs.
func (*GroupInviteLinkQuery) IDsX ¶
func (gilq *GroupInviteLinkQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroupInviteLinkQuery) Limit ¶
func (gilq *GroupInviteLinkQuery) Limit(limit int) *GroupInviteLinkQuery
Limit the number of records to be returned by this query.
func (*GroupInviteLinkQuery) Offset ¶
func (gilq *GroupInviteLinkQuery) Offset(offset int) *GroupInviteLinkQuery
Offset to start from.
func (*GroupInviteLinkQuery) Only ¶
func (gilq *GroupInviteLinkQuery) Only(ctx context.Context) (*GroupInviteLink, error)
Only returns a single GroupInviteLink entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GroupInviteLink entity is found. Returns a *NotFoundError when no GroupInviteLink entities are found.
func (*GroupInviteLinkQuery) OnlyID ¶
func (gilq *GroupInviteLinkQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only GroupInviteLink ID in the query. Returns a *NotSingularError when more than one GroupInviteLink ID is found. Returns a *NotFoundError when no entities are found.
func (*GroupInviteLinkQuery) OnlyIDX ¶
func (gilq *GroupInviteLinkQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupInviteLinkQuery) OnlyX ¶
func (gilq *GroupInviteLinkQuery) OnlyX(ctx context.Context) *GroupInviteLink
OnlyX is like Only, but panics if an error occurs.
func (*GroupInviteLinkQuery) Order ¶
func (gilq *GroupInviteLinkQuery) Order(o ...groupinvitelink.OrderOption) *GroupInviteLinkQuery
Order specifies how the records should be ordered.
func (*GroupInviteLinkQuery) QueryGroup ¶
func (gilq *GroupInviteLinkQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*GroupInviteLinkQuery) Select ¶
func (gilq *GroupInviteLinkQuery) Select(fields ...string) *GroupInviteLinkSelect
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 { Code string `json:"code,omitempty"` } client.GroupInviteLink.Query(). Select(groupinvitelink.FieldCode). Scan(ctx, &v)
func (*GroupInviteLinkQuery) Unique ¶
func (gilq *GroupInviteLinkQuery) Unique(unique bool) *GroupInviteLinkQuery
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 (*GroupInviteLinkQuery) Where ¶
func (gilq *GroupInviteLinkQuery) Where(ps ...predicate.GroupInviteLink) *GroupInviteLinkQuery
Where adds a new predicate for the GroupInviteLinkQuery builder.
func (*GroupInviteLinkQuery) WithGroup ¶
func (gilq *GroupInviteLinkQuery) WithGroup(opts ...func(*GroupQuery)) *GroupInviteLinkQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
type GroupInviteLinkSelect ¶
type GroupInviteLinkSelect struct { *GroupInviteLinkQuery // contains filtered or unexported fields }
GroupInviteLinkSelect is the builder for selecting fields of GroupInviteLink entities.
func (*GroupInviteLinkSelect) Aggregate ¶
func (gils *GroupInviteLinkSelect) Aggregate(fns ...AggregateFunc) *GroupInviteLinkSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroupInviteLinkSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupInviteLinkSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupInviteLinkSelect) Scan ¶
func (gils *GroupInviteLinkSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupInviteLinkSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupInviteLinkUpdate ¶
type GroupInviteLinkUpdate struct {
// contains filtered or unexported fields
}
GroupInviteLinkUpdate is the builder for updating GroupInviteLink entities.
func (*GroupInviteLinkUpdate) ClearGroup ¶
func (gilu *GroupInviteLinkUpdate) ClearGroup() *GroupInviteLinkUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*GroupInviteLinkUpdate) Exec ¶
func (gilu *GroupInviteLinkUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupInviteLinkUpdate) ExecX ¶
func (gilu *GroupInviteLinkUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInviteLinkUpdate) Mutation ¶
func (gilu *GroupInviteLinkUpdate) Mutation() *GroupInviteLinkMutation
Mutation returns the GroupInviteLinkMutation object of the builder.
func (*GroupInviteLinkUpdate) Save ¶
func (gilu *GroupInviteLinkUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupInviteLinkUpdate) SaveX ¶
func (gilu *GroupInviteLinkUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupInviteLinkUpdate) SetCode ¶
func (gilu *GroupInviteLinkUpdate) SetCode(s string) *GroupInviteLinkUpdate
SetCode sets the "code" field.
func (*GroupInviteLinkUpdate) SetGroup ¶
func (gilu *GroupInviteLinkUpdate) SetGroup(g *Group) *GroupInviteLinkUpdate
SetGroup sets the "group" edge to the Group entity.
func (*GroupInviteLinkUpdate) SetGroupID ¶
func (gilu *GroupInviteLinkUpdate) SetGroupID(id int) *GroupInviteLinkUpdate
SetGroupID sets the "group" edge to the Group entity by ID.
func (*GroupInviteLinkUpdate) SetRole ¶
func (gilu *GroupInviteLinkUpdate) SetRole(gr group.Role) *GroupInviteLinkUpdate
SetRole sets the "role" field.
func (*GroupInviteLinkUpdate) Where ¶
func (gilu *GroupInviteLinkUpdate) Where(ps ...predicate.GroupInviteLink) *GroupInviteLinkUpdate
Where appends a list predicates to the GroupInviteLinkUpdate builder.
type GroupInviteLinkUpdateOne ¶
type GroupInviteLinkUpdateOne struct {
// contains filtered or unexported fields
}
GroupInviteLinkUpdateOne is the builder for updating a single GroupInviteLink entity.
func (*GroupInviteLinkUpdateOne) ClearGroup ¶
func (giluo *GroupInviteLinkUpdateOne) ClearGroup() *GroupInviteLinkUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*GroupInviteLinkUpdateOne) Exec ¶
func (giluo *GroupInviteLinkUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupInviteLinkUpdateOne) ExecX ¶
func (giluo *GroupInviteLinkUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInviteLinkUpdateOne) Mutation ¶
func (giluo *GroupInviteLinkUpdateOne) Mutation() *GroupInviteLinkMutation
Mutation returns the GroupInviteLinkMutation object of the builder.
func (*GroupInviteLinkUpdateOne) Save ¶
func (giluo *GroupInviteLinkUpdateOne) Save(ctx context.Context) (*GroupInviteLink, error)
Save executes the query and returns the updated GroupInviteLink entity.
func (*GroupInviteLinkUpdateOne) SaveX ¶
func (giluo *GroupInviteLinkUpdateOne) SaveX(ctx context.Context) *GroupInviteLink
SaveX is like Save, but panics if an error occurs.
func (*GroupInviteLinkUpdateOne) Select ¶
func (giluo *GroupInviteLinkUpdateOne) Select(field string, fields ...string) *GroupInviteLinkUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupInviteLinkUpdateOne) SetCode ¶
func (giluo *GroupInviteLinkUpdateOne) SetCode(s string) *GroupInviteLinkUpdateOne
SetCode sets the "code" field.
func (*GroupInviteLinkUpdateOne) SetGroup ¶
func (giluo *GroupInviteLinkUpdateOne) SetGroup(g *Group) *GroupInviteLinkUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*GroupInviteLinkUpdateOne) SetGroupID ¶
func (giluo *GroupInviteLinkUpdateOne) SetGroupID(id int) *GroupInviteLinkUpdateOne
SetGroupID sets the "group" edge to the Group entity by ID.
func (*GroupInviteLinkUpdateOne) SetRole ¶
func (giluo *GroupInviteLinkUpdateOne) SetRole(gr group.Role) *GroupInviteLinkUpdateOne
SetRole sets the "role" field.
func (*GroupInviteLinkUpdateOne) Where ¶
func (giluo *GroupInviteLinkUpdateOne) Where(ps ...predicate.GroupInviteLink) *GroupInviteLinkUpdateOne
Where appends a list predicates to the GroupInviteLinkUpdate builder.
type GroupInviteLinkUpsert ¶
GroupInviteLinkUpsert is the "OnConflict" setter.
func (*GroupInviteLinkUpsert) SetCode ¶
func (u *GroupInviteLinkUpsert) SetCode(v string) *GroupInviteLinkUpsert
SetCode sets the "code" field.
func (*GroupInviteLinkUpsert) SetRole ¶
func (u *GroupInviteLinkUpsert) SetRole(v group.Role) *GroupInviteLinkUpsert
SetRole sets the "role" field.
func (*GroupInviteLinkUpsert) UpdateCode ¶
func (u *GroupInviteLinkUpsert) UpdateCode() *GroupInviteLinkUpsert
UpdateCode sets the "code" field to the value that was provided on create.
func (*GroupInviteLinkUpsert) UpdateRole ¶
func (u *GroupInviteLinkUpsert) UpdateRole() *GroupInviteLinkUpsert
UpdateRole sets the "role" field to the value that was provided on create.
type GroupInviteLinkUpsertBulk ¶
type GroupInviteLinkUpsertBulk struct {
// contains filtered or unexported fields
}
GroupInviteLinkUpsertBulk is the builder for "upsert"-ing a bulk of GroupInviteLink nodes.
func (*GroupInviteLinkUpsertBulk) DoNothing ¶
func (u *GroupInviteLinkUpsertBulk) DoNothing() *GroupInviteLinkUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupInviteLinkUpsertBulk) Exec ¶
func (u *GroupInviteLinkUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupInviteLinkUpsertBulk) ExecX ¶
func (u *GroupInviteLinkUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInviteLinkUpsertBulk) Ignore ¶
func (u *GroupInviteLinkUpsertBulk) Ignore() *GroupInviteLinkUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GroupInviteLink.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupInviteLinkUpsertBulk) SetCode ¶
func (u *GroupInviteLinkUpsertBulk) SetCode(v string) *GroupInviteLinkUpsertBulk
SetCode sets the "code" field.
func (*GroupInviteLinkUpsertBulk) SetRole ¶
func (u *GroupInviteLinkUpsertBulk) SetRole(v group.Role) *GroupInviteLinkUpsertBulk
SetRole sets the "role" field.
func (*GroupInviteLinkUpsertBulk) Update ¶
func (u *GroupInviteLinkUpsertBulk) Update(set func(*GroupInviteLinkUpsert)) *GroupInviteLinkUpsertBulk
Update allows overriding fields `UPDATE` values. See the GroupInviteLinkCreateBulk.OnConflict documentation for more info.
func (*GroupInviteLinkUpsertBulk) UpdateCode ¶
func (u *GroupInviteLinkUpsertBulk) UpdateCode() *GroupInviteLinkUpsertBulk
UpdateCode sets the "code" field to the value that was provided on create.
func (*GroupInviteLinkUpsertBulk) UpdateNewValues ¶
func (u *GroupInviteLinkUpsertBulk) UpdateNewValues() *GroupInviteLinkUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GroupInviteLink.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*GroupInviteLinkUpsertBulk) UpdateRole ¶
func (u *GroupInviteLinkUpsertBulk) UpdateRole() *GroupInviteLinkUpsertBulk
UpdateRole sets the "role" field to the value that was provided on create.
type GroupInviteLinkUpsertOne ¶
type GroupInviteLinkUpsertOne struct {
// contains filtered or unexported fields
}
GroupInviteLinkUpsertOne is the builder for "upsert"-ing
one GroupInviteLink node.
func (*GroupInviteLinkUpsertOne) DoNothing ¶
func (u *GroupInviteLinkUpsertOne) DoNothing() *GroupInviteLinkUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupInviteLinkUpsertOne) Exec ¶
func (u *GroupInviteLinkUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupInviteLinkUpsertOne) ExecX ¶
func (u *GroupInviteLinkUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupInviteLinkUpsertOne) ID ¶
func (u *GroupInviteLinkUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GroupInviteLinkUpsertOne) IDX ¶
func (u *GroupInviteLinkUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*GroupInviteLinkUpsertOne) Ignore ¶
func (u *GroupInviteLinkUpsertOne) Ignore() *GroupInviteLinkUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GroupInviteLink.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupInviteLinkUpsertOne) SetCode ¶
func (u *GroupInviteLinkUpsertOne) SetCode(v string) *GroupInviteLinkUpsertOne
SetCode sets the "code" field.
func (*GroupInviteLinkUpsertOne) SetRole ¶
func (u *GroupInviteLinkUpsertOne) SetRole(v group.Role) *GroupInviteLinkUpsertOne
SetRole sets the "role" field.
func (*GroupInviteLinkUpsertOne) Update ¶
func (u *GroupInviteLinkUpsertOne) Update(set func(*GroupInviteLinkUpsert)) *GroupInviteLinkUpsertOne
Update allows overriding fields `UPDATE` values. See the GroupInviteLinkCreate.OnConflict documentation for more info.
func (*GroupInviteLinkUpsertOne) UpdateCode ¶
func (u *GroupInviteLinkUpsertOne) UpdateCode() *GroupInviteLinkUpsertOne
UpdateCode sets the "code" field to the value that was provided on create.
func (*GroupInviteLinkUpsertOne) UpdateNewValues ¶
func (u *GroupInviteLinkUpsertOne) UpdateNewValues() *GroupInviteLinkUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GroupInviteLink.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*GroupInviteLinkUpsertOne) UpdateRole ¶
func (u *GroupInviteLinkUpsertOne) UpdateRole() *GroupInviteLinkUpsertOne
UpdateRole sets the "role" field to the value that was provided on create.
type GroupInviteLinks ¶
type GroupInviteLinks []*GroupInviteLink
GroupInviteLinks is a parsable slice of GroupInviteLink.
type GroupMutation ¶
type GroupMutation struct {
// contains filtered or unexported fields
}
GroupMutation represents an operation that mutates the Group nodes in the graph.
func (*GroupMutation) AddDeadlineIDs ¶
func (m *GroupMutation) AddDeadlineIDs(ids ...int)
AddDeadlineIDs adds the "deadlines" edge to the Deadline entity by ids.
func (*GroupMutation) AddEventIDs ¶
func (m *GroupMutation) AddEventIDs(ids ...int)
AddEventIDs adds the "events" edge to the Event entity by ids.
func (*GroupMutation) AddField ¶
func (m *GroupMutation) 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 (*GroupMutation) AddForumIDs ¶
func (m *GroupMutation) AddForumIDs(ids ...int)
AddForumIDs adds the "forums" edge to the Forum entity by ids.
func (*GroupMutation) AddInviteIDs ¶
func (m *GroupMutation) AddInviteIDs(ids ...int)
AddInviteIDs adds the "invites" edge to the GroupInviteLink entity by ids.
func (*GroupMutation) AddUserIDs ¶
func (m *GroupMutation) AddUserIDs(ids ...int)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*GroupMutation) AddedEdges ¶
func (m *GroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupMutation) AddedField ¶
func (m *GroupMutation) 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 (*GroupMutation) AddedFields ¶
func (m *GroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupMutation) AddedIDs ¶
func (m *GroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupMutation) ClearDeadlines ¶
func (m *GroupMutation) ClearDeadlines()
ClearDeadlines clears the "deadlines" edge to the Deadline entity.
func (*GroupMutation) ClearEdge ¶
func (m *GroupMutation) 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 (*GroupMutation) ClearEvents ¶
func (m *GroupMutation) ClearEvents()
ClearEvents clears the "events" edge to the Event entity.
func (*GroupMutation) ClearField ¶
func (m *GroupMutation) 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 (*GroupMutation) ClearForums ¶
func (m *GroupMutation) ClearForums()
ClearForums clears the "forums" edge to the Forum entity.
func (*GroupMutation) ClearInstitution ¶
func (m *GroupMutation) ClearInstitution()
ClearInstitution clears the "institution" edge to the Institution entity.
func (*GroupMutation) ClearInvites ¶
func (m *GroupMutation) ClearInvites()
ClearInvites clears the "invites" edge to the GroupInviteLink entity.
func (*GroupMutation) ClearUsers ¶
func (m *GroupMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*GroupMutation) ClearedEdges ¶
func (m *GroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupMutation) ClearedFields ¶
func (m *GroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupMutation) Client ¶
func (m GroupMutation) 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 (*GroupMutation) DeadlinesCleared ¶
func (m *GroupMutation) DeadlinesCleared() bool
DeadlinesCleared reports if the "deadlines" edge to the Deadline entity was cleared.
func (*GroupMutation) DeadlinesIDs ¶
func (m *GroupMutation) DeadlinesIDs() (ids []int)
DeadlinesIDs returns the "deadlines" edge IDs in the mutation.
func (*GroupMutation) Description ¶
func (m *GroupMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*GroupMutation) EdgeCleared ¶
func (m *GroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupMutation) EventsCleared ¶
func (m *GroupMutation) EventsCleared() bool
EventsCleared reports if the "events" edge to the Event entity was cleared.
func (*GroupMutation) EventsIDs ¶
func (m *GroupMutation) EventsIDs() (ids []int)
EventsIDs returns the "events" edge IDs in the mutation.
func (*GroupMutation) Field ¶
func (m *GroupMutation) 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 (*GroupMutation) FieldCleared ¶
func (m *GroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupMutation) Fields ¶
func (m *GroupMutation) 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 (*GroupMutation) ForumsCleared ¶
func (m *GroupMutation) ForumsCleared() bool
ForumsCleared reports if the "forums" edge to the Forum entity was cleared.
func (*GroupMutation) ForumsIDs ¶
func (m *GroupMutation) ForumsIDs() (ids []int)
ForumsIDs returns the "forums" edge IDs in the mutation.
func (*GroupMutation) ID ¶
func (m *GroupMutation) 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 (*GroupMutation) IDs ¶
func (m *GroupMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GroupMutation) InstitutionCleared ¶
func (m *GroupMutation) InstitutionCleared() bool
InstitutionCleared reports if the "institution" edge to the Institution entity was cleared.
func (*GroupMutation) InstitutionID ¶
func (m *GroupMutation) InstitutionID() (id int, exists bool)
InstitutionID returns the "institution" edge ID in the mutation.
func (*GroupMutation) InstitutionIDs ¶
func (m *GroupMutation) InstitutionIDs() (ids []int)
InstitutionIDs returns the "institution" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InstitutionID instead. It exists only for internal usage by the builders.
func (*GroupMutation) InvitesCleared ¶
func (m *GroupMutation) InvitesCleared() bool
InvitesCleared reports if the "invites" edge to the GroupInviteLink entity was cleared.
func (*GroupMutation) InvitesIDs ¶
func (m *GroupMutation) InvitesIDs() (ids []int)
InvitesIDs returns the "invites" edge IDs in the mutation.
func (*GroupMutation) Name ¶
func (m *GroupMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GroupMutation) OldDescription ¶
func (m *GroupMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Group entity. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupMutation) 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 (*GroupMutation) OldName ¶
func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Group entity. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupMutation) OldShortName ¶
func (m *GroupMutation) OldShortName(ctx context.Context) (v string, err error)
OldShortName returns the old "short_name" field's value of the Group entity. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupMutation) RemoveDeadlineIDs ¶
func (m *GroupMutation) RemoveDeadlineIDs(ids ...int)
RemoveDeadlineIDs removes the "deadlines" edge to the Deadline entity by IDs.
func (*GroupMutation) RemoveEventIDs ¶
func (m *GroupMutation) RemoveEventIDs(ids ...int)
RemoveEventIDs removes the "events" edge to the Event entity by IDs.
func (*GroupMutation) RemoveForumIDs ¶
func (m *GroupMutation) RemoveForumIDs(ids ...int)
RemoveForumIDs removes the "forums" edge to the Forum entity by IDs.
func (*GroupMutation) RemoveInviteIDs ¶
func (m *GroupMutation) RemoveInviteIDs(ids ...int)
RemoveInviteIDs removes the "invites" edge to the GroupInviteLink entity by IDs.
func (*GroupMutation) RemoveUserIDs ¶
func (m *GroupMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*GroupMutation) RemovedDeadlinesIDs ¶
func (m *GroupMutation) RemovedDeadlinesIDs() (ids []int)
RemovedDeadlines returns the removed IDs of the "deadlines" edge to the Deadline entity.
func (*GroupMutation) RemovedEdges ¶
func (m *GroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupMutation) RemovedEventsIDs ¶
func (m *GroupMutation) RemovedEventsIDs() (ids []int)
RemovedEvents returns the removed IDs of the "events" edge to the Event entity.
func (*GroupMutation) RemovedForumsIDs ¶
func (m *GroupMutation) RemovedForumsIDs() (ids []int)
RemovedForums returns the removed IDs of the "forums" edge to the Forum entity.
func (*GroupMutation) RemovedIDs ¶
func (m *GroupMutation) 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 (*GroupMutation) RemovedInvitesIDs ¶
func (m *GroupMutation) RemovedInvitesIDs() (ids []int)
RemovedInvites returns the removed IDs of the "invites" edge to the GroupInviteLink entity.
func (*GroupMutation) RemovedUsersIDs ¶
func (m *GroupMutation) RemovedUsersIDs() (ids []int)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*GroupMutation) ResetDeadlines ¶
func (m *GroupMutation) ResetDeadlines()
ResetDeadlines resets all changes to the "deadlines" edge.
func (*GroupMutation) ResetDescription ¶
func (m *GroupMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*GroupMutation) ResetEdge ¶
func (m *GroupMutation) 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 (*GroupMutation) ResetEvents ¶
func (m *GroupMutation) ResetEvents()
ResetEvents resets all changes to the "events" edge.
func (*GroupMutation) ResetField ¶
func (m *GroupMutation) 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 (*GroupMutation) ResetForums ¶
func (m *GroupMutation) ResetForums()
ResetForums resets all changes to the "forums" edge.
func (*GroupMutation) ResetInstitution ¶
func (m *GroupMutation) ResetInstitution()
ResetInstitution resets all changes to the "institution" edge.
func (*GroupMutation) ResetInvites ¶
func (m *GroupMutation) ResetInvites()
ResetInvites resets all changes to the "invites" edge.
func (*GroupMutation) ResetName ¶
func (m *GroupMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GroupMutation) ResetShortName ¶
func (m *GroupMutation) ResetShortName()
ResetShortName resets all changes to the "short_name" field.
func (*GroupMutation) ResetUsers ¶
func (m *GroupMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*GroupMutation) SetDescription ¶
func (m *GroupMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*GroupMutation) SetField ¶
func (m *GroupMutation) 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 (*GroupMutation) SetInstitutionID ¶
func (m *GroupMutation) SetInstitutionID(id int)
SetInstitutionID sets the "institution" edge to the Institution entity by id.
func (*GroupMutation) SetName ¶
func (m *GroupMutation) SetName(s string)
SetName sets the "name" field.
func (*GroupMutation) SetOp ¶
func (m *GroupMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroupMutation) SetShortName ¶
func (m *GroupMutation) SetShortName(s string)
SetShortName sets the "short_name" field.
func (*GroupMutation) ShortName ¶
func (m *GroupMutation) ShortName() (r string, exists bool)
ShortName returns the value of the "short_name" field in the mutation.
func (GroupMutation) Tx ¶
func (m GroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupMutation) Type ¶
func (m *GroupMutation) Type() string
Type returns the node type of this mutation (Group).
func (*GroupMutation) UsersCleared ¶
func (m *GroupMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*GroupMutation) UsersIDs ¶
func (m *GroupMutation) UsersIDs() (ids []int)
UsersIDs returns the "users" edge IDs in the mutation.
func (*GroupMutation) Where ¶
func (m *GroupMutation) Where(ps ...predicate.Group)
Where appends a list predicates to the GroupMutation builder.
func (*GroupMutation) WhereP ¶
func (m *GroupMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroupQuery ¶
type GroupQuery struct {
// contains filtered or unexported fields
}
GroupQuery is the builder for querying Group entities.
func (*GroupQuery) Aggregate ¶
func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect
Aggregate returns a GroupSelect configured with the given aggregations.
func (*GroupQuery) All ¶
func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
All executes the query and returns a list of Groups.
func (*GroupQuery) AllX ¶
func (gq *GroupQuery) AllX(ctx context.Context) []*Group
AllX is like All, but panics if an error occurs.
func (*GroupQuery) Clone ¶
func (gq *GroupQuery) Clone() *GroupQuery
Clone returns a duplicate of the GroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupQuery) Count ¶
func (gq *GroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupQuery) CountX ¶
func (gq *GroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupQuery) Exist ¶
func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupQuery) ExistX ¶
func (gq *GroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupQuery) First ¶
func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
First returns the first Group entity from the query. Returns a *NotFoundError when no Group was found.
func (*GroupQuery) FirstID ¶
func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Group ID from the query. Returns a *NotFoundError when no Group ID was found.
func (*GroupQuery) FirstIDX ¶
func (gq *GroupQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupQuery) FirstX ¶
func (gq *GroupQuery) FirstX(ctx context.Context) *Group
FirstX is like First, but panics if an error occurs.
func (*GroupQuery) GroupBy ¶
func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Group.Query(). GroupBy(entgroup.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupQuery) IDs ¶
func (gq *GroupQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Group IDs.
func (*GroupQuery) IDsX ¶
func (gq *GroupQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroupQuery) Limit ¶
func (gq *GroupQuery) Limit(limit int) *GroupQuery
Limit the number of records to be returned by this query.
func (*GroupQuery) Offset ¶
func (gq *GroupQuery) Offset(offset int) *GroupQuery
Offset to start from.
func (*GroupQuery) Only ¶
func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
Only returns a single Group entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Group entity is found. Returns a *NotFoundError when no Group entities are found.
func (*GroupQuery) OnlyID ¶
func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Group ID in the query. Returns a *NotSingularError when more than one Group ID is found. Returns a *NotFoundError when no entities are found.
func (*GroupQuery) OnlyIDX ¶
func (gq *GroupQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupQuery) OnlyX ¶
func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
OnlyX is like Only, but panics if an error occurs.
func (*GroupQuery) Order ¶
func (gq *GroupQuery) Order(o ...entgroup.OrderOption) *GroupQuery
Order specifies how the records should be ordered.
func (*GroupQuery) QueryDeadlines ¶
func (gq *GroupQuery) QueryDeadlines() *DeadlineQuery
QueryDeadlines chains the current query on the "deadlines" edge.
func (*GroupQuery) QueryEvents ¶
func (gq *GroupQuery) QueryEvents() *EventQuery
QueryEvents chains the current query on the "events" edge.
func (*GroupQuery) QueryForums ¶
func (gq *GroupQuery) QueryForums() *ForumQuery
QueryForums chains the current query on the "forums" edge.
func (*GroupQuery) QueryGroupUsers ¶
func (gq *GroupQuery) QueryGroupUsers() *GroupUserQuery
QueryGroupUsers chains the current query on the "group_users" edge.
func (*GroupQuery) QueryInstitution ¶
func (gq *GroupQuery) QueryInstitution() *InstitutionQuery
QueryInstitution chains the current query on the "institution" edge.
func (*GroupQuery) QueryInvites ¶
func (gq *GroupQuery) QueryInvites() *GroupInviteLinkQuery
QueryInvites chains the current query on the "invites" edge.
func (*GroupQuery) QueryUsers ¶
func (gq *GroupQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*GroupQuery) Select ¶
func (gq *GroupQuery) Select(fields ...string) *GroupSelect
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 { Name string `json:"name,omitempty"` } client.Group.Query(). Select(entgroup.FieldName). Scan(ctx, &v)
func (*GroupQuery) Unique ¶
func (gq *GroupQuery) Unique(unique bool) *GroupQuery
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 (*GroupQuery) Where ¶
func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
Where adds a new predicate for the GroupQuery builder.
func (*GroupQuery) WithDeadlines ¶
func (gq *GroupQuery) WithDeadlines(opts ...func(*DeadlineQuery)) *GroupQuery
WithDeadlines tells the query-builder to eager-load the nodes that are connected to the "deadlines" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithEvents ¶
func (gq *GroupQuery) WithEvents(opts ...func(*EventQuery)) *GroupQuery
WithEvents tells the query-builder to eager-load the nodes that are connected to the "events" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithForums ¶
func (gq *GroupQuery) WithForums(opts ...func(*ForumQuery)) *GroupQuery
WithForums tells the query-builder to eager-load the nodes that are connected to the "forums" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithGroupUsers ¶
func (gq *GroupQuery) WithGroupUsers(opts ...func(*GroupUserQuery)) *GroupQuery
WithGroupUsers tells the query-builder to eager-load the nodes that are connected to the "group_users" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithInstitution ¶
func (gq *GroupQuery) WithInstitution(opts ...func(*InstitutionQuery)) *GroupQuery
WithInstitution tells the query-builder to eager-load the nodes that are connected to the "institution" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithInvites ¶
func (gq *GroupQuery) WithInvites(opts ...func(*GroupInviteLinkQuery)) *GroupQuery
WithInvites tells the query-builder to eager-load the nodes that are connected to the "invites" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithUsers ¶
func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
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 GroupSelect ¶
type GroupSelect struct { *GroupQuery // contains filtered or unexported fields }
GroupSelect is the builder for selecting fields of Group entities.
func (*GroupSelect) Aggregate ¶
func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroupSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Scan ¶
func (gs *GroupSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupUpdate ¶
type GroupUpdate struct {
// contains filtered or unexported fields
}
GroupUpdate is the builder for updating Group entities.
func (*GroupUpdate) AddDeadlineIDs ¶
func (gu *GroupUpdate) AddDeadlineIDs(ids ...int) *GroupUpdate
AddDeadlineIDs adds the "deadlines" edge to the Deadline entity by IDs.
func (*GroupUpdate) AddDeadlines ¶
func (gu *GroupUpdate) AddDeadlines(d ...*Deadline) *GroupUpdate
AddDeadlines adds the "deadlines" edges to the Deadline entity.
func (*GroupUpdate) AddEventIDs ¶
func (gu *GroupUpdate) AddEventIDs(ids ...int) *GroupUpdate
AddEventIDs adds the "events" edge to the Event entity by IDs.
func (*GroupUpdate) AddEvents ¶
func (gu *GroupUpdate) AddEvents(e ...*Event) *GroupUpdate
AddEvents adds the "events" edges to the Event entity.
func (*GroupUpdate) AddForumIDs ¶
func (gu *GroupUpdate) AddForumIDs(ids ...int) *GroupUpdate
AddForumIDs adds the "forums" edge to the Forum entity by IDs.
func (*GroupUpdate) AddForums ¶
func (gu *GroupUpdate) AddForums(f ...*Forum) *GroupUpdate
AddForums adds the "forums" edges to the Forum entity.
func (*GroupUpdate) AddInviteIDs ¶
func (gu *GroupUpdate) AddInviteIDs(ids ...int) *GroupUpdate
AddInviteIDs adds the "invites" edge to the GroupInviteLink entity by IDs.
func (*GroupUpdate) AddInvites ¶
func (gu *GroupUpdate) AddInvites(g ...*GroupInviteLink) *GroupUpdate
AddInvites adds the "invites" edges to the GroupInviteLink entity.
func (*GroupUpdate) AddUserIDs ¶
func (gu *GroupUpdate) AddUserIDs(ids ...int) *GroupUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdate) AddUsers ¶
func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdate) ClearDeadlines ¶
func (gu *GroupUpdate) ClearDeadlines() *GroupUpdate
ClearDeadlines clears all "deadlines" edges to the Deadline entity.
func (*GroupUpdate) ClearEvents ¶
func (gu *GroupUpdate) ClearEvents() *GroupUpdate
ClearEvents clears all "events" edges to the Event entity.
func (*GroupUpdate) ClearForums ¶
func (gu *GroupUpdate) ClearForums() *GroupUpdate
ClearForums clears all "forums" edges to the Forum entity.
func (*GroupUpdate) ClearInstitution ¶
func (gu *GroupUpdate) ClearInstitution() *GroupUpdate
ClearInstitution clears the "institution" edge to the Institution entity.
func (*GroupUpdate) ClearInvites ¶
func (gu *GroupUpdate) ClearInvites() *GroupUpdate
ClearInvites clears all "invites" edges to the GroupInviteLink entity.
func (*GroupUpdate) ClearUsers ¶
func (gu *GroupUpdate) ClearUsers() *GroupUpdate
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdate) Exec ¶
func (gu *GroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpdate) ExecX ¶
func (gu *GroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdate) Mutation ¶
func (gu *GroupUpdate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdate) RemoveDeadlineIDs ¶
func (gu *GroupUpdate) RemoveDeadlineIDs(ids ...int) *GroupUpdate
RemoveDeadlineIDs removes the "deadlines" edge to Deadline entities by IDs.
func (*GroupUpdate) RemoveDeadlines ¶
func (gu *GroupUpdate) RemoveDeadlines(d ...*Deadline) *GroupUpdate
RemoveDeadlines removes "deadlines" edges to Deadline entities.
func (*GroupUpdate) RemoveEventIDs ¶
func (gu *GroupUpdate) RemoveEventIDs(ids ...int) *GroupUpdate
RemoveEventIDs removes the "events" edge to Event entities by IDs.
func (*GroupUpdate) RemoveEvents ¶
func (gu *GroupUpdate) RemoveEvents(e ...*Event) *GroupUpdate
RemoveEvents removes "events" edges to Event entities.
func (*GroupUpdate) RemoveForumIDs ¶
func (gu *GroupUpdate) RemoveForumIDs(ids ...int) *GroupUpdate
RemoveForumIDs removes the "forums" edge to Forum entities by IDs.
func (*GroupUpdate) RemoveForums ¶
func (gu *GroupUpdate) RemoveForums(f ...*Forum) *GroupUpdate
RemoveForums removes "forums" edges to Forum entities.
func (*GroupUpdate) RemoveInviteIDs ¶
func (gu *GroupUpdate) RemoveInviteIDs(ids ...int) *GroupUpdate
RemoveInviteIDs removes the "invites" edge to GroupInviteLink entities by IDs.
func (*GroupUpdate) RemoveInvites ¶
func (gu *GroupUpdate) RemoveInvites(g ...*GroupInviteLink) *GroupUpdate
RemoveInvites removes "invites" edges to GroupInviteLink entities.
func (*GroupUpdate) RemoveUserIDs ¶
func (gu *GroupUpdate) RemoveUserIDs(ids ...int) *GroupUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdate) RemoveUsers ¶
func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdate) Save ¶
func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupUpdate) SaveX ¶
func (gu *GroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdate) SetDescription ¶
func (gu *GroupUpdate) SetDescription(s string) *GroupUpdate
SetDescription sets the "description" field.
func (*GroupUpdate) SetInstitution ¶
func (gu *GroupUpdate) SetInstitution(i *Institution) *GroupUpdate
SetInstitution sets the "institution" edge to the Institution entity.
func (*GroupUpdate) SetInstitutionID ¶
func (gu *GroupUpdate) SetInstitutionID(id int) *GroupUpdate
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*GroupUpdate) SetName ¶
func (gu *GroupUpdate) SetName(s string) *GroupUpdate
SetName sets the "name" field.
func (*GroupUpdate) SetShortName ¶
func (gu *GroupUpdate) SetShortName(s string) *GroupUpdate
SetShortName sets the "short_name" field.
func (*GroupUpdate) Where ¶
func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
Where appends a list predicates to the GroupUpdate builder.
type GroupUpdateOne ¶
type GroupUpdateOne struct {
// contains filtered or unexported fields
}
GroupUpdateOne is the builder for updating a single Group entity.
func (*GroupUpdateOne) AddDeadlineIDs ¶
func (guo *GroupUpdateOne) AddDeadlineIDs(ids ...int) *GroupUpdateOne
AddDeadlineIDs adds the "deadlines" edge to the Deadline entity by IDs.
func (*GroupUpdateOne) AddDeadlines ¶
func (guo *GroupUpdateOne) AddDeadlines(d ...*Deadline) *GroupUpdateOne
AddDeadlines adds the "deadlines" edges to the Deadline entity.
func (*GroupUpdateOne) AddEventIDs ¶
func (guo *GroupUpdateOne) AddEventIDs(ids ...int) *GroupUpdateOne
AddEventIDs adds the "events" edge to the Event entity by IDs.
func (*GroupUpdateOne) AddEvents ¶
func (guo *GroupUpdateOne) AddEvents(e ...*Event) *GroupUpdateOne
AddEvents adds the "events" edges to the Event entity.
func (*GroupUpdateOne) AddForumIDs ¶
func (guo *GroupUpdateOne) AddForumIDs(ids ...int) *GroupUpdateOne
AddForumIDs adds the "forums" edge to the Forum entity by IDs.
func (*GroupUpdateOne) AddForums ¶
func (guo *GroupUpdateOne) AddForums(f ...*Forum) *GroupUpdateOne
AddForums adds the "forums" edges to the Forum entity.
func (*GroupUpdateOne) AddInviteIDs ¶
func (guo *GroupUpdateOne) AddInviteIDs(ids ...int) *GroupUpdateOne
AddInviteIDs adds the "invites" edge to the GroupInviteLink entity by IDs.
func (*GroupUpdateOne) AddInvites ¶
func (guo *GroupUpdateOne) AddInvites(g ...*GroupInviteLink) *GroupUpdateOne
AddInvites adds the "invites" edges to the GroupInviteLink entity.
func (*GroupUpdateOne) AddUserIDs ¶
func (guo *GroupUpdateOne) AddUserIDs(ids ...int) *GroupUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdateOne) AddUsers ¶
func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdateOne) ClearDeadlines ¶
func (guo *GroupUpdateOne) ClearDeadlines() *GroupUpdateOne
ClearDeadlines clears all "deadlines" edges to the Deadline entity.
func (*GroupUpdateOne) ClearEvents ¶
func (guo *GroupUpdateOne) ClearEvents() *GroupUpdateOne
ClearEvents clears all "events" edges to the Event entity.
func (*GroupUpdateOne) ClearForums ¶
func (guo *GroupUpdateOne) ClearForums() *GroupUpdateOne
ClearForums clears all "forums" edges to the Forum entity.
func (*GroupUpdateOne) ClearInstitution ¶
func (guo *GroupUpdateOne) ClearInstitution() *GroupUpdateOne
ClearInstitution clears the "institution" edge to the Institution entity.
func (*GroupUpdateOne) ClearInvites ¶
func (guo *GroupUpdateOne) ClearInvites() *GroupUpdateOne
ClearInvites clears all "invites" edges to the GroupInviteLink entity.
func (*GroupUpdateOne) ClearUsers ¶
func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdateOne) Exec ¶
func (guo *GroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupUpdateOne) ExecX ¶
func (guo *GroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdateOne) Mutation ¶
func (guo *GroupUpdateOne) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdateOne) RemoveDeadlineIDs ¶
func (guo *GroupUpdateOne) RemoveDeadlineIDs(ids ...int) *GroupUpdateOne
RemoveDeadlineIDs removes the "deadlines" edge to Deadline entities by IDs.
func (*GroupUpdateOne) RemoveDeadlines ¶
func (guo *GroupUpdateOne) RemoveDeadlines(d ...*Deadline) *GroupUpdateOne
RemoveDeadlines removes "deadlines" edges to Deadline entities.
func (*GroupUpdateOne) RemoveEventIDs ¶
func (guo *GroupUpdateOne) RemoveEventIDs(ids ...int) *GroupUpdateOne
RemoveEventIDs removes the "events" edge to Event entities by IDs.
func (*GroupUpdateOne) RemoveEvents ¶
func (guo *GroupUpdateOne) RemoveEvents(e ...*Event) *GroupUpdateOne
RemoveEvents removes "events" edges to Event entities.
func (*GroupUpdateOne) RemoveForumIDs ¶
func (guo *GroupUpdateOne) RemoveForumIDs(ids ...int) *GroupUpdateOne
RemoveForumIDs removes the "forums" edge to Forum entities by IDs.
func (*GroupUpdateOne) RemoveForums ¶
func (guo *GroupUpdateOne) RemoveForums(f ...*Forum) *GroupUpdateOne
RemoveForums removes "forums" edges to Forum entities.
func (*GroupUpdateOne) RemoveInviteIDs ¶
func (guo *GroupUpdateOne) RemoveInviteIDs(ids ...int) *GroupUpdateOne
RemoveInviteIDs removes the "invites" edge to GroupInviteLink entities by IDs.
func (*GroupUpdateOne) RemoveInvites ¶
func (guo *GroupUpdateOne) RemoveInvites(g ...*GroupInviteLink) *GroupUpdateOne
RemoveInvites removes "invites" edges to GroupInviteLink entities.
func (*GroupUpdateOne) RemoveUserIDs ¶
func (guo *GroupUpdateOne) RemoveUserIDs(ids ...int) *GroupUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdateOne) RemoveUsers ¶
func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdateOne) Save ¶
func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
Save executes the query and returns the updated Group entity.
func (*GroupUpdateOne) SaveX ¶
func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdateOne) Select ¶
func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupUpdateOne) SetDescription ¶
func (guo *GroupUpdateOne) SetDescription(s string) *GroupUpdateOne
SetDescription sets the "description" field.
func (*GroupUpdateOne) SetInstitution ¶
func (guo *GroupUpdateOne) SetInstitution(i *Institution) *GroupUpdateOne
SetInstitution sets the "institution" edge to the Institution entity.
func (*GroupUpdateOne) SetInstitutionID ¶
func (guo *GroupUpdateOne) SetInstitutionID(id int) *GroupUpdateOne
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*GroupUpdateOne) SetName ¶
func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
SetName sets the "name" field.
func (*GroupUpdateOne) SetShortName ¶
func (guo *GroupUpdateOne) SetShortName(s string) *GroupUpdateOne
SetShortName sets the "short_name" field.
func (*GroupUpdateOne) Where ¶
func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne
Where appends a list predicates to the GroupUpdate builder.
type GroupUpsert ¶
GroupUpsert is the "OnConflict" setter.
func (*GroupUpsert) SetDescription ¶
func (u *GroupUpsert) SetDescription(v string) *GroupUpsert
SetDescription sets the "description" field.
func (*GroupUpsert) SetName ¶
func (u *GroupUpsert) SetName(v string) *GroupUpsert
SetName sets the "name" field.
func (*GroupUpsert) SetShortName ¶
func (u *GroupUpsert) SetShortName(v string) *GroupUpsert
SetShortName sets the "short_name" field.
func (*GroupUpsert) UpdateDescription ¶
func (u *GroupUpsert) UpdateDescription() *GroupUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*GroupUpsert) UpdateName ¶
func (u *GroupUpsert) UpdateName() *GroupUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*GroupUpsert) UpdateShortName ¶
func (u *GroupUpsert) UpdateShortName() *GroupUpsert
UpdateShortName sets the "short_name" field to the value that was provided on create.
type GroupUpsertBulk ¶
type GroupUpsertBulk struct {
// contains filtered or unexported fields
}
GroupUpsertBulk is the builder for "upsert"-ing a bulk of Group nodes.
func (*GroupUpsertBulk) DoNothing ¶
func (u *GroupUpsertBulk) DoNothing() *GroupUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupUpsertBulk) Exec ¶
func (u *GroupUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpsertBulk) ExecX ¶
func (u *GroupUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpsertBulk) Ignore ¶
func (u *GroupUpsertBulk) Ignore() *GroupUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupUpsertBulk) SetDescription ¶
func (u *GroupUpsertBulk) SetDescription(v string) *GroupUpsertBulk
SetDescription sets the "description" field.
func (*GroupUpsertBulk) SetName ¶
func (u *GroupUpsertBulk) SetName(v string) *GroupUpsertBulk
SetName sets the "name" field.
func (*GroupUpsertBulk) SetShortName ¶
func (u *GroupUpsertBulk) SetShortName(v string) *GroupUpsertBulk
SetShortName sets the "short_name" field.
func (*GroupUpsertBulk) Update ¶
func (u *GroupUpsertBulk) Update(set func(*GroupUpsert)) *GroupUpsertBulk
Update allows overriding fields `UPDATE` values. See the GroupCreateBulk.OnConflict documentation for more info.
func (*GroupUpsertBulk) UpdateDescription ¶
func (u *GroupUpsertBulk) UpdateDescription() *GroupUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*GroupUpsertBulk) UpdateName ¶
func (u *GroupUpsertBulk) UpdateName() *GroupUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*GroupUpsertBulk) UpdateNewValues ¶
func (u *GroupUpsertBulk) UpdateNewValues() *GroupUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Group.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*GroupUpsertBulk) UpdateShortName ¶
func (u *GroupUpsertBulk) UpdateShortName() *GroupUpsertBulk
UpdateShortName sets the "short_name" field to the value that was provided on create.
type GroupUpsertOne ¶
type GroupUpsertOne struct {
// contains filtered or unexported fields
}
GroupUpsertOne is the builder for "upsert"-ing
one Group node.
func (*GroupUpsertOne) DoNothing ¶
func (u *GroupUpsertOne) DoNothing() *GroupUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupUpsertOne) Exec ¶
func (u *GroupUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpsertOne) ExecX ¶
func (u *GroupUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpsertOne) ID ¶
func (u *GroupUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GroupUpsertOne) IDX ¶
func (u *GroupUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*GroupUpsertOne) Ignore ¶
func (u *GroupUpsertOne) Ignore() *GroupUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupUpsertOne) SetDescription ¶
func (u *GroupUpsertOne) SetDescription(v string) *GroupUpsertOne
SetDescription sets the "description" field.
func (*GroupUpsertOne) SetName ¶
func (u *GroupUpsertOne) SetName(v string) *GroupUpsertOne
SetName sets the "name" field.
func (*GroupUpsertOne) SetShortName ¶
func (u *GroupUpsertOne) SetShortName(v string) *GroupUpsertOne
SetShortName sets the "short_name" field.
func (*GroupUpsertOne) Update ¶
func (u *GroupUpsertOne) Update(set func(*GroupUpsert)) *GroupUpsertOne
Update allows overriding fields `UPDATE` values. See the GroupCreate.OnConflict documentation for more info.
func (*GroupUpsertOne) UpdateDescription ¶
func (u *GroupUpsertOne) UpdateDescription() *GroupUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*GroupUpsertOne) UpdateName ¶
func (u *GroupUpsertOne) UpdateName() *GroupUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*GroupUpsertOne) UpdateNewValues ¶
func (u *GroupUpsertOne) UpdateNewValues() *GroupUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Group.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*GroupUpsertOne) UpdateShortName ¶
func (u *GroupUpsertOne) UpdateShortName() *GroupUpsertOne
UpdateShortName sets the "short_name" field to the value that was provided on create.
type GroupUser ¶
type GroupUser struct { // ID of the group GroupID int `json:"group_id,omitempty"` // ID of the user UserID int `json:"user_id,omitempty"` // Role of the user Role group.Role `json:"role,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupUserQuery when eager-loading is set. Edges GroupUserEdges `json:"edges"` // contains filtered or unexported fields }
GroupUser is the model entity for the GroupUser schema.
func (*GroupUser) QueryGroup ¶
func (gu *GroupUser) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the GroupUser entity.
func (*GroupUser) Unwrap ¶
Unwrap unwraps the GroupUser 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 (*GroupUser) Update ¶
func (gu *GroupUser) Update() *GroupUserUpdateOne
Update returns a builder for updating this GroupUser. Note that you need to call GroupUser.Unwrap() before calling this method if this GroupUser was returned from a transaction, and the transaction was committed or rolled back.
type GroupUserClient ¶
type GroupUserClient struct {
// contains filtered or unexported fields
}
GroupUserClient is a client for the GroupUser schema.
func NewGroupUserClient ¶
func NewGroupUserClient(c config) *GroupUserClient
NewGroupUserClient returns a client for the GroupUser from the given config.
func (*GroupUserClient) Create ¶
func (c *GroupUserClient) Create() *GroupUserCreate
Create returns a builder for creating a GroupUser entity.
func (*GroupUserClient) CreateBulk ¶
func (c *GroupUserClient) CreateBulk(builders ...*GroupUserCreate) *GroupUserCreateBulk
CreateBulk returns a builder for creating a bulk of GroupUser entities.
func (*GroupUserClient) Delete ¶
func (c *GroupUserClient) Delete() *GroupUserDelete
Delete returns a delete builder for GroupUser.
func (*GroupUserClient) Hooks ¶
func (c *GroupUserClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroupUserClient) Intercept ¶
func (c *GroupUserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `groupuser.Intercept(f(g(h())))`.
func (*GroupUserClient) Interceptors ¶
func (c *GroupUserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroupUserClient) Query ¶
func (c *GroupUserClient) Query() *GroupUserQuery
Query returns a query builder for GroupUser.
func (*GroupUserClient) QueryGroup ¶
func (c *GroupUserClient) QueryGroup(gu *GroupUser) *GroupQuery
QueryGroup queries the group edge of a GroupUser.
func (*GroupUserClient) QueryUser ¶
func (c *GroupUserClient) QueryUser(gu *GroupUser) *UserQuery
QueryUser queries the user edge of a GroupUser.
func (*GroupUserClient) Update ¶
func (c *GroupUserClient) Update() *GroupUserUpdate
Update returns an update builder for GroupUser.
func (*GroupUserClient) UpdateOne ¶
func (c *GroupUserClient) UpdateOne(gu *GroupUser) *GroupUserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupUserClient) Use ¶
func (c *GroupUserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `groupuser.Hooks(f(g(h())))`.
type GroupUserCreate ¶
type GroupUserCreate struct {
// contains filtered or unexported fields
}
GroupUserCreate is the builder for creating a GroupUser entity.
func (*GroupUserCreate) Exec ¶
func (guc *GroupUserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUserCreate) ExecX ¶
func (guc *GroupUserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUserCreate) Mutation ¶
func (guc *GroupUserCreate) Mutation() *GroupUserMutation
Mutation returns the GroupUserMutation object of the builder.
func (*GroupUserCreate) OnConflict ¶
func (guc *GroupUserCreate) OnConflict(opts ...sql.ConflictOption) *GroupUserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GroupUser.Create(). SetGroupID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GroupUserUpsert) { SetGroupID(v+v). }). Exec(ctx)
func (*GroupUserCreate) OnConflictColumns ¶
func (guc *GroupUserCreate) OnConflictColumns(columns ...string) *GroupUserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GroupUser.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GroupUserCreate) Save ¶
func (guc *GroupUserCreate) Save(ctx context.Context) (*GroupUser, error)
Save creates the GroupUser in the database.
func (*GroupUserCreate) SaveX ¶
func (guc *GroupUserCreate) SaveX(ctx context.Context) *GroupUser
SaveX calls Save and panics if Save returns an error.
func (*GroupUserCreate) SetGroup ¶
func (guc *GroupUserCreate) SetGroup(g *Group) *GroupUserCreate
SetGroup sets the "group" edge to the Group entity.
func (*GroupUserCreate) SetGroupID ¶
func (guc *GroupUserCreate) SetGroupID(i int) *GroupUserCreate
SetGroupID sets the "group_id" field.
func (*GroupUserCreate) SetRole ¶
func (guc *GroupUserCreate) SetRole(gr group.Role) *GroupUserCreate
SetRole sets the "role" field.
func (*GroupUserCreate) SetUser ¶
func (guc *GroupUserCreate) SetUser(u *User) *GroupUserCreate
SetUser sets the "user" edge to the User entity.
func (*GroupUserCreate) SetUserID ¶
func (guc *GroupUserCreate) SetUserID(i int) *GroupUserCreate
SetUserID sets the "user_id" field.
type GroupUserCreateBulk ¶
type GroupUserCreateBulk struct {
// contains filtered or unexported fields
}
GroupUserCreateBulk is the builder for creating many GroupUser entities in bulk.
func (*GroupUserCreateBulk) Exec ¶
func (gucb *GroupUserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUserCreateBulk) ExecX ¶
func (gucb *GroupUserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUserCreateBulk) OnConflict ¶
func (gucb *GroupUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupUserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GroupUser.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GroupUserUpsert) { SetGroupID(v+v). }). Exec(ctx)
func (*GroupUserCreateBulk) OnConflictColumns ¶
func (gucb *GroupUserCreateBulk) OnConflictColumns(columns ...string) *GroupUserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GroupUser.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type GroupUserDelete ¶
type GroupUserDelete struct {
// contains filtered or unexported fields
}
GroupUserDelete is the builder for deleting a GroupUser entity.
func (*GroupUserDelete) Exec ¶
func (gud *GroupUserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupUserDelete) ExecX ¶
func (gud *GroupUserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupUserDelete) Where ¶
func (gud *GroupUserDelete) Where(ps ...predicate.GroupUser) *GroupUserDelete
Where appends a list predicates to the GroupUserDelete builder.
type GroupUserDeleteOne ¶
type GroupUserDeleteOne struct {
// contains filtered or unexported fields
}
GroupUserDeleteOne is the builder for deleting a single GroupUser entity.
func (*GroupUserDeleteOne) Exec ¶
func (gudo *GroupUserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupUserDeleteOne) ExecX ¶
func (gudo *GroupUserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUserDeleteOne) Where ¶
func (gudo *GroupUserDeleteOne) Where(ps ...predicate.GroupUser) *GroupUserDeleteOne
Where appends a list predicates to the GroupUserDelete builder.
type GroupUserEdges ¶
type GroupUserEdges struct { // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
GroupUserEdges holds the relations/edges for other nodes in the graph.
func (GroupUserEdges) GroupOrErr ¶
func (e GroupUserEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GroupUserEdges) UserOrErr ¶
func (e GroupUserEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GroupUserGroupBy ¶
type GroupUserGroupBy struct {
// contains filtered or unexported fields
}
GroupUserGroupBy is the group-by builder for GroupUser entities.
func (*GroupUserGroupBy) Aggregate ¶
func (gugb *GroupUserGroupBy) Aggregate(fns ...AggregateFunc) *GroupUserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupUserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupUserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupUserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupUserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupUserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupUserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupUserGroupBy) Scan ¶
func (gugb *GroupUserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupUserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupUserMutation ¶
type GroupUserMutation struct {
// contains filtered or unexported fields
}
GroupUserMutation represents an operation that mutates the GroupUser nodes in the graph.
func (*GroupUserMutation) AddField ¶
func (m *GroupUserMutation) 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 (*GroupUserMutation) AddedEdges ¶
func (m *GroupUserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupUserMutation) AddedField ¶
func (m *GroupUserMutation) 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 (*GroupUserMutation) AddedFields ¶
func (m *GroupUserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupUserMutation) AddedIDs ¶
func (m *GroupUserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupUserMutation) ClearEdge ¶
func (m *GroupUserMutation) 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 (*GroupUserMutation) ClearField ¶
func (m *GroupUserMutation) 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 (*GroupUserMutation) ClearGroup ¶
func (m *GroupUserMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*GroupUserMutation) ClearUser ¶
func (m *GroupUserMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*GroupUserMutation) ClearedEdges ¶
func (m *GroupUserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupUserMutation) ClearedFields ¶
func (m *GroupUserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupUserMutation) Client ¶
func (m GroupUserMutation) 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 (*GroupUserMutation) EdgeCleared ¶
func (m *GroupUserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupUserMutation) Field ¶
func (m *GroupUserMutation) 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 (*GroupUserMutation) FieldCleared ¶
func (m *GroupUserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupUserMutation) Fields ¶
func (m *GroupUserMutation) 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 (*GroupUserMutation) GroupCleared ¶
func (m *GroupUserMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*GroupUserMutation) GroupID ¶
func (m *GroupUserMutation) GroupID() (r int, exists bool)
GroupID returns the value of the "group_id" field in the mutation.
func (*GroupUserMutation) GroupIDs ¶
func (m *GroupUserMutation) GroupIDs() (ids []int)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*GroupUserMutation) 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 (*GroupUserMutation) RemovedEdges ¶
func (m *GroupUserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupUserMutation) RemovedIDs ¶
func (m *GroupUserMutation) 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 (*GroupUserMutation) ResetEdge ¶
func (m *GroupUserMutation) 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 (*GroupUserMutation) ResetField ¶
func (m *GroupUserMutation) 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 (*GroupUserMutation) ResetGroup ¶
func (m *GroupUserMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*GroupUserMutation) ResetGroupID ¶
func (m *GroupUserMutation) ResetGroupID()
ResetGroupID resets all changes to the "group_id" field.
func (*GroupUserMutation) ResetRole ¶
func (m *GroupUserMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*GroupUserMutation) ResetUser ¶
func (m *GroupUserMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*GroupUserMutation) ResetUserID ¶
func (m *GroupUserMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*GroupUserMutation) Role ¶
func (m *GroupUserMutation) Role() (r group.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*GroupUserMutation) SetField ¶
func (m *GroupUserMutation) 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 (*GroupUserMutation) SetGroupID ¶
func (m *GroupUserMutation) SetGroupID(i int)
SetGroupID sets the "group_id" field.
func (*GroupUserMutation) SetOp ¶
func (m *GroupUserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroupUserMutation) SetRole ¶
func (m *GroupUserMutation) SetRole(gr group.Role)
SetRole sets the "role" field.
func (*GroupUserMutation) SetUserID ¶
func (m *GroupUserMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (GroupUserMutation) Tx ¶
func (m GroupUserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupUserMutation) Type ¶
func (m *GroupUserMutation) Type() string
Type returns the node type of this mutation (GroupUser).
func (*GroupUserMutation) UserCleared ¶
func (m *GroupUserMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*GroupUserMutation) UserID ¶
func (m *GroupUserMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*GroupUserMutation) UserIDs ¶
func (m *GroupUserMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*GroupUserMutation) Where ¶
func (m *GroupUserMutation) Where(ps ...predicate.GroupUser)
Where appends a list predicates to the GroupUserMutation builder.
func (*GroupUserMutation) WhereP ¶
func (m *GroupUserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroupUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroupUserQuery ¶
type GroupUserQuery struct {
// contains filtered or unexported fields
}
GroupUserQuery is the builder for querying GroupUser entities.
func (*GroupUserQuery) Aggregate ¶
func (guq *GroupUserQuery) Aggregate(fns ...AggregateFunc) *GroupUserSelect
Aggregate returns a GroupUserSelect configured with the given aggregations.
func (*GroupUserQuery) All ¶
func (guq *GroupUserQuery) All(ctx context.Context) ([]*GroupUser, error)
All executes the query and returns a list of GroupUsers.
func (*GroupUserQuery) AllX ¶
func (guq *GroupUserQuery) AllX(ctx context.Context) []*GroupUser
AllX is like All, but panics if an error occurs.
func (*GroupUserQuery) Clone ¶
func (guq *GroupUserQuery) Clone() *GroupUserQuery
Clone returns a duplicate of the GroupUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupUserQuery) Count ¶
func (guq *GroupUserQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupUserQuery) CountX ¶
func (guq *GroupUserQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupUserQuery) Exist ¶
func (guq *GroupUserQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupUserQuery) ExistX ¶
func (guq *GroupUserQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupUserQuery) First ¶
func (guq *GroupUserQuery) First(ctx context.Context) (*GroupUser, error)
First returns the first GroupUser entity from the query. Returns a *NotFoundError when no GroupUser was found.
func (*GroupUserQuery) FirstX ¶
func (guq *GroupUserQuery) FirstX(ctx context.Context) *GroupUser
FirstX is like First, but panics if an error occurs.
func (*GroupUserQuery) GroupBy ¶
func (guq *GroupUserQuery) GroupBy(field string, fields ...string) *GroupUserGroupBy
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 { GroupID int `json:"group_id,omitempty"` Count int `json:"count,omitempty"` } client.GroupUser.Query(). GroupBy(groupuser.FieldGroupID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupUserQuery) Limit ¶
func (guq *GroupUserQuery) Limit(limit int) *GroupUserQuery
Limit the number of records to be returned by this query.
func (*GroupUserQuery) Offset ¶
func (guq *GroupUserQuery) Offset(offset int) *GroupUserQuery
Offset to start from.
func (*GroupUserQuery) Only ¶
func (guq *GroupUserQuery) Only(ctx context.Context) (*GroupUser, error)
Only returns a single GroupUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GroupUser entity is found. Returns a *NotFoundError when no GroupUser entities are found.
func (*GroupUserQuery) OnlyX ¶
func (guq *GroupUserQuery) OnlyX(ctx context.Context) *GroupUser
OnlyX is like Only, but panics if an error occurs.
func (*GroupUserQuery) Order ¶
func (guq *GroupUserQuery) Order(o ...groupuser.OrderOption) *GroupUserQuery
Order specifies how the records should be ordered.
func (*GroupUserQuery) QueryGroup ¶
func (guq *GroupUserQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*GroupUserQuery) QueryUser ¶
func (guq *GroupUserQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*GroupUserQuery) Select ¶
func (guq *GroupUserQuery) Select(fields ...string) *GroupUserSelect
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 { GroupID int `json:"group_id,omitempty"` } client.GroupUser.Query(). Select(groupuser.FieldGroupID). Scan(ctx, &v)
func (*GroupUserQuery) Unique ¶
func (guq *GroupUserQuery) Unique(unique bool) *GroupUserQuery
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 (*GroupUserQuery) Where ¶
func (guq *GroupUserQuery) Where(ps ...predicate.GroupUser) *GroupUserQuery
Where adds a new predicate for the GroupUserQuery builder.
func (*GroupUserQuery) WithGroup ¶
func (guq *GroupUserQuery) WithGroup(opts ...func(*GroupQuery)) *GroupUserQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupUserQuery) WithUser ¶
func (guq *GroupUserQuery) WithUser(opts ...func(*UserQuery)) *GroupUserQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type GroupUserSelect ¶
type GroupUserSelect struct { *GroupUserQuery // contains filtered or unexported fields }
GroupUserSelect is the builder for selecting fields of GroupUser entities.
func (*GroupUserSelect) Aggregate ¶
func (gus *GroupUserSelect) Aggregate(fns ...AggregateFunc) *GroupUserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroupUserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupUserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupUserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupUserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupUserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupUserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupUserSelect) Scan ¶
func (gus *GroupUserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupUserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupUserUpdate ¶
type GroupUserUpdate struct {
// contains filtered or unexported fields
}
GroupUserUpdate is the builder for updating GroupUser entities.
func (*GroupUserUpdate) ClearGroup ¶
func (guu *GroupUserUpdate) ClearGroup() *GroupUserUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*GroupUserUpdate) ClearUser ¶
func (guu *GroupUserUpdate) ClearUser() *GroupUserUpdate
ClearUser clears the "user" edge to the User entity.
func (*GroupUserUpdate) Exec ¶
func (guu *GroupUserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUserUpdate) ExecX ¶
func (guu *GroupUserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUserUpdate) Mutation ¶
func (guu *GroupUserUpdate) Mutation() *GroupUserMutation
Mutation returns the GroupUserMutation object of the builder.
func (*GroupUserUpdate) Save ¶
func (guu *GroupUserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupUserUpdate) SaveX ¶
func (guu *GroupUserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupUserUpdate) SetGroup ¶
func (guu *GroupUserUpdate) SetGroup(g *Group) *GroupUserUpdate
SetGroup sets the "group" edge to the Group entity.
func (*GroupUserUpdate) SetGroupID ¶
func (guu *GroupUserUpdate) SetGroupID(i int) *GroupUserUpdate
SetGroupID sets the "group_id" field.
func (*GroupUserUpdate) SetRole ¶
func (guu *GroupUserUpdate) SetRole(gr group.Role) *GroupUserUpdate
SetRole sets the "role" field.
func (*GroupUserUpdate) SetUser ¶
func (guu *GroupUserUpdate) SetUser(u *User) *GroupUserUpdate
SetUser sets the "user" edge to the User entity.
func (*GroupUserUpdate) SetUserID ¶
func (guu *GroupUserUpdate) SetUserID(i int) *GroupUserUpdate
SetUserID sets the "user_id" field.
func (*GroupUserUpdate) Where ¶
func (guu *GroupUserUpdate) Where(ps ...predicate.GroupUser) *GroupUserUpdate
Where appends a list predicates to the GroupUserUpdate builder.
type GroupUserUpdateOne ¶
type GroupUserUpdateOne struct {
// contains filtered or unexported fields
}
GroupUserUpdateOne is the builder for updating a single GroupUser entity.
func (*GroupUserUpdateOne) ClearGroup ¶
func (guuo *GroupUserUpdateOne) ClearGroup() *GroupUserUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*GroupUserUpdateOne) ClearUser ¶
func (guuo *GroupUserUpdateOne) ClearUser() *GroupUserUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*GroupUserUpdateOne) Exec ¶
func (guuo *GroupUserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupUserUpdateOne) ExecX ¶
func (guuo *GroupUserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUserUpdateOne) Mutation ¶
func (guuo *GroupUserUpdateOne) Mutation() *GroupUserMutation
Mutation returns the GroupUserMutation object of the builder.
func (*GroupUserUpdateOne) Save ¶
func (guuo *GroupUserUpdateOne) Save(ctx context.Context) (*GroupUser, error)
Save executes the query and returns the updated GroupUser entity.
func (*GroupUserUpdateOne) SaveX ¶
func (guuo *GroupUserUpdateOne) SaveX(ctx context.Context) *GroupUser
SaveX is like Save, but panics if an error occurs.
func (*GroupUserUpdateOne) Select ¶
func (guuo *GroupUserUpdateOne) Select(field string, fields ...string) *GroupUserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupUserUpdateOne) SetGroup ¶
func (guuo *GroupUserUpdateOne) SetGroup(g *Group) *GroupUserUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*GroupUserUpdateOne) SetGroupID ¶
func (guuo *GroupUserUpdateOne) SetGroupID(i int) *GroupUserUpdateOne
SetGroupID sets the "group_id" field.
func (*GroupUserUpdateOne) SetRole ¶
func (guuo *GroupUserUpdateOne) SetRole(gr group.Role) *GroupUserUpdateOne
SetRole sets the "role" field.
func (*GroupUserUpdateOne) SetUser ¶
func (guuo *GroupUserUpdateOne) SetUser(u *User) *GroupUserUpdateOne
SetUser sets the "user" edge to the User entity.
func (*GroupUserUpdateOne) SetUserID ¶
func (guuo *GroupUserUpdateOne) SetUserID(i int) *GroupUserUpdateOne
SetUserID sets the "user_id" field.
func (*GroupUserUpdateOne) Where ¶
func (guuo *GroupUserUpdateOne) Where(ps ...predicate.GroupUser) *GroupUserUpdateOne
Where appends a list predicates to the GroupUserUpdate builder.
type GroupUserUpsert ¶
GroupUserUpsert is the "OnConflict" setter.
func (*GroupUserUpsert) SetGroupID ¶
func (u *GroupUserUpsert) SetGroupID(v int) *GroupUserUpsert
SetGroupID sets the "group_id" field.
func (*GroupUserUpsert) SetRole ¶
func (u *GroupUserUpsert) SetRole(v group.Role) *GroupUserUpsert
SetRole sets the "role" field.
func (*GroupUserUpsert) SetUserID ¶
func (u *GroupUserUpsert) SetUserID(v int) *GroupUserUpsert
SetUserID sets the "user_id" field.
func (*GroupUserUpsert) UpdateGroupID ¶
func (u *GroupUserUpsert) UpdateGroupID() *GroupUserUpsert
UpdateGroupID sets the "group_id" field to the value that was provided on create.
func (*GroupUserUpsert) UpdateRole ¶
func (u *GroupUserUpsert) UpdateRole() *GroupUserUpsert
UpdateRole sets the "role" field to the value that was provided on create.
func (*GroupUserUpsert) UpdateUserID ¶
func (u *GroupUserUpsert) UpdateUserID() *GroupUserUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type GroupUserUpsertBulk ¶
type GroupUserUpsertBulk struct {
// contains filtered or unexported fields
}
GroupUserUpsertBulk is the builder for "upsert"-ing a bulk of GroupUser nodes.
func (*GroupUserUpsertBulk) DoNothing ¶
func (u *GroupUserUpsertBulk) DoNothing() *GroupUserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupUserUpsertBulk) Exec ¶
func (u *GroupUserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUserUpsertBulk) ExecX ¶
func (u *GroupUserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUserUpsertBulk) Ignore ¶
func (u *GroupUserUpsertBulk) Ignore() *GroupUserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GroupUser.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupUserUpsertBulk) SetGroupID ¶
func (u *GroupUserUpsertBulk) SetGroupID(v int) *GroupUserUpsertBulk
SetGroupID sets the "group_id" field.
func (*GroupUserUpsertBulk) SetRole ¶
func (u *GroupUserUpsertBulk) SetRole(v group.Role) *GroupUserUpsertBulk
SetRole sets the "role" field.
func (*GroupUserUpsertBulk) SetUserID ¶
func (u *GroupUserUpsertBulk) SetUserID(v int) *GroupUserUpsertBulk
SetUserID sets the "user_id" field.
func (*GroupUserUpsertBulk) Update ¶
func (u *GroupUserUpsertBulk) Update(set func(*GroupUserUpsert)) *GroupUserUpsertBulk
Update allows overriding fields `UPDATE` values. See the GroupUserCreateBulk.OnConflict documentation for more info.
func (*GroupUserUpsertBulk) UpdateGroupID ¶
func (u *GroupUserUpsertBulk) UpdateGroupID() *GroupUserUpsertBulk
UpdateGroupID sets the "group_id" field to the value that was provided on create.
func (*GroupUserUpsertBulk) UpdateNewValues ¶
func (u *GroupUserUpsertBulk) UpdateNewValues() *GroupUserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GroupUser.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*GroupUserUpsertBulk) UpdateRole ¶
func (u *GroupUserUpsertBulk) UpdateRole() *GroupUserUpsertBulk
UpdateRole sets the "role" field to the value that was provided on create.
func (*GroupUserUpsertBulk) UpdateUserID ¶
func (u *GroupUserUpsertBulk) UpdateUserID() *GroupUserUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type GroupUserUpsertOne ¶
type GroupUserUpsertOne struct {
// contains filtered or unexported fields
}
GroupUserUpsertOne is the builder for "upsert"-ing
one GroupUser node.
func (*GroupUserUpsertOne) DoNothing ¶
func (u *GroupUserUpsertOne) DoNothing() *GroupUserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupUserUpsertOne) Exec ¶
func (u *GroupUserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUserUpsertOne) ExecX ¶
func (u *GroupUserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUserUpsertOne) Ignore ¶
func (u *GroupUserUpsertOne) Ignore() *GroupUserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GroupUser.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupUserUpsertOne) SetGroupID ¶
func (u *GroupUserUpsertOne) SetGroupID(v int) *GroupUserUpsertOne
SetGroupID sets the "group_id" field.
func (*GroupUserUpsertOne) SetRole ¶
func (u *GroupUserUpsertOne) SetRole(v group.Role) *GroupUserUpsertOne
SetRole sets the "role" field.
func (*GroupUserUpsertOne) SetUserID ¶
func (u *GroupUserUpsertOne) SetUserID(v int) *GroupUserUpsertOne
SetUserID sets the "user_id" field.
func (*GroupUserUpsertOne) Update ¶
func (u *GroupUserUpsertOne) Update(set func(*GroupUserUpsert)) *GroupUserUpsertOne
Update allows overriding fields `UPDATE` values. See the GroupUserCreate.OnConflict documentation for more info.
func (*GroupUserUpsertOne) UpdateGroupID ¶
func (u *GroupUserUpsertOne) UpdateGroupID() *GroupUserUpsertOne
UpdateGroupID sets the "group_id" field to the value that was provided on create.
func (*GroupUserUpsertOne) UpdateNewValues ¶
func (u *GroupUserUpsertOne) UpdateNewValues() *GroupUserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GroupUser.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*GroupUserUpsertOne) UpdateRole ¶
func (u *GroupUserUpsertOne) UpdateRole() *GroupUserUpsertOne
UpdateRole sets the "role" field to the value that was provided on create.
func (*GroupUserUpsertOne) UpdateUserID ¶
func (u *GroupUserUpsertOne) UpdateUserID() *GroupUserUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type Institution ¶
type Institution struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the institution Name string `json:"name,omitempty"` // Short name of the institution (example: np) ShortName string `json:"short_name,omitempty"` // Description of the institution Description string `json:"Description,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InstitutionQuery when eager-loading is set. Edges InstitutionEdges `json:"edges"` // contains filtered or unexported fields }
Institution is the model entity for the Institution schema.
func (*Institution) QueryAccessories ¶
func (i *Institution) QueryAccessories() *AccessoryQuery
QueryAccessories queries the "accessories" edge of the Institution entity.
func (*Institution) QueryGroups ¶
func (i *Institution) QueryGroups() *GroupQuery
QueryGroups queries the "groups" edge of the Institution entity.
func (*Institution) QueryInvites ¶
func (i *Institution) QueryInvites() *InstitutionInviteLinkQuery
QueryInvites queries the "invites" edge of the Institution entity.
func (*Institution) QueryUsers ¶
func (i *Institution) QueryUsers() *UserQuery
QueryUsers queries the "users" edge of the Institution entity.
func (*Institution) QueryVouchers ¶
func (i *Institution) QueryVouchers() *VoucherQuery
QueryVouchers queries the "vouchers" edge of the Institution entity.
func (*Institution) String ¶
func (i *Institution) String() string
String implements the fmt.Stringer.
func (*Institution) Unwrap ¶
func (i *Institution) Unwrap() *Institution
Unwrap unwraps the Institution 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 (*Institution) Update ¶
func (i *Institution) Update() *InstitutionUpdateOne
Update returns a builder for updating this Institution. Note that you need to call Institution.Unwrap() before calling this method if this Institution was returned from a transaction, and the transaction was committed or rolled back.
type InstitutionClient ¶
type InstitutionClient struct {
// contains filtered or unexported fields
}
InstitutionClient is a client for the Institution schema.
func NewInstitutionClient ¶
func NewInstitutionClient(c config) *InstitutionClient
NewInstitutionClient returns a client for the Institution from the given config.
func (*InstitutionClient) Create ¶
func (c *InstitutionClient) Create() *InstitutionCreate
Create returns a builder for creating a Institution entity.
func (*InstitutionClient) CreateBulk ¶
func (c *InstitutionClient) CreateBulk(builders ...*InstitutionCreate) *InstitutionCreateBulk
CreateBulk returns a builder for creating a bulk of Institution entities.
func (*InstitutionClient) Delete ¶
func (c *InstitutionClient) Delete() *InstitutionDelete
Delete returns a delete builder for Institution.
func (*InstitutionClient) DeleteOne ¶
func (c *InstitutionClient) DeleteOne(i *Institution) *InstitutionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InstitutionClient) DeleteOneID ¶
func (c *InstitutionClient) DeleteOneID(id int) *InstitutionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InstitutionClient) Get ¶
func (c *InstitutionClient) Get(ctx context.Context, id int) (*Institution, error)
Get returns a Institution entity by its id.
func (*InstitutionClient) GetX ¶
func (c *InstitutionClient) GetX(ctx context.Context, id int) *Institution
GetX is like Get, but panics if an error occurs.
func (*InstitutionClient) Hooks ¶
func (c *InstitutionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InstitutionClient) Intercept ¶
func (c *InstitutionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `entinstitution.Intercept(f(g(h())))`.
func (*InstitutionClient) Interceptors ¶
func (c *InstitutionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*InstitutionClient) Query ¶
func (c *InstitutionClient) Query() *InstitutionQuery
Query returns a query builder for Institution.
func (*InstitutionClient) QueryAccessories ¶
func (c *InstitutionClient) QueryAccessories(i *Institution) *AccessoryQuery
QueryAccessories queries the accessories edge of a Institution.
func (*InstitutionClient) QueryGroups ¶
func (c *InstitutionClient) QueryGroups(i *Institution) *GroupQuery
QueryGroups queries the groups edge of a Institution.
func (*InstitutionClient) QueryInvites ¶
func (c *InstitutionClient) QueryInvites(i *Institution) *InstitutionInviteLinkQuery
QueryInvites queries the invites edge of a Institution.
func (*InstitutionClient) QueryUsers ¶
func (c *InstitutionClient) QueryUsers(i *Institution) *UserQuery
QueryUsers queries the users edge of a Institution.
func (*InstitutionClient) QueryVouchers ¶
func (c *InstitutionClient) QueryVouchers(i *Institution) *VoucherQuery
QueryVouchers queries the vouchers edge of a Institution.
func (*InstitutionClient) Update ¶
func (c *InstitutionClient) Update() *InstitutionUpdate
Update returns an update builder for Institution.
func (*InstitutionClient) UpdateOne ¶
func (c *InstitutionClient) UpdateOne(i *Institution) *InstitutionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InstitutionClient) UpdateOneID ¶
func (c *InstitutionClient) UpdateOneID(id int) *InstitutionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InstitutionClient) Use ¶
func (c *InstitutionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `entinstitution.Hooks(f(g(h())))`.
type InstitutionCreate ¶
type InstitutionCreate struct {
// contains filtered or unexported fields
}
InstitutionCreate is the builder for creating a Institution entity.
func (*InstitutionCreate) AddAccessories ¶
func (ic *InstitutionCreate) AddAccessories(a ...*Accessory) *InstitutionCreate
AddAccessories adds the "accessories" edges to the Accessory entity.
func (*InstitutionCreate) AddAccessoryIDs ¶
func (ic *InstitutionCreate) AddAccessoryIDs(ids ...int) *InstitutionCreate
AddAccessoryIDs adds the "accessories" edge to the Accessory entity by IDs.
func (*InstitutionCreate) AddGroupIDs ¶
func (ic *InstitutionCreate) AddGroupIDs(ids ...int) *InstitutionCreate
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*InstitutionCreate) AddGroups ¶
func (ic *InstitutionCreate) AddGroups(g ...*Group) *InstitutionCreate
AddGroups adds the "groups" edges to the Group entity.
func (*InstitutionCreate) AddInviteIDs ¶
func (ic *InstitutionCreate) AddInviteIDs(ids ...int) *InstitutionCreate
AddInviteIDs adds the "invites" edge to the InstitutionInviteLink entity by IDs.
func (*InstitutionCreate) AddInvites ¶
func (ic *InstitutionCreate) AddInvites(i ...*InstitutionInviteLink) *InstitutionCreate
AddInvites adds the "invites" edges to the InstitutionInviteLink entity.
func (*InstitutionCreate) AddUserIDs ¶
func (ic *InstitutionCreate) AddUserIDs(ids ...int) *InstitutionCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*InstitutionCreate) AddUsers ¶
func (ic *InstitutionCreate) AddUsers(u ...*User) *InstitutionCreate
AddUsers adds the "users" edges to the User entity.
func (*InstitutionCreate) AddVoucherIDs ¶
func (ic *InstitutionCreate) AddVoucherIDs(ids ...int) *InstitutionCreate
AddVoucherIDs adds the "vouchers" edge to the Voucher entity by IDs.
func (*InstitutionCreate) AddVouchers ¶
func (ic *InstitutionCreate) AddVouchers(v ...*Voucher) *InstitutionCreate
AddVouchers adds the "vouchers" edges to the Voucher entity.
func (*InstitutionCreate) Exec ¶
func (ic *InstitutionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InstitutionCreate) ExecX ¶
func (ic *InstitutionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionCreate) Mutation ¶
func (ic *InstitutionCreate) Mutation() *InstitutionMutation
Mutation returns the InstitutionMutation object of the builder.
func (*InstitutionCreate) OnConflict ¶
func (ic *InstitutionCreate) OnConflict(opts ...sql.ConflictOption) *InstitutionUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Institution.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.InstitutionUpsert) { SetName(v+v). }). Exec(ctx)
func (*InstitutionCreate) OnConflictColumns ¶
func (ic *InstitutionCreate) OnConflictColumns(columns ...string) *InstitutionUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Institution.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*InstitutionCreate) Save ¶
func (ic *InstitutionCreate) Save(ctx context.Context) (*Institution, error)
Save creates the Institution in the database.
func (*InstitutionCreate) SaveX ¶
func (ic *InstitutionCreate) SaveX(ctx context.Context) *Institution
SaveX calls Save and panics if Save returns an error.
func (*InstitutionCreate) SetDescription ¶
func (ic *InstitutionCreate) SetDescription(s string) *InstitutionCreate
SetDescription sets the "Description" field.
func (*InstitutionCreate) SetName ¶
func (ic *InstitutionCreate) SetName(s string) *InstitutionCreate
SetName sets the "name" field.
func (*InstitutionCreate) SetNillableDescription ¶
func (ic *InstitutionCreate) SetNillableDescription(s *string) *InstitutionCreate
SetNillableDescription sets the "Description" field if the given value is not nil.
func (*InstitutionCreate) SetShortName ¶
func (ic *InstitutionCreate) SetShortName(s string) *InstitutionCreate
SetShortName sets the "short_name" field.
type InstitutionCreateBulk ¶
type InstitutionCreateBulk struct {
// contains filtered or unexported fields
}
InstitutionCreateBulk is the builder for creating many Institution entities in bulk.
func (*InstitutionCreateBulk) Exec ¶
func (icb *InstitutionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InstitutionCreateBulk) ExecX ¶
func (icb *InstitutionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionCreateBulk) OnConflict ¶
func (icb *InstitutionCreateBulk) OnConflict(opts ...sql.ConflictOption) *InstitutionUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Institution.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.InstitutionUpsert) { SetName(v+v). }). Exec(ctx)
func (*InstitutionCreateBulk) OnConflictColumns ¶
func (icb *InstitutionCreateBulk) OnConflictColumns(columns ...string) *InstitutionUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Institution.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*InstitutionCreateBulk) Save ¶
func (icb *InstitutionCreateBulk) Save(ctx context.Context) ([]*Institution, error)
Save creates the Institution entities in the database.
func (*InstitutionCreateBulk) SaveX ¶
func (icb *InstitutionCreateBulk) SaveX(ctx context.Context) []*Institution
SaveX is like Save, but panics if an error occurs.
type InstitutionDelete ¶
type InstitutionDelete struct {
// contains filtered or unexported fields
}
InstitutionDelete is the builder for deleting a Institution entity.
func (*InstitutionDelete) Exec ¶
func (id *InstitutionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InstitutionDelete) ExecX ¶
func (id *InstitutionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionDelete) Where ¶
func (id *InstitutionDelete) Where(ps ...predicate.Institution) *InstitutionDelete
Where appends a list predicates to the InstitutionDelete builder.
type InstitutionDeleteOne ¶
type InstitutionDeleteOne struct {
// contains filtered or unexported fields
}
InstitutionDeleteOne is the builder for deleting a single Institution entity.
func (*InstitutionDeleteOne) Exec ¶
func (ido *InstitutionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InstitutionDeleteOne) ExecX ¶
func (ido *InstitutionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionDeleteOne) Where ¶
func (ido *InstitutionDeleteOne) Where(ps ...predicate.Institution) *InstitutionDeleteOne
Where appends a list predicates to the InstitutionDelete builder.
type InstitutionEdges ¶
type InstitutionEdges struct { // Prizes (vouchers) available to be redeemed by users of the institution Vouchers []*Voucher `json:"vouchers,omitempty"` // Prizes (accessories) available to be redeemed by users of the institution Accessories []*Accessory `json:"accessories,omitempty"` // Groups under the institution Groups []*Group `json:"groups,omitempty"` // Invite links for the institution Invites []*InstitutionInviteLink `json:"invites,omitempty"` // Users under the institution Users []*User `json:"users,omitempty"` // contains filtered or unexported fields }
InstitutionEdges holds the relations/edges for other nodes in the graph.
func (InstitutionEdges) AccessoriesOrErr ¶
func (e InstitutionEdges) AccessoriesOrErr() ([]*Accessory, error)
AccessoriesOrErr returns the Accessories value or an error if the edge was not loaded in eager-loading.
func (InstitutionEdges) GroupsOrErr ¶
func (e InstitutionEdges) GroupsOrErr() ([]*Group, error)
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.
func (InstitutionEdges) InvitesOrErr ¶
func (e InstitutionEdges) InvitesOrErr() ([]*InstitutionInviteLink, error)
InvitesOrErr returns the Invites value or an error if the edge was not loaded in eager-loading.
func (InstitutionEdges) UsersOrErr ¶
func (e InstitutionEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
func (InstitutionEdges) VouchersOrErr ¶
func (e InstitutionEdges) VouchersOrErr() ([]*Voucher, error)
VouchersOrErr returns the Vouchers value or an error if the edge was not loaded in eager-loading.
type InstitutionGroupBy ¶
type InstitutionGroupBy struct {
// contains filtered or unexported fields
}
InstitutionGroupBy is the group-by builder for Institution entities.
func (*InstitutionGroupBy) Aggregate ¶
func (igb *InstitutionGroupBy) Aggregate(fns ...AggregateFunc) *InstitutionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InstitutionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InstitutionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InstitutionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InstitutionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InstitutionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InstitutionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InstitutionGroupBy) Scan ¶
func (igb *InstitutionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InstitutionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InstitutionInviteLink ¶
type InstitutionInviteLink struct { // ID of the ent. ID int `json:"id,omitempty"` // Code used in the invite link Code string `json:"code,omitempty"` // Role granted in the invite Role institution.Role `json:"role,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the InstitutionInviteLinkQuery when eager-loading is set. Edges InstitutionInviteLinkEdges `json:"edges"` // contains filtered or unexported fields }
InstitutionInviteLink is the model entity for the InstitutionInviteLink schema.
func (*InstitutionInviteLink) QueryInstitution ¶
func (iil *InstitutionInviteLink) QueryInstitution() *InstitutionQuery
QueryInstitution queries the "institution" edge of the InstitutionInviteLink entity.
func (*InstitutionInviteLink) String ¶
func (iil *InstitutionInviteLink) String() string
String implements the fmt.Stringer.
func (*InstitutionInviteLink) Unwrap ¶
func (iil *InstitutionInviteLink) Unwrap() *InstitutionInviteLink
Unwrap unwraps the InstitutionInviteLink 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 (*InstitutionInviteLink) Update ¶
func (iil *InstitutionInviteLink) Update() *InstitutionInviteLinkUpdateOne
Update returns a builder for updating this InstitutionInviteLink. Note that you need to call InstitutionInviteLink.Unwrap() before calling this method if this InstitutionInviteLink was returned from a transaction, and the transaction was committed or rolled back.
type InstitutionInviteLinkClient ¶
type InstitutionInviteLinkClient struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkClient is a client for the InstitutionInviteLink schema.
func NewInstitutionInviteLinkClient ¶
func NewInstitutionInviteLinkClient(c config) *InstitutionInviteLinkClient
NewInstitutionInviteLinkClient returns a client for the InstitutionInviteLink from the given config.
func (*InstitutionInviteLinkClient) Create ¶
func (c *InstitutionInviteLinkClient) Create() *InstitutionInviteLinkCreate
Create returns a builder for creating a InstitutionInviteLink entity.
func (*InstitutionInviteLinkClient) CreateBulk ¶
func (c *InstitutionInviteLinkClient) CreateBulk(builders ...*InstitutionInviteLinkCreate) *InstitutionInviteLinkCreateBulk
CreateBulk returns a builder for creating a bulk of InstitutionInviteLink entities.
func (*InstitutionInviteLinkClient) Delete ¶
func (c *InstitutionInviteLinkClient) Delete() *InstitutionInviteLinkDelete
Delete returns a delete builder for InstitutionInviteLink.
func (*InstitutionInviteLinkClient) DeleteOne ¶
func (c *InstitutionInviteLinkClient) DeleteOne(iil *InstitutionInviteLink) *InstitutionInviteLinkDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*InstitutionInviteLinkClient) DeleteOneID ¶
func (c *InstitutionInviteLinkClient) DeleteOneID(id int) *InstitutionInviteLinkDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*InstitutionInviteLinkClient) Get ¶
func (c *InstitutionInviteLinkClient) Get(ctx context.Context, id int) (*InstitutionInviteLink, error)
Get returns a InstitutionInviteLink entity by its id.
func (*InstitutionInviteLinkClient) GetX ¶
func (c *InstitutionInviteLinkClient) GetX(ctx context.Context, id int) *InstitutionInviteLink
GetX is like Get, but panics if an error occurs.
func (*InstitutionInviteLinkClient) Hooks ¶
func (c *InstitutionInviteLinkClient) Hooks() []Hook
Hooks returns the client hooks.
func (*InstitutionInviteLinkClient) Intercept ¶
func (c *InstitutionInviteLinkClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `institutioninvitelink.Intercept(f(g(h())))`.
func (*InstitutionInviteLinkClient) Interceptors ¶
func (c *InstitutionInviteLinkClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*InstitutionInviteLinkClient) Query ¶
func (c *InstitutionInviteLinkClient) Query() *InstitutionInviteLinkQuery
Query returns a query builder for InstitutionInviteLink.
func (*InstitutionInviteLinkClient) QueryInstitution ¶
func (c *InstitutionInviteLinkClient) QueryInstitution(iil *InstitutionInviteLink) *InstitutionQuery
QueryInstitution queries the institution edge of a InstitutionInviteLink.
func (*InstitutionInviteLinkClient) Update ¶
func (c *InstitutionInviteLinkClient) Update() *InstitutionInviteLinkUpdate
Update returns an update builder for InstitutionInviteLink.
func (*InstitutionInviteLinkClient) UpdateOne ¶
func (c *InstitutionInviteLinkClient) UpdateOne(iil *InstitutionInviteLink) *InstitutionInviteLinkUpdateOne
UpdateOne returns an update builder for the given entity.
func (*InstitutionInviteLinkClient) UpdateOneID ¶
func (c *InstitutionInviteLinkClient) UpdateOneID(id int) *InstitutionInviteLinkUpdateOne
UpdateOneID returns an update builder for the given id.
func (*InstitutionInviteLinkClient) Use ¶
func (c *InstitutionInviteLinkClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `institutioninvitelink.Hooks(f(g(h())))`.
type InstitutionInviteLinkCreate ¶
type InstitutionInviteLinkCreate struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkCreate is the builder for creating a InstitutionInviteLink entity.
func (*InstitutionInviteLinkCreate) Exec ¶
func (iilc *InstitutionInviteLinkCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*InstitutionInviteLinkCreate) ExecX ¶
func (iilc *InstitutionInviteLinkCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionInviteLinkCreate) Mutation ¶
func (iilc *InstitutionInviteLinkCreate) Mutation() *InstitutionInviteLinkMutation
Mutation returns the InstitutionInviteLinkMutation object of the builder.
func (*InstitutionInviteLinkCreate) OnConflict ¶
func (iilc *InstitutionInviteLinkCreate) OnConflict(opts ...sql.ConflictOption) *InstitutionInviteLinkUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.InstitutionInviteLink.Create(). SetCode(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.InstitutionInviteLinkUpsert) { SetCode(v+v). }). Exec(ctx)
func (*InstitutionInviteLinkCreate) OnConflictColumns ¶
func (iilc *InstitutionInviteLinkCreate) OnConflictColumns(columns ...string) *InstitutionInviteLinkUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.InstitutionInviteLink.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*InstitutionInviteLinkCreate) Save ¶
func (iilc *InstitutionInviteLinkCreate) Save(ctx context.Context) (*InstitutionInviteLink, error)
Save creates the InstitutionInviteLink in the database.
func (*InstitutionInviteLinkCreate) SaveX ¶
func (iilc *InstitutionInviteLinkCreate) SaveX(ctx context.Context) *InstitutionInviteLink
SaveX calls Save and panics if Save returns an error.
func (*InstitutionInviteLinkCreate) SetCode ¶
func (iilc *InstitutionInviteLinkCreate) SetCode(s string) *InstitutionInviteLinkCreate
SetCode sets the "code" field.
func (*InstitutionInviteLinkCreate) SetInstitution ¶
func (iilc *InstitutionInviteLinkCreate) SetInstitution(i *Institution) *InstitutionInviteLinkCreate
SetInstitution sets the "institution" edge to the Institution entity.
func (*InstitutionInviteLinkCreate) SetInstitutionID ¶
func (iilc *InstitutionInviteLinkCreate) SetInstitutionID(id int) *InstitutionInviteLinkCreate
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*InstitutionInviteLinkCreate) SetRole ¶
func (iilc *InstitutionInviteLinkCreate) SetRole(i institution.Role) *InstitutionInviteLinkCreate
SetRole sets the "role" field.
type InstitutionInviteLinkCreateBulk ¶
type InstitutionInviteLinkCreateBulk struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkCreateBulk is the builder for creating many InstitutionInviteLink entities in bulk.
func (*InstitutionInviteLinkCreateBulk) Exec ¶
func (iilcb *InstitutionInviteLinkCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InstitutionInviteLinkCreateBulk) ExecX ¶
func (iilcb *InstitutionInviteLinkCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionInviteLinkCreateBulk) OnConflict ¶
func (iilcb *InstitutionInviteLinkCreateBulk) OnConflict(opts ...sql.ConflictOption) *InstitutionInviteLinkUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.InstitutionInviteLink.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.InstitutionInviteLinkUpsert) { SetCode(v+v). }). Exec(ctx)
func (*InstitutionInviteLinkCreateBulk) OnConflictColumns ¶
func (iilcb *InstitutionInviteLinkCreateBulk) OnConflictColumns(columns ...string) *InstitutionInviteLinkUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.InstitutionInviteLink.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*InstitutionInviteLinkCreateBulk) Save ¶
func (iilcb *InstitutionInviteLinkCreateBulk) Save(ctx context.Context) ([]*InstitutionInviteLink, error)
Save creates the InstitutionInviteLink entities in the database.
func (*InstitutionInviteLinkCreateBulk) SaveX ¶
func (iilcb *InstitutionInviteLinkCreateBulk) SaveX(ctx context.Context) []*InstitutionInviteLink
SaveX is like Save, but panics if an error occurs.
type InstitutionInviteLinkDelete ¶
type InstitutionInviteLinkDelete struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkDelete is the builder for deleting a InstitutionInviteLink entity.
func (*InstitutionInviteLinkDelete) Exec ¶
func (iild *InstitutionInviteLinkDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*InstitutionInviteLinkDelete) ExecX ¶
func (iild *InstitutionInviteLinkDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionInviteLinkDelete) Where ¶
func (iild *InstitutionInviteLinkDelete) Where(ps ...predicate.InstitutionInviteLink) *InstitutionInviteLinkDelete
Where appends a list predicates to the InstitutionInviteLinkDelete builder.
type InstitutionInviteLinkDeleteOne ¶
type InstitutionInviteLinkDeleteOne struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkDeleteOne is the builder for deleting a single InstitutionInviteLink entity.
func (*InstitutionInviteLinkDeleteOne) Exec ¶
func (iildo *InstitutionInviteLinkDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*InstitutionInviteLinkDeleteOne) ExecX ¶
func (iildo *InstitutionInviteLinkDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionInviteLinkDeleteOne) Where ¶
func (iildo *InstitutionInviteLinkDeleteOne) Where(ps ...predicate.InstitutionInviteLink) *InstitutionInviteLinkDeleteOne
Where appends a list predicates to the InstitutionInviteLinkDelete builder.
type InstitutionInviteLinkEdges ¶
type InstitutionInviteLinkEdges struct { // Institution holds the value of the institution edge. Institution *Institution `json:"institution,omitempty"` // contains filtered or unexported fields }
InstitutionInviteLinkEdges holds the relations/edges for other nodes in the graph.
func (InstitutionInviteLinkEdges) InstitutionOrErr ¶
func (e InstitutionInviteLinkEdges) InstitutionOrErr() (*Institution, error)
InstitutionOrErr returns the Institution value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type InstitutionInviteLinkGroupBy ¶
type InstitutionInviteLinkGroupBy struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkGroupBy is the group-by builder for InstitutionInviteLink entities.
func (*InstitutionInviteLinkGroupBy) Aggregate ¶
func (iilgb *InstitutionInviteLinkGroupBy) Aggregate(fns ...AggregateFunc) *InstitutionInviteLinkGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*InstitutionInviteLinkGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*InstitutionInviteLinkGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*InstitutionInviteLinkGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkGroupBy) Scan ¶
func (iilgb *InstitutionInviteLinkGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InstitutionInviteLinkGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkGroupBy) StringX ¶
StringX is like String, but panics if an error occurs.
type InstitutionInviteLinkMutation ¶
type InstitutionInviteLinkMutation struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkMutation represents an operation that mutates the InstitutionInviteLink nodes in the graph.
func (*InstitutionInviteLinkMutation) AddField ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) AddedEdges ¶
func (m *InstitutionInviteLinkMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InstitutionInviteLinkMutation) AddedField ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) AddedFields ¶
func (m *InstitutionInviteLinkMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InstitutionInviteLinkMutation) AddedIDs ¶
func (m *InstitutionInviteLinkMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InstitutionInviteLinkMutation) ClearEdge ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) ClearField ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) ClearInstitution ¶
func (m *InstitutionInviteLinkMutation) ClearInstitution()
ClearInstitution clears the "institution" edge to the Institution entity.
func (*InstitutionInviteLinkMutation) ClearedEdges ¶
func (m *InstitutionInviteLinkMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InstitutionInviteLinkMutation) ClearedFields ¶
func (m *InstitutionInviteLinkMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InstitutionInviteLinkMutation) Client ¶
func (m InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) Code ¶
func (m *InstitutionInviteLinkMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*InstitutionInviteLinkMutation) EdgeCleared ¶
func (m *InstitutionInviteLinkMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InstitutionInviteLinkMutation) Field ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) FieldCleared ¶
func (m *InstitutionInviteLinkMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InstitutionInviteLinkMutation) Fields ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) ID ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) IDs ¶
func (m *InstitutionInviteLinkMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*InstitutionInviteLinkMutation) InstitutionCleared ¶
func (m *InstitutionInviteLinkMutation) InstitutionCleared() bool
InstitutionCleared reports if the "institution" edge to the Institution entity was cleared.
func (*InstitutionInviteLinkMutation) InstitutionID ¶
func (m *InstitutionInviteLinkMutation) InstitutionID() (id int, exists bool)
InstitutionID returns the "institution" edge ID in the mutation.
func (*InstitutionInviteLinkMutation) InstitutionIDs ¶
func (m *InstitutionInviteLinkMutation) InstitutionIDs() (ids []int)
InstitutionIDs returns the "institution" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InstitutionID instead. It exists only for internal usage by the builders.
func (*InstitutionInviteLinkMutation) OldCode ¶
func (m *InstitutionInviteLinkMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the InstitutionInviteLink entity. If the InstitutionInviteLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*InstitutionInviteLinkMutation) OldField ¶
func (m *InstitutionInviteLinkMutation) OldField(ctx context.Context, name string) (ent.Value, error)
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 (*InstitutionInviteLinkMutation) OldRole ¶
func (m *InstitutionInviteLinkMutation) OldRole(ctx context.Context) (v institution.Role, err error)
OldRole returns the old "role" field's value of the InstitutionInviteLink entity. If the InstitutionInviteLink object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*InstitutionInviteLinkMutation) Op ¶
func (m *InstitutionInviteLinkMutation) Op() Op
Op returns the operation name.
func (*InstitutionInviteLinkMutation) RemovedEdges ¶
func (m *InstitutionInviteLinkMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InstitutionInviteLinkMutation) RemovedIDs ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) ResetCode ¶
func (m *InstitutionInviteLinkMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*InstitutionInviteLinkMutation) ResetEdge ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) ResetField ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) ResetInstitution ¶
func (m *InstitutionInviteLinkMutation) ResetInstitution()
ResetInstitution resets all changes to the "institution" edge.
func (*InstitutionInviteLinkMutation) ResetRole ¶
func (m *InstitutionInviteLinkMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*InstitutionInviteLinkMutation) Role ¶
func (m *InstitutionInviteLinkMutation) Role() (r institution.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*InstitutionInviteLinkMutation) SetCode ¶
func (m *InstitutionInviteLinkMutation) SetCode(s string)
SetCode sets the "code" field.
func (*InstitutionInviteLinkMutation) SetField ¶
func (m *InstitutionInviteLinkMutation) 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 (*InstitutionInviteLinkMutation) SetInstitutionID ¶
func (m *InstitutionInviteLinkMutation) SetInstitutionID(id int)
SetInstitutionID sets the "institution" edge to the Institution entity by id.
func (*InstitutionInviteLinkMutation) SetOp ¶
func (m *InstitutionInviteLinkMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*InstitutionInviteLinkMutation) SetRole ¶
func (m *InstitutionInviteLinkMutation) SetRole(i institution.Role)
SetRole sets the "role" field.
func (InstitutionInviteLinkMutation) Tx ¶
func (m InstitutionInviteLinkMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InstitutionInviteLinkMutation) Type ¶
func (m *InstitutionInviteLinkMutation) Type() string
Type returns the node type of this mutation (InstitutionInviteLink).
func (*InstitutionInviteLinkMutation) Where ¶
func (m *InstitutionInviteLinkMutation) Where(ps ...predicate.InstitutionInviteLink)
Where appends a list predicates to the InstitutionInviteLinkMutation builder.
func (*InstitutionInviteLinkMutation) WhereP ¶
func (m *InstitutionInviteLinkMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the InstitutionInviteLinkMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type InstitutionInviteLinkQuery ¶
type InstitutionInviteLinkQuery struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkQuery is the builder for querying InstitutionInviteLink entities.
func (*InstitutionInviteLinkQuery) Aggregate ¶
func (iilq *InstitutionInviteLinkQuery) Aggregate(fns ...AggregateFunc) *InstitutionInviteLinkSelect
Aggregate returns a InstitutionInviteLinkSelect configured with the given aggregations.
func (*InstitutionInviteLinkQuery) All ¶
func (iilq *InstitutionInviteLinkQuery) All(ctx context.Context) ([]*InstitutionInviteLink, error)
All executes the query and returns a list of InstitutionInviteLinks.
func (*InstitutionInviteLinkQuery) AllX ¶
func (iilq *InstitutionInviteLinkQuery) AllX(ctx context.Context) []*InstitutionInviteLink
AllX is like All, but panics if an error occurs.
func (*InstitutionInviteLinkQuery) Clone ¶
func (iilq *InstitutionInviteLinkQuery) Clone() *InstitutionInviteLinkQuery
Clone returns a duplicate of the InstitutionInviteLinkQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InstitutionInviteLinkQuery) Count ¶
func (iilq *InstitutionInviteLinkQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InstitutionInviteLinkQuery) CountX ¶
func (iilq *InstitutionInviteLinkQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InstitutionInviteLinkQuery) Exist ¶
func (iilq *InstitutionInviteLinkQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InstitutionInviteLinkQuery) ExistX ¶
func (iilq *InstitutionInviteLinkQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InstitutionInviteLinkQuery) First ¶
func (iilq *InstitutionInviteLinkQuery) First(ctx context.Context) (*InstitutionInviteLink, error)
First returns the first InstitutionInviteLink entity from the query. Returns a *NotFoundError when no InstitutionInviteLink was found.
func (*InstitutionInviteLinkQuery) FirstID ¶
func (iilq *InstitutionInviteLinkQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first InstitutionInviteLink ID from the query. Returns a *NotFoundError when no InstitutionInviteLink ID was found.
func (*InstitutionInviteLinkQuery) FirstIDX ¶
func (iilq *InstitutionInviteLinkQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*InstitutionInviteLinkQuery) FirstX ¶
func (iilq *InstitutionInviteLinkQuery) FirstX(ctx context.Context) *InstitutionInviteLink
FirstX is like First, but panics if an error occurs.
func (*InstitutionInviteLinkQuery) GroupBy ¶
func (iilq *InstitutionInviteLinkQuery) GroupBy(field string, fields ...string) *InstitutionInviteLinkGroupBy
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 { Code string `json:"code,omitempty"` Count int `json:"count,omitempty"` } client.InstitutionInviteLink.Query(). GroupBy(institutioninvitelink.FieldCode). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InstitutionInviteLinkQuery) IDs ¶
func (iilq *InstitutionInviteLinkQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of InstitutionInviteLink IDs.
func (*InstitutionInviteLinkQuery) IDsX ¶
func (iilq *InstitutionInviteLinkQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*InstitutionInviteLinkQuery) Limit ¶
func (iilq *InstitutionInviteLinkQuery) Limit(limit int) *InstitutionInviteLinkQuery
Limit the number of records to be returned by this query.
func (*InstitutionInviteLinkQuery) Offset ¶
func (iilq *InstitutionInviteLinkQuery) Offset(offset int) *InstitutionInviteLinkQuery
Offset to start from.
func (*InstitutionInviteLinkQuery) Only ¶
func (iilq *InstitutionInviteLinkQuery) Only(ctx context.Context) (*InstitutionInviteLink, error)
Only returns a single InstitutionInviteLink entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one InstitutionInviteLink entity is found. Returns a *NotFoundError when no InstitutionInviteLink entities are found.
func (*InstitutionInviteLinkQuery) OnlyID ¶
func (iilq *InstitutionInviteLinkQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only InstitutionInviteLink ID in the query. Returns a *NotSingularError when more than one InstitutionInviteLink ID is found. Returns a *NotFoundError when no entities are found.
func (*InstitutionInviteLinkQuery) OnlyIDX ¶
func (iilq *InstitutionInviteLinkQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InstitutionInviteLinkQuery) OnlyX ¶
func (iilq *InstitutionInviteLinkQuery) OnlyX(ctx context.Context) *InstitutionInviteLink
OnlyX is like Only, but panics if an error occurs.
func (*InstitutionInviteLinkQuery) Order ¶
func (iilq *InstitutionInviteLinkQuery) Order(o ...institutioninvitelink.OrderOption) *InstitutionInviteLinkQuery
Order specifies how the records should be ordered.
func (*InstitutionInviteLinkQuery) QueryInstitution ¶
func (iilq *InstitutionInviteLinkQuery) QueryInstitution() *InstitutionQuery
QueryInstitution chains the current query on the "institution" edge.
func (*InstitutionInviteLinkQuery) Select ¶
func (iilq *InstitutionInviteLinkQuery) Select(fields ...string) *InstitutionInviteLinkSelect
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 { Code string `json:"code,omitempty"` } client.InstitutionInviteLink.Query(). Select(institutioninvitelink.FieldCode). Scan(ctx, &v)
func (*InstitutionInviteLinkQuery) Unique ¶
func (iilq *InstitutionInviteLinkQuery) Unique(unique bool) *InstitutionInviteLinkQuery
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 (*InstitutionInviteLinkQuery) Where ¶
func (iilq *InstitutionInviteLinkQuery) Where(ps ...predicate.InstitutionInviteLink) *InstitutionInviteLinkQuery
Where adds a new predicate for the InstitutionInviteLinkQuery builder.
func (*InstitutionInviteLinkQuery) WithInstitution ¶
func (iilq *InstitutionInviteLinkQuery) WithInstitution(opts ...func(*InstitutionQuery)) *InstitutionInviteLinkQuery
WithInstitution tells the query-builder to eager-load the nodes that are connected to the "institution" edge. The optional arguments are used to configure the query builder of the edge.
type InstitutionInviteLinkSelect ¶
type InstitutionInviteLinkSelect struct { *InstitutionInviteLinkQuery // contains filtered or unexported fields }
InstitutionInviteLinkSelect is the builder for selecting fields of InstitutionInviteLink entities.
func (*InstitutionInviteLinkSelect) Aggregate ¶
func (iils *InstitutionInviteLinkSelect) Aggregate(fns ...AggregateFunc) *InstitutionInviteLinkSelect
Aggregate adds the given aggregation functions to the selector query.
func (*InstitutionInviteLinkSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*InstitutionInviteLinkSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*InstitutionInviteLinkSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkSelect) Scan ¶
func (iils *InstitutionInviteLinkSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InstitutionInviteLinkSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
func (*InstitutionInviteLinkSelect) StringX ¶
StringX is like String, but panics if an error occurs.
type InstitutionInviteLinkUpdate ¶
type InstitutionInviteLinkUpdate struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkUpdate is the builder for updating InstitutionInviteLink entities.
func (*InstitutionInviteLinkUpdate) ClearInstitution ¶
func (iilu *InstitutionInviteLinkUpdate) ClearInstitution() *InstitutionInviteLinkUpdate
ClearInstitution clears the "institution" edge to the Institution entity.
func (*InstitutionInviteLinkUpdate) Exec ¶
func (iilu *InstitutionInviteLinkUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InstitutionInviteLinkUpdate) ExecX ¶
func (iilu *InstitutionInviteLinkUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionInviteLinkUpdate) Mutation ¶
func (iilu *InstitutionInviteLinkUpdate) Mutation() *InstitutionInviteLinkMutation
Mutation returns the InstitutionInviteLinkMutation object of the builder.
func (*InstitutionInviteLinkUpdate) Save ¶
func (iilu *InstitutionInviteLinkUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InstitutionInviteLinkUpdate) SaveX ¶
func (iilu *InstitutionInviteLinkUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InstitutionInviteLinkUpdate) SetCode ¶
func (iilu *InstitutionInviteLinkUpdate) SetCode(s string) *InstitutionInviteLinkUpdate
SetCode sets the "code" field.
func (*InstitutionInviteLinkUpdate) SetInstitution ¶
func (iilu *InstitutionInviteLinkUpdate) SetInstitution(i *Institution) *InstitutionInviteLinkUpdate
SetInstitution sets the "institution" edge to the Institution entity.
func (*InstitutionInviteLinkUpdate) SetInstitutionID ¶
func (iilu *InstitutionInviteLinkUpdate) SetInstitutionID(id int) *InstitutionInviteLinkUpdate
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*InstitutionInviteLinkUpdate) SetRole ¶
func (iilu *InstitutionInviteLinkUpdate) SetRole(i institution.Role) *InstitutionInviteLinkUpdate
SetRole sets the "role" field.
func (*InstitutionInviteLinkUpdate) Where ¶
func (iilu *InstitutionInviteLinkUpdate) Where(ps ...predicate.InstitutionInviteLink) *InstitutionInviteLinkUpdate
Where appends a list predicates to the InstitutionInviteLinkUpdate builder.
type InstitutionInviteLinkUpdateOne ¶
type InstitutionInviteLinkUpdateOne struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkUpdateOne is the builder for updating a single InstitutionInviteLink entity.
func (*InstitutionInviteLinkUpdateOne) ClearInstitution ¶
func (iiluo *InstitutionInviteLinkUpdateOne) ClearInstitution() *InstitutionInviteLinkUpdateOne
ClearInstitution clears the "institution" edge to the Institution entity.
func (*InstitutionInviteLinkUpdateOne) Exec ¶
func (iiluo *InstitutionInviteLinkUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InstitutionInviteLinkUpdateOne) ExecX ¶
func (iiluo *InstitutionInviteLinkUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionInviteLinkUpdateOne) Mutation ¶
func (iiluo *InstitutionInviteLinkUpdateOne) Mutation() *InstitutionInviteLinkMutation
Mutation returns the InstitutionInviteLinkMutation object of the builder.
func (*InstitutionInviteLinkUpdateOne) Save ¶
func (iiluo *InstitutionInviteLinkUpdateOne) Save(ctx context.Context) (*InstitutionInviteLink, error)
Save executes the query and returns the updated InstitutionInviteLink entity.
func (*InstitutionInviteLinkUpdateOne) SaveX ¶
func (iiluo *InstitutionInviteLinkUpdateOne) SaveX(ctx context.Context) *InstitutionInviteLink
SaveX is like Save, but panics if an error occurs.
func (*InstitutionInviteLinkUpdateOne) Select ¶
func (iiluo *InstitutionInviteLinkUpdateOne) Select(field string, fields ...string) *InstitutionInviteLinkUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InstitutionInviteLinkUpdateOne) SetCode ¶
func (iiluo *InstitutionInviteLinkUpdateOne) SetCode(s string) *InstitutionInviteLinkUpdateOne
SetCode sets the "code" field.
func (*InstitutionInviteLinkUpdateOne) SetInstitution ¶
func (iiluo *InstitutionInviteLinkUpdateOne) SetInstitution(i *Institution) *InstitutionInviteLinkUpdateOne
SetInstitution sets the "institution" edge to the Institution entity.
func (*InstitutionInviteLinkUpdateOne) SetInstitutionID ¶
func (iiluo *InstitutionInviteLinkUpdateOne) SetInstitutionID(id int) *InstitutionInviteLinkUpdateOne
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*InstitutionInviteLinkUpdateOne) SetRole ¶
func (iiluo *InstitutionInviteLinkUpdateOne) SetRole(i institution.Role) *InstitutionInviteLinkUpdateOne
SetRole sets the "role" field.
func (*InstitutionInviteLinkUpdateOne) Where ¶
func (iiluo *InstitutionInviteLinkUpdateOne) Where(ps ...predicate.InstitutionInviteLink) *InstitutionInviteLinkUpdateOne
Where appends a list predicates to the InstitutionInviteLinkUpdate builder.
type InstitutionInviteLinkUpsert ¶
InstitutionInviteLinkUpsert is the "OnConflict" setter.
func (*InstitutionInviteLinkUpsert) SetCode ¶
func (u *InstitutionInviteLinkUpsert) SetCode(v string) *InstitutionInviteLinkUpsert
SetCode sets the "code" field.
func (*InstitutionInviteLinkUpsert) SetRole ¶
func (u *InstitutionInviteLinkUpsert) SetRole(v institution.Role) *InstitutionInviteLinkUpsert
SetRole sets the "role" field.
func (*InstitutionInviteLinkUpsert) UpdateCode ¶
func (u *InstitutionInviteLinkUpsert) UpdateCode() *InstitutionInviteLinkUpsert
UpdateCode sets the "code" field to the value that was provided on create.
func (*InstitutionInviteLinkUpsert) UpdateRole ¶
func (u *InstitutionInviteLinkUpsert) UpdateRole() *InstitutionInviteLinkUpsert
UpdateRole sets the "role" field to the value that was provided on create.
type InstitutionInviteLinkUpsertBulk ¶
type InstitutionInviteLinkUpsertBulk struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkUpsertBulk is the builder for "upsert"-ing a bulk of InstitutionInviteLink nodes.
func (*InstitutionInviteLinkUpsertBulk) DoNothing ¶
func (u *InstitutionInviteLinkUpsertBulk) DoNothing() *InstitutionInviteLinkUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*InstitutionInviteLinkUpsertBulk) Exec ¶
func (u *InstitutionInviteLinkUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InstitutionInviteLinkUpsertBulk) ExecX ¶
func (u *InstitutionInviteLinkUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionInviteLinkUpsertBulk) Ignore ¶
func (u *InstitutionInviteLinkUpsertBulk) Ignore() *InstitutionInviteLinkUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.InstitutionInviteLink.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*InstitutionInviteLinkUpsertBulk) SetCode ¶
func (u *InstitutionInviteLinkUpsertBulk) SetCode(v string) *InstitutionInviteLinkUpsertBulk
SetCode sets the "code" field.
func (*InstitutionInviteLinkUpsertBulk) SetRole ¶
func (u *InstitutionInviteLinkUpsertBulk) SetRole(v institution.Role) *InstitutionInviteLinkUpsertBulk
SetRole sets the "role" field.
func (*InstitutionInviteLinkUpsertBulk) Update ¶
func (u *InstitutionInviteLinkUpsertBulk) Update(set func(*InstitutionInviteLinkUpsert)) *InstitutionInviteLinkUpsertBulk
Update allows overriding fields `UPDATE` values. See the InstitutionInviteLinkCreateBulk.OnConflict documentation for more info.
func (*InstitutionInviteLinkUpsertBulk) UpdateCode ¶
func (u *InstitutionInviteLinkUpsertBulk) UpdateCode() *InstitutionInviteLinkUpsertBulk
UpdateCode sets the "code" field to the value that was provided on create.
func (*InstitutionInviteLinkUpsertBulk) UpdateNewValues ¶
func (u *InstitutionInviteLinkUpsertBulk) UpdateNewValues() *InstitutionInviteLinkUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.InstitutionInviteLink.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*InstitutionInviteLinkUpsertBulk) UpdateRole ¶
func (u *InstitutionInviteLinkUpsertBulk) UpdateRole() *InstitutionInviteLinkUpsertBulk
UpdateRole sets the "role" field to the value that was provided on create.
type InstitutionInviteLinkUpsertOne ¶
type InstitutionInviteLinkUpsertOne struct {
// contains filtered or unexported fields
}
InstitutionInviteLinkUpsertOne is the builder for "upsert"-ing
one InstitutionInviteLink node.
func (*InstitutionInviteLinkUpsertOne) DoNothing ¶
func (u *InstitutionInviteLinkUpsertOne) DoNothing() *InstitutionInviteLinkUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*InstitutionInviteLinkUpsertOne) Exec ¶
func (u *InstitutionInviteLinkUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*InstitutionInviteLinkUpsertOne) ExecX ¶
func (u *InstitutionInviteLinkUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionInviteLinkUpsertOne) ID ¶
func (u *InstitutionInviteLinkUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*InstitutionInviteLinkUpsertOne) IDX ¶
func (u *InstitutionInviteLinkUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*InstitutionInviteLinkUpsertOne) Ignore ¶
func (u *InstitutionInviteLinkUpsertOne) Ignore() *InstitutionInviteLinkUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.InstitutionInviteLink.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*InstitutionInviteLinkUpsertOne) SetCode ¶
func (u *InstitutionInviteLinkUpsertOne) SetCode(v string) *InstitutionInviteLinkUpsertOne
SetCode sets the "code" field.
func (*InstitutionInviteLinkUpsertOne) SetRole ¶
func (u *InstitutionInviteLinkUpsertOne) SetRole(v institution.Role) *InstitutionInviteLinkUpsertOne
SetRole sets the "role" field.
func (*InstitutionInviteLinkUpsertOne) Update ¶
func (u *InstitutionInviteLinkUpsertOne) Update(set func(*InstitutionInviteLinkUpsert)) *InstitutionInviteLinkUpsertOne
Update allows overriding fields `UPDATE` values. See the InstitutionInviteLinkCreate.OnConflict documentation for more info.
func (*InstitutionInviteLinkUpsertOne) UpdateCode ¶
func (u *InstitutionInviteLinkUpsertOne) UpdateCode() *InstitutionInviteLinkUpsertOne
UpdateCode sets the "code" field to the value that was provided on create.
func (*InstitutionInviteLinkUpsertOne) UpdateNewValues ¶
func (u *InstitutionInviteLinkUpsertOne) UpdateNewValues() *InstitutionInviteLinkUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.InstitutionInviteLink.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*InstitutionInviteLinkUpsertOne) UpdateRole ¶
func (u *InstitutionInviteLinkUpsertOne) UpdateRole() *InstitutionInviteLinkUpsertOne
UpdateRole sets the "role" field to the value that was provided on create.
type InstitutionInviteLinks ¶
type InstitutionInviteLinks []*InstitutionInviteLink
InstitutionInviteLinks is a parsable slice of InstitutionInviteLink.
type InstitutionMutation ¶
type InstitutionMutation struct {
// contains filtered or unexported fields
}
InstitutionMutation represents an operation that mutates the Institution nodes in the graph.
func (*InstitutionMutation) AccessoriesCleared ¶
func (m *InstitutionMutation) AccessoriesCleared() bool
AccessoriesCleared reports if the "accessories" edge to the Accessory entity was cleared.
func (*InstitutionMutation) AccessoriesIDs ¶
func (m *InstitutionMutation) AccessoriesIDs() (ids []int)
AccessoriesIDs returns the "accessories" edge IDs in the mutation.
func (*InstitutionMutation) AddAccessoryIDs ¶
func (m *InstitutionMutation) AddAccessoryIDs(ids ...int)
AddAccessoryIDs adds the "accessories" edge to the Accessory entity by ids.
func (*InstitutionMutation) AddField ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) AddGroupIDs ¶
func (m *InstitutionMutation) AddGroupIDs(ids ...int)
AddGroupIDs adds the "groups" edge to the Group entity by ids.
func (*InstitutionMutation) AddInviteIDs ¶
func (m *InstitutionMutation) AddInviteIDs(ids ...int)
AddInviteIDs adds the "invites" edge to the InstitutionInviteLink entity by ids.
func (*InstitutionMutation) AddUserIDs ¶
func (m *InstitutionMutation) AddUserIDs(ids ...int)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*InstitutionMutation) AddVoucherIDs ¶
func (m *InstitutionMutation) AddVoucherIDs(ids ...int)
AddVoucherIDs adds the "vouchers" edge to the Voucher entity by ids.
func (*InstitutionMutation) AddedEdges ¶
func (m *InstitutionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*InstitutionMutation) AddedField ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) AddedFields ¶
func (m *InstitutionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*InstitutionMutation) AddedIDs ¶
func (m *InstitutionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*InstitutionMutation) ClearAccessories ¶
func (m *InstitutionMutation) ClearAccessories()
ClearAccessories clears the "accessories" edge to the Accessory entity.
func (*InstitutionMutation) ClearEdge ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) ClearField ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) ClearGroups ¶
func (m *InstitutionMutation) ClearGroups()
ClearGroups clears the "groups" edge to the Group entity.
func (*InstitutionMutation) ClearInvites ¶
func (m *InstitutionMutation) ClearInvites()
ClearInvites clears the "invites" edge to the InstitutionInviteLink entity.
func (*InstitutionMutation) ClearUsers ¶
func (m *InstitutionMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*InstitutionMutation) ClearVouchers ¶
func (m *InstitutionMutation) ClearVouchers()
ClearVouchers clears the "vouchers" edge to the Voucher entity.
func (*InstitutionMutation) ClearedEdges ¶
func (m *InstitutionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*InstitutionMutation) ClearedFields ¶
func (m *InstitutionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (InstitutionMutation) Client ¶
func (m InstitutionMutation) 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 (*InstitutionMutation) Description ¶
func (m *InstitutionMutation) Description() (r string, exists bool)
Description returns the value of the "Description" field in the mutation.
func (*InstitutionMutation) EdgeCleared ¶
func (m *InstitutionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*InstitutionMutation) Field ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) FieldCleared ¶
func (m *InstitutionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*InstitutionMutation) Fields ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) GroupsCleared ¶
func (m *InstitutionMutation) GroupsCleared() bool
GroupsCleared reports if the "groups" edge to the Group entity was cleared.
func (*InstitutionMutation) GroupsIDs ¶
func (m *InstitutionMutation) GroupsIDs() (ids []int)
GroupsIDs returns the "groups" edge IDs in the mutation.
func (*InstitutionMutation) ID ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) IDs ¶
func (m *InstitutionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*InstitutionMutation) InvitesCleared ¶
func (m *InstitutionMutation) InvitesCleared() bool
InvitesCleared reports if the "invites" edge to the InstitutionInviteLink entity was cleared.
func (*InstitutionMutation) InvitesIDs ¶
func (m *InstitutionMutation) InvitesIDs() (ids []int)
InvitesIDs returns the "invites" edge IDs in the mutation.
func (*InstitutionMutation) Name ¶
func (m *InstitutionMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*InstitutionMutation) OldDescription ¶
func (m *InstitutionMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "Description" field's value of the Institution entity. If the Institution object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*InstitutionMutation) 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 (*InstitutionMutation) OldName ¶
func (m *InstitutionMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Institution entity. If the Institution object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*InstitutionMutation) OldShortName ¶
func (m *InstitutionMutation) OldShortName(ctx context.Context) (v string, err error)
OldShortName returns the old "short_name" field's value of the Institution entity. If the Institution object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*InstitutionMutation) Op ¶
func (m *InstitutionMutation) Op() Op
Op returns the operation name.
func (*InstitutionMutation) RemoveAccessoryIDs ¶
func (m *InstitutionMutation) RemoveAccessoryIDs(ids ...int)
RemoveAccessoryIDs removes the "accessories" edge to the Accessory entity by IDs.
func (*InstitutionMutation) RemoveGroupIDs ¶
func (m *InstitutionMutation) RemoveGroupIDs(ids ...int)
RemoveGroupIDs removes the "groups" edge to the Group entity by IDs.
func (*InstitutionMutation) RemoveInviteIDs ¶
func (m *InstitutionMutation) RemoveInviteIDs(ids ...int)
RemoveInviteIDs removes the "invites" edge to the InstitutionInviteLink entity by IDs.
func (*InstitutionMutation) RemoveUserIDs ¶
func (m *InstitutionMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*InstitutionMutation) RemoveVoucherIDs ¶
func (m *InstitutionMutation) RemoveVoucherIDs(ids ...int)
RemoveVoucherIDs removes the "vouchers" edge to the Voucher entity by IDs.
func (*InstitutionMutation) RemovedAccessoriesIDs ¶
func (m *InstitutionMutation) RemovedAccessoriesIDs() (ids []int)
RemovedAccessories returns the removed IDs of the "accessories" edge to the Accessory entity.
func (*InstitutionMutation) RemovedEdges ¶
func (m *InstitutionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*InstitutionMutation) RemovedGroupsIDs ¶
func (m *InstitutionMutation) RemovedGroupsIDs() (ids []int)
RemovedGroups returns the removed IDs of the "groups" edge to the Group entity.
func (*InstitutionMutation) RemovedIDs ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) RemovedInvitesIDs ¶
func (m *InstitutionMutation) RemovedInvitesIDs() (ids []int)
RemovedInvites returns the removed IDs of the "invites" edge to the InstitutionInviteLink entity.
func (*InstitutionMutation) RemovedUsersIDs ¶
func (m *InstitutionMutation) RemovedUsersIDs() (ids []int)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*InstitutionMutation) RemovedVouchersIDs ¶
func (m *InstitutionMutation) RemovedVouchersIDs() (ids []int)
RemovedVouchers returns the removed IDs of the "vouchers" edge to the Voucher entity.
func (*InstitutionMutation) ResetAccessories ¶
func (m *InstitutionMutation) ResetAccessories()
ResetAccessories resets all changes to the "accessories" edge.
func (*InstitutionMutation) ResetDescription ¶
func (m *InstitutionMutation) ResetDescription()
ResetDescription resets all changes to the "Description" field.
func (*InstitutionMutation) ResetEdge ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) ResetField ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) ResetGroups ¶
func (m *InstitutionMutation) ResetGroups()
ResetGroups resets all changes to the "groups" edge.
func (*InstitutionMutation) ResetInvites ¶
func (m *InstitutionMutation) ResetInvites()
ResetInvites resets all changes to the "invites" edge.
func (*InstitutionMutation) ResetName ¶
func (m *InstitutionMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*InstitutionMutation) ResetShortName ¶
func (m *InstitutionMutation) ResetShortName()
ResetShortName resets all changes to the "short_name" field.
func (*InstitutionMutation) ResetUsers ¶
func (m *InstitutionMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*InstitutionMutation) ResetVouchers ¶
func (m *InstitutionMutation) ResetVouchers()
ResetVouchers resets all changes to the "vouchers" edge.
func (*InstitutionMutation) SetDescription ¶
func (m *InstitutionMutation) SetDescription(s string)
SetDescription sets the "Description" field.
func (*InstitutionMutation) SetField ¶
func (m *InstitutionMutation) 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 (*InstitutionMutation) SetName ¶
func (m *InstitutionMutation) SetName(s string)
SetName sets the "name" field.
func (*InstitutionMutation) SetOp ¶
func (m *InstitutionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*InstitutionMutation) SetShortName ¶
func (m *InstitutionMutation) SetShortName(s string)
SetShortName sets the "short_name" field.
func (*InstitutionMutation) ShortName ¶
func (m *InstitutionMutation) ShortName() (r string, exists bool)
ShortName returns the value of the "short_name" field in the mutation.
func (InstitutionMutation) Tx ¶
func (m InstitutionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*InstitutionMutation) Type ¶
func (m *InstitutionMutation) Type() string
Type returns the node type of this mutation (Institution).
func (*InstitutionMutation) UsersCleared ¶
func (m *InstitutionMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*InstitutionMutation) UsersIDs ¶
func (m *InstitutionMutation) UsersIDs() (ids []int)
UsersIDs returns the "users" edge IDs in the mutation.
func (*InstitutionMutation) VouchersCleared ¶
func (m *InstitutionMutation) VouchersCleared() bool
VouchersCleared reports if the "vouchers" edge to the Voucher entity was cleared.
func (*InstitutionMutation) VouchersIDs ¶
func (m *InstitutionMutation) VouchersIDs() (ids []int)
VouchersIDs returns the "vouchers" edge IDs in the mutation.
func (*InstitutionMutation) Where ¶
func (m *InstitutionMutation) Where(ps ...predicate.Institution)
Where appends a list predicates to the InstitutionMutation builder.
func (*InstitutionMutation) WhereP ¶
func (m *InstitutionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the InstitutionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type InstitutionQuery ¶
type InstitutionQuery struct {
// contains filtered or unexported fields
}
InstitutionQuery is the builder for querying Institution entities.
func (*InstitutionQuery) Aggregate ¶
func (iq *InstitutionQuery) Aggregate(fns ...AggregateFunc) *InstitutionSelect
Aggregate returns a InstitutionSelect configured with the given aggregations.
func (*InstitutionQuery) All ¶
func (iq *InstitutionQuery) All(ctx context.Context) ([]*Institution, error)
All executes the query and returns a list of Institutions.
func (*InstitutionQuery) AllX ¶
func (iq *InstitutionQuery) AllX(ctx context.Context) []*Institution
AllX is like All, but panics if an error occurs.
func (*InstitutionQuery) Clone ¶
func (iq *InstitutionQuery) Clone() *InstitutionQuery
Clone returns a duplicate of the InstitutionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*InstitutionQuery) Count ¶
func (iq *InstitutionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*InstitutionQuery) CountX ¶
func (iq *InstitutionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*InstitutionQuery) Exist ¶
func (iq *InstitutionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*InstitutionQuery) ExistX ¶
func (iq *InstitutionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*InstitutionQuery) First ¶
func (iq *InstitutionQuery) First(ctx context.Context) (*Institution, error)
First returns the first Institution entity from the query. Returns a *NotFoundError when no Institution was found.
func (*InstitutionQuery) FirstID ¶
func (iq *InstitutionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Institution ID from the query. Returns a *NotFoundError when no Institution ID was found.
func (*InstitutionQuery) FirstIDX ¶
func (iq *InstitutionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*InstitutionQuery) FirstX ¶
func (iq *InstitutionQuery) FirstX(ctx context.Context) *Institution
FirstX is like First, but panics if an error occurs.
func (*InstitutionQuery) GroupBy ¶
func (iq *InstitutionQuery) GroupBy(field string, fields ...string) *InstitutionGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Institution.Query(). GroupBy(entinstitution.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*InstitutionQuery) IDs ¶
func (iq *InstitutionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Institution IDs.
func (*InstitutionQuery) IDsX ¶
func (iq *InstitutionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*InstitutionQuery) Limit ¶
func (iq *InstitutionQuery) Limit(limit int) *InstitutionQuery
Limit the number of records to be returned by this query.
func (*InstitutionQuery) Offset ¶
func (iq *InstitutionQuery) Offset(offset int) *InstitutionQuery
Offset to start from.
func (*InstitutionQuery) Only ¶
func (iq *InstitutionQuery) Only(ctx context.Context) (*Institution, error)
Only returns a single Institution entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Institution entity is found. Returns a *NotFoundError when no Institution entities are found.
func (*InstitutionQuery) OnlyID ¶
func (iq *InstitutionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Institution ID in the query. Returns a *NotSingularError when more than one Institution ID is found. Returns a *NotFoundError when no entities are found.
func (*InstitutionQuery) OnlyIDX ¶
func (iq *InstitutionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*InstitutionQuery) OnlyX ¶
func (iq *InstitutionQuery) OnlyX(ctx context.Context) *Institution
OnlyX is like Only, but panics if an error occurs.
func (*InstitutionQuery) Order ¶
func (iq *InstitutionQuery) Order(o ...entinstitution.OrderOption) *InstitutionQuery
Order specifies how the records should be ordered.
func (*InstitutionQuery) QueryAccessories ¶
func (iq *InstitutionQuery) QueryAccessories() *AccessoryQuery
QueryAccessories chains the current query on the "accessories" edge.
func (*InstitutionQuery) QueryGroups ¶
func (iq *InstitutionQuery) QueryGroups() *GroupQuery
QueryGroups chains the current query on the "groups" edge.
func (*InstitutionQuery) QueryInvites ¶
func (iq *InstitutionQuery) QueryInvites() *InstitutionInviteLinkQuery
QueryInvites chains the current query on the "invites" edge.
func (*InstitutionQuery) QueryUsers ¶
func (iq *InstitutionQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*InstitutionQuery) QueryVouchers ¶
func (iq *InstitutionQuery) QueryVouchers() *VoucherQuery
QueryVouchers chains the current query on the "vouchers" edge.
func (*InstitutionQuery) Select ¶
func (iq *InstitutionQuery) Select(fields ...string) *InstitutionSelect
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 { Name string `json:"name,omitempty"` } client.Institution.Query(). Select(entinstitution.FieldName). Scan(ctx, &v)
func (*InstitutionQuery) Unique ¶
func (iq *InstitutionQuery) Unique(unique bool) *InstitutionQuery
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 (*InstitutionQuery) Where ¶
func (iq *InstitutionQuery) Where(ps ...predicate.Institution) *InstitutionQuery
Where adds a new predicate for the InstitutionQuery builder.
func (*InstitutionQuery) WithAccessories ¶
func (iq *InstitutionQuery) WithAccessories(opts ...func(*AccessoryQuery)) *InstitutionQuery
WithAccessories tells the query-builder to eager-load the nodes that are connected to the "accessories" edge. The optional arguments are used to configure the query builder of the edge.
func (*InstitutionQuery) WithGroups ¶
func (iq *InstitutionQuery) WithGroups(opts ...func(*GroupQuery)) *InstitutionQuery
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.
func (*InstitutionQuery) WithInvites ¶
func (iq *InstitutionQuery) WithInvites(opts ...func(*InstitutionInviteLinkQuery)) *InstitutionQuery
WithInvites tells the query-builder to eager-load the nodes that are connected to the "invites" edge. The optional arguments are used to configure the query builder of the edge.
func (*InstitutionQuery) WithUsers ¶
func (iq *InstitutionQuery) WithUsers(opts ...func(*UserQuery)) *InstitutionQuery
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.
func (*InstitutionQuery) WithVouchers ¶
func (iq *InstitutionQuery) WithVouchers(opts ...func(*VoucherQuery)) *InstitutionQuery
WithVouchers tells the query-builder to eager-load the nodes that are connected to the "vouchers" edge. The optional arguments are used to configure the query builder of the edge.
type InstitutionSelect ¶
type InstitutionSelect struct { *InstitutionQuery // contains filtered or unexported fields }
InstitutionSelect is the builder for selecting fields of Institution entities.
func (*InstitutionSelect) Aggregate ¶
func (is *InstitutionSelect) Aggregate(fns ...AggregateFunc) *InstitutionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*InstitutionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*InstitutionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*InstitutionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*InstitutionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*InstitutionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*InstitutionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*InstitutionSelect) Scan ¶
func (is *InstitutionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*InstitutionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type InstitutionUpdate ¶
type InstitutionUpdate struct {
// contains filtered or unexported fields
}
InstitutionUpdate is the builder for updating Institution entities.
func (*InstitutionUpdate) AddAccessories ¶
func (iu *InstitutionUpdate) AddAccessories(a ...*Accessory) *InstitutionUpdate
AddAccessories adds the "accessories" edges to the Accessory entity.
func (*InstitutionUpdate) AddAccessoryIDs ¶
func (iu *InstitutionUpdate) AddAccessoryIDs(ids ...int) *InstitutionUpdate
AddAccessoryIDs adds the "accessories" edge to the Accessory entity by IDs.
func (*InstitutionUpdate) AddGroupIDs ¶
func (iu *InstitutionUpdate) AddGroupIDs(ids ...int) *InstitutionUpdate
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*InstitutionUpdate) AddGroups ¶
func (iu *InstitutionUpdate) AddGroups(g ...*Group) *InstitutionUpdate
AddGroups adds the "groups" edges to the Group entity.
func (*InstitutionUpdate) AddInviteIDs ¶
func (iu *InstitutionUpdate) AddInviteIDs(ids ...int) *InstitutionUpdate
AddInviteIDs adds the "invites" edge to the InstitutionInviteLink entity by IDs.
func (*InstitutionUpdate) AddInvites ¶
func (iu *InstitutionUpdate) AddInvites(i ...*InstitutionInviteLink) *InstitutionUpdate
AddInvites adds the "invites" edges to the InstitutionInviteLink entity.
func (*InstitutionUpdate) AddUserIDs ¶
func (iu *InstitutionUpdate) AddUserIDs(ids ...int) *InstitutionUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*InstitutionUpdate) AddUsers ¶
func (iu *InstitutionUpdate) AddUsers(u ...*User) *InstitutionUpdate
AddUsers adds the "users" edges to the User entity.
func (*InstitutionUpdate) AddVoucherIDs ¶
func (iu *InstitutionUpdate) AddVoucherIDs(ids ...int) *InstitutionUpdate
AddVoucherIDs adds the "vouchers" edge to the Voucher entity by IDs.
func (*InstitutionUpdate) AddVouchers ¶
func (iu *InstitutionUpdate) AddVouchers(v ...*Voucher) *InstitutionUpdate
AddVouchers adds the "vouchers" edges to the Voucher entity.
func (*InstitutionUpdate) ClearAccessories ¶
func (iu *InstitutionUpdate) ClearAccessories() *InstitutionUpdate
ClearAccessories clears all "accessories" edges to the Accessory entity.
func (*InstitutionUpdate) ClearGroups ¶
func (iu *InstitutionUpdate) ClearGroups() *InstitutionUpdate
ClearGroups clears all "groups" edges to the Group entity.
func (*InstitutionUpdate) ClearInvites ¶
func (iu *InstitutionUpdate) ClearInvites() *InstitutionUpdate
ClearInvites clears all "invites" edges to the InstitutionInviteLink entity.
func (*InstitutionUpdate) ClearUsers ¶
func (iu *InstitutionUpdate) ClearUsers() *InstitutionUpdate
ClearUsers clears all "users" edges to the User entity.
func (*InstitutionUpdate) ClearVouchers ¶
func (iu *InstitutionUpdate) ClearVouchers() *InstitutionUpdate
ClearVouchers clears all "vouchers" edges to the Voucher entity.
func (*InstitutionUpdate) Exec ¶
func (iu *InstitutionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*InstitutionUpdate) ExecX ¶
func (iu *InstitutionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionUpdate) Mutation ¶
func (iu *InstitutionUpdate) Mutation() *InstitutionMutation
Mutation returns the InstitutionMutation object of the builder.
func (*InstitutionUpdate) RemoveAccessories ¶
func (iu *InstitutionUpdate) RemoveAccessories(a ...*Accessory) *InstitutionUpdate
RemoveAccessories removes "accessories" edges to Accessory entities.
func (*InstitutionUpdate) RemoveAccessoryIDs ¶
func (iu *InstitutionUpdate) RemoveAccessoryIDs(ids ...int) *InstitutionUpdate
RemoveAccessoryIDs removes the "accessories" edge to Accessory entities by IDs.
func (*InstitutionUpdate) RemoveGroupIDs ¶
func (iu *InstitutionUpdate) RemoveGroupIDs(ids ...int) *InstitutionUpdate
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*InstitutionUpdate) RemoveGroups ¶
func (iu *InstitutionUpdate) RemoveGroups(g ...*Group) *InstitutionUpdate
RemoveGroups removes "groups" edges to Group entities.
func (*InstitutionUpdate) RemoveInviteIDs ¶
func (iu *InstitutionUpdate) RemoveInviteIDs(ids ...int) *InstitutionUpdate
RemoveInviteIDs removes the "invites" edge to InstitutionInviteLink entities by IDs.
func (*InstitutionUpdate) RemoveInvites ¶
func (iu *InstitutionUpdate) RemoveInvites(i ...*InstitutionInviteLink) *InstitutionUpdate
RemoveInvites removes "invites" edges to InstitutionInviteLink entities.
func (*InstitutionUpdate) RemoveUserIDs ¶
func (iu *InstitutionUpdate) RemoveUserIDs(ids ...int) *InstitutionUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*InstitutionUpdate) RemoveUsers ¶
func (iu *InstitutionUpdate) RemoveUsers(u ...*User) *InstitutionUpdate
RemoveUsers removes "users" edges to User entities.
func (*InstitutionUpdate) RemoveVoucherIDs ¶
func (iu *InstitutionUpdate) RemoveVoucherIDs(ids ...int) *InstitutionUpdate
RemoveVoucherIDs removes the "vouchers" edge to Voucher entities by IDs.
func (*InstitutionUpdate) RemoveVouchers ¶
func (iu *InstitutionUpdate) RemoveVouchers(v ...*Voucher) *InstitutionUpdate
RemoveVouchers removes "vouchers" edges to Voucher entities.
func (*InstitutionUpdate) Save ¶
func (iu *InstitutionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*InstitutionUpdate) SaveX ¶
func (iu *InstitutionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*InstitutionUpdate) SetDescription ¶
func (iu *InstitutionUpdate) SetDescription(s string) *InstitutionUpdate
SetDescription sets the "Description" field.
func (*InstitutionUpdate) SetName ¶
func (iu *InstitutionUpdate) SetName(s string) *InstitutionUpdate
SetName sets the "name" field.
func (*InstitutionUpdate) SetNillableDescription ¶
func (iu *InstitutionUpdate) SetNillableDescription(s *string) *InstitutionUpdate
SetNillableDescription sets the "Description" field if the given value is not nil.
func (*InstitutionUpdate) SetShortName ¶
func (iu *InstitutionUpdate) SetShortName(s string) *InstitutionUpdate
SetShortName sets the "short_name" field.
func (*InstitutionUpdate) Where ¶
func (iu *InstitutionUpdate) Where(ps ...predicate.Institution) *InstitutionUpdate
Where appends a list predicates to the InstitutionUpdate builder.
type InstitutionUpdateOne ¶
type InstitutionUpdateOne struct {
// contains filtered or unexported fields
}
InstitutionUpdateOne is the builder for updating a single Institution entity.
func (*InstitutionUpdateOne) AddAccessories ¶
func (iuo *InstitutionUpdateOne) AddAccessories(a ...*Accessory) *InstitutionUpdateOne
AddAccessories adds the "accessories" edges to the Accessory entity.
func (*InstitutionUpdateOne) AddAccessoryIDs ¶
func (iuo *InstitutionUpdateOne) AddAccessoryIDs(ids ...int) *InstitutionUpdateOne
AddAccessoryIDs adds the "accessories" edge to the Accessory entity by IDs.
func (*InstitutionUpdateOne) AddGroupIDs ¶
func (iuo *InstitutionUpdateOne) AddGroupIDs(ids ...int) *InstitutionUpdateOne
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*InstitutionUpdateOne) AddGroups ¶
func (iuo *InstitutionUpdateOne) AddGroups(g ...*Group) *InstitutionUpdateOne
AddGroups adds the "groups" edges to the Group entity.
func (*InstitutionUpdateOne) AddInviteIDs ¶
func (iuo *InstitutionUpdateOne) AddInviteIDs(ids ...int) *InstitutionUpdateOne
AddInviteIDs adds the "invites" edge to the InstitutionInviteLink entity by IDs.
func (*InstitutionUpdateOne) AddInvites ¶
func (iuo *InstitutionUpdateOne) AddInvites(i ...*InstitutionInviteLink) *InstitutionUpdateOne
AddInvites adds the "invites" edges to the InstitutionInviteLink entity.
func (*InstitutionUpdateOne) AddUserIDs ¶
func (iuo *InstitutionUpdateOne) AddUserIDs(ids ...int) *InstitutionUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*InstitutionUpdateOne) AddUsers ¶
func (iuo *InstitutionUpdateOne) AddUsers(u ...*User) *InstitutionUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*InstitutionUpdateOne) AddVoucherIDs ¶
func (iuo *InstitutionUpdateOne) AddVoucherIDs(ids ...int) *InstitutionUpdateOne
AddVoucherIDs adds the "vouchers" edge to the Voucher entity by IDs.
func (*InstitutionUpdateOne) AddVouchers ¶
func (iuo *InstitutionUpdateOne) AddVouchers(v ...*Voucher) *InstitutionUpdateOne
AddVouchers adds the "vouchers" edges to the Voucher entity.
func (*InstitutionUpdateOne) ClearAccessories ¶
func (iuo *InstitutionUpdateOne) ClearAccessories() *InstitutionUpdateOne
ClearAccessories clears all "accessories" edges to the Accessory entity.
func (*InstitutionUpdateOne) ClearGroups ¶
func (iuo *InstitutionUpdateOne) ClearGroups() *InstitutionUpdateOne
ClearGroups clears all "groups" edges to the Group entity.
func (*InstitutionUpdateOne) ClearInvites ¶
func (iuo *InstitutionUpdateOne) ClearInvites() *InstitutionUpdateOne
ClearInvites clears all "invites" edges to the InstitutionInviteLink entity.
func (*InstitutionUpdateOne) ClearUsers ¶
func (iuo *InstitutionUpdateOne) ClearUsers() *InstitutionUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*InstitutionUpdateOne) ClearVouchers ¶
func (iuo *InstitutionUpdateOne) ClearVouchers() *InstitutionUpdateOne
ClearVouchers clears all "vouchers" edges to the Voucher entity.
func (*InstitutionUpdateOne) Exec ¶
func (iuo *InstitutionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*InstitutionUpdateOne) ExecX ¶
func (iuo *InstitutionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionUpdateOne) Mutation ¶
func (iuo *InstitutionUpdateOne) Mutation() *InstitutionMutation
Mutation returns the InstitutionMutation object of the builder.
func (*InstitutionUpdateOne) RemoveAccessories ¶
func (iuo *InstitutionUpdateOne) RemoveAccessories(a ...*Accessory) *InstitutionUpdateOne
RemoveAccessories removes "accessories" edges to Accessory entities.
func (*InstitutionUpdateOne) RemoveAccessoryIDs ¶
func (iuo *InstitutionUpdateOne) RemoveAccessoryIDs(ids ...int) *InstitutionUpdateOne
RemoveAccessoryIDs removes the "accessories" edge to Accessory entities by IDs.
func (*InstitutionUpdateOne) RemoveGroupIDs ¶
func (iuo *InstitutionUpdateOne) RemoveGroupIDs(ids ...int) *InstitutionUpdateOne
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*InstitutionUpdateOne) RemoveGroups ¶
func (iuo *InstitutionUpdateOne) RemoveGroups(g ...*Group) *InstitutionUpdateOne
RemoveGroups removes "groups" edges to Group entities.
func (*InstitutionUpdateOne) RemoveInviteIDs ¶
func (iuo *InstitutionUpdateOne) RemoveInviteIDs(ids ...int) *InstitutionUpdateOne
RemoveInviteIDs removes the "invites" edge to InstitutionInviteLink entities by IDs.
func (*InstitutionUpdateOne) RemoveInvites ¶
func (iuo *InstitutionUpdateOne) RemoveInvites(i ...*InstitutionInviteLink) *InstitutionUpdateOne
RemoveInvites removes "invites" edges to InstitutionInviteLink entities.
func (*InstitutionUpdateOne) RemoveUserIDs ¶
func (iuo *InstitutionUpdateOne) RemoveUserIDs(ids ...int) *InstitutionUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*InstitutionUpdateOne) RemoveUsers ¶
func (iuo *InstitutionUpdateOne) RemoveUsers(u ...*User) *InstitutionUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*InstitutionUpdateOne) RemoveVoucherIDs ¶
func (iuo *InstitutionUpdateOne) RemoveVoucherIDs(ids ...int) *InstitutionUpdateOne
RemoveVoucherIDs removes the "vouchers" edge to Voucher entities by IDs.
func (*InstitutionUpdateOne) RemoveVouchers ¶
func (iuo *InstitutionUpdateOne) RemoveVouchers(v ...*Voucher) *InstitutionUpdateOne
RemoveVouchers removes "vouchers" edges to Voucher entities.
func (*InstitutionUpdateOne) Save ¶
func (iuo *InstitutionUpdateOne) Save(ctx context.Context) (*Institution, error)
Save executes the query and returns the updated Institution entity.
func (*InstitutionUpdateOne) SaveX ¶
func (iuo *InstitutionUpdateOne) SaveX(ctx context.Context) *Institution
SaveX is like Save, but panics if an error occurs.
func (*InstitutionUpdateOne) Select ¶
func (iuo *InstitutionUpdateOne) Select(field string, fields ...string) *InstitutionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*InstitutionUpdateOne) SetDescription ¶
func (iuo *InstitutionUpdateOne) SetDescription(s string) *InstitutionUpdateOne
SetDescription sets the "Description" field.
func (*InstitutionUpdateOne) SetName ¶
func (iuo *InstitutionUpdateOne) SetName(s string) *InstitutionUpdateOne
SetName sets the "name" field.
func (*InstitutionUpdateOne) SetNillableDescription ¶
func (iuo *InstitutionUpdateOne) SetNillableDescription(s *string) *InstitutionUpdateOne
SetNillableDescription sets the "Description" field if the given value is not nil.
func (*InstitutionUpdateOne) SetShortName ¶
func (iuo *InstitutionUpdateOne) SetShortName(s string) *InstitutionUpdateOne
SetShortName sets the "short_name" field.
func (*InstitutionUpdateOne) Where ¶
func (iuo *InstitutionUpdateOne) Where(ps ...predicate.Institution) *InstitutionUpdateOne
Where appends a list predicates to the InstitutionUpdate builder.
type InstitutionUpsert ¶
InstitutionUpsert is the "OnConflict" setter.
func (*InstitutionUpsert) SetDescription ¶
func (u *InstitutionUpsert) SetDescription(v string) *InstitutionUpsert
SetDescription sets the "Description" field.
func (*InstitutionUpsert) SetName ¶
func (u *InstitutionUpsert) SetName(v string) *InstitutionUpsert
SetName sets the "name" field.
func (*InstitutionUpsert) SetShortName ¶
func (u *InstitutionUpsert) SetShortName(v string) *InstitutionUpsert
SetShortName sets the "short_name" field.
func (*InstitutionUpsert) UpdateDescription ¶
func (u *InstitutionUpsert) UpdateDescription() *InstitutionUpsert
UpdateDescription sets the "Description" field to the value that was provided on create.
func (*InstitutionUpsert) UpdateName ¶
func (u *InstitutionUpsert) UpdateName() *InstitutionUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*InstitutionUpsert) UpdateShortName ¶
func (u *InstitutionUpsert) UpdateShortName() *InstitutionUpsert
UpdateShortName sets the "short_name" field to the value that was provided on create.
type InstitutionUpsertBulk ¶
type InstitutionUpsertBulk struct {
// contains filtered or unexported fields
}
InstitutionUpsertBulk is the builder for "upsert"-ing a bulk of Institution nodes.
func (*InstitutionUpsertBulk) DoNothing ¶
func (u *InstitutionUpsertBulk) DoNothing() *InstitutionUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*InstitutionUpsertBulk) Exec ¶
func (u *InstitutionUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*InstitutionUpsertBulk) ExecX ¶
func (u *InstitutionUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionUpsertBulk) Ignore ¶
func (u *InstitutionUpsertBulk) Ignore() *InstitutionUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Institution.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*InstitutionUpsertBulk) SetDescription ¶
func (u *InstitutionUpsertBulk) SetDescription(v string) *InstitutionUpsertBulk
SetDescription sets the "Description" field.
func (*InstitutionUpsertBulk) SetName ¶
func (u *InstitutionUpsertBulk) SetName(v string) *InstitutionUpsertBulk
SetName sets the "name" field.
func (*InstitutionUpsertBulk) SetShortName ¶
func (u *InstitutionUpsertBulk) SetShortName(v string) *InstitutionUpsertBulk
SetShortName sets the "short_name" field.
func (*InstitutionUpsertBulk) Update ¶
func (u *InstitutionUpsertBulk) Update(set func(*InstitutionUpsert)) *InstitutionUpsertBulk
Update allows overriding fields `UPDATE` values. See the InstitutionCreateBulk.OnConflict documentation for more info.
func (*InstitutionUpsertBulk) UpdateDescription ¶
func (u *InstitutionUpsertBulk) UpdateDescription() *InstitutionUpsertBulk
UpdateDescription sets the "Description" field to the value that was provided on create.
func (*InstitutionUpsertBulk) UpdateName ¶
func (u *InstitutionUpsertBulk) UpdateName() *InstitutionUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*InstitutionUpsertBulk) UpdateNewValues ¶
func (u *InstitutionUpsertBulk) UpdateNewValues() *InstitutionUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Institution.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*InstitutionUpsertBulk) UpdateShortName ¶
func (u *InstitutionUpsertBulk) UpdateShortName() *InstitutionUpsertBulk
UpdateShortName sets the "short_name" field to the value that was provided on create.
type InstitutionUpsertOne ¶
type InstitutionUpsertOne struct {
// contains filtered or unexported fields
}
InstitutionUpsertOne is the builder for "upsert"-ing
one Institution node.
func (*InstitutionUpsertOne) DoNothing ¶
func (u *InstitutionUpsertOne) DoNothing() *InstitutionUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*InstitutionUpsertOne) Exec ¶
func (u *InstitutionUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*InstitutionUpsertOne) ExecX ¶
func (u *InstitutionUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*InstitutionUpsertOne) ID ¶
func (u *InstitutionUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*InstitutionUpsertOne) IDX ¶
func (u *InstitutionUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*InstitutionUpsertOne) Ignore ¶
func (u *InstitutionUpsertOne) Ignore() *InstitutionUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Institution.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*InstitutionUpsertOne) SetDescription ¶
func (u *InstitutionUpsertOne) SetDescription(v string) *InstitutionUpsertOne
SetDescription sets the "Description" field.
func (*InstitutionUpsertOne) SetName ¶
func (u *InstitutionUpsertOne) SetName(v string) *InstitutionUpsertOne
SetName sets the "name" field.
func (*InstitutionUpsertOne) SetShortName ¶
func (u *InstitutionUpsertOne) SetShortName(v string) *InstitutionUpsertOne
SetShortName sets the "short_name" field.
func (*InstitutionUpsertOne) Update ¶
func (u *InstitutionUpsertOne) Update(set func(*InstitutionUpsert)) *InstitutionUpsertOne
Update allows overriding fields `UPDATE` values. See the InstitutionCreate.OnConflict documentation for more info.
func (*InstitutionUpsertOne) UpdateDescription ¶
func (u *InstitutionUpsertOne) UpdateDescription() *InstitutionUpsertOne
UpdateDescription sets the "Description" field to the value that was provided on create.
func (*InstitutionUpsertOne) UpdateName ¶
func (u *InstitutionUpsertOne) UpdateName() *InstitutionUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*InstitutionUpsertOne) UpdateNewValues ¶
func (u *InstitutionUpsertOne) UpdateNewValues() *InstitutionUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Institution.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*InstitutionUpsertOne) UpdateShortName ¶
func (u *InstitutionUpsertOne) UpdateShortName() *InstitutionUpsertOne
UpdateShortName sets the "short_name" field to the value that was provided on create.
type Institutions ¶
type Institutions []*Institution
Institutions is a parsable slice of Institution.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type JWTRevocation ¶
type JWTRevocation struct { // ID of the ent. ID int `json:"id,omitempty"` // ID of the revoked JWT Jti string `json:"jti,omitempty"` // Expiry of the JWT. // The revocation can be deleted after the expiry has passed Expiry time.Time `json:"expiry,omitempty"` // contains filtered or unexported fields }
JWTRevocation is the model entity for the JWTRevocation schema.
func (*JWTRevocation) String ¶
func (jr *JWTRevocation) String() string
String implements the fmt.Stringer.
func (*JWTRevocation) Unwrap ¶
func (jr *JWTRevocation) Unwrap() *JWTRevocation
Unwrap unwraps the JWTRevocation 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 (*JWTRevocation) Update ¶
func (jr *JWTRevocation) Update() *JWTRevocationUpdateOne
Update returns a builder for updating this JWTRevocation. Note that you need to call JWTRevocation.Unwrap() before calling this method if this JWTRevocation was returned from a transaction, and the transaction was committed or rolled back.
type JWTRevocationClient ¶
type JWTRevocationClient struct {
// contains filtered or unexported fields
}
JWTRevocationClient is a client for the JWTRevocation schema.
func NewJWTRevocationClient ¶
func NewJWTRevocationClient(c config) *JWTRevocationClient
NewJWTRevocationClient returns a client for the JWTRevocation from the given config.
func (*JWTRevocationClient) Create ¶
func (c *JWTRevocationClient) Create() *JWTRevocationCreate
Create returns a builder for creating a JWTRevocation entity.
func (*JWTRevocationClient) CreateBulk ¶
func (c *JWTRevocationClient) CreateBulk(builders ...*JWTRevocationCreate) *JWTRevocationCreateBulk
CreateBulk returns a builder for creating a bulk of JWTRevocation entities.
func (*JWTRevocationClient) Delete ¶
func (c *JWTRevocationClient) Delete() *JWTRevocationDelete
Delete returns a delete builder for JWTRevocation.
func (*JWTRevocationClient) DeleteOne ¶
func (c *JWTRevocationClient) DeleteOne(jr *JWTRevocation) *JWTRevocationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*JWTRevocationClient) DeleteOneID ¶
func (c *JWTRevocationClient) DeleteOneID(id int) *JWTRevocationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*JWTRevocationClient) Get ¶
func (c *JWTRevocationClient) Get(ctx context.Context, id int) (*JWTRevocation, error)
Get returns a JWTRevocation entity by its id.
func (*JWTRevocationClient) GetX ¶
func (c *JWTRevocationClient) GetX(ctx context.Context, id int) *JWTRevocation
GetX is like Get, but panics if an error occurs.
func (*JWTRevocationClient) Hooks ¶
func (c *JWTRevocationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*JWTRevocationClient) Intercept ¶
func (c *JWTRevocationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `jwtrevocation.Intercept(f(g(h())))`.
func (*JWTRevocationClient) Interceptors ¶
func (c *JWTRevocationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*JWTRevocationClient) Query ¶
func (c *JWTRevocationClient) Query() *JWTRevocationQuery
Query returns a query builder for JWTRevocation.
func (*JWTRevocationClient) Update ¶
func (c *JWTRevocationClient) Update() *JWTRevocationUpdate
Update returns an update builder for JWTRevocation.
func (*JWTRevocationClient) UpdateOne ¶
func (c *JWTRevocationClient) UpdateOne(jr *JWTRevocation) *JWTRevocationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*JWTRevocationClient) UpdateOneID ¶
func (c *JWTRevocationClient) UpdateOneID(id int) *JWTRevocationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*JWTRevocationClient) Use ¶
func (c *JWTRevocationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `jwtrevocation.Hooks(f(g(h())))`.
type JWTRevocationCreate ¶
type JWTRevocationCreate struct {
// contains filtered or unexported fields
}
JWTRevocationCreate is the builder for creating a JWTRevocation entity.
func (*JWTRevocationCreate) Exec ¶
func (jrc *JWTRevocationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*JWTRevocationCreate) ExecX ¶
func (jrc *JWTRevocationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JWTRevocationCreate) Mutation ¶
func (jrc *JWTRevocationCreate) Mutation() *JWTRevocationMutation
Mutation returns the JWTRevocationMutation object of the builder.
func (*JWTRevocationCreate) OnConflict ¶
func (jrc *JWTRevocationCreate) OnConflict(opts ...sql.ConflictOption) *JWTRevocationUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.JWTRevocation.Create(). SetJti(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.JWTRevocationUpsert) { SetJti(v+v). }). Exec(ctx)
func (*JWTRevocationCreate) OnConflictColumns ¶
func (jrc *JWTRevocationCreate) OnConflictColumns(columns ...string) *JWTRevocationUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.JWTRevocation.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*JWTRevocationCreate) Save ¶
func (jrc *JWTRevocationCreate) Save(ctx context.Context) (*JWTRevocation, error)
Save creates the JWTRevocation in the database.
func (*JWTRevocationCreate) SaveX ¶
func (jrc *JWTRevocationCreate) SaveX(ctx context.Context) *JWTRevocation
SaveX calls Save and panics if Save returns an error.
func (*JWTRevocationCreate) SetExpiry ¶
func (jrc *JWTRevocationCreate) SetExpiry(t time.Time) *JWTRevocationCreate
SetExpiry sets the "expiry" field.
func (*JWTRevocationCreate) SetJti ¶
func (jrc *JWTRevocationCreate) SetJti(s string) *JWTRevocationCreate
SetJti sets the "jti" field.
type JWTRevocationCreateBulk ¶
type JWTRevocationCreateBulk struct {
// contains filtered or unexported fields
}
JWTRevocationCreateBulk is the builder for creating many JWTRevocation entities in bulk.
func (*JWTRevocationCreateBulk) Exec ¶
func (jrcb *JWTRevocationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*JWTRevocationCreateBulk) ExecX ¶
func (jrcb *JWTRevocationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JWTRevocationCreateBulk) OnConflict ¶
func (jrcb *JWTRevocationCreateBulk) OnConflict(opts ...sql.ConflictOption) *JWTRevocationUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.JWTRevocation.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.JWTRevocationUpsert) { SetJti(v+v). }). Exec(ctx)
func (*JWTRevocationCreateBulk) OnConflictColumns ¶
func (jrcb *JWTRevocationCreateBulk) OnConflictColumns(columns ...string) *JWTRevocationUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.JWTRevocation.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*JWTRevocationCreateBulk) Save ¶
func (jrcb *JWTRevocationCreateBulk) Save(ctx context.Context) ([]*JWTRevocation, error)
Save creates the JWTRevocation entities in the database.
func (*JWTRevocationCreateBulk) SaveX ¶
func (jrcb *JWTRevocationCreateBulk) SaveX(ctx context.Context) []*JWTRevocation
SaveX is like Save, but panics if an error occurs.
type JWTRevocationDelete ¶
type JWTRevocationDelete struct {
// contains filtered or unexported fields
}
JWTRevocationDelete is the builder for deleting a JWTRevocation entity.
func (*JWTRevocationDelete) Exec ¶
func (jrd *JWTRevocationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*JWTRevocationDelete) ExecX ¶
func (jrd *JWTRevocationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*JWTRevocationDelete) Where ¶
func (jrd *JWTRevocationDelete) Where(ps ...predicate.JWTRevocation) *JWTRevocationDelete
Where appends a list predicates to the JWTRevocationDelete builder.
type JWTRevocationDeleteOne ¶
type JWTRevocationDeleteOne struct {
// contains filtered or unexported fields
}
JWTRevocationDeleteOne is the builder for deleting a single JWTRevocation entity.
func (*JWTRevocationDeleteOne) Exec ¶
func (jrdo *JWTRevocationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*JWTRevocationDeleteOne) ExecX ¶
func (jrdo *JWTRevocationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JWTRevocationDeleteOne) Where ¶
func (jrdo *JWTRevocationDeleteOne) Where(ps ...predicate.JWTRevocation) *JWTRevocationDeleteOne
Where appends a list predicates to the JWTRevocationDelete builder.
type JWTRevocationGroupBy ¶
type JWTRevocationGroupBy struct {
// contains filtered or unexported fields
}
JWTRevocationGroupBy is the group-by builder for JWTRevocation entities.
func (*JWTRevocationGroupBy) Aggregate ¶
func (jrgb *JWTRevocationGroupBy) Aggregate(fns ...AggregateFunc) *JWTRevocationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*JWTRevocationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*JWTRevocationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*JWTRevocationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*JWTRevocationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*JWTRevocationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*JWTRevocationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*JWTRevocationGroupBy) Scan ¶
func (jrgb *JWTRevocationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*JWTRevocationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type JWTRevocationMutation ¶
type JWTRevocationMutation struct {
// contains filtered or unexported fields
}
JWTRevocationMutation represents an operation that mutates the JWTRevocation nodes in the graph.
func (*JWTRevocationMutation) AddField ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) AddedEdges ¶
func (m *JWTRevocationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*JWTRevocationMutation) AddedField ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) AddedFields ¶
func (m *JWTRevocationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*JWTRevocationMutation) AddedIDs ¶
func (m *JWTRevocationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*JWTRevocationMutation) ClearEdge ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) ClearField ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) ClearedEdges ¶
func (m *JWTRevocationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*JWTRevocationMutation) ClearedFields ¶
func (m *JWTRevocationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (JWTRevocationMutation) Client ¶
func (m JWTRevocationMutation) 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 (*JWTRevocationMutation) EdgeCleared ¶
func (m *JWTRevocationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*JWTRevocationMutation) Expiry ¶
func (m *JWTRevocationMutation) Expiry() (r time.Time, exists bool)
Expiry returns the value of the "expiry" field in the mutation.
func (*JWTRevocationMutation) Field ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) FieldCleared ¶
func (m *JWTRevocationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*JWTRevocationMutation) Fields ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) ID ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) IDs ¶
func (m *JWTRevocationMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*JWTRevocationMutation) Jti ¶
func (m *JWTRevocationMutation) Jti() (r string, exists bool)
Jti returns the value of the "jti" field in the mutation.
func (*JWTRevocationMutation) OldExpiry ¶
OldExpiry returns the old "expiry" field's value of the JWTRevocation entity. If the JWTRevocation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*JWTRevocationMutation) 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 (*JWTRevocationMutation) OldJti ¶
func (m *JWTRevocationMutation) OldJti(ctx context.Context) (v string, err error)
OldJti returns the old "jti" field's value of the JWTRevocation entity. If the JWTRevocation object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*JWTRevocationMutation) Op ¶
func (m *JWTRevocationMutation) Op() Op
Op returns the operation name.
func (*JWTRevocationMutation) RemovedEdges ¶
func (m *JWTRevocationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*JWTRevocationMutation) RemovedIDs ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) ResetEdge ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) ResetExpiry ¶
func (m *JWTRevocationMutation) ResetExpiry()
ResetExpiry resets all changes to the "expiry" field.
func (*JWTRevocationMutation) ResetField ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) ResetJti ¶
func (m *JWTRevocationMutation) ResetJti()
ResetJti resets all changes to the "jti" field.
func (*JWTRevocationMutation) SetExpiry ¶
func (m *JWTRevocationMutation) SetExpiry(t time.Time)
SetExpiry sets the "expiry" field.
func (*JWTRevocationMutation) SetField ¶
func (m *JWTRevocationMutation) 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 (*JWTRevocationMutation) SetJti ¶
func (m *JWTRevocationMutation) SetJti(s string)
SetJti sets the "jti" field.
func (*JWTRevocationMutation) SetOp ¶
func (m *JWTRevocationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (JWTRevocationMutation) Tx ¶
func (m JWTRevocationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*JWTRevocationMutation) Type ¶
func (m *JWTRevocationMutation) Type() string
Type returns the node type of this mutation (JWTRevocation).
func (*JWTRevocationMutation) Where ¶
func (m *JWTRevocationMutation) Where(ps ...predicate.JWTRevocation)
Where appends a list predicates to the JWTRevocationMutation builder.
func (*JWTRevocationMutation) WhereP ¶
func (m *JWTRevocationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the JWTRevocationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type JWTRevocationQuery ¶
type JWTRevocationQuery struct {
// contains filtered or unexported fields
}
JWTRevocationQuery is the builder for querying JWTRevocation entities.
func (*JWTRevocationQuery) Aggregate ¶
func (jrq *JWTRevocationQuery) Aggregate(fns ...AggregateFunc) *JWTRevocationSelect
Aggregate returns a JWTRevocationSelect configured with the given aggregations.
func (*JWTRevocationQuery) All ¶
func (jrq *JWTRevocationQuery) All(ctx context.Context) ([]*JWTRevocation, error)
All executes the query and returns a list of JWTRevocations.
func (*JWTRevocationQuery) AllX ¶
func (jrq *JWTRevocationQuery) AllX(ctx context.Context) []*JWTRevocation
AllX is like All, but panics if an error occurs.
func (*JWTRevocationQuery) Clone ¶
func (jrq *JWTRevocationQuery) Clone() *JWTRevocationQuery
Clone returns a duplicate of the JWTRevocationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*JWTRevocationQuery) Count ¶
func (jrq *JWTRevocationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*JWTRevocationQuery) CountX ¶
func (jrq *JWTRevocationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*JWTRevocationQuery) Exist ¶
func (jrq *JWTRevocationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*JWTRevocationQuery) ExistX ¶
func (jrq *JWTRevocationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*JWTRevocationQuery) First ¶
func (jrq *JWTRevocationQuery) First(ctx context.Context) (*JWTRevocation, error)
First returns the first JWTRevocation entity from the query. Returns a *NotFoundError when no JWTRevocation was found.
func (*JWTRevocationQuery) FirstID ¶
func (jrq *JWTRevocationQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first JWTRevocation ID from the query. Returns a *NotFoundError when no JWTRevocation ID was found.
func (*JWTRevocationQuery) FirstIDX ¶
func (jrq *JWTRevocationQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*JWTRevocationQuery) FirstX ¶
func (jrq *JWTRevocationQuery) FirstX(ctx context.Context) *JWTRevocation
FirstX is like First, but panics if an error occurs.
func (*JWTRevocationQuery) GroupBy ¶
func (jrq *JWTRevocationQuery) GroupBy(field string, fields ...string) *JWTRevocationGroupBy
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 { Jti string `json:"jti,omitempty"` Count int `json:"count,omitempty"` } client.JWTRevocation.Query(). GroupBy(jwtrevocation.FieldJti). Aggregate(ent.Count()). Scan(ctx, &v)
func (*JWTRevocationQuery) IDs ¶
func (jrq *JWTRevocationQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of JWTRevocation IDs.
func (*JWTRevocationQuery) IDsX ¶
func (jrq *JWTRevocationQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*JWTRevocationQuery) Limit ¶
func (jrq *JWTRevocationQuery) Limit(limit int) *JWTRevocationQuery
Limit the number of records to be returned by this query.
func (*JWTRevocationQuery) Offset ¶
func (jrq *JWTRevocationQuery) Offset(offset int) *JWTRevocationQuery
Offset to start from.
func (*JWTRevocationQuery) Only ¶
func (jrq *JWTRevocationQuery) Only(ctx context.Context) (*JWTRevocation, error)
Only returns a single JWTRevocation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one JWTRevocation entity is found. Returns a *NotFoundError when no JWTRevocation entities are found.
func (*JWTRevocationQuery) OnlyID ¶
func (jrq *JWTRevocationQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only JWTRevocation ID in the query. Returns a *NotSingularError when more than one JWTRevocation ID is found. Returns a *NotFoundError when no entities are found.
func (*JWTRevocationQuery) OnlyIDX ¶
func (jrq *JWTRevocationQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*JWTRevocationQuery) OnlyX ¶
func (jrq *JWTRevocationQuery) OnlyX(ctx context.Context) *JWTRevocation
OnlyX is like Only, but panics if an error occurs.
func (*JWTRevocationQuery) Order ¶
func (jrq *JWTRevocationQuery) Order(o ...jwtrevocation.OrderOption) *JWTRevocationQuery
Order specifies how the records should be ordered.
func (*JWTRevocationQuery) Select ¶
func (jrq *JWTRevocationQuery) Select(fields ...string) *JWTRevocationSelect
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 { Jti string `json:"jti,omitempty"` } client.JWTRevocation.Query(). Select(jwtrevocation.FieldJti). Scan(ctx, &v)
func (*JWTRevocationQuery) Unique ¶
func (jrq *JWTRevocationQuery) Unique(unique bool) *JWTRevocationQuery
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 (*JWTRevocationQuery) Where ¶
func (jrq *JWTRevocationQuery) Where(ps ...predicate.JWTRevocation) *JWTRevocationQuery
Where adds a new predicate for the JWTRevocationQuery builder.
type JWTRevocationSelect ¶
type JWTRevocationSelect struct { *JWTRevocationQuery // contains filtered or unexported fields }
JWTRevocationSelect is the builder for selecting fields of JWTRevocation entities.
func (*JWTRevocationSelect) Aggregate ¶
func (jrs *JWTRevocationSelect) Aggregate(fns ...AggregateFunc) *JWTRevocationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*JWTRevocationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*JWTRevocationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*JWTRevocationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*JWTRevocationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*JWTRevocationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*JWTRevocationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*JWTRevocationSelect) Scan ¶
func (jrs *JWTRevocationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*JWTRevocationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type JWTRevocationUpdate ¶
type JWTRevocationUpdate struct {
// contains filtered or unexported fields
}
JWTRevocationUpdate is the builder for updating JWTRevocation entities.
func (*JWTRevocationUpdate) Exec ¶
func (jru *JWTRevocationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*JWTRevocationUpdate) ExecX ¶
func (jru *JWTRevocationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JWTRevocationUpdate) Mutation ¶
func (jru *JWTRevocationUpdate) Mutation() *JWTRevocationMutation
Mutation returns the JWTRevocationMutation object of the builder.
func (*JWTRevocationUpdate) Save ¶
func (jru *JWTRevocationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*JWTRevocationUpdate) SaveX ¶
func (jru *JWTRevocationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*JWTRevocationUpdate) Where ¶
func (jru *JWTRevocationUpdate) Where(ps ...predicate.JWTRevocation) *JWTRevocationUpdate
Where appends a list predicates to the JWTRevocationUpdate builder.
type JWTRevocationUpdateOne ¶
type JWTRevocationUpdateOne struct {
// contains filtered or unexported fields
}
JWTRevocationUpdateOne is the builder for updating a single JWTRevocation entity.
func (*JWTRevocationUpdateOne) Exec ¶
func (jruo *JWTRevocationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*JWTRevocationUpdateOne) ExecX ¶
func (jruo *JWTRevocationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JWTRevocationUpdateOne) Mutation ¶
func (jruo *JWTRevocationUpdateOne) Mutation() *JWTRevocationMutation
Mutation returns the JWTRevocationMutation object of the builder.
func (*JWTRevocationUpdateOne) Save ¶
func (jruo *JWTRevocationUpdateOne) Save(ctx context.Context) (*JWTRevocation, error)
Save executes the query and returns the updated JWTRevocation entity.
func (*JWTRevocationUpdateOne) SaveX ¶
func (jruo *JWTRevocationUpdateOne) SaveX(ctx context.Context) *JWTRevocation
SaveX is like Save, but panics if an error occurs.
func (*JWTRevocationUpdateOne) Select ¶
func (jruo *JWTRevocationUpdateOne) Select(field string, fields ...string) *JWTRevocationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*JWTRevocationUpdateOne) Where ¶
func (jruo *JWTRevocationUpdateOne) Where(ps ...predicate.JWTRevocation) *JWTRevocationUpdateOne
Where appends a list predicates to the JWTRevocationUpdate builder.
type JWTRevocationUpsert ¶
JWTRevocationUpsert is the "OnConflict" setter.
type JWTRevocationUpsertBulk ¶
type JWTRevocationUpsertBulk struct {
// contains filtered or unexported fields
}
JWTRevocationUpsertBulk is the builder for "upsert"-ing a bulk of JWTRevocation nodes.
func (*JWTRevocationUpsertBulk) DoNothing ¶
func (u *JWTRevocationUpsertBulk) DoNothing() *JWTRevocationUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*JWTRevocationUpsertBulk) Exec ¶
func (u *JWTRevocationUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*JWTRevocationUpsertBulk) ExecX ¶
func (u *JWTRevocationUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JWTRevocationUpsertBulk) Ignore ¶
func (u *JWTRevocationUpsertBulk) Ignore() *JWTRevocationUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.JWTRevocation.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*JWTRevocationUpsertBulk) Update ¶
func (u *JWTRevocationUpsertBulk) Update(set func(*JWTRevocationUpsert)) *JWTRevocationUpsertBulk
Update allows overriding fields `UPDATE` values. See the JWTRevocationCreateBulk.OnConflict documentation for more info.
func (*JWTRevocationUpsertBulk) UpdateNewValues ¶
func (u *JWTRevocationUpsertBulk) UpdateNewValues() *JWTRevocationUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.JWTRevocation.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type JWTRevocationUpsertOne ¶
type JWTRevocationUpsertOne struct {
// contains filtered or unexported fields
}
JWTRevocationUpsertOne is the builder for "upsert"-ing
one JWTRevocation node.
func (*JWTRevocationUpsertOne) DoNothing ¶
func (u *JWTRevocationUpsertOne) DoNothing() *JWTRevocationUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*JWTRevocationUpsertOne) Exec ¶
func (u *JWTRevocationUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*JWTRevocationUpsertOne) ExecX ¶
func (u *JWTRevocationUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JWTRevocationUpsertOne) ID ¶
func (u *JWTRevocationUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*JWTRevocationUpsertOne) IDX ¶
func (u *JWTRevocationUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*JWTRevocationUpsertOne) Ignore ¶
func (u *JWTRevocationUpsertOne) Ignore() *JWTRevocationUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.JWTRevocation.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*JWTRevocationUpsertOne) Update ¶
func (u *JWTRevocationUpsertOne) Update(set func(*JWTRevocationUpsert)) *JWTRevocationUpsertOne
Update allows overriding fields `UPDATE` values. See the JWTRevocationCreate.OnConflict documentation for more info.
func (*JWTRevocationUpsertOne) UpdateNewValues ¶
func (u *JWTRevocationUpsertOne) UpdateNewValues() *JWTRevocationUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.JWTRevocation.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type JWTRevocations ¶
type JWTRevocations []*JWTRevocation
JWTRevocations is a parsable slice of JWTRevocation.
type Milestone ¶
type Milestone struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the milestone Name string `json:"name,omitempty"` // Time when the milestone is should be completed TargetCompletionTime time.Time `json:"target_completion_time,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MilestoneQuery when eager-loading is set. Edges MilestoneEdges `json:"edges"` // contains filtered or unexported fields }
Milestone is the model entity for the Milestone schema.
func (*Milestone) QueryStudyPlan ¶
func (m *Milestone) QueryStudyPlan() *StudyPlanQuery
QueryStudyPlan queries the "study_plan" edge of the Milestone entity.
func (*Milestone) Unwrap ¶
Unwrap unwraps the Milestone 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 (*Milestone) Update ¶
func (m *Milestone) Update() *MilestoneUpdateOne
Update returns a builder for updating this Milestone. Note that you need to call Milestone.Unwrap() before calling this method if this Milestone was returned from a transaction, and the transaction was committed or rolled back.
type MilestoneClient ¶
type MilestoneClient struct {
// contains filtered or unexported fields
}
MilestoneClient is a client for the Milestone schema.
func NewMilestoneClient ¶
func NewMilestoneClient(c config) *MilestoneClient
NewMilestoneClient returns a client for the Milestone from the given config.
func (*MilestoneClient) Create ¶
func (c *MilestoneClient) Create() *MilestoneCreate
Create returns a builder for creating a Milestone entity.
func (*MilestoneClient) CreateBulk ¶
func (c *MilestoneClient) CreateBulk(builders ...*MilestoneCreate) *MilestoneCreateBulk
CreateBulk returns a builder for creating a bulk of Milestone entities.
func (*MilestoneClient) Delete ¶
func (c *MilestoneClient) Delete() *MilestoneDelete
Delete returns a delete builder for Milestone.
func (*MilestoneClient) DeleteOne ¶
func (c *MilestoneClient) DeleteOne(m *Milestone) *MilestoneDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MilestoneClient) DeleteOneID ¶
func (c *MilestoneClient) DeleteOneID(id int) *MilestoneDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MilestoneClient) GetX ¶
func (c *MilestoneClient) GetX(ctx context.Context, id int) *Milestone
GetX is like Get, but panics if an error occurs.
func (*MilestoneClient) Hooks ¶
func (c *MilestoneClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MilestoneClient) Intercept ¶
func (c *MilestoneClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `milestone.Intercept(f(g(h())))`.
func (*MilestoneClient) Interceptors ¶
func (c *MilestoneClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MilestoneClient) Query ¶
func (c *MilestoneClient) Query() *MilestoneQuery
Query returns a query builder for Milestone.
func (*MilestoneClient) QueryStudyPlan ¶
func (c *MilestoneClient) QueryStudyPlan(m *Milestone) *StudyPlanQuery
QueryStudyPlan queries the study_plan edge of a Milestone.
func (*MilestoneClient) Update ¶
func (c *MilestoneClient) Update() *MilestoneUpdate
Update returns an update builder for Milestone.
func (*MilestoneClient) UpdateOne ¶
func (c *MilestoneClient) UpdateOne(m *Milestone) *MilestoneUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MilestoneClient) UpdateOneID ¶
func (c *MilestoneClient) UpdateOneID(id int) *MilestoneUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MilestoneClient) Use ¶
func (c *MilestoneClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `milestone.Hooks(f(g(h())))`.
type MilestoneCreate ¶
type MilestoneCreate struct {
// contains filtered or unexported fields
}
MilestoneCreate is the builder for creating a Milestone entity.
func (*MilestoneCreate) Exec ¶
func (mc *MilestoneCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MilestoneCreate) ExecX ¶
func (mc *MilestoneCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MilestoneCreate) Mutation ¶
func (mc *MilestoneCreate) Mutation() *MilestoneMutation
Mutation returns the MilestoneMutation object of the builder.
func (*MilestoneCreate) OnConflict ¶
func (mc *MilestoneCreate) OnConflict(opts ...sql.ConflictOption) *MilestoneUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Milestone.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.MilestoneUpsert) { SetName(v+v). }). Exec(ctx)
func (*MilestoneCreate) OnConflictColumns ¶
func (mc *MilestoneCreate) OnConflictColumns(columns ...string) *MilestoneUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Milestone.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*MilestoneCreate) Save ¶
func (mc *MilestoneCreate) Save(ctx context.Context) (*Milestone, error)
Save creates the Milestone in the database.
func (*MilestoneCreate) SaveX ¶
func (mc *MilestoneCreate) SaveX(ctx context.Context) *Milestone
SaveX calls Save and panics if Save returns an error.
func (*MilestoneCreate) SetName ¶
func (mc *MilestoneCreate) SetName(s string) *MilestoneCreate
SetName sets the "name" field.
func (*MilestoneCreate) SetStudyPlan ¶
func (mc *MilestoneCreate) SetStudyPlan(s *StudyPlan) *MilestoneCreate
SetStudyPlan sets the "study_plan" edge to the StudyPlan entity.
func (*MilestoneCreate) SetStudyPlanID ¶
func (mc *MilestoneCreate) SetStudyPlanID(id int) *MilestoneCreate
SetStudyPlanID sets the "study_plan" edge to the StudyPlan entity by ID.
func (*MilestoneCreate) SetTargetCompletionTime ¶
func (mc *MilestoneCreate) SetTargetCompletionTime(t time.Time) *MilestoneCreate
SetTargetCompletionTime sets the "target_completion_time" field.
type MilestoneCreateBulk ¶
type MilestoneCreateBulk struct {
// contains filtered or unexported fields
}
MilestoneCreateBulk is the builder for creating many Milestone entities in bulk.
func (*MilestoneCreateBulk) Exec ¶
func (mcb *MilestoneCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MilestoneCreateBulk) ExecX ¶
func (mcb *MilestoneCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MilestoneCreateBulk) OnConflict ¶
func (mcb *MilestoneCreateBulk) OnConflict(opts ...sql.ConflictOption) *MilestoneUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Milestone.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.MilestoneUpsert) { SetName(v+v). }). Exec(ctx)
func (*MilestoneCreateBulk) OnConflictColumns ¶
func (mcb *MilestoneCreateBulk) OnConflictColumns(columns ...string) *MilestoneUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Milestone.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type MilestoneDelete ¶
type MilestoneDelete struct {
// contains filtered or unexported fields
}
MilestoneDelete is the builder for deleting a Milestone entity.
func (*MilestoneDelete) Exec ¶
func (md *MilestoneDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MilestoneDelete) ExecX ¶
func (md *MilestoneDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MilestoneDelete) Where ¶
func (md *MilestoneDelete) Where(ps ...predicate.Milestone) *MilestoneDelete
Where appends a list predicates to the MilestoneDelete builder.
type MilestoneDeleteOne ¶
type MilestoneDeleteOne struct {
// contains filtered or unexported fields
}
MilestoneDeleteOne is the builder for deleting a single Milestone entity.
func (*MilestoneDeleteOne) Exec ¶
func (mdo *MilestoneDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MilestoneDeleteOne) ExecX ¶
func (mdo *MilestoneDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MilestoneDeleteOne) Where ¶
func (mdo *MilestoneDeleteOne) Where(ps ...predicate.Milestone) *MilestoneDeleteOne
Where appends a list predicates to the MilestoneDelete builder.
type MilestoneEdges ¶
type MilestoneEdges struct { // StudyPlan holds the value of the study_plan edge. StudyPlan *StudyPlan `json:"study_plan,omitempty"` // contains filtered or unexported fields }
MilestoneEdges holds the relations/edges for other nodes in the graph.
func (MilestoneEdges) StudyPlanOrErr ¶
func (e MilestoneEdges) StudyPlanOrErr() (*StudyPlan, error)
StudyPlanOrErr returns the StudyPlan value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MilestoneGroupBy ¶
type MilestoneGroupBy struct {
// contains filtered or unexported fields
}
MilestoneGroupBy is the group-by builder for Milestone entities.
func (*MilestoneGroupBy) Aggregate ¶
func (mgb *MilestoneGroupBy) Aggregate(fns ...AggregateFunc) *MilestoneGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MilestoneGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MilestoneGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MilestoneGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MilestoneGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MilestoneGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MilestoneGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MilestoneGroupBy) Scan ¶
func (mgb *MilestoneGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MilestoneGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MilestoneMutation ¶
type MilestoneMutation struct {
// contains filtered or unexported fields
}
MilestoneMutation represents an operation that mutates the Milestone nodes in the graph.
func (*MilestoneMutation) AddField ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) AddedEdges ¶
func (m *MilestoneMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MilestoneMutation) AddedField ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) AddedFields ¶
func (m *MilestoneMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MilestoneMutation) AddedIDs ¶
func (m *MilestoneMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MilestoneMutation) ClearEdge ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) ClearField ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) ClearStudyPlan ¶
func (m *MilestoneMutation) ClearStudyPlan()
ClearStudyPlan clears the "study_plan" edge to the StudyPlan entity.
func (*MilestoneMutation) ClearedEdges ¶
func (m *MilestoneMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MilestoneMutation) ClearedFields ¶
func (m *MilestoneMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MilestoneMutation) Client ¶
func (m MilestoneMutation) 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 (*MilestoneMutation) EdgeCleared ¶
func (m *MilestoneMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MilestoneMutation) Field ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) FieldCleared ¶
func (m *MilestoneMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MilestoneMutation) Fields ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) ID ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) IDs ¶
func (m *MilestoneMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MilestoneMutation) Name ¶
func (m *MilestoneMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*MilestoneMutation) 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 (*MilestoneMutation) OldName ¶
func (m *MilestoneMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Milestone entity. If the Milestone object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MilestoneMutation) OldTargetCompletionTime ¶
OldTargetCompletionTime returns the old "target_completion_time" field's value of the Milestone entity. If the Milestone object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MilestoneMutation) RemovedEdges ¶
func (m *MilestoneMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MilestoneMutation) RemovedIDs ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) ResetEdge ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) ResetField ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) ResetName ¶
func (m *MilestoneMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*MilestoneMutation) ResetStudyPlan ¶
func (m *MilestoneMutation) ResetStudyPlan()
ResetStudyPlan resets all changes to the "study_plan" edge.
func (*MilestoneMutation) ResetTargetCompletionTime ¶
func (m *MilestoneMutation) ResetTargetCompletionTime()
ResetTargetCompletionTime resets all changes to the "target_completion_time" field.
func (*MilestoneMutation) SetField ¶
func (m *MilestoneMutation) 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 (*MilestoneMutation) SetName ¶
func (m *MilestoneMutation) SetName(s string)
SetName sets the "name" field.
func (*MilestoneMutation) SetOp ¶
func (m *MilestoneMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MilestoneMutation) SetStudyPlanID ¶
func (m *MilestoneMutation) SetStudyPlanID(id int)
SetStudyPlanID sets the "study_plan" edge to the StudyPlan entity by id.
func (*MilestoneMutation) SetTargetCompletionTime ¶
func (m *MilestoneMutation) SetTargetCompletionTime(t time.Time)
SetTargetCompletionTime sets the "target_completion_time" field.
func (*MilestoneMutation) StudyPlanCleared ¶
func (m *MilestoneMutation) StudyPlanCleared() bool
StudyPlanCleared reports if the "study_plan" edge to the StudyPlan entity was cleared.
func (*MilestoneMutation) StudyPlanID ¶
func (m *MilestoneMutation) StudyPlanID() (id int, exists bool)
StudyPlanID returns the "study_plan" edge ID in the mutation.
func (*MilestoneMutation) StudyPlanIDs ¶
func (m *MilestoneMutation) StudyPlanIDs() (ids []int)
StudyPlanIDs returns the "study_plan" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use StudyPlanID instead. It exists only for internal usage by the builders.
func (*MilestoneMutation) TargetCompletionTime ¶
func (m *MilestoneMutation) TargetCompletionTime() (r time.Time, exists bool)
TargetCompletionTime returns the value of the "target_completion_time" field in the mutation.
func (MilestoneMutation) Tx ¶
func (m MilestoneMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MilestoneMutation) Type ¶
func (m *MilestoneMutation) Type() string
Type returns the node type of this mutation (Milestone).
func (*MilestoneMutation) Where ¶
func (m *MilestoneMutation) Where(ps ...predicate.Milestone)
Where appends a list predicates to the MilestoneMutation builder.
func (*MilestoneMutation) WhereP ¶
func (m *MilestoneMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MilestoneMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MilestoneQuery ¶
type MilestoneQuery struct {
// contains filtered or unexported fields
}
MilestoneQuery is the builder for querying Milestone entities.
func (*MilestoneQuery) Aggregate ¶
func (mq *MilestoneQuery) Aggregate(fns ...AggregateFunc) *MilestoneSelect
Aggregate returns a MilestoneSelect configured with the given aggregations.
func (*MilestoneQuery) All ¶
func (mq *MilestoneQuery) All(ctx context.Context) ([]*Milestone, error)
All executes the query and returns a list of Milestones.
func (*MilestoneQuery) AllX ¶
func (mq *MilestoneQuery) AllX(ctx context.Context) []*Milestone
AllX is like All, but panics if an error occurs.
func (*MilestoneQuery) Clone ¶
func (mq *MilestoneQuery) Clone() *MilestoneQuery
Clone returns a duplicate of the MilestoneQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MilestoneQuery) Count ¶
func (mq *MilestoneQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MilestoneQuery) CountX ¶
func (mq *MilestoneQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MilestoneQuery) Exist ¶
func (mq *MilestoneQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MilestoneQuery) ExistX ¶
func (mq *MilestoneQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MilestoneQuery) First ¶
func (mq *MilestoneQuery) First(ctx context.Context) (*Milestone, error)
First returns the first Milestone entity from the query. Returns a *NotFoundError when no Milestone was found.
func (*MilestoneQuery) FirstID ¶
func (mq *MilestoneQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Milestone ID from the query. Returns a *NotFoundError when no Milestone ID was found.
func (*MilestoneQuery) FirstIDX ¶
func (mq *MilestoneQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MilestoneQuery) FirstX ¶
func (mq *MilestoneQuery) FirstX(ctx context.Context) *Milestone
FirstX is like First, but panics if an error occurs.
func (*MilestoneQuery) GroupBy ¶
func (mq *MilestoneQuery) GroupBy(field string, fields ...string) *MilestoneGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Milestone.Query(). GroupBy(milestone.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MilestoneQuery) IDs ¶
func (mq *MilestoneQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Milestone IDs.
func (*MilestoneQuery) IDsX ¶
func (mq *MilestoneQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MilestoneQuery) Limit ¶
func (mq *MilestoneQuery) Limit(limit int) *MilestoneQuery
Limit the number of records to be returned by this query.
func (*MilestoneQuery) Offset ¶
func (mq *MilestoneQuery) Offset(offset int) *MilestoneQuery
Offset to start from.
func (*MilestoneQuery) Only ¶
func (mq *MilestoneQuery) Only(ctx context.Context) (*Milestone, error)
Only returns a single Milestone entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Milestone entity is found. Returns a *NotFoundError when no Milestone entities are found.
func (*MilestoneQuery) OnlyID ¶
func (mq *MilestoneQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Milestone ID in the query. Returns a *NotSingularError when more than one Milestone ID is found. Returns a *NotFoundError when no entities are found.
func (*MilestoneQuery) OnlyIDX ¶
func (mq *MilestoneQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MilestoneQuery) OnlyX ¶
func (mq *MilestoneQuery) OnlyX(ctx context.Context) *Milestone
OnlyX is like Only, but panics if an error occurs.
func (*MilestoneQuery) Order ¶
func (mq *MilestoneQuery) Order(o ...milestone.OrderOption) *MilestoneQuery
Order specifies how the records should be ordered.
func (*MilestoneQuery) QueryStudyPlan ¶
func (mq *MilestoneQuery) QueryStudyPlan() *StudyPlanQuery
QueryStudyPlan chains the current query on the "study_plan" edge.
func (*MilestoneQuery) Select ¶
func (mq *MilestoneQuery) Select(fields ...string) *MilestoneSelect
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 { Name string `json:"name,omitempty"` } client.Milestone.Query(). Select(milestone.FieldName). Scan(ctx, &v)
func (*MilestoneQuery) Unique ¶
func (mq *MilestoneQuery) Unique(unique bool) *MilestoneQuery
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 (*MilestoneQuery) Where ¶
func (mq *MilestoneQuery) Where(ps ...predicate.Milestone) *MilestoneQuery
Where adds a new predicate for the MilestoneQuery builder.
func (*MilestoneQuery) WithStudyPlan ¶
func (mq *MilestoneQuery) WithStudyPlan(opts ...func(*StudyPlanQuery)) *MilestoneQuery
WithStudyPlan tells the query-builder to eager-load the nodes that are connected to the "study_plan" edge. The optional arguments are used to configure the query builder of the edge.
type MilestoneSelect ¶
type MilestoneSelect struct { *MilestoneQuery // contains filtered or unexported fields }
MilestoneSelect is the builder for selecting fields of Milestone entities.
func (*MilestoneSelect) Aggregate ¶
func (ms *MilestoneSelect) Aggregate(fns ...AggregateFunc) *MilestoneSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MilestoneSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MilestoneSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MilestoneSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MilestoneSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MilestoneSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MilestoneSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MilestoneSelect) Scan ¶
func (ms *MilestoneSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MilestoneSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MilestoneUpdate ¶
type MilestoneUpdate struct {
// contains filtered or unexported fields
}
MilestoneUpdate is the builder for updating Milestone entities.
func (*MilestoneUpdate) ClearStudyPlan ¶
func (mu *MilestoneUpdate) ClearStudyPlan() *MilestoneUpdate
ClearStudyPlan clears the "study_plan" edge to the StudyPlan entity.
func (*MilestoneUpdate) Exec ¶
func (mu *MilestoneUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MilestoneUpdate) ExecX ¶
func (mu *MilestoneUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MilestoneUpdate) Mutation ¶
func (mu *MilestoneUpdate) Mutation() *MilestoneMutation
Mutation returns the MilestoneMutation object of the builder.
func (*MilestoneUpdate) Save ¶
func (mu *MilestoneUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MilestoneUpdate) SaveX ¶
func (mu *MilestoneUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MilestoneUpdate) SetName ¶
func (mu *MilestoneUpdate) SetName(s string) *MilestoneUpdate
SetName sets the "name" field.
func (*MilestoneUpdate) SetStudyPlan ¶
func (mu *MilestoneUpdate) SetStudyPlan(s *StudyPlan) *MilestoneUpdate
SetStudyPlan sets the "study_plan" edge to the StudyPlan entity.
func (*MilestoneUpdate) SetStudyPlanID ¶
func (mu *MilestoneUpdate) SetStudyPlanID(id int) *MilestoneUpdate
SetStudyPlanID sets the "study_plan" edge to the StudyPlan entity by ID.
func (*MilestoneUpdate) SetTargetCompletionTime ¶
func (mu *MilestoneUpdate) SetTargetCompletionTime(t time.Time) *MilestoneUpdate
SetTargetCompletionTime sets the "target_completion_time" field.
func (*MilestoneUpdate) Where ¶
func (mu *MilestoneUpdate) Where(ps ...predicate.Milestone) *MilestoneUpdate
Where appends a list predicates to the MilestoneUpdate builder.
type MilestoneUpdateOne ¶
type MilestoneUpdateOne struct {
// contains filtered or unexported fields
}
MilestoneUpdateOne is the builder for updating a single Milestone entity.
func (*MilestoneUpdateOne) ClearStudyPlan ¶
func (muo *MilestoneUpdateOne) ClearStudyPlan() *MilestoneUpdateOne
ClearStudyPlan clears the "study_plan" edge to the StudyPlan entity.
func (*MilestoneUpdateOne) Exec ¶
func (muo *MilestoneUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MilestoneUpdateOne) ExecX ¶
func (muo *MilestoneUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MilestoneUpdateOne) Mutation ¶
func (muo *MilestoneUpdateOne) Mutation() *MilestoneMutation
Mutation returns the MilestoneMutation object of the builder.
func (*MilestoneUpdateOne) Save ¶
func (muo *MilestoneUpdateOne) Save(ctx context.Context) (*Milestone, error)
Save executes the query and returns the updated Milestone entity.
func (*MilestoneUpdateOne) SaveX ¶
func (muo *MilestoneUpdateOne) SaveX(ctx context.Context) *Milestone
SaveX is like Save, but panics if an error occurs.
func (*MilestoneUpdateOne) Select ¶
func (muo *MilestoneUpdateOne) Select(field string, fields ...string) *MilestoneUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MilestoneUpdateOne) SetName ¶
func (muo *MilestoneUpdateOne) SetName(s string) *MilestoneUpdateOne
SetName sets the "name" field.
func (*MilestoneUpdateOne) SetStudyPlan ¶
func (muo *MilestoneUpdateOne) SetStudyPlan(s *StudyPlan) *MilestoneUpdateOne
SetStudyPlan sets the "study_plan" edge to the StudyPlan entity.
func (*MilestoneUpdateOne) SetStudyPlanID ¶
func (muo *MilestoneUpdateOne) SetStudyPlanID(id int) *MilestoneUpdateOne
SetStudyPlanID sets the "study_plan" edge to the StudyPlan entity by ID.
func (*MilestoneUpdateOne) SetTargetCompletionTime ¶
func (muo *MilestoneUpdateOne) SetTargetCompletionTime(t time.Time) *MilestoneUpdateOne
SetTargetCompletionTime sets the "target_completion_time" field.
func (*MilestoneUpdateOne) Where ¶
func (muo *MilestoneUpdateOne) Where(ps ...predicate.Milestone) *MilestoneUpdateOne
Where appends a list predicates to the MilestoneUpdate builder.
type MilestoneUpsert ¶
MilestoneUpsert is the "OnConflict" setter.
func (*MilestoneUpsert) SetName ¶
func (u *MilestoneUpsert) SetName(v string) *MilestoneUpsert
SetName sets the "name" field.
func (*MilestoneUpsert) SetTargetCompletionTime ¶
func (u *MilestoneUpsert) SetTargetCompletionTime(v time.Time) *MilestoneUpsert
SetTargetCompletionTime sets the "target_completion_time" field.
func (*MilestoneUpsert) UpdateName ¶
func (u *MilestoneUpsert) UpdateName() *MilestoneUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*MilestoneUpsert) UpdateTargetCompletionTime ¶
func (u *MilestoneUpsert) UpdateTargetCompletionTime() *MilestoneUpsert
UpdateTargetCompletionTime sets the "target_completion_time" field to the value that was provided on create.
type MilestoneUpsertBulk ¶
type MilestoneUpsertBulk struct {
// contains filtered or unexported fields
}
MilestoneUpsertBulk is the builder for "upsert"-ing a bulk of Milestone nodes.
func (*MilestoneUpsertBulk) DoNothing ¶
func (u *MilestoneUpsertBulk) DoNothing() *MilestoneUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MilestoneUpsertBulk) Exec ¶
func (u *MilestoneUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MilestoneUpsertBulk) ExecX ¶
func (u *MilestoneUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MilestoneUpsertBulk) Ignore ¶
func (u *MilestoneUpsertBulk) Ignore() *MilestoneUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Milestone.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MilestoneUpsertBulk) SetName ¶
func (u *MilestoneUpsertBulk) SetName(v string) *MilestoneUpsertBulk
SetName sets the "name" field.
func (*MilestoneUpsertBulk) SetTargetCompletionTime ¶
func (u *MilestoneUpsertBulk) SetTargetCompletionTime(v time.Time) *MilestoneUpsertBulk
SetTargetCompletionTime sets the "target_completion_time" field.
func (*MilestoneUpsertBulk) Update ¶
func (u *MilestoneUpsertBulk) Update(set func(*MilestoneUpsert)) *MilestoneUpsertBulk
Update allows overriding fields `UPDATE` values. See the MilestoneCreateBulk.OnConflict documentation for more info.
func (*MilestoneUpsertBulk) UpdateName ¶
func (u *MilestoneUpsertBulk) UpdateName() *MilestoneUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*MilestoneUpsertBulk) UpdateNewValues ¶
func (u *MilestoneUpsertBulk) UpdateNewValues() *MilestoneUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Milestone.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*MilestoneUpsertBulk) UpdateTargetCompletionTime ¶
func (u *MilestoneUpsertBulk) UpdateTargetCompletionTime() *MilestoneUpsertBulk
UpdateTargetCompletionTime sets the "target_completion_time" field to the value that was provided on create.
type MilestoneUpsertOne ¶
type MilestoneUpsertOne struct {
// contains filtered or unexported fields
}
MilestoneUpsertOne is the builder for "upsert"-ing
one Milestone node.
func (*MilestoneUpsertOne) DoNothing ¶
func (u *MilestoneUpsertOne) DoNothing() *MilestoneUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*MilestoneUpsertOne) Exec ¶
func (u *MilestoneUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*MilestoneUpsertOne) ExecX ¶
func (u *MilestoneUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MilestoneUpsertOne) ID ¶
func (u *MilestoneUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*MilestoneUpsertOne) IDX ¶
func (u *MilestoneUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*MilestoneUpsertOne) Ignore ¶
func (u *MilestoneUpsertOne) Ignore() *MilestoneUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Milestone.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*MilestoneUpsertOne) SetName ¶
func (u *MilestoneUpsertOne) SetName(v string) *MilestoneUpsertOne
SetName sets the "name" field.
func (*MilestoneUpsertOne) SetTargetCompletionTime ¶
func (u *MilestoneUpsertOne) SetTargetCompletionTime(v time.Time) *MilestoneUpsertOne
SetTargetCompletionTime sets the "target_completion_time" field.
func (*MilestoneUpsertOne) Update ¶
func (u *MilestoneUpsertOne) Update(set func(*MilestoneUpsert)) *MilestoneUpsertOne
Update allows overriding fields `UPDATE` values. See the MilestoneCreate.OnConflict documentation for more info.
func (*MilestoneUpsertOne) UpdateName ¶
func (u *MilestoneUpsertOne) UpdateName() *MilestoneUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*MilestoneUpsertOne) UpdateNewValues ¶
func (u *MilestoneUpsertOne) UpdateNewValues() *MilestoneUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Milestone.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*MilestoneUpsertOne) UpdateTargetCompletionTime ¶
func (u *MilestoneUpsertOne) UpdateTargetCompletionTime() *MilestoneUpsertOne
UpdateTargetCompletionTime sets the "target_completion_time" field to the value that was provided on create.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Pet ¶
type Pet struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the pet Name string `json:"name,omitempty"` // SVG of the pet SvgRaw string `json:"svg_raw,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PetQuery when eager-loading is set. Edges PetEdges `json:"edges"` // contains filtered or unexported fields }
Pet is the model entity for the Pet schema.
func (*Pet) QueryOwner ¶
QueryOwner queries the "owner" edge of the Pet entity.
func (*Pet) QueryUserPets ¶
func (pe *Pet) QueryUserPets() *UserPetQuery
QueryUserPets queries the "user_pets" edge of the Pet entity.
func (*Pet) Unwrap ¶
Unwrap unwraps the Pet 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 (*Pet) Update ¶
func (pe *Pet) Update() *PetUpdateOne
Update returns a builder for updating this Pet. Note that you need to call Pet.Unwrap() before calling this method if this Pet was returned from a transaction, and the transaction was committed or rolled back.
type PetClient ¶
type PetClient struct {
// contains filtered or unexported fields
}
PetClient is a client for the Pet schema.
func NewPetClient ¶
func NewPetClient(c config) *PetClient
NewPetClient returns a client for the Pet from the given config.
func (*PetClient) CreateBulk ¶
func (c *PetClient) CreateBulk(builders ...*PetCreate) *PetCreateBulk
CreateBulk returns a builder for creating a bulk of Pet entities.
func (*PetClient) DeleteOne ¶
func (c *PetClient) DeleteOne(pe *Pet) *PetDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PetClient) DeleteOneID ¶
func (c *PetClient) DeleteOneID(id int) *PetDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PetClient) Intercept ¶
func (c *PetClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `pet.Intercept(f(g(h())))`.
func (*PetClient) Interceptors ¶
func (c *PetClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PetClient) QueryOwner ¶
QueryOwner queries the owner edge of a Pet.
func (*PetClient) QueryUserPets ¶
func (c *PetClient) QueryUserPets(pe *Pet) *UserPetQuery
QueryUserPets queries the user_pets edge of a Pet.
func (*PetClient) UpdateOne ¶
func (c *PetClient) UpdateOne(pe *Pet) *PetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PetClient) UpdateOneID ¶
func (c *PetClient) UpdateOneID(id int) *PetUpdateOne
UpdateOneID returns an update builder for the given id.
type PetCreate ¶
type PetCreate struct {
// contains filtered or unexported fields
}
PetCreate is the builder for creating a Pet entity.
func (*PetCreate) AddOwnerIDs ¶
AddOwnerIDs adds the "owner" edge to the User entity by IDs.
func (*PetCreate) Mutation ¶
func (pc *PetCreate) Mutation() *PetMutation
Mutation returns the PetMutation object of the builder.
func (*PetCreate) OnConflict ¶
func (pc *PetCreate) OnConflict(opts ...sql.ConflictOption) *PetUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Pet.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.PetUpsert) { SetName(v+v). }). Exec(ctx)
func (*PetCreate) OnConflictColumns ¶
func (pc *PetCreate) OnConflictColumns(columns ...string) *PetUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Pet.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type PetCreateBulk ¶
type PetCreateBulk struct {
// contains filtered or unexported fields
}
PetCreateBulk is the builder for creating many Pet entities in bulk.
func (*PetCreateBulk) Exec ¶
func (pcb *PetCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PetCreateBulk) ExecX ¶
func (pcb *PetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PetCreateBulk) OnConflict ¶
func (pcb *PetCreateBulk) OnConflict(opts ...sql.ConflictOption) *PetUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Pet.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.PetUpsert) { SetName(v+v). }). Exec(ctx)
func (*PetCreateBulk) OnConflictColumns ¶
func (pcb *PetCreateBulk) OnConflictColumns(columns ...string) *PetUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Pet.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type PetDelete ¶
type PetDelete struct {
// contains filtered or unexported fields
}
PetDelete is the builder for deleting a Pet entity.
func (*PetDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type PetDeleteOne ¶
type PetDeleteOne struct {
// contains filtered or unexported fields
}
PetDeleteOne is the builder for deleting a single Pet entity.
func (*PetDeleteOne) Exec ¶
func (pdo *PetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PetDeleteOne) ExecX ¶
func (pdo *PetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PetDeleteOne) Where ¶
func (pdo *PetDeleteOne) Where(ps ...predicate.Pet) *PetDeleteOne
Where appends a list predicates to the PetDelete builder.
type PetEdges ¶
type PetEdges struct { // Owner holds the value of the owner edge. Owner []*User `json:"owner,omitempty"` // UserPets holds the value of the user_pets edge. UserPets []*UserPet `json:"user_pets,omitempty"` // contains filtered or unexported fields }
PetEdges holds the relations/edges for other nodes in the graph.
func (PetEdges) OwnerOrErr ¶
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading.
func (PetEdges) UserPetsOrErr ¶
UserPetsOrErr returns the UserPets value or an error if the edge was not loaded in eager-loading.
type PetGroupBy ¶
type PetGroupBy struct {
// contains filtered or unexported fields
}
PetGroupBy is the group-by builder for Pet entities.
func (*PetGroupBy) Aggregate ¶
func (pgb *PetGroupBy) Aggregate(fns ...AggregateFunc) *PetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PetGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PetGroupBy) Scan ¶
func (pgb *PetGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PetGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PetMutation ¶
type PetMutation struct {
// contains filtered or unexported fields
}
PetMutation represents an operation that mutates the Pet nodes in the graph.
func (*PetMutation) AddField ¶
func (m *PetMutation) 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 (*PetMutation) AddOwnerIDs ¶
func (m *PetMutation) AddOwnerIDs(ids ...int)
AddOwnerIDs adds the "owner" edge to the User entity by ids.
func (*PetMutation) AddedEdges ¶
func (m *PetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PetMutation) AddedField ¶
func (m *PetMutation) 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 (*PetMutation) AddedFields ¶
func (m *PetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PetMutation) AddedIDs ¶
func (m *PetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PetMutation) ClearEdge ¶
func (m *PetMutation) 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 (*PetMutation) ClearField ¶
func (m *PetMutation) 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 (*PetMutation) ClearOwner ¶
func (m *PetMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*PetMutation) ClearedEdges ¶
func (m *PetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PetMutation) ClearedFields ¶
func (m *PetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PetMutation) Client ¶
func (m PetMutation) 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 (*PetMutation) EdgeCleared ¶
func (m *PetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PetMutation) Field ¶
func (m *PetMutation) 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 (*PetMutation) FieldCleared ¶
func (m *PetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PetMutation) Fields ¶
func (m *PetMutation) 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 (*PetMutation) ID ¶
func (m *PetMutation) 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 (*PetMutation) IDs ¶
func (m *PetMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*PetMutation) Name ¶
func (m *PetMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*PetMutation) 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 (*PetMutation) OldName ¶
func (m *PetMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Pet entity. If the Pet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PetMutation) OldSvgRaw ¶
func (m *PetMutation) OldSvgRaw(ctx context.Context) (v string, err error)
OldSvgRaw returns the old "svg_raw" field's value of the Pet entity. If the Pet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*PetMutation) OwnerCleared ¶
func (m *PetMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*PetMutation) OwnerIDs ¶
func (m *PetMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation.
func (*PetMutation) RemoveOwnerIDs ¶
func (m *PetMutation) RemoveOwnerIDs(ids ...int)
RemoveOwnerIDs removes the "owner" edge to the User entity by IDs.
func (*PetMutation) RemovedEdges ¶
func (m *PetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PetMutation) RemovedIDs ¶
func (m *PetMutation) 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 (*PetMutation) RemovedOwnerIDs ¶
func (m *PetMutation) RemovedOwnerIDs() (ids []int)
RemovedOwner returns the removed IDs of the "owner" edge to the User entity.
func (*PetMutation) ResetEdge ¶
func (m *PetMutation) 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 (*PetMutation) ResetField ¶
func (m *PetMutation) 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 (*PetMutation) ResetName ¶
func (m *PetMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*PetMutation) ResetOwner ¶
func (m *PetMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*PetMutation) ResetSvgRaw ¶
func (m *PetMutation) ResetSvgRaw()
ResetSvgRaw resets all changes to the "svg_raw" field.
func (*PetMutation) SetField ¶
func (m *PetMutation) 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 (*PetMutation) SetName ¶
func (m *PetMutation) SetName(s string)
SetName sets the "name" field.
func (*PetMutation) SetOp ¶
func (m *PetMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PetMutation) SetSvgRaw ¶
func (m *PetMutation) SetSvgRaw(s string)
SetSvgRaw sets the "svg_raw" field.
func (*PetMutation) SvgRaw ¶
func (m *PetMutation) SvgRaw() (r string, exists bool)
SvgRaw returns the value of the "svg_raw" field in the mutation.
func (PetMutation) Tx ¶
func (m PetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PetMutation) Type ¶
func (m *PetMutation) Type() string
Type returns the node type of this mutation (Pet).
func (*PetMutation) Where ¶
func (m *PetMutation) Where(ps ...predicate.Pet)
Where appends a list predicates to the PetMutation builder.
func (*PetMutation) WhereP ¶
func (m *PetMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PetMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PetQuery ¶
type PetQuery struct {
// contains filtered or unexported fields
}
PetQuery is the builder for querying Pet entities.
func (*PetQuery) Aggregate ¶
func (pq *PetQuery) Aggregate(fns ...AggregateFunc) *PetSelect
Aggregate returns a PetSelect configured with the given aggregations.
func (*PetQuery) Clone ¶
Clone returns a duplicate of the PetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PetQuery) First ¶
First returns the first Pet entity from the query. Returns a *NotFoundError when no Pet was found.
func (*PetQuery) FirstID ¶
FirstID returns the first Pet ID from the query. Returns a *NotFoundError when no Pet ID was found.
func (*PetQuery) GroupBy ¶
func (pq *PetQuery) GroupBy(field string, fields ...string) *PetGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Pet.Query(). GroupBy(pet.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PetQuery) Only ¶
Only returns a single Pet entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Pet entity is found. Returns a *NotFoundError when no Pet entities are found.
func (*PetQuery) OnlyID ¶
OnlyID is like Only, but returns the only Pet ID in the query. Returns a *NotSingularError when more than one Pet ID is found. Returns a *NotFoundError when no entities are found.
func (*PetQuery) Order ¶
func (pq *PetQuery) Order(o ...pet.OrderOption) *PetQuery
Order specifies how the records should be ordered.
func (*PetQuery) QueryOwner ¶
QueryOwner chains the current query on the "owner" edge.
func (*PetQuery) QueryUserPets ¶
func (pq *PetQuery) QueryUserPets() *UserPetQuery
QueryUserPets chains the current query on the "user_pets" edge.
func (*PetQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Pet.Query(). Select(pet.FieldName). Scan(ctx, &v)
func (*PetQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*PetQuery) WithOwner ¶
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
func (*PetQuery) WithUserPets ¶
func (pq *PetQuery) WithUserPets(opts ...func(*UserPetQuery)) *PetQuery
WithUserPets tells the query-builder to eager-load the nodes that are connected to the "user_pets" edge. The optional arguments are used to configure the query builder of the edge.
type PetSelect ¶
type PetSelect struct { *PetQuery // contains filtered or unexported fields }
PetSelect is the builder for selecting fields of Pet entities.
func (*PetSelect) Aggregate ¶
func (ps *PetSelect) Aggregate(fns ...AggregateFunc) *PetSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PetSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PetSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PetSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PetSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PetSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PetSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PetSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PetUpdate ¶
type PetUpdate struct {
// contains filtered or unexported fields
}
PetUpdate is the builder for updating Pet entities.
func (*PetUpdate) AddOwnerIDs ¶
AddOwnerIDs adds the "owner" edge to the User entity by IDs.
func (*PetUpdate) ClearOwner ¶
ClearOwner clears all "owner" edges to the User entity.
func (*PetUpdate) Mutation ¶
func (pu *PetUpdate) Mutation() *PetMutation
Mutation returns the PetMutation object of the builder.
func (*PetUpdate) RemoveOwner ¶
RemoveOwner removes "owner" edges to User entities.
func (*PetUpdate) RemoveOwnerIDs ¶
RemoveOwnerIDs removes the "owner" edge to User entities by IDs.
func (*PetUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
type PetUpdateOne ¶
type PetUpdateOne struct {
// contains filtered or unexported fields
}
PetUpdateOne is the builder for updating a single Pet entity.
func (*PetUpdateOne) AddOwner ¶
func (puo *PetUpdateOne) AddOwner(u ...*User) *PetUpdateOne
AddOwner adds the "owner" edges to the User entity.
func (*PetUpdateOne) AddOwnerIDs ¶
func (puo *PetUpdateOne) AddOwnerIDs(ids ...int) *PetUpdateOne
AddOwnerIDs adds the "owner" edge to the User entity by IDs.
func (*PetUpdateOne) ClearOwner ¶
func (puo *PetUpdateOne) ClearOwner() *PetUpdateOne
ClearOwner clears all "owner" edges to the User entity.
func (*PetUpdateOne) Exec ¶
func (puo *PetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PetUpdateOne) ExecX ¶
func (puo *PetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PetUpdateOne) Mutation ¶
func (puo *PetUpdateOne) Mutation() *PetMutation
Mutation returns the PetMutation object of the builder.
func (*PetUpdateOne) RemoveOwner ¶
func (puo *PetUpdateOne) RemoveOwner(u ...*User) *PetUpdateOne
RemoveOwner removes "owner" edges to User entities.
func (*PetUpdateOne) RemoveOwnerIDs ¶
func (puo *PetUpdateOne) RemoveOwnerIDs(ids ...int) *PetUpdateOne
RemoveOwnerIDs removes the "owner" edge to User entities by IDs.
func (*PetUpdateOne) Save ¶
func (puo *PetUpdateOne) Save(ctx context.Context) (*Pet, error)
Save executes the query and returns the updated Pet entity.
func (*PetUpdateOne) SaveX ¶
func (puo *PetUpdateOne) SaveX(ctx context.Context) *Pet
SaveX is like Save, but panics if an error occurs.
func (*PetUpdateOne) Select ¶
func (puo *PetUpdateOne) Select(field string, fields ...string) *PetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PetUpdateOne) SetName ¶
func (puo *PetUpdateOne) SetName(s string) *PetUpdateOne
SetName sets the "name" field.
func (*PetUpdateOne) SetSvgRaw ¶
func (puo *PetUpdateOne) SetSvgRaw(s string) *PetUpdateOne
SetSvgRaw sets the "svg_raw" field.
func (*PetUpdateOne) Where ¶
func (puo *PetUpdateOne) Where(ps ...predicate.Pet) *PetUpdateOne
Where appends a list predicates to the PetUpdate builder.
type PetUpsert ¶
PetUpsert is the "OnConflict" setter.
func (*PetUpsert) UpdateName ¶
UpdateName sets the "name" field to the value that was provided on create.
func (*PetUpsert) UpdateSvgRaw ¶
UpdateSvgRaw sets the "svg_raw" field to the value that was provided on create.
type PetUpsertBulk ¶
type PetUpsertBulk struct {
// contains filtered or unexported fields
}
PetUpsertBulk is the builder for "upsert"-ing a bulk of Pet nodes.
func (*PetUpsertBulk) DoNothing ¶
func (u *PetUpsertBulk) DoNothing() *PetUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PetUpsertBulk) Exec ¶
func (u *PetUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PetUpsertBulk) ExecX ¶
func (u *PetUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PetUpsertBulk) Ignore ¶
func (u *PetUpsertBulk) Ignore() *PetUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Pet.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PetUpsertBulk) SetName ¶
func (u *PetUpsertBulk) SetName(v string) *PetUpsertBulk
SetName sets the "name" field.
func (*PetUpsertBulk) SetSvgRaw ¶
func (u *PetUpsertBulk) SetSvgRaw(v string) *PetUpsertBulk
SetSvgRaw sets the "svg_raw" field.
func (*PetUpsertBulk) Update ¶
func (u *PetUpsertBulk) Update(set func(*PetUpsert)) *PetUpsertBulk
Update allows overriding fields `UPDATE` values. See the PetCreateBulk.OnConflict documentation for more info.
func (*PetUpsertBulk) UpdateName ¶
func (u *PetUpsertBulk) UpdateName() *PetUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*PetUpsertBulk) UpdateNewValues ¶
func (u *PetUpsertBulk) UpdateNewValues() *PetUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Pet.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*PetUpsertBulk) UpdateSvgRaw ¶
func (u *PetUpsertBulk) UpdateSvgRaw() *PetUpsertBulk
UpdateSvgRaw sets the "svg_raw" field to the value that was provided on create.
type PetUpsertOne ¶
type PetUpsertOne struct {
// contains filtered or unexported fields
}
PetUpsertOne is the builder for "upsert"-ing
one Pet node.
func (*PetUpsertOne) DoNothing ¶
func (u *PetUpsertOne) DoNothing() *PetUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*PetUpsertOne) Exec ¶
func (u *PetUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*PetUpsertOne) ExecX ¶
func (u *PetUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PetUpsertOne) ID ¶
func (u *PetUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*PetUpsertOne) IDX ¶
func (u *PetUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*PetUpsertOne) Ignore ¶
func (u *PetUpsertOne) Ignore() *PetUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Pet.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*PetUpsertOne) SetName ¶
func (u *PetUpsertOne) SetName(v string) *PetUpsertOne
SetName sets the "name" field.
func (*PetUpsertOne) SetSvgRaw ¶
func (u *PetUpsertOne) SetSvgRaw(v string) *PetUpsertOne
SetSvgRaw sets the "svg_raw" field.
func (*PetUpsertOne) Update ¶
func (u *PetUpsertOne) Update(set func(*PetUpsert)) *PetUpsertOne
Update allows overriding fields `UPDATE` values. See the PetCreate.OnConflict documentation for more info.
func (*PetUpsertOne) UpdateName ¶
func (u *PetUpsertOne) UpdateName() *PetUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*PetUpsertOne) UpdateNewValues ¶
func (u *PetUpsertOne) UpdateNewValues() *PetUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Pet.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*PetUpsertOne) UpdateSvgRaw ¶
func (u *PetUpsertOne) UpdateSvgRaw() *PetUpsertOne
UpdateSvgRaw sets the "svg_raw" field to the value that was provided on create.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type Reaction ¶
type Reaction struct { // ID of the user that reacted on the post UserID int `json:"user_id,omitempty"` // ID of the post that was reacted to ForumPostID int `json:"forum_post_id,omitempty"` // Emoji used for the reaction Emoji string `json:"emoji,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ReactionQuery when eager-loading is set. Edges ReactionEdges `json:"edges"` // contains filtered or unexported fields }
Reaction is the model entity for the Reaction schema.
func (*Reaction) QueryForumPost ¶
func (r *Reaction) QueryForumPost() *ForumPostQuery
QueryForumPost queries the "forum_post" edge of the Reaction entity.
func (*Reaction) Unwrap ¶
Unwrap unwraps the Reaction 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 (*Reaction) Update ¶
func (r *Reaction) Update() *ReactionUpdateOne
Update returns a builder for updating this Reaction. Note that you need to call Reaction.Unwrap() before calling this method if this Reaction was returned from a transaction, and the transaction was committed or rolled back.
type ReactionClient ¶
type ReactionClient struct {
// contains filtered or unexported fields
}
ReactionClient is a client for the Reaction schema.
func NewReactionClient ¶
func NewReactionClient(c config) *ReactionClient
NewReactionClient returns a client for the Reaction from the given config.
func (*ReactionClient) Create ¶
func (c *ReactionClient) Create() *ReactionCreate
Create returns a builder for creating a Reaction entity.
func (*ReactionClient) CreateBulk ¶
func (c *ReactionClient) CreateBulk(builders ...*ReactionCreate) *ReactionCreateBulk
CreateBulk returns a builder for creating a bulk of Reaction entities.
func (*ReactionClient) Delete ¶
func (c *ReactionClient) Delete() *ReactionDelete
Delete returns a delete builder for Reaction.
func (*ReactionClient) Hooks ¶
func (c *ReactionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ReactionClient) Intercept ¶
func (c *ReactionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `reaction.Intercept(f(g(h())))`.
func (*ReactionClient) Interceptors ¶
func (c *ReactionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ReactionClient) Query ¶
func (c *ReactionClient) Query() *ReactionQuery
Query returns a query builder for Reaction.
func (*ReactionClient) QueryForumPost ¶
func (c *ReactionClient) QueryForumPost(r *Reaction) *ForumPostQuery
QueryForumPost queries the forum_post edge of a Reaction.
func (*ReactionClient) QueryUser ¶
func (c *ReactionClient) QueryUser(r *Reaction) *UserQuery
QueryUser queries the user edge of a Reaction.
func (*ReactionClient) Update ¶
func (c *ReactionClient) Update() *ReactionUpdate
Update returns an update builder for Reaction.
func (*ReactionClient) UpdateOne ¶
func (c *ReactionClient) UpdateOne(r *Reaction) *ReactionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ReactionClient) Use ¶
func (c *ReactionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `reaction.Hooks(f(g(h())))`.
type ReactionCreate ¶
type ReactionCreate struct {
// contains filtered or unexported fields
}
ReactionCreate is the builder for creating a Reaction entity.
func (*ReactionCreate) Exec ¶
func (rc *ReactionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionCreate) ExecX ¶
func (rc *ReactionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionCreate) Mutation ¶
func (rc *ReactionCreate) Mutation() *ReactionMutation
Mutation returns the ReactionMutation object of the builder.
func (*ReactionCreate) OnConflict ¶
func (rc *ReactionCreate) OnConflict(opts ...sql.ConflictOption) *ReactionUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Reaction.Create(). SetUserID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ReactionUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*ReactionCreate) OnConflictColumns ¶
func (rc *ReactionCreate) OnConflictColumns(columns ...string) *ReactionUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Reaction.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*ReactionCreate) Save ¶
func (rc *ReactionCreate) Save(ctx context.Context) (*Reaction, error)
Save creates the Reaction in the database.
func (*ReactionCreate) SaveX ¶
func (rc *ReactionCreate) SaveX(ctx context.Context) *Reaction
SaveX calls Save and panics if Save returns an error.
func (*ReactionCreate) SetEmoji ¶
func (rc *ReactionCreate) SetEmoji(s string) *ReactionCreate
SetEmoji sets the "emoji" field.
func (*ReactionCreate) SetForumPost ¶
func (rc *ReactionCreate) SetForumPost(f *ForumPost) *ReactionCreate
SetForumPost sets the "forum_post" edge to the ForumPost entity.
func (*ReactionCreate) SetForumPostID ¶
func (rc *ReactionCreate) SetForumPostID(i int) *ReactionCreate
SetForumPostID sets the "forum_post_id" field.
func (*ReactionCreate) SetUser ¶
func (rc *ReactionCreate) SetUser(u *User) *ReactionCreate
SetUser sets the "user" edge to the User entity.
func (*ReactionCreate) SetUserID ¶
func (rc *ReactionCreate) SetUserID(i int) *ReactionCreate
SetUserID sets the "user_id" field.
type ReactionCreateBulk ¶
type ReactionCreateBulk struct {
// contains filtered or unexported fields
}
ReactionCreateBulk is the builder for creating many Reaction entities in bulk.
func (*ReactionCreateBulk) Exec ¶
func (rcb *ReactionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionCreateBulk) ExecX ¶
func (rcb *ReactionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionCreateBulk) OnConflict ¶
func (rcb *ReactionCreateBulk) OnConflict(opts ...sql.ConflictOption) *ReactionUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Reaction.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.ReactionUpsert) { SetUserID(v+v). }). Exec(ctx)
func (*ReactionCreateBulk) OnConflictColumns ¶
func (rcb *ReactionCreateBulk) OnConflictColumns(columns ...string) *ReactionUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Reaction.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ReactionDelete ¶
type ReactionDelete struct {
// contains filtered or unexported fields
}
ReactionDelete is the builder for deleting a Reaction entity.
func (*ReactionDelete) Exec ¶
func (rd *ReactionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ReactionDelete) ExecX ¶
func (rd *ReactionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ReactionDelete) Where ¶
func (rd *ReactionDelete) Where(ps ...predicate.Reaction) *ReactionDelete
Where appends a list predicates to the ReactionDelete builder.
type ReactionDeleteOne ¶
type ReactionDeleteOne struct {
// contains filtered or unexported fields
}
ReactionDeleteOne is the builder for deleting a single Reaction entity.
func (*ReactionDeleteOne) Exec ¶
func (rdo *ReactionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ReactionDeleteOne) ExecX ¶
func (rdo *ReactionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionDeleteOne) Where ¶
func (rdo *ReactionDeleteOne) Where(ps ...predicate.Reaction) *ReactionDeleteOne
Where appends a list predicates to the ReactionDelete builder.
type ReactionEdges ¶
type ReactionEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // ForumPost holds the value of the forum_post edge. ForumPost *ForumPost `json:"forum_post,omitempty"` // contains filtered or unexported fields }
ReactionEdges holds the relations/edges for other nodes in the graph.
func (ReactionEdges) ForumPostOrErr ¶
func (e ReactionEdges) ForumPostOrErr() (*ForumPost, error)
ForumPostOrErr returns the ForumPost value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (ReactionEdges) UserOrErr ¶
func (e ReactionEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ReactionGroupBy ¶
type ReactionGroupBy struct {
// contains filtered or unexported fields
}
ReactionGroupBy is the group-by builder for Reaction entities.
func (*ReactionGroupBy) Aggregate ¶
func (rgb *ReactionGroupBy) Aggregate(fns ...AggregateFunc) *ReactionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ReactionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReactionGroupBy) Scan ¶
func (rgb *ReactionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReactionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReactionMutation ¶
type ReactionMutation struct {
// contains filtered or unexported fields
}
ReactionMutation represents an operation that mutates the Reaction nodes in the graph.
func (*ReactionMutation) AddField ¶
func (m *ReactionMutation) 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 (*ReactionMutation) AddedEdges ¶
func (m *ReactionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ReactionMutation) AddedField ¶
func (m *ReactionMutation) 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 (*ReactionMutation) AddedFields ¶
func (m *ReactionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ReactionMutation) AddedIDs ¶
func (m *ReactionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ReactionMutation) ClearEdge ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ClearField ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ClearForumPost ¶
func (m *ReactionMutation) ClearForumPost()
ClearForumPost clears the "forum_post" edge to the ForumPost entity.
func (*ReactionMutation) ClearUser ¶
func (m *ReactionMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*ReactionMutation) ClearedEdges ¶
func (m *ReactionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ReactionMutation) ClearedFields ¶
func (m *ReactionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ReactionMutation) Client ¶
func (m ReactionMutation) 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 (*ReactionMutation) EdgeCleared ¶
func (m *ReactionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ReactionMutation) Emoji ¶
func (m *ReactionMutation) Emoji() (r string, exists bool)
Emoji returns the value of the "emoji" field in the mutation.
func (*ReactionMutation) Field ¶
func (m *ReactionMutation) 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 (*ReactionMutation) FieldCleared ¶
func (m *ReactionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ReactionMutation) Fields ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ForumPostCleared ¶
func (m *ReactionMutation) ForumPostCleared() bool
ForumPostCleared reports if the "forum_post" edge to the ForumPost entity was cleared.
func (*ReactionMutation) ForumPostID ¶
func (m *ReactionMutation) ForumPostID() (r int, exists bool)
ForumPostID returns the value of the "forum_post_id" field in the mutation.
func (*ReactionMutation) ForumPostIDs ¶
func (m *ReactionMutation) ForumPostIDs() (ids []int)
ForumPostIDs returns the "forum_post" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ForumPostID instead. It exists only for internal usage by the builders.
func (*ReactionMutation) 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 (*ReactionMutation) RemovedEdges ¶
func (m *ReactionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ReactionMutation) RemovedIDs ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ResetEdge ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ResetEmoji ¶
func (m *ReactionMutation) ResetEmoji()
ResetEmoji resets all changes to the "emoji" field.
func (*ReactionMutation) ResetField ¶
func (m *ReactionMutation) 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 (*ReactionMutation) ResetForumPost ¶
func (m *ReactionMutation) ResetForumPost()
ResetForumPost resets all changes to the "forum_post" edge.
func (*ReactionMutation) ResetForumPostID ¶
func (m *ReactionMutation) ResetForumPostID()
ResetForumPostID resets all changes to the "forum_post_id" field.
func (*ReactionMutation) ResetUser ¶
func (m *ReactionMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*ReactionMutation) ResetUserID ¶
func (m *ReactionMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*ReactionMutation) SetEmoji ¶
func (m *ReactionMutation) SetEmoji(s string)
SetEmoji sets the "emoji" field.
func (*ReactionMutation) SetField ¶
func (m *ReactionMutation) 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 (*ReactionMutation) SetForumPostID ¶
func (m *ReactionMutation) SetForumPostID(i int)
SetForumPostID sets the "forum_post_id" field.
func (*ReactionMutation) SetOp ¶
func (m *ReactionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ReactionMutation) SetUserID ¶
func (m *ReactionMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (ReactionMutation) Tx ¶
func (m ReactionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ReactionMutation) Type ¶
func (m *ReactionMutation) Type() string
Type returns the node type of this mutation (Reaction).
func (*ReactionMutation) UserCleared ¶
func (m *ReactionMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*ReactionMutation) UserID ¶
func (m *ReactionMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*ReactionMutation) UserIDs ¶
func (m *ReactionMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*ReactionMutation) Where ¶
func (m *ReactionMutation) Where(ps ...predicate.Reaction)
Where appends a list predicates to the ReactionMutation builder.
func (*ReactionMutation) WhereP ¶
func (m *ReactionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ReactionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ReactionQuery ¶
type ReactionQuery struct {
// contains filtered or unexported fields
}
ReactionQuery is the builder for querying Reaction entities.
func (*ReactionQuery) Aggregate ¶
func (rq *ReactionQuery) Aggregate(fns ...AggregateFunc) *ReactionSelect
Aggregate returns a ReactionSelect configured with the given aggregations.
func (*ReactionQuery) All ¶
func (rq *ReactionQuery) All(ctx context.Context) ([]*Reaction, error)
All executes the query and returns a list of Reactions.
func (*ReactionQuery) AllX ¶
func (rq *ReactionQuery) AllX(ctx context.Context) []*Reaction
AllX is like All, but panics if an error occurs.
func (*ReactionQuery) Clone ¶
func (rq *ReactionQuery) Clone() *ReactionQuery
Clone returns a duplicate of the ReactionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ReactionQuery) Count ¶
func (rq *ReactionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ReactionQuery) CountX ¶
func (rq *ReactionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ReactionQuery) Exist ¶
func (rq *ReactionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ReactionQuery) ExistX ¶
func (rq *ReactionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ReactionQuery) First ¶
func (rq *ReactionQuery) First(ctx context.Context) (*Reaction, error)
First returns the first Reaction entity from the query. Returns a *NotFoundError when no Reaction was found.
func (*ReactionQuery) FirstX ¶
func (rq *ReactionQuery) FirstX(ctx context.Context) *Reaction
FirstX is like First, but panics if an error occurs.
func (*ReactionQuery) GroupBy ¶
func (rq *ReactionQuery) GroupBy(field string, fields ...string) *ReactionGroupBy
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 { UserID int `json:"user_id,omitempty"` Count int `json:"count,omitempty"` } client.Reaction.Query(). GroupBy(reaction.FieldUserID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ReactionQuery) Limit ¶
func (rq *ReactionQuery) Limit(limit int) *ReactionQuery
Limit the number of records to be returned by this query.
func (*ReactionQuery) Offset ¶
func (rq *ReactionQuery) Offset(offset int) *ReactionQuery
Offset to start from.
func (*ReactionQuery) Only ¶
func (rq *ReactionQuery) Only(ctx context.Context) (*Reaction, error)
Only returns a single Reaction entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Reaction entity is found. Returns a *NotFoundError when no Reaction entities are found.
func (*ReactionQuery) OnlyX ¶
func (rq *ReactionQuery) OnlyX(ctx context.Context) *Reaction
OnlyX is like Only, but panics if an error occurs.
func (*ReactionQuery) Order ¶
func (rq *ReactionQuery) Order(o ...reaction.OrderOption) *ReactionQuery
Order specifies how the records should be ordered.
func (*ReactionQuery) QueryForumPost ¶
func (rq *ReactionQuery) QueryForumPost() *ForumPostQuery
QueryForumPost chains the current query on the "forum_post" edge.
func (*ReactionQuery) QueryUser ¶
func (rq *ReactionQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*ReactionQuery) Select ¶
func (rq *ReactionQuery) Select(fields ...string) *ReactionSelect
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 { UserID int `json:"user_id,omitempty"` } client.Reaction.Query(). Select(reaction.FieldUserID). Scan(ctx, &v)
func (*ReactionQuery) Unique ¶
func (rq *ReactionQuery) Unique(unique bool) *ReactionQuery
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 (*ReactionQuery) Where ¶
func (rq *ReactionQuery) Where(ps ...predicate.Reaction) *ReactionQuery
Where adds a new predicate for the ReactionQuery builder.
func (*ReactionQuery) WithForumPost ¶
func (rq *ReactionQuery) WithForumPost(opts ...func(*ForumPostQuery)) *ReactionQuery
WithForumPost tells the query-builder to eager-load the nodes that are connected to the "forum_post" edge. The optional arguments are used to configure the query builder of the edge.
func (*ReactionQuery) WithUser ¶
func (rq *ReactionQuery) WithUser(opts ...func(*UserQuery)) *ReactionQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type ReactionSelect ¶
type ReactionSelect struct { *ReactionQuery // contains filtered or unexported fields }
ReactionSelect is the builder for selecting fields of Reaction entities.
func (*ReactionSelect) Aggregate ¶
func (rs *ReactionSelect) Aggregate(fns ...AggregateFunc) *ReactionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ReactionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ReactionSelect) Scan ¶
func (rs *ReactionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ReactionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ReactionUpdate ¶
type ReactionUpdate struct {
// contains filtered or unexported fields
}
ReactionUpdate is the builder for updating Reaction entities.
func (*ReactionUpdate) ClearForumPost ¶
func (ru *ReactionUpdate) ClearForumPost() *ReactionUpdate
ClearForumPost clears the "forum_post" edge to the ForumPost entity.
func (*ReactionUpdate) ClearUser ¶
func (ru *ReactionUpdate) ClearUser() *ReactionUpdate
ClearUser clears the "user" edge to the User entity.
func (*ReactionUpdate) Exec ¶
func (ru *ReactionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionUpdate) ExecX ¶
func (ru *ReactionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionUpdate) Mutation ¶
func (ru *ReactionUpdate) Mutation() *ReactionMutation
Mutation returns the ReactionMutation object of the builder.
func (*ReactionUpdate) Save ¶
func (ru *ReactionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ReactionUpdate) SaveX ¶
func (ru *ReactionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ReactionUpdate) SetEmoji ¶
func (ru *ReactionUpdate) SetEmoji(s string) *ReactionUpdate
SetEmoji sets the "emoji" field.
func (*ReactionUpdate) SetForumPost ¶
func (ru *ReactionUpdate) SetForumPost(f *ForumPost) *ReactionUpdate
SetForumPost sets the "forum_post" edge to the ForumPost entity.
func (*ReactionUpdate) SetForumPostID ¶
func (ru *ReactionUpdate) SetForumPostID(i int) *ReactionUpdate
SetForumPostID sets the "forum_post_id" field.
func (*ReactionUpdate) SetUser ¶
func (ru *ReactionUpdate) SetUser(u *User) *ReactionUpdate
SetUser sets the "user" edge to the User entity.
func (*ReactionUpdate) SetUserID ¶
func (ru *ReactionUpdate) SetUserID(i int) *ReactionUpdate
SetUserID sets the "user_id" field.
func (*ReactionUpdate) Where ¶
func (ru *ReactionUpdate) Where(ps ...predicate.Reaction) *ReactionUpdate
Where appends a list predicates to the ReactionUpdate builder.
type ReactionUpdateOne ¶
type ReactionUpdateOne struct {
// contains filtered or unexported fields
}
ReactionUpdateOne is the builder for updating a single Reaction entity.
func (*ReactionUpdateOne) ClearForumPost ¶
func (ruo *ReactionUpdateOne) ClearForumPost() *ReactionUpdateOne
ClearForumPost clears the "forum_post" edge to the ForumPost entity.
func (*ReactionUpdateOne) ClearUser ¶
func (ruo *ReactionUpdateOne) ClearUser() *ReactionUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*ReactionUpdateOne) Exec ¶
func (ruo *ReactionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ReactionUpdateOne) ExecX ¶
func (ruo *ReactionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionUpdateOne) Mutation ¶
func (ruo *ReactionUpdateOne) Mutation() *ReactionMutation
Mutation returns the ReactionMutation object of the builder.
func (*ReactionUpdateOne) Save ¶
func (ruo *ReactionUpdateOne) Save(ctx context.Context) (*Reaction, error)
Save executes the query and returns the updated Reaction entity.
func (*ReactionUpdateOne) SaveX ¶
func (ruo *ReactionUpdateOne) SaveX(ctx context.Context) *Reaction
SaveX is like Save, but panics if an error occurs.
func (*ReactionUpdateOne) Select ¶
func (ruo *ReactionUpdateOne) Select(field string, fields ...string) *ReactionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ReactionUpdateOne) SetEmoji ¶
func (ruo *ReactionUpdateOne) SetEmoji(s string) *ReactionUpdateOne
SetEmoji sets the "emoji" field.
func (*ReactionUpdateOne) SetForumPost ¶
func (ruo *ReactionUpdateOne) SetForumPost(f *ForumPost) *ReactionUpdateOne
SetForumPost sets the "forum_post" edge to the ForumPost entity.
func (*ReactionUpdateOne) SetForumPostID ¶
func (ruo *ReactionUpdateOne) SetForumPostID(i int) *ReactionUpdateOne
SetForumPostID sets the "forum_post_id" field.
func (*ReactionUpdateOne) SetUser ¶
func (ruo *ReactionUpdateOne) SetUser(u *User) *ReactionUpdateOne
SetUser sets the "user" edge to the User entity.
func (*ReactionUpdateOne) SetUserID ¶
func (ruo *ReactionUpdateOne) SetUserID(i int) *ReactionUpdateOne
SetUserID sets the "user_id" field.
func (*ReactionUpdateOne) Where ¶
func (ruo *ReactionUpdateOne) Where(ps ...predicate.Reaction) *ReactionUpdateOne
Where appends a list predicates to the ReactionUpdate builder.
type ReactionUpsert ¶
ReactionUpsert is the "OnConflict" setter.
func (*ReactionUpsert) SetEmoji ¶
func (u *ReactionUpsert) SetEmoji(v string) *ReactionUpsert
SetEmoji sets the "emoji" field.
func (*ReactionUpsert) SetForumPostID ¶
func (u *ReactionUpsert) SetForumPostID(v int) *ReactionUpsert
SetForumPostID sets the "forum_post_id" field.
func (*ReactionUpsert) SetUserID ¶
func (u *ReactionUpsert) SetUserID(v int) *ReactionUpsert
SetUserID sets the "user_id" field.
func (*ReactionUpsert) UpdateEmoji ¶
func (u *ReactionUpsert) UpdateEmoji() *ReactionUpsert
UpdateEmoji sets the "emoji" field to the value that was provided on create.
func (*ReactionUpsert) UpdateForumPostID ¶
func (u *ReactionUpsert) UpdateForumPostID() *ReactionUpsert
UpdateForumPostID sets the "forum_post_id" field to the value that was provided on create.
func (*ReactionUpsert) UpdateUserID ¶
func (u *ReactionUpsert) UpdateUserID() *ReactionUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type ReactionUpsertBulk ¶
type ReactionUpsertBulk struct {
// contains filtered or unexported fields
}
ReactionUpsertBulk is the builder for "upsert"-ing a bulk of Reaction nodes.
func (*ReactionUpsertBulk) DoNothing ¶
func (u *ReactionUpsertBulk) DoNothing() *ReactionUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ReactionUpsertBulk) Exec ¶
func (u *ReactionUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionUpsertBulk) ExecX ¶
func (u *ReactionUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionUpsertBulk) Ignore ¶
func (u *ReactionUpsertBulk) Ignore() *ReactionUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Reaction.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ReactionUpsertBulk) SetEmoji ¶
func (u *ReactionUpsertBulk) SetEmoji(v string) *ReactionUpsertBulk
SetEmoji sets the "emoji" field.
func (*ReactionUpsertBulk) SetForumPostID ¶
func (u *ReactionUpsertBulk) SetForumPostID(v int) *ReactionUpsertBulk
SetForumPostID sets the "forum_post_id" field.
func (*ReactionUpsertBulk) SetUserID ¶
func (u *ReactionUpsertBulk) SetUserID(v int) *ReactionUpsertBulk
SetUserID sets the "user_id" field.
func (*ReactionUpsertBulk) Update ¶
func (u *ReactionUpsertBulk) Update(set func(*ReactionUpsert)) *ReactionUpsertBulk
Update allows overriding fields `UPDATE` values. See the ReactionCreateBulk.OnConflict documentation for more info.
func (*ReactionUpsertBulk) UpdateEmoji ¶
func (u *ReactionUpsertBulk) UpdateEmoji() *ReactionUpsertBulk
UpdateEmoji sets the "emoji" field to the value that was provided on create.
func (*ReactionUpsertBulk) UpdateForumPostID ¶
func (u *ReactionUpsertBulk) UpdateForumPostID() *ReactionUpsertBulk
UpdateForumPostID sets the "forum_post_id" field to the value that was provided on create.
func (*ReactionUpsertBulk) UpdateNewValues ¶
func (u *ReactionUpsertBulk) UpdateNewValues() *ReactionUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Reaction.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ReactionUpsertBulk) UpdateUserID ¶
func (u *ReactionUpsertBulk) UpdateUserID() *ReactionUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type ReactionUpsertOne ¶
type ReactionUpsertOne struct {
// contains filtered or unexported fields
}
ReactionUpsertOne is the builder for "upsert"-ing
one Reaction node.
func (*ReactionUpsertOne) DoNothing ¶
func (u *ReactionUpsertOne) DoNothing() *ReactionUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ReactionUpsertOne) Exec ¶
func (u *ReactionUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionUpsertOne) ExecX ¶
func (u *ReactionUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionUpsertOne) Ignore ¶
func (u *ReactionUpsertOne) Ignore() *ReactionUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Reaction.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ReactionUpsertOne) SetEmoji ¶
func (u *ReactionUpsertOne) SetEmoji(v string) *ReactionUpsertOne
SetEmoji sets the "emoji" field.
func (*ReactionUpsertOne) SetForumPostID ¶
func (u *ReactionUpsertOne) SetForumPostID(v int) *ReactionUpsertOne
SetForumPostID sets the "forum_post_id" field.
func (*ReactionUpsertOne) SetUserID ¶
func (u *ReactionUpsertOne) SetUserID(v int) *ReactionUpsertOne
SetUserID sets the "user_id" field.
func (*ReactionUpsertOne) Update ¶
func (u *ReactionUpsertOne) Update(set func(*ReactionUpsert)) *ReactionUpsertOne
Update allows overriding fields `UPDATE` values. See the ReactionCreate.OnConflict documentation for more info.
func (*ReactionUpsertOne) UpdateEmoji ¶
func (u *ReactionUpsertOne) UpdateEmoji() *ReactionUpsertOne
UpdateEmoji sets the "emoji" field to the value that was provided on create.
func (*ReactionUpsertOne) UpdateForumPostID ¶
func (u *ReactionUpsertOne) UpdateForumPostID() *ReactionUpsertOne
UpdateForumPostID sets the "forum_post_id" field to the value that was provided on create.
func (*ReactionUpsertOne) UpdateNewValues ¶
func (u *ReactionUpsertOne) UpdateNewValues() *ReactionUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Reaction.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ReactionUpsertOne) UpdateUserID ¶
func (u *ReactionUpsertOne) UpdateUserID() *ReactionUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type Redemption ¶
type Redemption struct { // ID of the ent. ID int `json:"id,omitempty"` // Time when the prize was redeemed RedeemedAt time.Time `json:"redeemed_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RedemptionQuery when eager-loading is set. Edges RedemptionEdges `json:"edges"` // contains filtered or unexported fields }
Redemption is the model entity for the Redemption schema.
func (*Redemption) QueryAccessory ¶
func (r *Redemption) QueryAccessory() *AccessoryQuery
QueryAccessory queries the "accessory" edge of the Redemption entity.
func (*Redemption) QueryUser ¶
func (r *Redemption) QueryUser() *UserQuery
QueryUser queries the "user" edge of the Redemption entity.
func (*Redemption) QueryVoucher ¶
func (r *Redemption) QueryVoucher() *VoucherQuery
QueryVoucher queries the "voucher" edge of the Redemption entity.
func (*Redemption) String ¶
func (r *Redemption) String() string
String implements the fmt.Stringer.
func (*Redemption) Unwrap ¶
func (r *Redemption) Unwrap() *Redemption
Unwrap unwraps the Redemption 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 (*Redemption) Update ¶
func (r *Redemption) Update() *RedemptionUpdateOne
Update returns a builder for updating this Redemption. Note that you need to call Redemption.Unwrap() before calling this method if this Redemption was returned from a transaction, and the transaction was committed or rolled back.
type RedemptionClient ¶
type RedemptionClient struct {
// contains filtered or unexported fields
}
RedemptionClient is a client for the Redemption schema.
func NewRedemptionClient ¶
func NewRedemptionClient(c config) *RedemptionClient
NewRedemptionClient returns a client for the Redemption from the given config.
func (*RedemptionClient) Create ¶
func (c *RedemptionClient) Create() *RedemptionCreate
Create returns a builder for creating a Redemption entity.
func (*RedemptionClient) CreateBulk ¶
func (c *RedemptionClient) CreateBulk(builders ...*RedemptionCreate) *RedemptionCreateBulk
CreateBulk returns a builder for creating a bulk of Redemption entities.
func (*RedemptionClient) Delete ¶
func (c *RedemptionClient) Delete() *RedemptionDelete
Delete returns a delete builder for Redemption.
func (*RedemptionClient) DeleteOne ¶
func (c *RedemptionClient) DeleteOne(r *Redemption) *RedemptionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RedemptionClient) DeleteOneID ¶
func (c *RedemptionClient) DeleteOneID(id int) *RedemptionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RedemptionClient) Get ¶
func (c *RedemptionClient) Get(ctx context.Context, id int) (*Redemption, error)
Get returns a Redemption entity by its id.
func (*RedemptionClient) GetX ¶
func (c *RedemptionClient) GetX(ctx context.Context, id int) *Redemption
GetX is like Get, but panics if an error occurs.
func (*RedemptionClient) Hooks ¶
func (c *RedemptionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RedemptionClient) Intercept ¶
func (c *RedemptionClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `redemption.Intercept(f(g(h())))`.
func (*RedemptionClient) Interceptors ¶
func (c *RedemptionClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RedemptionClient) Query ¶
func (c *RedemptionClient) Query() *RedemptionQuery
Query returns a query builder for Redemption.
func (*RedemptionClient) QueryAccessory ¶
func (c *RedemptionClient) QueryAccessory(r *Redemption) *AccessoryQuery
QueryAccessory queries the accessory edge of a Redemption.
func (*RedemptionClient) QueryUser ¶
func (c *RedemptionClient) QueryUser(r *Redemption) *UserQuery
QueryUser queries the user edge of a Redemption.
func (*RedemptionClient) QueryVoucher ¶
func (c *RedemptionClient) QueryVoucher(r *Redemption) *VoucherQuery
QueryVoucher queries the voucher edge of a Redemption.
func (*RedemptionClient) Update ¶
func (c *RedemptionClient) Update() *RedemptionUpdate
Update returns an update builder for Redemption.
func (*RedemptionClient) UpdateOne ¶
func (c *RedemptionClient) UpdateOne(r *Redemption) *RedemptionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RedemptionClient) UpdateOneID ¶
func (c *RedemptionClient) UpdateOneID(id int) *RedemptionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RedemptionClient) Use ¶
func (c *RedemptionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `redemption.Hooks(f(g(h())))`.
type RedemptionCreate ¶
type RedemptionCreate struct {
// contains filtered or unexported fields
}
RedemptionCreate is the builder for creating a Redemption entity.
func (*RedemptionCreate) Exec ¶
func (rc *RedemptionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RedemptionCreate) ExecX ¶
func (rc *RedemptionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedemptionCreate) Mutation ¶
func (rc *RedemptionCreate) Mutation() *RedemptionMutation
Mutation returns the RedemptionMutation object of the builder.
func (*RedemptionCreate) OnConflict ¶
func (rc *RedemptionCreate) OnConflict(opts ...sql.ConflictOption) *RedemptionUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Redemption.Create(). SetRedeemedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RedemptionUpsert) { SetRedeemedAt(v+v). }). Exec(ctx)
func (*RedemptionCreate) OnConflictColumns ¶
func (rc *RedemptionCreate) OnConflictColumns(columns ...string) *RedemptionUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Redemption.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RedemptionCreate) Save ¶
func (rc *RedemptionCreate) Save(ctx context.Context) (*Redemption, error)
Save creates the Redemption in the database.
func (*RedemptionCreate) SaveX ¶
func (rc *RedemptionCreate) SaveX(ctx context.Context) *Redemption
SaveX calls Save and panics if Save returns an error.
func (*RedemptionCreate) SetAccessory ¶
func (rc *RedemptionCreate) SetAccessory(a *Accessory) *RedemptionCreate
SetAccessory sets the "accessory" edge to the Accessory entity.
func (*RedemptionCreate) SetAccessoryID ¶
func (rc *RedemptionCreate) SetAccessoryID(id int) *RedemptionCreate
SetAccessoryID sets the "accessory" edge to the Accessory entity by ID.
func (*RedemptionCreate) SetNillableAccessoryID ¶
func (rc *RedemptionCreate) SetNillableAccessoryID(id *int) *RedemptionCreate
SetNillableAccessoryID sets the "accessory" edge to the Accessory entity by ID if the given value is not nil.
func (*RedemptionCreate) SetNillableVoucherID ¶
func (rc *RedemptionCreate) SetNillableVoucherID(id *int) *RedemptionCreate
SetNillableVoucherID sets the "voucher" edge to the Voucher entity by ID if the given value is not nil.
func (*RedemptionCreate) SetRedeemedAt ¶
func (rc *RedemptionCreate) SetRedeemedAt(t time.Time) *RedemptionCreate
SetRedeemedAt sets the "redeemed_at" field.
func (*RedemptionCreate) SetUser ¶
func (rc *RedemptionCreate) SetUser(u *User) *RedemptionCreate
SetUser sets the "user" edge to the User entity.
func (*RedemptionCreate) SetUserID ¶
func (rc *RedemptionCreate) SetUserID(id int) *RedemptionCreate
SetUserID sets the "user" edge to the User entity by ID.
func (*RedemptionCreate) SetVoucher ¶
func (rc *RedemptionCreate) SetVoucher(v *Voucher) *RedemptionCreate
SetVoucher sets the "voucher" edge to the Voucher entity.
func (*RedemptionCreate) SetVoucherID ¶
func (rc *RedemptionCreate) SetVoucherID(id int) *RedemptionCreate
SetVoucherID sets the "voucher" edge to the Voucher entity by ID.
type RedemptionCreateBulk ¶
type RedemptionCreateBulk struct {
// contains filtered or unexported fields
}
RedemptionCreateBulk is the builder for creating many Redemption entities in bulk.
func (*RedemptionCreateBulk) Exec ¶
func (rcb *RedemptionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RedemptionCreateBulk) ExecX ¶
func (rcb *RedemptionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedemptionCreateBulk) OnConflict ¶
func (rcb *RedemptionCreateBulk) OnConflict(opts ...sql.ConflictOption) *RedemptionUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Redemption.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RedemptionUpsert) { SetRedeemedAt(v+v). }). Exec(ctx)
func (*RedemptionCreateBulk) OnConflictColumns ¶
func (rcb *RedemptionCreateBulk) OnConflictColumns(columns ...string) *RedemptionUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Redemption.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RedemptionCreateBulk) Save ¶
func (rcb *RedemptionCreateBulk) Save(ctx context.Context) ([]*Redemption, error)
Save creates the Redemption entities in the database.
func (*RedemptionCreateBulk) SaveX ¶
func (rcb *RedemptionCreateBulk) SaveX(ctx context.Context) []*Redemption
SaveX is like Save, but panics if an error occurs.
type RedemptionDelete ¶
type RedemptionDelete struct {
// contains filtered or unexported fields
}
RedemptionDelete is the builder for deleting a Redemption entity.
func (*RedemptionDelete) Exec ¶
func (rd *RedemptionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RedemptionDelete) ExecX ¶
func (rd *RedemptionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RedemptionDelete) Where ¶
func (rd *RedemptionDelete) Where(ps ...predicate.Redemption) *RedemptionDelete
Where appends a list predicates to the RedemptionDelete builder.
type RedemptionDeleteOne ¶
type RedemptionDeleteOne struct {
// contains filtered or unexported fields
}
RedemptionDeleteOne is the builder for deleting a single Redemption entity.
func (*RedemptionDeleteOne) Exec ¶
func (rdo *RedemptionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RedemptionDeleteOne) ExecX ¶
func (rdo *RedemptionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedemptionDeleteOne) Where ¶
func (rdo *RedemptionDeleteOne) Where(ps ...predicate.Redemption) *RedemptionDeleteOne
Where appends a list predicates to the RedemptionDelete builder.
type RedemptionEdges ¶
type RedemptionEdges struct { // Voucher holds the value of the voucher edge. Voucher *Voucher `json:"voucher,omitempty"` // Accessory holds the value of the accessory edge. Accessory *Accessory `json:"accessory,omitempty"` // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
RedemptionEdges holds the relations/edges for other nodes in the graph.
func (RedemptionEdges) AccessoryOrErr ¶
func (e RedemptionEdges) AccessoryOrErr() (*Accessory, error)
AccessoryOrErr returns the Accessory value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RedemptionEdges) UserOrErr ¶
func (e RedemptionEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RedemptionEdges) VoucherOrErr ¶
func (e RedemptionEdges) VoucherOrErr() (*Voucher, error)
VoucherOrErr returns the Voucher value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RedemptionGroupBy ¶
type RedemptionGroupBy struct {
// contains filtered or unexported fields
}
RedemptionGroupBy is the group-by builder for Redemption entities.
func (*RedemptionGroupBy) Aggregate ¶
func (rgb *RedemptionGroupBy) Aggregate(fns ...AggregateFunc) *RedemptionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RedemptionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RedemptionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RedemptionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RedemptionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RedemptionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RedemptionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RedemptionGroupBy) Scan ¶
func (rgb *RedemptionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RedemptionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RedemptionMutation ¶
type RedemptionMutation struct {
// contains filtered or unexported fields
}
RedemptionMutation represents an operation that mutates the Redemption nodes in the graph.
func (*RedemptionMutation) AccessoryCleared ¶
func (m *RedemptionMutation) AccessoryCleared() bool
AccessoryCleared reports if the "accessory" edge to the Accessory entity was cleared.
func (*RedemptionMutation) AccessoryID ¶
func (m *RedemptionMutation) AccessoryID() (id int, exists bool)
AccessoryID returns the "accessory" edge ID in the mutation.
func (*RedemptionMutation) AccessoryIDs ¶
func (m *RedemptionMutation) AccessoryIDs() (ids []int)
AccessoryIDs returns the "accessory" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AccessoryID instead. It exists only for internal usage by the builders.
func (*RedemptionMutation) AddField ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) AddedEdges ¶
func (m *RedemptionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RedemptionMutation) AddedField ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) AddedFields ¶
func (m *RedemptionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RedemptionMutation) AddedIDs ¶
func (m *RedemptionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RedemptionMutation) ClearAccessory ¶
func (m *RedemptionMutation) ClearAccessory()
ClearAccessory clears the "accessory" edge to the Accessory entity.
func (*RedemptionMutation) ClearEdge ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) ClearField ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) ClearUser ¶
func (m *RedemptionMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*RedemptionMutation) ClearVoucher ¶
func (m *RedemptionMutation) ClearVoucher()
ClearVoucher clears the "voucher" edge to the Voucher entity.
func (*RedemptionMutation) ClearedEdges ¶
func (m *RedemptionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RedemptionMutation) ClearedFields ¶
func (m *RedemptionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RedemptionMutation) Client ¶
func (m RedemptionMutation) 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 (*RedemptionMutation) EdgeCleared ¶
func (m *RedemptionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RedemptionMutation) Field ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) FieldCleared ¶
func (m *RedemptionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RedemptionMutation) Fields ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) ID ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) IDs ¶
func (m *RedemptionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RedemptionMutation) 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 (*RedemptionMutation) OldRedeemedAt ¶
OldRedeemedAt returns the old "redeemed_at" field's value of the Redemption entity. If the Redemption object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RedemptionMutation) RedeemedAt ¶
func (m *RedemptionMutation) RedeemedAt() (r time.Time, exists bool)
RedeemedAt returns the value of the "redeemed_at" field in the mutation.
func (*RedemptionMutation) RemovedEdges ¶
func (m *RedemptionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RedemptionMutation) RemovedIDs ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) ResetAccessory ¶
func (m *RedemptionMutation) ResetAccessory()
ResetAccessory resets all changes to the "accessory" edge.
func (*RedemptionMutation) ResetEdge ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) ResetField ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) ResetRedeemedAt ¶
func (m *RedemptionMutation) ResetRedeemedAt()
ResetRedeemedAt resets all changes to the "redeemed_at" field.
func (*RedemptionMutation) ResetUser ¶
func (m *RedemptionMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*RedemptionMutation) ResetVoucher ¶
func (m *RedemptionMutation) ResetVoucher()
ResetVoucher resets all changes to the "voucher" edge.
func (*RedemptionMutation) SetAccessoryID ¶
func (m *RedemptionMutation) SetAccessoryID(id int)
SetAccessoryID sets the "accessory" edge to the Accessory entity by id.
func (*RedemptionMutation) SetField ¶
func (m *RedemptionMutation) 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 (*RedemptionMutation) SetOp ¶
func (m *RedemptionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RedemptionMutation) SetRedeemedAt ¶
func (m *RedemptionMutation) SetRedeemedAt(t time.Time)
SetRedeemedAt sets the "redeemed_at" field.
func (*RedemptionMutation) SetUserID ¶
func (m *RedemptionMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*RedemptionMutation) SetVoucherID ¶
func (m *RedemptionMutation) SetVoucherID(id int)
SetVoucherID sets the "voucher" edge to the Voucher entity by id.
func (RedemptionMutation) Tx ¶
func (m RedemptionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RedemptionMutation) Type ¶
func (m *RedemptionMutation) Type() string
Type returns the node type of this mutation (Redemption).
func (*RedemptionMutation) UserCleared ¶
func (m *RedemptionMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*RedemptionMutation) UserID ¶
func (m *RedemptionMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*RedemptionMutation) UserIDs ¶
func (m *RedemptionMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*RedemptionMutation) VoucherCleared ¶
func (m *RedemptionMutation) VoucherCleared() bool
VoucherCleared reports if the "voucher" edge to the Voucher entity was cleared.
func (*RedemptionMutation) VoucherID ¶
func (m *RedemptionMutation) VoucherID() (id int, exists bool)
VoucherID returns the "voucher" edge ID in the mutation.
func (*RedemptionMutation) VoucherIDs ¶
func (m *RedemptionMutation) VoucherIDs() (ids []int)
VoucherIDs returns the "voucher" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use VoucherID instead. It exists only for internal usage by the builders.
func (*RedemptionMutation) Where ¶
func (m *RedemptionMutation) Where(ps ...predicate.Redemption)
Where appends a list predicates to the RedemptionMutation builder.
func (*RedemptionMutation) WhereP ¶
func (m *RedemptionMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RedemptionMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RedemptionQuery ¶
type RedemptionQuery struct {
// contains filtered or unexported fields
}
RedemptionQuery is the builder for querying Redemption entities.
func (*RedemptionQuery) Aggregate ¶
func (rq *RedemptionQuery) Aggregate(fns ...AggregateFunc) *RedemptionSelect
Aggregate returns a RedemptionSelect configured with the given aggregations.
func (*RedemptionQuery) All ¶
func (rq *RedemptionQuery) All(ctx context.Context) ([]*Redemption, error)
All executes the query and returns a list of Redemptions.
func (*RedemptionQuery) AllX ¶
func (rq *RedemptionQuery) AllX(ctx context.Context) []*Redemption
AllX is like All, but panics if an error occurs.
func (*RedemptionQuery) Clone ¶
func (rq *RedemptionQuery) Clone() *RedemptionQuery
Clone returns a duplicate of the RedemptionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RedemptionQuery) Count ¶
func (rq *RedemptionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RedemptionQuery) CountX ¶
func (rq *RedemptionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RedemptionQuery) Exist ¶
func (rq *RedemptionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RedemptionQuery) ExistX ¶
func (rq *RedemptionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RedemptionQuery) First ¶
func (rq *RedemptionQuery) First(ctx context.Context) (*Redemption, error)
First returns the first Redemption entity from the query. Returns a *NotFoundError when no Redemption was found.
func (*RedemptionQuery) FirstID ¶
func (rq *RedemptionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Redemption ID from the query. Returns a *NotFoundError when no Redemption ID was found.
func (*RedemptionQuery) FirstIDX ¶
func (rq *RedemptionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*RedemptionQuery) FirstX ¶
func (rq *RedemptionQuery) FirstX(ctx context.Context) *Redemption
FirstX is like First, but panics if an error occurs.
func (*RedemptionQuery) GroupBy ¶
func (rq *RedemptionQuery) GroupBy(field string, fields ...string) *RedemptionGroupBy
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 { RedeemedAt time.Time `json:"redeemed_at,omitempty"` Count int `json:"count,omitempty"` } client.Redemption.Query(). GroupBy(redemption.FieldRedeemedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RedemptionQuery) IDs ¶
func (rq *RedemptionQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Redemption IDs.
func (*RedemptionQuery) IDsX ¶
func (rq *RedemptionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*RedemptionQuery) Limit ¶
func (rq *RedemptionQuery) Limit(limit int) *RedemptionQuery
Limit the number of records to be returned by this query.
func (*RedemptionQuery) Offset ¶
func (rq *RedemptionQuery) Offset(offset int) *RedemptionQuery
Offset to start from.
func (*RedemptionQuery) Only ¶
func (rq *RedemptionQuery) Only(ctx context.Context) (*Redemption, error)
Only returns a single Redemption entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Redemption entity is found. Returns a *NotFoundError when no Redemption entities are found.
func (*RedemptionQuery) OnlyID ¶
func (rq *RedemptionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Redemption ID in the query. Returns a *NotSingularError when more than one Redemption ID is found. Returns a *NotFoundError when no entities are found.
func (*RedemptionQuery) OnlyIDX ¶
func (rq *RedemptionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RedemptionQuery) OnlyX ¶
func (rq *RedemptionQuery) OnlyX(ctx context.Context) *Redemption
OnlyX is like Only, but panics if an error occurs.
func (*RedemptionQuery) Order ¶
func (rq *RedemptionQuery) Order(o ...redemption.OrderOption) *RedemptionQuery
Order specifies how the records should be ordered.
func (*RedemptionQuery) QueryAccessory ¶
func (rq *RedemptionQuery) QueryAccessory() *AccessoryQuery
QueryAccessory chains the current query on the "accessory" edge.
func (*RedemptionQuery) QueryUser ¶
func (rq *RedemptionQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*RedemptionQuery) QueryVoucher ¶
func (rq *RedemptionQuery) QueryVoucher() *VoucherQuery
QueryVoucher chains the current query on the "voucher" edge.
func (*RedemptionQuery) Select ¶
func (rq *RedemptionQuery) Select(fields ...string) *RedemptionSelect
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 { RedeemedAt time.Time `json:"redeemed_at,omitempty"` } client.Redemption.Query(). Select(redemption.FieldRedeemedAt). Scan(ctx, &v)
func (*RedemptionQuery) Unique ¶
func (rq *RedemptionQuery) Unique(unique bool) *RedemptionQuery
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 (*RedemptionQuery) Where ¶
func (rq *RedemptionQuery) Where(ps ...predicate.Redemption) *RedemptionQuery
Where adds a new predicate for the RedemptionQuery builder.
func (*RedemptionQuery) WithAccessory ¶
func (rq *RedemptionQuery) WithAccessory(opts ...func(*AccessoryQuery)) *RedemptionQuery
WithAccessory tells the query-builder to eager-load the nodes that are connected to the "accessory" edge. The optional arguments are used to configure the query builder of the edge.
func (*RedemptionQuery) WithUser ¶
func (rq *RedemptionQuery) WithUser(opts ...func(*UserQuery)) *RedemptionQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
func (*RedemptionQuery) WithVoucher ¶
func (rq *RedemptionQuery) WithVoucher(opts ...func(*VoucherQuery)) *RedemptionQuery
WithVoucher tells the query-builder to eager-load the nodes that are connected to the "voucher" edge. The optional arguments are used to configure the query builder of the edge.
type RedemptionSelect ¶
type RedemptionSelect struct { *RedemptionQuery // contains filtered or unexported fields }
RedemptionSelect is the builder for selecting fields of Redemption entities.
func (*RedemptionSelect) Aggregate ¶
func (rs *RedemptionSelect) Aggregate(fns ...AggregateFunc) *RedemptionSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RedemptionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RedemptionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RedemptionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RedemptionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RedemptionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RedemptionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RedemptionSelect) Scan ¶
func (rs *RedemptionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RedemptionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RedemptionUpdate ¶
type RedemptionUpdate struct {
// contains filtered or unexported fields
}
RedemptionUpdate is the builder for updating Redemption entities.
func (*RedemptionUpdate) ClearAccessory ¶
func (ru *RedemptionUpdate) ClearAccessory() *RedemptionUpdate
ClearAccessory clears the "accessory" edge to the Accessory entity.
func (*RedemptionUpdate) ClearUser ¶
func (ru *RedemptionUpdate) ClearUser() *RedemptionUpdate
ClearUser clears the "user" edge to the User entity.
func (*RedemptionUpdate) ClearVoucher ¶
func (ru *RedemptionUpdate) ClearVoucher() *RedemptionUpdate
ClearVoucher clears the "voucher" edge to the Voucher entity.
func (*RedemptionUpdate) Exec ¶
func (ru *RedemptionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RedemptionUpdate) ExecX ¶
func (ru *RedemptionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedemptionUpdate) Mutation ¶
func (ru *RedemptionUpdate) Mutation() *RedemptionMutation
Mutation returns the RedemptionMutation object of the builder.
func (*RedemptionUpdate) Save ¶
func (ru *RedemptionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RedemptionUpdate) SaveX ¶
func (ru *RedemptionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RedemptionUpdate) SetAccessory ¶
func (ru *RedemptionUpdate) SetAccessory(a *Accessory) *RedemptionUpdate
SetAccessory sets the "accessory" edge to the Accessory entity.
func (*RedemptionUpdate) SetAccessoryID ¶
func (ru *RedemptionUpdate) SetAccessoryID(id int) *RedemptionUpdate
SetAccessoryID sets the "accessory" edge to the Accessory entity by ID.
func (*RedemptionUpdate) SetNillableAccessoryID ¶
func (ru *RedemptionUpdate) SetNillableAccessoryID(id *int) *RedemptionUpdate
SetNillableAccessoryID sets the "accessory" edge to the Accessory entity by ID if the given value is not nil.
func (*RedemptionUpdate) SetNillableVoucherID ¶
func (ru *RedemptionUpdate) SetNillableVoucherID(id *int) *RedemptionUpdate
SetNillableVoucherID sets the "voucher" edge to the Voucher entity by ID if the given value is not nil.
func (*RedemptionUpdate) SetRedeemedAt ¶
func (ru *RedemptionUpdate) SetRedeemedAt(t time.Time) *RedemptionUpdate
SetRedeemedAt sets the "redeemed_at" field.
func (*RedemptionUpdate) SetUser ¶
func (ru *RedemptionUpdate) SetUser(u *User) *RedemptionUpdate
SetUser sets the "user" edge to the User entity.
func (*RedemptionUpdate) SetUserID ¶
func (ru *RedemptionUpdate) SetUserID(id int) *RedemptionUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*RedemptionUpdate) SetVoucher ¶
func (ru *RedemptionUpdate) SetVoucher(v *Voucher) *RedemptionUpdate
SetVoucher sets the "voucher" edge to the Voucher entity.
func (*RedemptionUpdate) SetVoucherID ¶
func (ru *RedemptionUpdate) SetVoucherID(id int) *RedemptionUpdate
SetVoucherID sets the "voucher" edge to the Voucher entity by ID.
func (*RedemptionUpdate) Where ¶
func (ru *RedemptionUpdate) Where(ps ...predicate.Redemption) *RedemptionUpdate
Where appends a list predicates to the RedemptionUpdate builder.
type RedemptionUpdateOne ¶
type RedemptionUpdateOne struct {
// contains filtered or unexported fields
}
RedemptionUpdateOne is the builder for updating a single Redemption entity.
func (*RedemptionUpdateOne) ClearAccessory ¶
func (ruo *RedemptionUpdateOne) ClearAccessory() *RedemptionUpdateOne
ClearAccessory clears the "accessory" edge to the Accessory entity.
func (*RedemptionUpdateOne) ClearUser ¶
func (ruo *RedemptionUpdateOne) ClearUser() *RedemptionUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*RedemptionUpdateOne) ClearVoucher ¶
func (ruo *RedemptionUpdateOne) ClearVoucher() *RedemptionUpdateOne
ClearVoucher clears the "voucher" edge to the Voucher entity.
func (*RedemptionUpdateOne) Exec ¶
func (ruo *RedemptionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RedemptionUpdateOne) ExecX ¶
func (ruo *RedemptionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedemptionUpdateOne) Mutation ¶
func (ruo *RedemptionUpdateOne) Mutation() *RedemptionMutation
Mutation returns the RedemptionMutation object of the builder.
func (*RedemptionUpdateOne) Save ¶
func (ruo *RedemptionUpdateOne) Save(ctx context.Context) (*Redemption, error)
Save executes the query and returns the updated Redemption entity.
func (*RedemptionUpdateOne) SaveX ¶
func (ruo *RedemptionUpdateOne) SaveX(ctx context.Context) *Redemption
SaveX is like Save, but panics if an error occurs.
func (*RedemptionUpdateOne) Select ¶
func (ruo *RedemptionUpdateOne) Select(field string, fields ...string) *RedemptionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RedemptionUpdateOne) SetAccessory ¶
func (ruo *RedemptionUpdateOne) SetAccessory(a *Accessory) *RedemptionUpdateOne
SetAccessory sets the "accessory" edge to the Accessory entity.
func (*RedemptionUpdateOne) SetAccessoryID ¶
func (ruo *RedemptionUpdateOne) SetAccessoryID(id int) *RedemptionUpdateOne
SetAccessoryID sets the "accessory" edge to the Accessory entity by ID.
func (*RedemptionUpdateOne) SetNillableAccessoryID ¶
func (ruo *RedemptionUpdateOne) SetNillableAccessoryID(id *int) *RedemptionUpdateOne
SetNillableAccessoryID sets the "accessory" edge to the Accessory entity by ID if the given value is not nil.
func (*RedemptionUpdateOne) SetNillableVoucherID ¶
func (ruo *RedemptionUpdateOne) SetNillableVoucherID(id *int) *RedemptionUpdateOne
SetNillableVoucherID sets the "voucher" edge to the Voucher entity by ID if the given value is not nil.
func (*RedemptionUpdateOne) SetRedeemedAt ¶
func (ruo *RedemptionUpdateOne) SetRedeemedAt(t time.Time) *RedemptionUpdateOne
SetRedeemedAt sets the "redeemed_at" field.
func (*RedemptionUpdateOne) SetUser ¶
func (ruo *RedemptionUpdateOne) SetUser(u *User) *RedemptionUpdateOne
SetUser sets the "user" edge to the User entity.
func (*RedemptionUpdateOne) SetUserID ¶
func (ruo *RedemptionUpdateOne) SetUserID(id int) *RedemptionUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*RedemptionUpdateOne) SetVoucher ¶
func (ruo *RedemptionUpdateOne) SetVoucher(v *Voucher) *RedemptionUpdateOne
SetVoucher sets the "voucher" edge to the Voucher entity.
func (*RedemptionUpdateOne) SetVoucherID ¶
func (ruo *RedemptionUpdateOne) SetVoucherID(id int) *RedemptionUpdateOne
SetVoucherID sets the "voucher" edge to the Voucher entity by ID.
func (*RedemptionUpdateOne) Where ¶
func (ruo *RedemptionUpdateOne) Where(ps ...predicate.Redemption) *RedemptionUpdateOne
Where appends a list predicates to the RedemptionUpdate builder.
type RedemptionUpsert ¶
RedemptionUpsert is the "OnConflict" setter.
func (*RedemptionUpsert) SetRedeemedAt ¶
func (u *RedemptionUpsert) SetRedeemedAt(v time.Time) *RedemptionUpsert
SetRedeemedAt sets the "redeemed_at" field.
func (*RedemptionUpsert) UpdateRedeemedAt ¶
func (u *RedemptionUpsert) UpdateRedeemedAt() *RedemptionUpsert
UpdateRedeemedAt sets the "redeemed_at" field to the value that was provided on create.
type RedemptionUpsertBulk ¶
type RedemptionUpsertBulk struct {
// contains filtered or unexported fields
}
RedemptionUpsertBulk is the builder for "upsert"-ing a bulk of Redemption nodes.
func (*RedemptionUpsertBulk) DoNothing ¶
func (u *RedemptionUpsertBulk) DoNothing() *RedemptionUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RedemptionUpsertBulk) Exec ¶
func (u *RedemptionUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RedemptionUpsertBulk) ExecX ¶
func (u *RedemptionUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedemptionUpsertBulk) Ignore ¶
func (u *RedemptionUpsertBulk) Ignore() *RedemptionUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Redemption.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RedemptionUpsertBulk) SetRedeemedAt ¶
func (u *RedemptionUpsertBulk) SetRedeemedAt(v time.Time) *RedemptionUpsertBulk
SetRedeemedAt sets the "redeemed_at" field.
func (*RedemptionUpsertBulk) Update ¶
func (u *RedemptionUpsertBulk) Update(set func(*RedemptionUpsert)) *RedemptionUpsertBulk
Update allows overriding fields `UPDATE` values. See the RedemptionCreateBulk.OnConflict documentation for more info.
func (*RedemptionUpsertBulk) UpdateNewValues ¶
func (u *RedemptionUpsertBulk) UpdateNewValues() *RedemptionUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Redemption.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*RedemptionUpsertBulk) UpdateRedeemedAt ¶
func (u *RedemptionUpsertBulk) UpdateRedeemedAt() *RedemptionUpsertBulk
UpdateRedeemedAt sets the "redeemed_at" field to the value that was provided on create.
type RedemptionUpsertOne ¶
type RedemptionUpsertOne struct {
// contains filtered or unexported fields
}
RedemptionUpsertOne is the builder for "upsert"-ing
one Redemption node.
func (*RedemptionUpsertOne) DoNothing ¶
func (u *RedemptionUpsertOne) DoNothing() *RedemptionUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RedemptionUpsertOne) Exec ¶
func (u *RedemptionUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*RedemptionUpsertOne) ExecX ¶
func (u *RedemptionUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RedemptionUpsertOne) ID ¶
func (u *RedemptionUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*RedemptionUpsertOne) IDX ¶
func (u *RedemptionUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*RedemptionUpsertOne) Ignore ¶
func (u *RedemptionUpsertOne) Ignore() *RedemptionUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Redemption.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RedemptionUpsertOne) SetRedeemedAt ¶
func (u *RedemptionUpsertOne) SetRedeemedAt(v time.Time) *RedemptionUpsertOne
SetRedeemedAt sets the "redeemed_at" field.
func (*RedemptionUpsertOne) Update ¶
func (u *RedemptionUpsertOne) Update(set func(*RedemptionUpsert)) *RedemptionUpsertOne
Update allows overriding fields `UPDATE` values. See the RedemptionCreate.OnConflict documentation for more info.
func (*RedemptionUpsertOne) UpdateNewValues ¶
func (u *RedemptionUpsertOne) UpdateNewValues() *RedemptionUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Redemption.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*RedemptionUpsertOne) UpdateRedeemedAt ¶
func (u *RedemptionUpsertOne) UpdateRedeemedAt() *RedemptionUpsertOne
UpdateRedeemedAt sets the "redeemed_at" field to the value that was provided on create.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type StudyPlan ¶
type StudyPlan struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the study plan Name string `json:"name,omitempty"` // Code for sharing the study plan Code string `json:"code,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the StudyPlanQuery when eager-loading is set. Edges StudyPlanEdges `json:"edges"` // contains filtered or unexported fields }
StudyPlan is the model entity for the StudyPlan schema.
func (*StudyPlan) QueryAuthor ¶
QueryAuthor queries the "author" edge of the StudyPlan entity.
func (*StudyPlan) QueryMilestones ¶
func (sp *StudyPlan) QueryMilestones() *MilestoneQuery
QueryMilestones queries the "milestones" edge of the StudyPlan entity.
func (*StudyPlan) Unwrap ¶
Unwrap unwraps the StudyPlan 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 (*StudyPlan) Update ¶
func (sp *StudyPlan) Update() *StudyPlanUpdateOne
Update returns a builder for updating this StudyPlan. Note that you need to call StudyPlan.Unwrap() before calling this method if this StudyPlan was returned from a transaction, and the transaction was committed or rolled back.
type StudyPlanClient ¶
type StudyPlanClient struct {
// contains filtered or unexported fields
}
StudyPlanClient is a client for the StudyPlan schema.
func NewStudyPlanClient ¶
func NewStudyPlanClient(c config) *StudyPlanClient
NewStudyPlanClient returns a client for the StudyPlan from the given config.
func (*StudyPlanClient) Create ¶
func (c *StudyPlanClient) Create() *StudyPlanCreate
Create returns a builder for creating a StudyPlan entity.
func (*StudyPlanClient) CreateBulk ¶
func (c *StudyPlanClient) CreateBulk(builders ...*StudyPlanCreate) *StudyPlanCreateBulk
CreateBulk returns a builder for creating a bulk of StudyPlan entities.
func (*StudyPlanClient) Delete ¶
func (c *StudyPlanClient) Delete() *StudyPlanDelete
Delete returns a delete builder for StudyPlan.
func (*StudyPlanClient) DeleteOne ¶
func (c *StudyPlanClient) DeleteOne(sp *StudyPlan) *StudyPlanDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*StudyPlanClient) DeleteOneID ¶
func (c *StudyPlanClient) DeleteOneID(id int) *StudyPlanDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*StudyPlanClient) GetX ¶
func (c *StudyPlanClient) GetX(ctx context.Context, id int) *StudyPlan
GetX is like Get, but panics if an error occurs.
func (*StudyPlanClient) Hooks ¶
func (c *StudyPlanClient) Hooks() []Hook
Hooks returns the client hooks.
func (*StudyPlanClient) Intercept ¶
func (c *StudyPlanClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `studyplan.Intercept(f(g(h())))`.
func (*StudyPlanClient) Interceptors ¶
func (c *StudyPlanClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*StudyPlanClient) Query ¶
func (c *StudyPlanClient) Query() *StudyPlanQuery
Query returns a query builder for StudyPlan.
func (*StudyPlanClient) QueryAuthor ¶
func (c *StudyPlanClient) QueryAuthor(sp *StudyPlan) *UserQuery
QueryAuthor queries the author edge of a StudyPlan.
func (*StudyPlanClient) QueryMilestones ¶
func (c *StudyPlanClient) QueryMilestones(sp *StudyPlan) *MilestoneQuery
QueryMilestones queries the milestones edge of a StudyPlan.
func (*StudyPlanClient) Update ¶
func (c *StudyPlanClient) Update() *StudyPlanUpdate
Update returns an update builder for StudyPlan.
func (*StudyPlanClient) UpdateOne ¶
func (c *StudyPlanClient) UpdateOne(sp *StudyPlan) *StudyPlanUpdateOne
UpdateOne returns an update builder for the given entity.
func (*StudyPlanClient) UpdateOneID ¶
func (c *StudyPlanClient) UpdateOneID(id int) *StudyPlanUpdateOne
UpdateOneID returns an update builder for the given id.
func (*StudyPlanClient) Use ¶
func (c *StudyPlanClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `studyplan.Hooks(f(g(h())))`.
type StudyPlanCreate ¶
type StudyPlanCreate struct {
// contains filtered or unexported fields
}
StudyPlanCreate is the builder for creating a StudyPlan entity.
func (*StudyPlanCreate) AddMilestoneIDs ¶
func (spc *StudyPlanCreate) AddMilestoneIDs(ids ...int) *StudyPlanCreate
AddMilestoneIDs adds the "milestones" edge to the Milestone entity by IDs.
func (*StudyPlanCreate) AddMilestones ¶
func (spc *StudyPlanCreate) AddMilestones(m ...*Milestone) *StudyPlanCreate
AddMilestones adds the "milestones" edges to the Milestone entity.
func (*StudyPlanCreate) Exec ¶
func (spc *StudyPlanCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StudyPlanCreate) ExecX ¶
func (spc *StudyPlanCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudyPlanCreate) Mutation ¶
func (spc *StudyPlanCreate) Mutation() *StudyPlanMutation
Mutation returns the StudyPlanMutation object of the builder.
func (*StudyPlanCreate) OnConflict ¶
func (spc *StudyPlanCreate) OnConflict(opts ...sql.ConflictOption) *StudyPlanUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.StudyPlan.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.StudyPlanUpsert) { SetName(v+v). }). Exec(ctx)
func (*StudyPlanCreate) OnConflictColumns ¶
func (spc *StudyPlanCreate) OnConflictColumns(columns ...string) *StudyPlanUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.StudyPlan.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*StudyPlanCreate) Save ¶
func (spc *StudyPlanCreate) Save(ctx context.Context) (*StudyPlan, error)
Save creates the StudyPlan in the database.
func (*StudyPlanCreate) SaveX ¶
func (spc *StudyPlanCreate) SaveX(ctx context.Context) *StudyPlan
SaveX calls Save and panics if Save returns an error.
func (*StudyPlanCreate) SetAuthor ¶
func (spc *StudyPlanCreate) SetAuthor(u *User) *StudyPlanCreate
SetAuthor sets the "author" edge to the User entity.
func (*StudyPlanCreate) SetAuthorID ¶
func (spc *StudyPlanCreate) SetAuthorID(id int) *StudyPlanCreate
SetAuthorID sets the "author" edge to the User entity by ID.
func (*StudyPlanCreate) SetCode ¶
func (spc *StudyPlanCreate) SetCode(s string) *StudyPlanCreate
SetCode sets the "code" field.
func (*StudyPlanCreate) SetName ¶
func (spc *StudyPlanCreate) SetName(s string) *StudyPlanCreate
SetName sets the "name" field.
func (*StudyPlanCreate) SetNillableCode ¶
func (spc *StudyPlanCreate) SetNillableCode(s *string) *StudyPlanCreate
SetNillableCode sets the "code" field if the given value is not nil.
type StudyPlanCreateBulk ¶
type StudyPlanCreateBulk struct {
// contains filtered or unexported fields
}
StudyPlanCreateBulk is the builder for creating many StudyPlan entities in bulk.
func (*StudyPlanCreateBulk) Exec ¶
func (spcb *StudyPlanCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StudyPlanCreateBulk) ExecX ¶
func (spcb *StudyPlanCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudyPlanCreateBulk) OnConflict ¶
func (spcb *StudyPlanCreateBulk) OnConflict(opts ...sql.ConflictOption) *StudyPlanUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.StudyPlan.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.StudyPlanUpsert) { SetName(v+v). }). Exec(ctx)
func (*StudyPlanCreateBulk) OnConflictColumns ¶
func (spcb *StudyPlanCreateBulk) OnConflictColumns(columns ...string) *StudyPlanUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.StudyPlan.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type StudyPlanDelete ¶
type StudyPlanDelete struct {
// contains filtered or unexported fields
}
StudyPlanDelete is the builder for deleting a StudyPlan entity.
func (*StudyPlanDelete) Exec ¶
func (spd *StudyPlanDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StudyPlanDelete) ExecX ¶
func (spd *StudyPlanDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StudyPlanDelete) Where ¶
func (spd *StudyPlanDelete) Where(ps ...predicate.StudyPlan) *StudyPlanDelete
Where appends a list predicates to the StudyPlanDelete builder.
type StudyPlanDeleteOne ¶
type StudyPlanDeleteOne struct {
// contains filtered or unexported fields
}
StudyPlanDeleteOne is the builder for deleting a single StudyPlan entity.
func (*StudyPlanDeleteOne) Exec ¶
func (spdo *StudyPlanDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StudyPlanDeleteOne) ExecX ¶
func (spdo *StudyPlanDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudyPlanDeleteOne) Where ¶
func (spdo *StudyPlanDeleteOne) Where(ps ...predicate.StudyPlan) *StudyPlanDeleteOne
Where appends a list predicates to the StudyPlanDelete builder.
type StudyPlanEdges ¶
type StudyPlanEdges struct { // Author of the study plan Author *User `json:"author,omitempty"` // Milestones of the study plan Milestones []*Milestone `json:"milestones,omitempty"` // contains filtered or unexported fields }
StudyPlanEdges holds the relations/edges for other nodes in the graph.
func (StudyPlanEdges) AuthorOrErr ¶
func (e StudyPlanEdges) AuthorOrErr() (*User, error)
AuthorOrErr returns the Author value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (StudyPlanEdges) MilestonesOrErr ¶
func (e StudyPlanEdges) MilestonesOrErr() ([]*Milestone, error)
MilestonesOrErr returns the Milestones value or an error if the edge was not loaded in eager-loading.
type StudyPlanGroupBy ¶
type StudyPlanGroupBy struct {
// contains filtered or unexported fields
}
StudyPlanGroupBy is the group-by builder for StudyPlan entities.
func (*StudyPlanGroupBy) Aggregate ¶
func (spgb *StudyPlanGroupBy) Aggregate(fns ...AggregateFunc) *StudyPlanGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*StudyPlanGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StudyPlanGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StudyPlanGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StudyPlanGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StudyPlanGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StudyPlanGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StudyPlanGroupBy) Scan ¶
func (spgb *StudyPlanGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StudyPlanGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StudyPlanMutation ¶
type StudyPlanMutation struct {
// contains filtered or unexported fields
}
StudyPlanMutation represents an operation that mutates the StudyPlan nodes in the graph.
func (*StudyPlanMutation) AddField ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) AddMilestoneIDs ¶
func (m *StudyPlanMutation) AddMilestoneIDs(ids ...int)
AddMilestoneIDs adds the "milestones" edge to the Milestone entity by ids.
func (*StudyPlanMutation) AddedEdges ¶
func (m *StudyPlanMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*StudyPlanMutation) AddedField ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) AddedFields ¶
func (m *StudyPlanMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*StudyPlanMutation) AddedIDs ¶
func (m *StudyPlanMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*StudyPlanMutation) AuthorCleared ¶
func (m *StudyPlanMutation) AuthorCleared() bool
AuthorCleared reports if the "author" edge to the User entity was cleared.
func (*StudyPlanMutation) AuthorID ¶
func (m *StudyPlanMutation) AuthorID() (id int, exists bool)
AuthorID returns the "author" edge ID in the mutation.
func (*StudyPlanMutation) AuthorIDs ¶
func (m *StudyPlanMutation) AuthorIDs() (ids []int)
AuthorIDs returns the "author" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use AuthorID instead. It exists only for internal usage by the builders.
func (*StudyPlanMutation) ClearAuthor ¶
func (m *StudyPlanMutation) ClearAuthor()
ClearAuthor clears the "author" edge to the User entity.
func (*StudyPlanMutation) ClearCode ¶
func (m *StudyPlanMutation) ClearCode()
ClearCode clears the value of the "code" field.
func (*StudyPlanMutation) ClearEdge ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) ClearField ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) ClearMilestones ¶
func (m *StudyPlanMutation) ClearMilestones()
ClearMilestones clears the "milestones" edge to the Milestone entity.
func (*StudyPlanMutation) ClearedEdges ¶
func (m *StudyPlanMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*StudyPlanMutation) ClearedFields ¶
func (m *StudyPlanMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (StudyPlanMutation) Client ¶
func (m StudyPlanMutation) 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 (*StudyPlanMutation) Code ¶
func (m *StudyPlanMutation) Code() (r string, exists bool)
Code returns the value of the "code" field in the mutation.
func (*StudyPlanMutation) CodeCleared ¶
func (m *StudyPlanMutation) CodeCleared() bool
CodeCleared returns if the "code" field was cleared in this mutation.
func (*StudyPlanMutation) EdgeCleared ¶
func (m *StudyPlanMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*StudyPlanMutation) Field ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) FieldCleared ¶
func (m *StudyPlanMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*StudyPlanMutation) Fields ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) ID ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) IDs ¶
func (m *StudyPlanMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*StudyPlanMutation) MilestonesCleared ¶
func (m *StudyPlanMutation) MilestonesCleared() bool
MilestonesCleared reports if the "milestones" edge to the Milestone entity was cleared.
func (*StudyPlanMutation) MilestonesIDs ¶
func (m *StudyPlanMutation) MilestonesIDs() (ids []int)
MilestonesIDs returns the "milestones" edge IDs in the mutation.
func (*StudyPlanMutation) Name ¶
func (m *StudyPlanMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*StudyPlanMutation) OldCode ¶
func (m *StudyPlanMutation) OldCode(ctx context.Context) (v string, err error)
OldCode returns the old "code" field's value of the StudyPlan entity. If the StudyPlan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StudyPlanMutation) 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 (*StudyPlanMutation) OldName ¶
func (m *StudyPlanMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the StudyPlan entity. If the StudyPlan object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*StudyPlanMutation) RemoveMilestoneIDs ¶
func (m *StudyPlanMutation) RemoveMilestoneIDs(ids ...int)
RemoveMilestoneIDs removes the "milestones" edge to the Milestone entity by IDs.
func (*StudyPlanMutation) RemovedEdges ¶
func (m *StudyPlanMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*StudyPlanMutation) RemovedIDs ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) RemovedMilestonesIDs ¶
func (m *StudyPlanMutation) RemovedMilestonesIDs() (ids []int)
RemovedMilestones returns the removed IDs of the "milestones" edge to the Milestone entity.
func (*StudyPlanMutation) ResetAuthor ¶
func (m *StudyPlanMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" edge.
func (*StudyPlanMutation) ResetCode ¶
func (m *StudyPlanMutation) ResetCode()
ResetCode resets all changes to the "code" field.
func (*StudyPlanMutation) ResetEdge ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) ResetField ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) ResetMilestones ¶
func (m *StudyPlanMutation) ResetMilestones()
ResetMilestones resets all changes to the "milestones" edge.
func (*StudyPlanMutation) ResetName ¶
func (m *StudyPlanMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*StudyPlanMutation) SetAuthorID ¶
func (m *StudyPlanMutation) SetAuthorID(id int)
SetAuthorID sets the "author" edge to the User entity by id.
func (*StudyPlanMutation) SetCode ¶
func (m *StudyPlanMutation) SetCode(s string)
SetCode sets the "code" field.
func (*StudyPlanMutation) SetField ¶
func (m *StudyPlanMutation) 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 (*StudyPlanMutation) SetName ¶
func (m *StudyPlanMutation) SetName(s string)
SetName sets the "name" field.
func (*StudyPlanMutation) SetOp ¶
func (m *StudyPlanMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (StudyPlanMutation) Tx ¶
func (m StudyPlanMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*StudyPlanMutation) Type ¶
func (m *StudyPlanMutation) Type() string
Type returns the node type of this mutation (StudyPlan).
func (*StudyPlanMutation) Where ¶
func (m *StudyPlanMutation) Where(ps ...predicate.StudyPlan)
Where appends a list predicates to the StudyPlanMutation builder.
func (*StudyPlanMutation) WhereP ¶
func (m *StudyPlanMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the StudyPlanMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type StudyPlanQuery ¶
type StudyPlanQuery struct {
// contains filtered or unexported fields
}
StudyPlanQuery is the builder for querying StudyPlan entities.
func (*StudyPlanQuery) Aggregate ¶
func (spq *StudyPlanQuery) Aggregate(fns ...AggregateFunc) *StudyPlanSelect
Aggregate returns a StudyPlanSelect configured with the given aggregations.
func (*StudyPlanQuery) All ¶
func (spq *StudyPlanQuery) All(ctx context.Context) ([]*StudyPlan, error)
All executes the query and returns a list of StudyPlans.
func (*StudyPlanQuery) AllX ¶
func (spq *StudyPlanQuery) AllX(ctx context.Context) []*StudyPlan
AllX is like All, but panics if an error occurs.
func (*StudyPlanQuery) Clone ¶
func (spq *StudyPlanQuery) Clone() *StudyPlanQuery
Clone returns a duplicate of the StudyPlanQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*StudyPlanQuery) Count ¶
func (spq *StudyPlanQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StudyPlanQuery) CountX ¶
func (spq *StudyPlanQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StudyPlanQuery) Exist ¶
func (spq *StudyPlanQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StudyPlanQuery) ExistX ¶
func (spq *StudyPlanQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StudyPlanQuery) First ¶
func (spq *StudyPlanQuery) First(ctx context.Context) (*StudyPlan, error)
First returns the first StudyPlan entity from the query. Returns a *NotFoundError when no StudyPlan was found.
func (*StudyPlanQuery) FirstID ¶
func (spq *StudyPlanQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first StudyPlan ID from the query. Returns a *NotFoundError when no StudyPlan ID was found.
func (*StudyPlanQuery) FirstIDX ¶
func (spq *StudyPlanQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*StudyPlanQuery) FirstX ¶
func (spq *StudyPlanQuery) FirstX(ctx context.Context) *StudyPlan
FirstX is like First, but panics if an error occurs.
func (*StudyPlanQuery) GroupBy ¶
func (spq *StudyPlanQuery) GroupBy(field string, fields ...string) *StudyPlanGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.StudyPlan.Query(). GroupBy(studyplan.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*StudyPlanQuery) IDs ¶
func (spq *StudyPlanQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of StudyPlan IDs.
func (*StudyPlanQuery) IDsX ¶
func (spq *StudyPlanQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*StudyPlanQuery) Limit ¶
func (spq *StudyPlanQuery) Limit(limit int) *StudyPlanQuery
Limit the number of records to be returned by this query.
func (*StudyPlanQuery) Offset ¶
func (spq *StudyPlanQuery) Offset(offset int) *StudyPlanQuery
Offset to start from.
func (*StudyPlanQuery) Only ¶
func (spq *StudyPlanQuery) Only(ctx context.Context) (*StudyPlan, error)
Only returns a single StudyPlan entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one StudyPlan entity is found. Returns a *NotFoundError when no StudyPlan entities are found.
func (*StudyPlanQuery) OnlyID ¶
func (spq *StudyPlanQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only StudyPlan ID in the query. Returns a *NotSingularError when more than one StudyPlan ID is found. Returns a *NotFoundError when no entities are found.
func (*StudyPlanQuery) OnlyIDX ¶
func (spq *StudyPlanQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StudyPlanQuery) OnlyX ¶
func (spq *StudyPlanQuery) OnlyX(ctx context.Context) *StudyPlan
OnlyX is like Only, but panics if an error occurs.
func (*StudyPlanQuery) Order ¶
func (spq *StudyPlanQuery) Order(o ...studyplan.OrderOption) *StudyPlanQuery
Order specifies how the records should be ordered.
func (*StudyPlanQuery) QueryAuthor ¶
func (spq *StudyPlanQuery) QueryAuthor() *UserQuery
QueryAuthor chains the current query on the "author" edge.
func (*StudyPlanQuery) QueryMilestones ¶
func (spq *StudyPlanQuery) QueryMilestones() *MilestoneQuery
QueryMilestones chains the current query on the "milestones" edge.
func (*StudyPlanQuery) Select ¶
func (spq *StudyPlanQuery) Select(fields ...string) *StudyPlanSelect
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 { Name string `json:"name,omitempty"` } client.StudyPlan.Query(). Select(studyplan.FieldName). Scan(ctx, &v)
func (*StudyPlanQuery) Unique ¶
func (spq *StudyPlanQuery) Unique(unique bool) *StudyPlanQuery
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 (*StudyPlanQuery) Where ¶
func (spq *StudyPlanQuery) Where(ps ...predicate.StudyPlan) *StudyPlanQuery
Where adds a new predicate for the StudyPlanQuery builder.
func (*StudyPlanQuery) WithAuthor ¶
func (spq *StudyPlanQuery) WithAuthor(opts ...func(*UserQuery)) *StudyPlanQuery
WithAuthor tells the query-builder to eager-load the nodes that are connected to the "author" edge. The optional arguments are used to configure the query builder of the edge.
func (*StudyPlanQuery) WithMilestones ¶
func (spq *StudyPlanQuery) WithMilestones(opts ...func(*MilestoneQuery)) *StudyPlanQuery
WithMilestones tells the query-builder to eager-load the nodes that are connected to the "milestones" edge. The optional arguments are used to configure the query builder of the edge.
type StudyPlanSelect ¶
type StudyPlanSelect struct { *StudyPlanQuery // contains filtered or unexported fields }
StudyPlanSelect is the builder for selecting fields of StudyPlan entities.
func (*StudyPlanSelect) Aggregate ¶
func (sps *StudyPlanSelect) Aggregate(fns ...AggregateFunc) *StudyPlanSelect
Aggregate adds the given aggregation functions to the selector query.
func (*StudyPlanSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StudyPlanSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StudyPlanSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StudyPlanSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StudyPlanSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StudyPlanSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StudyPlanSelect) Scan ¶
func (sps *StudyPlanSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StudyPlanSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StudyPlanUpdate ¶
type StudyPlanUpdate struct {
// contains filtered or unexported fields
}
StudyPlanUpdate is the builder for updating StudyPlan entities.
func (*StudyPlanUpdate) AddMilestoneIDs ¶
func (spu *StudyPlanUpdate) AddMilestoneIDs(ids ...int) *StudyPlanUpdate
AddMilestoneIDs adds the "milestones" edge to the Milestone entity by IDs.
func (*StudyPlanUpdate) AddMilestones ¶
func (spu *StudyPlanUpdate) AddMilestones(m ...*Milestone) *StudyPlanUpdate
AddMilestones adds the "milestones" edges to the Milestone entity.
func (*StudyPlanUpdate) ClearAuthor ¶
func (spu *StudyPlanUpdate) ClearAuthor() *StudyPlanUpdate
ClearAuthor clears the "author" edge to the User entity.
func (*StudyPlanUpdate) ClearCode ¶
func (spu *StudyPlanUpdate) ClearCode() *StudyPlanUpdate
ClearCode clears the value of the "code" field.
func (*StudyPlanUpdate) ClearMilestones ¶
func (spu *StudyPlanUpdate) ClearMilestones() *StudyPlanUpdate
ClearMilestones clears all "milestones" edges to the Milestone entity.
func (*StudyPlanUpdate) Exec ¶
func (spu *StudyPlanUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StudyPlanUpdate) ExecX ¶
func (spu *StudyPlanUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudyPlanUpdate) Mutation ¶
func (spu *StudyPlanUpdate) Mutation() *StudyPlanMutation
Mutation returns the StudyPlanMutation object of the builder.
func (*StudyPlanUpdate) RemoveMilestoneIDs ¶
func (spu *StudyPlanUpdate) RemoveMilestoneIDs(ids ...int) *StudyPlanUpdate
RemoveMilestoneIDs removes the "milestones" edge to Milestone entities by IDs.
func (*StudyPlanUpdate) RemoveMilestones ¶
func (spu *StudyPlanUpdate) RemoveMilestones(m ...*Milestone) *StudyPlanUpdate
RemoveMilestones removes "milestones" edges to Milestone entities.
func (*StudyPlanUpdate) Save ¶
func (spu *StudyPlanUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*StudyPlanUpdate) SaveX ¶
func (spu *StudyPlanUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StudyPlanUpdate) SetAuthor ¶
func (spu *StudyPlanUpdate) SetAuthor(u *User) *StudyPlanUpdate
SetAuthor sets the "author" edge to the User entity.
func (*StudyPlanUpdate) SetAuthorID ¶
func (spu *StudyPlanUpdate) SetAuthorID(id int) *StudyPlanUpdate
SetAuthorID sets the "author" edge to the User entity by ID.
func (*StudyPlanUpdate) SetCode ¶
func (spu *StudyPlanUpdate) SetCode(s string) *StudyPlanUpdate
SetCode sets the "code" field.
func (*StudyPlanUpdate) SetName ¶
func (spu *StudyPlanUpdate) SetName(s string) *StudyPlanUpdate
SetName sets the "name" field.
func (*StudyPlanUpdate) SetNillableCode ¶
func (spu *StudyPlanUpdate) SetNillableCode(s *string) *StudyPlanUpdate
SetNillableCode sets the "code" field if the given value is not nil.
func (*StudyPlanUpdate) Where ¶
func (spu *StudyPlanUpdate) Where(ps ...predicate.StudyPlan) *StudyPlanUpdate
Where appends a list predicates to the StudyPlanUpdate builder.
type StudyPlanUpdateOne ¶
type StudyPlanUpdateOne struct {
// contains filtered or unexported fields
}
StudyPlanUpdateOne is the builder for updating a single StudyPlan entity.
func (*StudyPlanUpdateOne) AddMilestoneIDs ¶
func (spuo *StudyPlanUpdateOne) AddMilestoneIDs(ids ...int) *StudyPlanUpdateOne
AddMilestoneIDs adds the "milestones" edge to the Milestone entity by IDs.
func (*StudyPlanUpdateOne) AddMilestones ¶
func (spuo *StudyPlanUpdateOne) AddMilestones(m ...*Milestone) *StudyPlanUpdateOne
AddMilestones adds the "milestones" edges to the Milestone entity.
func (*StudyPlanUpdateOne) ClearAuthor ¶
func (spuo *StudyPlanUpdateOne) ClearAuthor() *StudyPlanUpdateOne
ClearAuthor clears the "author" edge to the User entity.
func (*StudyPlanUpdateOne) ClearCode ¶
func (spuo *StudyPlanUpdateOne) ClearCode() *StudyPlanUpdateOne
ClearCode clears the value of the "code" field.
func (*StudyPlanUpdateOne) ClearMilestones ¶
func (spuo *StudyPlanUpdateOne) ClearMilestones() *StudyPlanUpdateOne
ClearMilestones clears all "milestones" edges to the Milestone entity.
func (*StudyPlanUpdateOne) Exec ¶
func (spuo *StudyPlanUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StudyPlanUpdateOne) ExecX ¶
func (spuo *StudyPlanUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudyPlanUpdateOne) Mutation ¶
func (spuo *StudyPlanUpdateOne) Mutation() *StudyPlanMutation
Mutation returns the StudyPlanMutation object of the builder.
func (*StudyPlanUpdateOne) RemoveMilestoneIDs ¶
func (spuo *StudyPlanUpdateOne) RemoveMilestoneIDs(ids ...int) *StudyPlanUpdateOne
RemoveMilestoneIDs removes the "milestones" edge to Milestone entities by IDs.
func (*StudyPlanUpdateOne) RemoveMilestones ¶
func (spuo *StudyPlanUpdateOne) RemoveMilestones(m ...*Milestone) *StudyPlanUpdateOne
RemoveMilestones removes "milestones" edges to Milestone entities.
func (*StudyPlanUpdateOne) Save ¶
func (spuo *StudyPlanUpdateOne) Save(ctx context.Context) (*StudyPlan, error)
Save executes the query and returns the updated StudyPlan entity.
func (*StudyPlanUpdateOne) SaveX ¶
func (spuo *StudyPlanUpdateOne) SaveX(ctx context.Context) *StudyPlan
SaveX is like Save, but panics if an error occurs.
func (*StudyPlanUpdateOne) Select ¶
func (spuo *StudyPlanUpdateOne) Select(field string, fields ...string) *StudyPlanUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*StudyPlanUpdateOne) SetAuthor ¶
func (spuo *StudyPlanUpdateOne) SetAuthor(u *User) *StudyPlanUpdateOne
SetAuthor sets the "author" edge to the User entity.
func (*StudyPlanUpdateOne) SetAuthorID ¶
func (spuo *StudyPlanUpdateOne) SetAuthorID(id int) *StudyPlanUpdateOne
SetAuthorID sets the "author" edge to the User entity by ID.
func (*StudyPlanUpdateOne) SetCode ¶
func (spuo *StudyPlanUpdateOne) SetCode(s string) *StudyPlanUpdateOne
SetCode sets the "code" field.
func (*StudyPlanUpdateOne) SetName ¶
func (spuo *StudyPlanUpdateOne) SetName(s string) *StudyPlanUpdateOne
SetName sets the "name" field.
func (*StudyPlanUpdateOne) SetNillableCode ¶
func (spuo *StudyPlanUpdateOne) SetNillableCode(s *string) *StudyPlanUpdateOne
SetNillableCode sets the "code" field if the given value is not nil.
func (*StudyPlanUpdateOne) Where ¶
func (spuo *StudyPlanUpdateOne) Where(ps ...predicate.StudyPlan) *StudyPlanUpdateOne
Where appends a list predicates to the StudyPlanUpdate builder.
type StudyPlanUpsert ¶
StudyPlanUpsert is the "OnConflict" setter.
func (*StudyPlanUpsert) ClearCode ¶
func (u *StudyPlanUpsert) ClearCode() *StudyPlanUpsert
ClearCode clears the value of the "code" field.
func (*StudyPlanUpsert) SetCode ¶
func (u *StudyPlanUpsert) SetCode(v string) *StudyPlanUpsert
SetCode sets the "code" field.
func (*StudyPlanUpsert) SetName ¶
func (u *StudyPlanUpsert) SetName(v string) *StudyPlanUpsert
SetName sets the "name" field.
func (*StudyPlanUpsert) UpdateCode ¶
func (u *StudyPlanUpsert) UpdateCode() *StudyPlanUpsert
UpdateCode sets the "code" field to the value that was provided on create.
func (*StudyPlanUpsert) UpdateName ¶
func (u *StudyPlanUpsert) UpdateName() *StudyPlanUpsert
UpdateName sets the "name" field to the value that was provided on create.
type StudyPlanUpsertBulk ¶
type StudyPlanUpsertBulk struct {
// contains filtered or unexported fields
}
StudyPlanUpsertBulk is the builder for "upsert"-ing a bulk of StudyPlan nodes.
func (*StudyPlanUpsertBulk) ClearCode ¶
func (u *StudyPlanUpsertBulk) ClearCode() *StudyPlanUpsertBulk
ClearCode clears the value of the "code" field.
func (*StudyPlanUpsertBulk) DoNothing ¶
func (u *StudyPlanUpsertBulk) DoNothing() *StudyPlanUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*StudyPlanUpsertBulk) Exec ¶
func (u *StudyPlanUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StudyPlanUpsertBulk) ExecX ¶
func (u *StudyPlanUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudyPlanUpsertBulk) Ignore ¶
func (u *StudyPlanUpsertBulk) Ignore() *StudyPlanUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.StudyPlan.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*StudyPlanUpsertBulk) SetCode ¶
func (u *StudyPlanUpsertBulk) SetCode(v string) *StudyPlanUpsertBulk
SetCode sets the "code" field.
func (*StudyPlanUpsertBulk) SetName ¶
func (u *StudyPlanUpsertBulk) SetName(v string) *StudyPlanUpsertBulk
SetName sets the "name" field.
func (*StudyPlanUpsertBulk) Update ¶
func (u *StudyPlanUpsertBulk) Update(set func(*StudyPlanUpsert)) *StudyPlanUpsertBulk
Update allows overriding fields `UPDATE` values. See the StudyPlanCreateBulk.OnConflict documentation for more info.
func (*StudyPlanUpsertBulk) UpdateCode ¶
func (u *StudyPlanUpsertBulk) UpdateCode() *StudyPlanUpsertBulk
UpdateCode sets the "code" field to the value that was provided on create.
func (*StudyPlanUpsertBulk) UpdateName ¶
func (u *StudyPlanUpsertBulk) UpdateName() *StudyPlanUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*StudyPlanUpsertBulk) UpdateNewValues ¶
func (u *StudyPlanUpsertBulk) UpdateNewValues() *StudyPlanUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.StudyPlan.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type StudyPlanUpsertOne ¶
type StudyPlanUpsertOne struct {
// contains filtered or unexported fields
}
StudyPlanUpsertOne is the builder for "upsert"-ing
one StudyPlan node.
func (*StudyPlanUpsertOne) ClearCode ¶
func (u *StudyPlanUpsertOne) ClearCode() *StudyPlanUpsertOne
ClearCode clears the value of the "code" field.
func (*StudyPlanUpsertOne) DoNothing ¶
func (u *StudyPlanUpsertOne) DoNothing() *StudyPlanUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*StudyPlanUpsertOne) Exec ¶
func (u *StudyPlanUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*StudyPlanUpsertOne) ExecX ¶
func (u *StudyPlanUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StudyPlanUpsertOne) ID ¶
func (u *StudyPlanUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*StudyPlanUpsertOne) IDX ¶
func (u *StudyPlanUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*StudyPlanUpsertOne) Ignore ¶
func (u *StudyPlanUpsertOne) Ignore() *StudyPlanUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.StudyPlan.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*StudyPlanUpsertOne) SetCode ¶
func (u *StudyPlanUpsertOne) SetCode(v string) *StudyPlanUpsertOne
SetCode sets the "code" field.
func (*StudyPlanUpsertOne) SetName ¶
func (u *StudyPlanUpsertOne) SetName(v string) *StudyPlanUpsertOne
SetName sets the "name" field.
func (*StudyPlanUpsertOne) Update ¶
func (u *StudyPlanUpsertOne) Update(set func(*StudyPlanUpsert)) *StudyPlanUpsertOne
Update allows overriding fields `UPDATE` values. See the StudyPlanCreate.OnConflict documentation for more info.
func (*StudyPlanUpsertOne) UpdateCode ¶
func (u *StudyPlanUpsertOne) UpdateCode() *StudyPlanUpsertOne
UpdateCode sets the "code" field to the value that was provided on create.
func (*StudyPlanUpsertOne) UpdateName ¶
func (u *StudyPlanUpsertOne) UpdateName() *StudyPlanUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*StudyPlanUpsertOne) UpdateNewValues ¶
func (u *StudyPlanUpsertOne) UpdateNewValues() *StudyPlanUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.StudyPlan.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Accessory is the client for interacting with the Accessory builders. Accessory *AccessoryClient // Deadline is the client for interacting with the Deadline builders. Deadline *DeadlineClient // Event is the client for interacting with the Event builders. Event *EventClient // Forum is the client for interacting with the Forum builders. Forum *ForumClient // ForumPost is the client for interacting with the ForumPost builders. ForumPost *ForumPostClient // Group is the client for interacting with the Group builders. Group *GroupClient // GroupInviteLink is the client for interacting with the GroupInviteLink builders. GroupInviteLink *GroupInviteLinkClient // GroupUser is the client for interacting with the GroupUser builders. GroupUser *GroupUserClient // Institution is the client for interacting with the Institution builders. Institution *InstitutionClient // InstitutionInviteLink is the client for interacting with the InstitutionInviteLink builders. InstitutionInviteLink *InstitutionInviteLinkClient // JWTRevocation is the client for interacting with the JWTRevocation builders. JWTRevocation *JWTRevocationClient // Milestone is the client for interacting with the Milestone builders. Milestone *MilestoneClient // Pet is the client for interacting with the Pet builders. Pet *PetClient // Reaction is the client for interacting with the Reaction builders. Reaction *ReactionClient // Redemption is the client for interacting with the Redemption builders. Redemption *RedemptionClient // StudyPlan is the client for interacting with the StudyPlan builders. StudyPlan *StudyPlanClient // User is the client for interacting with the User builders. User *UserClient // UserPet is the client for interacting with the UserPet builders. UserPet *UserPetClient // Voucher is the client for interacting with the Voucher builders. Voucher *VoucherClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // First name of the user FirstName string `json:"first_name,omitempty"` // Last name of the user LastName string `json:"last_name,omitempty"` // Email of the user Email string `json:"email,omitempty"` // Encoded password hash of the user Password hash.Encoded `json:"-"` // Points of the user. // Must always be positive Points int `json:"points,omitempty"` // Points awarded by the user after points_awarded_reset_time. // Must always be positive PointsAwardedCount int `json:"points_awarded_count,omitempty"` // Time when points_awarded_count was last reset to 0 PointsAwardedResetTime time.Time `json:"points_awarded_reset_time,omitempty"` // Superuser of the iNProve platform GodMode bool `json:"god_mode,omitempty"` // Role of the in the institution Role institution.Role `json:"role,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryAuthoredDeadlines ¶
func (u *User) QueryAuthoredDeadlines() *DeadlineQuery
QueryAuthoredDeadlines queries the "authored_deadlines" edge of the User entity.
func (*User) QueryForumPosts ¶
func (u *User) QueryForumPosts() *ForumPostQuery
QueryForumPosts queries the "forum_posts" edge of the User entity.
func (*User) QueryGroupUsers ¶
func (u *User) QueryGroupUsers() *GroupUserQuery
QueryGroupUsers queries the "group_users" edge of the User entity.
func (*User) QueryGroups ¶
func (u *User) QueryGroups() *GroupQuery
QueryGroups queries the "groups" edge of the User entity.
func (*User) QueryInstitution ¶
func (u *User) QueryInstitution() *InstitutionQuery
QueryInstitution queries the "institution" edge of the User entity.
func (*User) QueryReactedPosts ¶
func (u *User) QueryReactedPosts() *ForumPostQuery
QueryReactedPosts queries the "reacted_posts" edge of the User entity.
func (*User) QueryReactions ¶
func (u *User) QueryReactions() *ReactionQuery
QueryReactions queries the "reactions" edge of the User entity.
func (*User) QueryRedemptions ¶
func (u *User) QueryRedemptions() *RedemptionQuery
QueryRedemptions queries the "redemptions" edge of the User entity.
func (*User) QueryUserPets ¶
func (u *User) QueryUserPets() *UserPetQuery
QueryUserPets queries the "user_pets" edge of the User entity.
func (*User) QueryVotedDeadlines ¶
func (u *User) QueryVotedDeadlines() *DeadlineQuery
QueryVotedDeadlines queries the "voted_deadlines" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryAuthoredDeadlines ¶
func (c *UserClient) QueryAuthoredDeadlines(u *User) *DeadlineQuery
QueryAuthoredDeadlines queries the authored_deadlines edge of a User.
func (*UserClient) QueryForumPosts ¶
func (c *UserClient) QueryForumPosts(u *User) *ForumPostQuery
QueryForumPosts queries the forum_posts edge of a User.
func (*UserClient) QueryGroupUsers ¶
func (c *UserClient) QueryGroupUsers(u *User) *GroupUserQuery
QueryGroupUsers queries the group_users edge of a User.
func (*UserClient) QueryGroups ¶
func (c *UserClient) QueryGroups(u *User) *GroupQuery
QueryGroups queries the groups edge of a User.
func (*UserClient) QueryInstitution ¶
func (c *UserClient) QueryInstitution(u *User) *InstitutionQuery
QueryInstitution queries the institution edge of a User.
func (*UserClient) QueryPet ¶
func (c *UserClient) QueryPet(u *User) *PetQuery
QueryPet queries the pet edge of a User.
func (*UserClient) QueryReactedPosts ¶
func (c *UserClient) QueryReactedPosts(u *User) *ForumPostQuery
QueryReactedPosts queries the reacted_posts edge of a User.
func (*UserClient) QueryReactions ¶
func (c *UserClient) QueryReactions(u *User) *ReactionQuery
QueryReactions queries the reactions edge of a User.
func (*UserClient) QueryRedemptions ¶
func (c *UserClient) QueryRedemptions(u *User) *RedemptionQuery
QueryRedemptions queries the redemptions edge of a User.
func (*UserClient) QueryUserPets ¶
func (c *UserClient) QueryUserPets(u *User) *UserPetQuery
QueryUserPets queries the user_pets edge of a User.
func (*UserClient) QueryVotedDeadlines ¶
func (c *UserClient) QueryVotedDeadlines(u *User) *DeadlineQuery
QueryVotedDeadlines queries the voted_deadlines edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddAuthoredDeadlineIDs ¶
func (uc *UserCreate) AddAuthoredDeadlineIDs(ids ...int) *UserCreate
AddAuthoredDeadlineIDs adds the "authored_deadlines" edge to the Deadline entity by IDs.
func (*UserCreate) AddAuthoredDeadlines ¶
func (uc *UserCreate) AddAuthoredDeadlines(d ...*Deadline) *UserCreate
AddAuthoredDeadlines adds the "authored_deadlines" edges to the Deadline entity.
func (*UserCreate) AddForumPostIDs ¶
func (uc *UserCreate) AddForumPostIDs(ids ...int) *UserCreate
AddForumPostIDs adds the "forum_posts" edge to the ForumPost entity by IDs.
func (*UserCreate) AddForumPosts ¶
func (uc *UserCreate) AddForumPosts(f ...*ForumPost) *UserCreate
AddForumPosts adds the "forum_posts" edges to the ForumPost entity.
func (*UserCreate) AddGroupIDs ¶
func (uc *UserCreate) AddGroupIDs(ids ...int) *UserCreate
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*UserCreate) AddGroups ¶
func (uc *UserCreate) AddGroups(g ...*Group) *UserCreate
AddGroups adds the "groups" edges to the Group entity.
func (*UserCreate) AddPet ¶
func (uc *UserCreate) AddPet(p ...*Pet) *UserCreate
AddPet adds the "pet" edges to the Pet entity.
func (*UserCreate) AddPetIDs ¶
func (uc *UserCreate) AddPetIDs(ids ...int) *UserCreate
AddPetIDs adds the "pet" edge to the Pet entity by IDs.
func (*UserCreate) AddReactedPostIDs ¶
func (uc *UserCreate) AddReactedPostIDs(ids ...int) *UserCreate
AddReactedPostIDs adds the "reacted_posts" edge to the ForumPost entity by IDs.
func (*UserCreate) AddReactedPosts ¶
func (uc *UserCreate) AddReactedPosts(f ...*ForumPost) *UserCreate
AddReactedPosts adds the "reacted_posts" edges to the ForumPost entity.
func (*UserCreate) AddRedemptionIDs ¶
func (uc *UserCreate) AddRedemptionIDs(ids ...int) *UserCreate
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by IDs.
func (*UserCreate) AddRedemptions ¶
func (uc *UserCreate) AddRedemptions(r ...*Redemption) *UserCreate
AddRedemptions adds the "redemptions" edges to the Redemption entity.
func (*UserCreate) AddVotedDeadlineIDs ¶
func (uc *UserCreate) AddVotedDeadlineIDs(ids ...int) *UserCreate
AddVotedDeadlineIDs adds the "voted_deadlines" edge to the Deadline entity by IDs.
func (*UserCreate) AddVotedDeadlines ¶
func (uc *UserCreate) AddVotedDeadlines(d ...*Deadline) *UserCreate
AddVotedDeadlines adds the "voted_deadlines" edges to the Deadline entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetFirstName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetFirstName(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetFirstName ¶
func (uc *UserCreate) SetFirstName(s string) *UserCreate
SetFirstName sets the "first_name" field.
func (*UserCreate) SetGodMode ¶
func (uc *UserCreate) SetGodMode(b bool) *UserCreate
SetGodMode sets the "god_mode" field.
func (*UserCreate) SetInstitution ¶
func (uc *UserCreate) SetInstitution(i *Institution) *UserCreate
SetInstitution sets the "institution" edge to the Institution entity.
func (*UserCreate) SetInstitutionID ¶
func (uc *UserCreate) SetInstitutionID(id int) *UserCreate
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*UserCreate) SetLastName ¶
func (uc *UserCreate) SetLastName(s string) *UserCreate
SetLastName sets the "last_name" field.
func (*UserCreate) SetNillablePoints ¶
func (uc *UserCreate) SetNillablePoints(i *int) *UserCreate
SetNillablePoints sets the "points" field if the given value is not nil.
func (*UserCreate) SetNillablePointsAwardedCount ¶
func (uc *UserCreate) SetNillablePointsAwardedCount(i *int) *UserCreate
SetNillablePointsAwardedCount sets the "points_awarded_count" field if the given value is not nil.
func (*UserCreate) SetNillablePointsAwardedResetTime ¶
func (uc *UserCreate) SetNillablePointsAwardedResetTime(t *time.Time) *UserCreate
SetNillablePointsAwardedResetTime sets the "points_awarded_reset_time" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(h hash.Encoded) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetPoints ¶
func (uc *UserCreate) SetPoints(i int) *UserCreate
SetPoints sets the "points" field.
func (*UserCreate) SetPointsAwardedCount ¶
func (uc *UserCreate) SetPointsAwardedCount(i int) *UserCreate
SetPointsAwardedCount sets the "points_awarded_count" field.
func (*UserCreate) SetPointsAwardedResetTime ¶
func (uc *UserCreate) SetPointsAwardedResetTime(t time.Time) *UserCreate
SetPointsAwardedResetTime sets the "points_awarded_reset_time" field.
func (*UserCreate) SetRole ¶
func (uc *UserCreate) SetRole(i institution.Role) *UserCreate
SetRole sets the "role" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetFirstName(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Institution holds the value of the institution edge. Institution *Institution `json:"institution,omitempty"` // Redemptions holds the value of the redemptions edge. Redemptions []*Redemption `json:"redemptions,omitempty"` // ForumPosts holds the value of the forum_posts edge. ForumPosts []*ForumPost `json:"forum_posts,omitempty"` // Pet holds the value of the pet edge. Pet []*Pet `json:"pet,omitempty"` // Groups holds the value of the groups edge. Groups []*Group `json:"groups,omitempty"` // ReactedPosts holds the value of the reacted_posts edge. ReactedPosts []*ForumPost `json:"reacted_posts,omitempty"` // VotedDeadlines holds the value of the voted_deadlines edge. VotedDeadlines []*Deadline `json:"voted_deadlines,omitempty"` // AuthoredDeadlines holds the value of the authored_deadlines edge. AuthoredDeadlines []*Deadline `json:"authored_deadlines,omitempty"` // UserPets holds the value of the user_pets edge. UserPets []*UserPet `json:"user_pets,omitempty"` // GroupUsers holds the value of the group_users edge. GroupUsers []*GroupUser `json:"group_users,omitempty"` // Reactions holds the value of the reactions edge. Reactions []*Reaction `json:"reactions,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) AuthoredDeadlinesOrErr ¶
AuthoredDeadlinesOrErr returns the AuthoredDeadlines value or an error if the edge was not loaded in eager-loading.
func (UserEdges) ForumPostsOrErr ¶
ForumPostsOrErr returns the ForumPosts value or an error if the edge was not loaded in eager-loading.
func (UserEdges) GroupUsersOrErr ¶
GroupUsersOrErr returns the GroupUsers value or an error if the edge was not loaded in eager-loading.
func (UserEdges) GroupsOrErr ¶
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.
func (UserEdges) InstitutionOrErr ¶
func (e UserEdges) InstitutionOrErr() (*Institution, error)
InstitutionOrErr returns the Institution value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) PetOrErr ¶
PetOrErr returns the Pet value or an error if the edge was not loaded in eager-loading.
func (UserEdges) ReactedPostsOrErr ¶
ReactedPostsOrErr returns the ReactedPosts value or an error if the edge was not loaded in eager-loading.
func (UserEdges) ReactionsOrErr ¶
ReactionsOrErr returns the Reactions value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RedemptionsOrErr ¶
func (e UserEdges) RedemptionsOrErr() ([]*Redemption, error)
RedemptionsOrErr returns the Redemptions value or an error if the edge was not loaded in eager-loading.
func (UserEdges) UserPetsOrErr ¶
UserPetsOrErr returns the UserPets value or an error if the edge was not loaded in eager-loading.
func (UserEdges) VotedDeadlinesOrErr ¶
VotedDeadlinesOrErr returns the VotedDeadlines value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddAuthoredDeadlineIDs ¶
func (m *UserMutation) AddAuthoredDeadlineIDs(ids ...int)
AddAuthoredDeadlineIDs adds the "authored_deadlines" edge to the Deadline entity by ids.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddForumPostIDs ¶
func (m *UserMutation) AddForumPostIDs(ids ...int)
AddForumPostIDs adds the "forum_posts" edge to the ForumPost entity by ids.
func (*UserMutation) AddGroupIDs ¶
func (m *UserMutation) AddGroupIDs(ids ...int)
AddGroupIDs adds the "groups" edge to the Group entity by ids.
func (*UserMutation) AddPetIDs ¶
func (m *UserMutation) AddPetIDs(ids ...int)
AddPetIDs adds the "pet" edge to the Pet entity by ids.
func (*UserMutation) AddPoints ¶
func (m *UserMutation) AddPoints(i int)
AddPoints adds i to the "points" field.
func (*UserMutation) AddPointsAwardedCount ¶
func (m *UserMutation) AddPointsAwardedCount(i int)
AddPointsAwardedCount adds i to the "points_awarded_count" field.
func (*UserMutation) AddReactedPostIDs ¶
func (m *UserMutation) AddReactedPostIDs(ids ...int)
AddReactedPostIDs adds the "reacted_posts" edge to the ForumPost entity by ids.
func (*UserMutation) AddRedemptionIDs ¶
func (m *UserMutation) AddRedemptionIDs(ids ...int)
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by ids.
func (*UserMutation) AddVotedDeadlineIDs ¶
func (m *UserMutation) AddVotedDeadlineIDs(ids ...int)
AddVotedDeadlineIDs adds the "voted_deadlines" edge to the Deadline entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) AddedPoints ¶
func (m *UserMutation) AddedPoints() (r int, exists bool)
AddedPoints returns the value that was added to the "points" field in this mutation.
func (*UserMutation) AddedPointsAwardedCount ¶
func (m *UserMutation) AddedPointsAwardedCount() (r int, exists bool)
AddedPointsAwardedCount returns the value that was added to the "points_awarded_count" field in this mutation.
func (*UserMutation) AuthoredDeadlinesCleared ¶
func (m *UserMutation) AuthoredDeadlinesCleared() bool
AuthoredDeadlinesCleared reports if the "authored_deadlines" edge to the Deadline entity was cleared.
func (*UserMutation) AuthoredDeadlinesIDs ¶
func (m *UserMutation) AuthoredDeadlinesIDs() (ids []int)
AuthoredDeadlinesIDs returns the "authored_deadlines" edge IDs in the mutation.
func (*UserMutation) ClearAuthoredDeadlines ¶
func (m *UserMutation) ClearAuthoredDeadlines()
ClearAuthoredDeadlines clears the "authored_deadlines" edge to the Deadline entity.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearForumPosts ¶
func (m *UserMutation) ClearForumPosts()
ClearForumPosts clears the "forum_posts" edge to the ForumPost entity.
func (*UserMutation) ClearGroups ¶
func (m *UserMutation) ClearGroups()
ClearGroups clears the "groups" edge to the Group entity.
func (*UserMutation) ClearInstitution ¶
func (m *UserMutation) ClearInstitution()
ClearInstitution clears the "institution" edge to the Institution entity.
func (*UserMutation) ClearPet ¶
func (m *UserMutation) ClearPet()
ClearPet clears the "pet" edge to the Pet entity.
func (*UserMutation) ClearPointsAwardedResetTime ¶
func (m *UserMutation) ClearPointsAwardedResetTime()
ClearPointsAwardedResetTime clears the value of the "points_awarded_reset_time" field.
func (*UserMutation) ClearReactedPosts ¶
func (m *UserMutation) ClearReactedPosts()
ClearReactedPosts clears the "reacted_posts" edge to the ForumPost entity.
func (*UserMutation) ClearRedemptions ¶
func (m *UserMutation) ClearRedemptions()
ClearRedemptions clears the "redemptions" edge to the Redemption entity.
func (*UserMutation) ClearVotedDeadlines ¶
func (m *UserMutation) ClearVotedDeadlines()
ClearVotedDeadlines clears the "voted_deadlines" edge to the Deadline entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) FirstName ¶
func (m *UserMutation) FirstName() (r string, exists bool)
FirstName returns the value of the "first_name" field in the mutation.
func (*UserMutation) ForumPostsCleared ¶
func (m *UserMutation) ForumPostsCleared() bool
ForumPostsCleared reports if the "forum_posts" edge to the ForumPost entity was cleared.
func (*UserMutation) ForumPostsIDs ¶
func (m *UserMutation) ForumPostsIDs() (ids []int)
ForumPostsIDs returns the "forum_posts" edge IDs in the mutation.
func (*UserMutation) GodMode ¶
func (m *UserMutation) GodMode() (r bool, exists bool)
GodMode returns the value of the "god_mode" field in the mutation.
func (*UserMutation) GroupsCleared ¶
func (m *UserMutation) GroupsCleared() bool
GroupsCleared reports if the "groups" edge to the Group entity was cleared.
func (*UserMutation) GroupsIDs ¶
func (m *UserMutation) GroupsIDs() (ids []int)
GroupsIDs returns the "groups" edge IDs in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) 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 (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) InstitutionCleared ¶
func (m *UserMutation) InstitutionCleared() bool
InstitutionCleared reports if the "institution" edge to the Institution entity was cleared.
func (*UserMutation) InstitutionID ¶
func (m *UserMutation) InstitutionID() (id int, exists bool)
InstitutionID returns the "institution" edge ID in the mutation.
func (*UserMutation) InstitutionIDs ¶
func (m *UserMutation) InstitutionIDs() (ids []int)
InstitutionIDs returns the "institution" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InstitutionID instead. It exists only for internal usage by the builders.
func (*UserMutation) LastName ¶
func (m *UserMutation) LastName() (r string, exists bool)
LastName returns the value of the "last_name" field in the mutation.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldFirstName ¶
func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)
OldFirstName returns the old "first_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldGodMode ¶
func (m *UserMutation) OldGodMode(ctx context.Context) (v bool, err error)
OldGodMode returns the old "god_mode" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldLastName ¶
func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)
OldLastName returns the old "last_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPoints ¶
func (m *UserMutation) OldPoints(ctx context.Context) (v int, err error)
OldPoints returns the old "points" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPointsAwardedCount ¶
func (m *UserMutation) OldPointsAwardedCount(ctx context.Context) (v int, err error)
OldPointsAwardedCount returns the old "points_awarded_count" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPointsAwardedResetTime ¶
OldPointsAwardedResetTime returns the old "points_awarded_reset_time" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldRole ¶
func (m *UserMutation) OldRole(ctx context.Context) (v institution.Role, err error)
OldRole returns the old "role" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r hash.Encoded, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) PetCleared ¶
func (m *UserMutation) PetCleared() bool
PetCleared reports if the "pet" edge to the Pet entity was cleared.
func (*UserMutation) PetIDs ¶
func (m *UserMutation) PetIDs() (ids []int)
PetIDs returns the "pet" edge IDs in the mutation.
func (*UserMutation) Points ¶
func (m *UserMutation) Points() (r int, exists bool)
Points returns the value of the "points" field in the mutation.
func (*UserMutation) PointsAwardedCount ¶
func (m *UserMutation) PointsAwardedCount() (r int, exists bool)
PointsAwardedCount returns the value of the "points_awarded_count" field in the mutation.
func (*UserMutation) PointsAwardedResetTime ¶
func (m *UserMutation) PointsAwardedResetTime() (r time.Time, exists bool)
PointsAwardedResetTime returns the value of the "points_awarded_reset_time" field in the mutation.
func (*UserMutation) PointsAwardedResetTimeCleared ¶
func (m *UserMutation) PointsAwardedResetTimeCleared() bool
PointsAwardedResetTimeCleared returns if the "points_awarded_reset_time" field was cleared in this mutation.
func (*UserMutation) ReactedPostsCleared ¶
func (m *UserMutation) ReactedPostsCleared() bool
ReactedPostsCleared reports if the "reacted_posts" edge to the ForumPost entity was cleared.
func (*UserMutation) ReactedPostsIDs ¶
func (m *UserMutation) ReactedPostsIDs() (ids []int)
ReactedPostsIDs returns the "reacted_posts" edge IDs in the mutation.
func (*UserMutation) RedemptionsCleared ¶
func (m *UserMutation) RedemptionsCleared() bool
RedemptionsCleared reports if the "redemptions" edge to the Redemption entity was cleared.
func (*UserMutation) RedemptionsIDs ¶
func (m *UserMutation) RedemptionsIDs() (ids []int)
RedemptionsIDs returns the "redemptions" edge IDs in the mutation.
func (*UserMutation) RemoveAuthoredDeadlineIDs ¶
func (m *UserMutation) RemoveAuthoredDeadlineIDs(ids ...int)
RemoveAuthoredDeadlineIDs removes the "authored_deadlines" edge to the Deadline entity by IDs.
func (*UserMutation) RemoveForumPostIDs ¶
func (m *UserMutation) RemoveForumPostIDs(ids ...int)
RemoveForumPostIDs removes the "forum_posts" edge to the ForumPost entity by IDs.
func (*UserMutation) RemoveGroupIDs ¶
func (m *UserMutation) RemoveGroupIDs(ids ...int)
RemoveGroupIDs removes the "groups" edge to the Group entity by IDs.
func (*UserMutation) RemovePetIDs ¶
func (m *UserMutation) RemovePetIDs(ids ...int)
RemovePetIDs removes the "pet" edge to the Pet entity by IDs.
func (*UserMutation) RemoveReactedPostIDs ¶
func (m *UserMutation) RemoveReactedPostIDs(ids ...int)
RemoveReactedPostIDs removes the "reacted_posts" edge to the ForumPost entity by IDs.
func (*UserMutation) RemoveRedemptionIDs ¶
func (m *UserMutation) RemoveRedemptionIDs(ids ...int)
RemoveRedemptionIDs removes the "redemptions" edge to the Redemption entity by IDs.
func (*UserMutation) RemoveVotedDeadlineIDs ¶
func (m *UserMutation) RemoveVotedDeadlineIDs(ids ...int)
RemoveVotedDeadlineIDs removes the "voted_deadlines" edge to the Deadline entity by IDs.
func (*UserMutation) RemovedAuthoredDeadlinesIDs ¶
func (m *UserMutation) RemovedAuthoredDeadlinesIDs() (ids []int)
RemovedAuthoredDeadlines returns the removed IDs of the "authored_deadlines" edge to the Deadline entity.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedForumPostsIDs ¶
func (m *UserMutation) RemovedForumPostsIDs() (ids []int)
RemovedForumPosts returns the removed IDs of the "forum_posts" edge to the ForumPost entity.
func (*UserMutation) RemovedGroupsIDs ¶
func (m *UserMutation) RemovedGroupsIDs() (ids []int)
RemovedGroups returns the removed IDs of the "groups" edge to the Group entity.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedPetIDs ¶
func (m *UserMutation) RemovedPetIDs() (ids []int)
RemovedPet returns the removed IDs of the "pet" edge to the Pet entity.
func (*UserMutation) RemovedReactedPostsIDs ¶
func (m *UserMutation) RemovedReactedPostsIDs() (ids []int)
RemovedReactedPosts returns the removed IDs of the "reacted_posts" edge to the ForumPost entity.
func (*UserMutation) RemovedRedemptionsIDs ¶
func (m *UserMutation) RemovedRedemptionsIDs() (ids []int)
RemovedRedemptions returns the removed IDs of the "redemptions" edge to the Redemption entity.
func (*UserMutation) RemovedVotedDeadlinesIDs ¶
func (m *UserMutation) RemovedVotedDeadlinesIDs() (ids []int)
RemovedVotedDeadlines returns the removed IDs of the "voted_deadlines" edge to the Deadline entity.
func (*UserMutation) ResetAuthoredDeadlines ¶
func (m *UserMutation) ResetAuthoredDeadlines()
ResetAuthoredDeadlines resets all changes to the "authored_deadlines" edge.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetFirstName ¶
func (m *UserMutation) ResetFirstName()
ResetFirstName resets all changes to the "first_name" field.
func (*UserMutation) ResetForumPosts ¶
func (m *UserMutation) ResetForumPosts()
ResetForumPosts resets all changes to the "forum_posts" edge.
func (*UserMutation) ResetGodMode ¶
func (m *UserMutation) ResetGodMode()
ResetGodMode resets all changes to the "god_mode" field.
func (*UserMutation) ResetGroups ¶
func (m *UserMutation) ResetGroups()
ResetGroups resets all changes to the "groups" edge.
func (*UserMutation) ResetInstitution ¶
func (m *UserMutation) ResetInstitution()
ResetInstitution resets all changes to the "institution" edge.
func (*UserMutation) ResetLastName ¶
func (m *UserMutation) ResetLastName()
ResetLastName resets all changes to the "last_name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetPet ¶
func (m *UserMutation) ResetPet()
ResetPet resets all changes to the "pet" edge.
func (*UserMutation) ResetPoints ¶
func (m *UserMutation) ResetPoints()
ResetPoints resets all changes to the "points" field.
func (*UserMutation) ResetPointsAwardedCount ¶
func (m *UserMutation) ResetPointsAwardedCount()
ResetPointsAwardedCount resets all changes to the "points_awarded_count" field.
func (*UserMutation) ResetPointsAwardedResetTime ¶
func (m *UserMutation) ResetPointsAwardedResetTime()
ResetPointsAwardedResetTime resets all changes to the "points_awarded_reset_time" field.
func (*UserMutation) ResetReactedPosts ¶
func (m *UserMutation) ResetReactedPosts()
ResetReactedPosts resets all changes to the "reacted_posts" edge.
func (*UserMutation) ResetRedemptions ¶
func (m *UserMutation) ResetRedemptions()
ResetRedemptions resets all changes to the "redemptions" edge.
func (*UserMutation) ResetRole ¶
func (m *UserMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*UserMutation) ResetVotedDeadlines ¶
func (m *UserMutation) ResetVotedDeadlines()
ResetVotedDeadlines resets all changes to the "voted_deadlines" edge.
func (*UserMutation) Role ¶
func (m *UserMutation) Role() (r institution.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetFirstName ¶
func (m *UserMutation) SetFirstName(s string)
SetFirstName sets the "first_name" field.
func (*UserMutation) SetGodMode ¶
func (m *UserMutation) SetGodMode(b bool)
SetGodMode sets the "god_mode" field.
func (*UserMutation) SetInstitutionID ¶
func (m *UserMutation) SetInstitutionID(id int)
SetInstitutionID sets the "institution" edge to the Institution entity by id.
func (*UserMutation) SetLastName ¶
func (m *UserMutation) SetLastName(s string)
SetLastName sets the "last_name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(h hash.Encoded)
SetPassword sets the "password" field.
func (*UserMutation) SetPoints ¶
func (m *UserMutation) SetPoints(i int)
SetPoints sets the "points" field.
func (*UserMutation) SetPointsAwardedCount ¶
func (m *UserMutation) SetPointsAwardedCount(i int)
SetPointsAwardedCount sets the "points_awarded_count" field.
func (*UserMutation) SetPointsAwardedResetTime ¶
func (m *UserMutation) SetPointsAwardedResetTime(t time.Time)
SetPointsAwardedResetTime sets the "points_awarded_reset_time" field.
func (*UserMutation) SetRole ¶
func (m *UserMutation) SetRole(i institution.Role)
SetRole sets the "role" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) VotedDeadlinesCleared ¶
func (m *UserMutation) VotedDeadlinesCleared() bool
VotedDeadlinesCleared reports if the "voted_deadlines" edge to the Deadline entity was cleared.
func (*UserMutation) VotedDeadlinesIDs ¶
func (m *UserMutation) VotedDeadlinesIDs() (ids []int)
VotedDeadlinesIDs returns the "voted_deadlines" edge IDs in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserPet ¶
type UserPet struct { // Hunger percentage of the pet (0-1) HungerPercentage float64 `json:"hunger_percentage,omitempty"` // Map of enabled SVG group element IDs EnabledSvgGroupElementIds map[string]bool `json:"enabled_svg_group_element_ids,omitempty"` // ID of the pet PetID int `json:"pet_id,omitempty"` // ID of the user UserID int `json:"user_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserPetQuery when eager-loading is set. Edges UserPetEdges `json:"edges"` // contains filtered or unexported fields }
UserPet is the model entity for the UserPet schema.
func (*UserPet) Unwrap ¶
Unwrap unwraps the UserPet 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 (*UserPet) Update ¶
func (up *UserPet) Update() *UserPetUpdateOne
Update returns a builder for updating this UserPet. Note that you need to call UserPet.Unwrap() before calling this method if this UserPet was returned from a transaction, and the transaction was committed or rolled back.
type UserPetClient ¶
type UserPetClient struct {
// contains filtered or unexported fields
}
UserPetClient is a client for the UserPet schema.
func NewUserPetClient ¶
func NewUserPetClient(c config) *UserPetClient
NewUserPetClient returns a client for the UserPet from the given config.
func (*UserPetClient) Create ¶
func (c *UserPetClient) Create() *UserPetCreate
Create returns a builder for creating a UserPet entity.
func (*UserPetClient) CreateBulk ¶
func (c *UserPetClient) CreateBulk(builders ...*UserPetCreate) *UserPetCreateBulk
CreateBulk returns a builder for creating a bulk of UserPet entities.
func (*UserPetClient) Delete ¶
func (c *UserPetClient) Delete() *UserPetDelete
Delete returns a delete builder for UserPet.
func (*UserPetClient) Hooks ¶
func (c *UserPetClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserPetClient) Intercept ¶
func (c *UserPetClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `userpet.Intercept(f(g(h())))`.
func (*UserPetClient) Interceptors ¶
func (c *UserPetClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserPetClient) Query ¶
func (c *UserPetClient) Query() *UserPetQuery
Query returns a query builder for UserPet.
func (*UserPetClient) QueryPet ¶
func (c *UserPetClient) QueryPet(up *UserPet) *PetQuery
QueryPet queries the pet edge of a UserPet.
func (*UserPetClient) QueryUser ¶
func (c *UserPetClient) QueryUser(up *UserPet) *UserQuery
QueryUser queries the user edge of a UserPet.
func (*UserPetClient) Update ¶
func (c *UserPetClient) Update() *UserPetUpdate
Update returns an update builder for UserPet.
func (*UserPetClient) UpdateOne ¶
func (c *UserPetClient) UpdateOne(up *UserPet) *UserPetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserPetClient) Use ¶
func (c *UserPetClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `userpet.Hooks(f(g(h())))`.
type UserPetCreate ¶
type UserPetCreate struct {
// contains filtered or unexported fields
}
UserPetCreate is the builder for creating a UserPet entity.
func (*UserPetCreate) Exec ¶
func (upc *UserPetCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserPetCreate) ExecX ¶
func (upc *UserPetCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPetCreate) Mutation ¶
func (upc *UserPetCreate) Mutation() *UserPetMutation
Mutation returns the UserPetMutation object of the builder.
func (*UserPetCreate) OnConflict ¶
func (upc *UserPetCreate) OnConflict(opts ...sql.ConflictOption) *UserPetUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserPet.Create(). SetHungerPercentage(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserPetUpsert) { SetHungerPercentage(v+v). }). Exec(ctx)
func (*UserPetCreate) OnConflictColumns ¶
func (upc *UserPetCreate) OnConflictColumns(columns ...string) *UserPetUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserPet.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserPetCreate) Save ¶
func (upc *UserPetCreate) Save(ctx context.Context) (*UserPet, error)
Save creates the UserPet in the database.
func (*UserPetCreate) SaveX ¶
func (upc *UserPetCreate) SaveX(ctx context.Context) *UserPet
SaveX calls Save and panics if Save returns an error.
func (*UserPetCreate) SetEnabledSvgGroupElementIds ¶
func (upc *UserPetCreate) SetEnabledSvgGroupElementIds(m map[string]bool) *UserPetCreate
SetEnabledSvgGroupElementIds sets the "enabled_svg_group_element_ids" field.
func (*UserPetCreate) SetHungerPercentage ¶
func (upc *UserPetCreate) SetHungerPercentage(f float64) *UserPetCreate
SetHungerPercentage sets the "hunger_percentage" field.
func (*UserPetCreate) SetPet ¶
func (upc *UserPetCreate) SetPet(p *Pet) *UserPetCreate
SetPet sets the "pet" edge to the Pet entity.
func (*UserPetCreate) SetPetID ¶
func (upc *UserPetCreate) SetPetID(i int) *UserPetCreate
SetPetID sets the "pet_id" field.
func (*UserPetCreate) SetUser ¶
func (upc *UserPetCreate) SetUser(u *User) *UserPetCreate
SetUser sets the "user" edge to the User entity.
func (*UserPetCreate) SetUserID ¶
func (upc *UserPetCreate) SetUserID(i int) *UserPetCreate
SetUserID sets the "user_id" field.
type UserPetCreateBulk ¶
type UserPetCreateBulk struct {
// contains filtered or unexported fields
}
UserPetCreateBulk is the builder for creating many UserPet entities in bulk.
func (*UserPetCreateBulk) Exec ¶
func (upcb *UserPetCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserPetCreateBulk) ExecX ¶
func (upcb *UserPetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPetCreateBulk) OnConflict ¶
func (upcb *UserPetCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserPetUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserPet.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserPetUpsert) { SetHungerPercentage(v+v). }). Exec(ctx)
func (*UserPetCreateBulk) OnConflictColumns ¶
func (upcb *UserPetCreateBulk) OnConflictColumns(columns ...string) *UserPetUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserPet.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserPetDelete ¶
type UserPetDelete struct {
// contains filtered or unexported fields
}
UserPetDelete is the builder for deleting a UserPet entity.
func (*UserPetDelete) Exec ¶
func (upd *UserPetDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserPetDelete) ExecX ¶
func (upd *UserPetDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserPetDelete) Where ¶
func (upd *UserPetDelete) Where(ps ...predicate.UserPet) *UserPetDelete
Where appends a list predicates to the UserPetDelete builder.
type UserPetDeleteOne ¶
type UserPetDeleteOne struct {
// contains filtered or unexported fields
}
UserPetDeleteOne is the builder for deleting a single UserPet entity.
func (*UserPetDeleteOne) Exec ¶
func (updo *UserPetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserPetDeleteOne) ExecX ¶
func (updo *UserPetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPetDeleteOne) Where ¶
func (updo *UserPetDeleteOne) Where(ps ...predicate.UserPet) *UserPetDeleteOne
Where appends a list predicates to the UserPetDelete builder.
type UserPetEdges ¶
type UserPetEdges struct { // Pet holds the value of the pet edge. Pet *Pet `json:"pet,omitempty"` // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
UserPetEdges holds the relations/edges for other nodes in the graph.
func (UserPetEdges) PetOrErr ¶
func (e UserPetEdges) PetOrErr() (*Pet, error)
PetOrErr returns the Pet value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserPetEdges) UserOrErr ¶
func (e UserPetEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserPetGroupBy ¶
type UserPetGroupBy struct {
// contains filtered or unexported fields
}
UserPetGroupBy is the group-by builder for UserPet entities.
func (*UserPetGroupBy) Aggregate ¶
func (upgb *UserPetGroupBy) Aggregate(fns ...AggregateFunc) *UserPetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserPetGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserPetGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserPetGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserPetGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserPetGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserPetGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserPetGroupBy) Scan ¶
func (upgb *UserPetGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserPetGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserPetMutation ¶
type UserPetMutation struct {
// contains filtered or unexported fields
}
UserPetMutation represents an operation that mutates the UserPet nodes in the graph.
func (*UserPetMutation) AddField ¶
func (m *UserPetMutation) 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 (*UserPetMutation) AddHungerPercentage ¶
func (m *UserPetMutation) AddHungerPercentage(f float64)
AddHungerPercentage adds f to the "hunger_percentage" field.
func (*UserPetMutation) AddedEdges ¶
func (m *UserPetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserPetMutation) AddedField ¶
func (m *UserPetMutation) 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 (*UserPetMutation) AddedFields ¶
func (m *UserPetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserPetMutation) AddedHungerPercentage ¶
func (m *UserPetMutation) AddedHungerPercentage() (r float64, exists bool)
AddedHungerPercentage returns the value that was added to the "hunger_percentage" field in this mutation.
func (*UserPetMutation) AddedIDs ¶
func (m *UserPetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserPetMutation) ClearEdge ¶
func (m *UserPetMutation) 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 (*UserPetMutation) ClearField ¶
func (m *UserPetMutation) 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 (*UserPetMutation) ClearPet ¶
func (m *UserPetMutation) ClearPet()
ClearPet clears the "pet" edge to the Pet entity.
func (*UserPetMutation) ClearUser ¶
func (m *UserPetMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserPetMutation) ClearedEdges ¶
func (m *UserPetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserPetMutation) ClearedFields ¶
func (m *UserPetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserPetMutation) Client ¶
func (m UserPetMutation) 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 (*UserPetMutation) EdgeCleared ¶
func (m *UserPetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserPetMutation) EnabledSvgGroupElementIds ¶
func (m *UserPetMutation) EnabledSvgGroupElementIds() (r map[string]bool, exists bool)
EnabledSvgGroupElementIds returns the value of the "enabled_svg_group_element_ids" field in the mutation.
func (*UserPetMutation) Field ¶
func (m *UserPetMutation) 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 (*UserPetMutation) FieldCleared ¶
func (m *UserPetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserPetMutation) Fields ¶
func (m *UserPetMutation) 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 (*UserPetMutation) HungerPercentage ¶
func (m *UserPetMutation) HungerPercentage() (r float64, exists bool)
HungerPercentage returns the value of the "hunger_percentage" field in the mutation.
func (*UserPetMutation) 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 (*UserPetMutation) PetCleared ¶
func (m *UserPetMutation) PetCleared() bool
PetCleared reports if the "pet" edge to the Pet entity was cleared.
func (*UserPetMutation) PetID ¶
func (m *UserPetMutation) PetID() (r int, exists bool)
PetID returns the value of the "pet_id" field in the mutation.
func (*UserPetMutation) PetIDs ¶
func (m *UserPetMutation) PetIDs() (ids []int)
PetIDs returns the "pet" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use PetID instead. It exists only for internal usage by the builders.
func (*UserPetMutation) RemovedEdges ¶
func (m *UserPetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserPetMutation) RemovedIDs ¶
func (m *UserPetMutation) 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 (*UserPetMutation) ResetEdge ¶
func (m *UserPetMutation) 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 (*UserPetMutation) ResetEnabledSvgGroupElementIds ¶
func (m *UserPetMutation) ResetEnabledSvgGroupElementIds()
ResetEnabledSvgGroupElementIds resets all changes to the "enabled_svg_group_element_ids" field.
func (*UserPetMutation) ResetField ¶
func (m *UserPetMutation) 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 (*UserPetMutation) ResetHungerPercentage ¶
func (m *UserPetMutation) ResetHungerPercentage()
ResetHungerPercentage resets all changes to the "hunger_percentage" field.
func (*UserPetMutation) ResetPet ¶
func (m *UserPetMutation) ResetPet()
ResetPet resets all changes to the "pet" edge.
func (*UserPetMutation) ResetPetID ¶
func (m *UserPetMutation) ResetPetID()
ResetPetID resets all changes to the "pet_id" field.
func (*UserPetMutation) ResetUser ¶
func (m *UserPetMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserPetMutation) ResetUserID ¶
func (m *UserPetMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserPetMutation) SetEnabledSvgGroupElementIds ¶
func (m *UserPetMutation) SetEnabledSvgGroupElementIds(value map[string]bool)
SetEnabledSvgGroupElementIds sets the "enabled_svg_group_element_ids" field.
func (*UserPetMutation) SetField ¶
func (m *UserPetMutation) 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 (*UserPetMutation) SetHungerPercentage ¶
func (m *UserPetMutation) SetHungerPercentage(f float64)
SetHungerPercentage sets the "hunger_percentage" field.
func (*UserPetMutation) SetOp ¶
func (m *UserPetMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserPetMutation) SetPetID ¶
func (m *UserPetMutation) SetPetID(i int)
SetPetID sets the "pet_id" field.
func (*UserPetMutation) SetUserID ¶
func (m *UserPetMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (UserPetMutation) Tx ¶
func (m UserPetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserPetMutation) Type ¶
func (m *UserPetMutation) Type() string
Type returns the node type of this mutation (UserPet).
func (*UserPetMutation) UserCleared ¶
func (m *UserPetMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserPetMutation) UserID ¶
func (m *UserPetMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*UserPetMutation) UserIDs ¶
func (m *UserPetMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*UserPetMutation) Where ¶
func (m *UserPetMutation) Where(ps ...predicate.UserPet)
Where appends a list predicates to the UserPetMutation builder.
func (*UserPetMutation) WhereP ¶
func (m *UserPetMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserPetMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserPetQuery ¶
type UserPetQuery struct {
// contains filtered or unexported fields
}
UserPetQuery is the builder for querying UserPet entities.
func (*UserPetQuery) Aggregate ¶
func (upq *UserPetQuery) Aggregate(fns ...AggregateFunc) *UserPetSelect
Aggregate returns a UserPetSelect configured with the given aggregations.
func (*UserPetQuery) All ¶
func (upq *UserPetQuery) All(ctx context.Context) ([]*UserPet, error)
All executes the query and returns a list of UserPets.
func (*UserPetQuery) AllX ¶
func (upq *UserPetQuery) AllX(ctx context.Context) []*UserPet
AllX is like All, but panics if an error occurs.
func (*UserPetQuery) Clone ¶
func (upq *UserPetQuery) Clone() *UserPetQuery
Clone returns a duplicate of the UserPetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserPetQuery) Count ¶
func (upq *UserPetQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserPetQuery) CountX ¶
func (upq *UserPetQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserPetQuery) Exist ¶
func (upq *UserPetQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserPetQuery) ExistX ¶
func (upq *UserPetQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserPetQuery) First ¶
func (upq *UserPetQuery) First(ctx context.Context) (*UserPet, error)
First returns the first UserPet entity from the query. Returns a *NotFoundError when no UserPet was found.
func (*UserPetQuery) FirstX ¶
func (upq *UserPetQuery) FirstX(ctx context.Context) *UserPet
FirstX is like First, but panics if an error occurs.
func (*UserPetQuery) GroupBy ¶
func (upq *UserPetQuery) GroupBy(field string, fields ...string) *UserPetGroupBy
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 { HungerPercentage float64 `json:"hunger_percentage,omitempty"` Count int `json:"count,omitempty"` } client.UserPet.Query(). GroupBy(userpet.FieldHungerPercentage). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserPetQuery) Limit ¶
func (upq *UserPetQuery) Limit(limit int) *UserPetQuery
Limit the number of records to be returned by this query.
func (*UserPetQuery) Offset ¶
func (upq *UserPetQuery) Offset(offset int) *UserPetQuery
Offset to start from.
func (*UserPetQuery) Only ¶
func (upq *UserPetQuery) Only(ctx context.Context) (*UserPet, error)
Only returns a single UserPet entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserPet entity is found. Returns a *NotFoundError when no UserPet entities are found.
func (*UserPetQuery) OnlyX ¶
func (upq *UserPetQuery) OnlyX(ctx context.Context) *UserPet
OnlyX is like Only, but panics if an error occurs.
func (*UserPetQuery) Order ¶
func (upq *UserPetQuery) Order(o ...userpet.OrderOption) *UserPetQuery
Order specifies how the records should be ordered.
func (*UserPetQuery) QueryPet ¶
func (upq *UserPetQuery) QueryPet() *PetQuery
QueryPet chains the current query on the "pet" edge.
func (*UserPetQuery) QueryUser ¶
func (upq *UserPetQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserPetQuery) Select ¶
func (upq *UserPetQuery) Select(fields ...string) *UserPetSelect
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 { HungerPercentage float64 `json:"hunger_percentage,omitempty"` } client.UserPet.Query(). Select(userpet.FieldHungerPercentage). Scan(ctx, &v)
func (*UserPetQuery) Unique ¶
func (upq *UserPetQuery) Unique(unique bool) *UserPetQuery
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 (*UserPetQuery) Where ¶
func (upq *UserPetQuery) Where(ps ...predicate.UserPet) *UserPetQuery
Where adds a new predicate for the UserPetQuery builder.
func (*UserPetQuery) WithPet ¶
func (upq *UserPetQuery) WithPet(opts ...func(*PetQuery)) *UserPetQuery
WithPet tells the query-builder to eager-load the nodes that are connected to the "pet" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserPetQuery) WithUser ¶
func (upq *UserPetQuery) WithUser(opts ...func(*UserQuery)) *UserPetQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type UserPetSelect ¶
type UserPetSelect struct { *UserPetQuery // contains filtered or unexported fields }
UserPetSelect is the builder for selecting fields of UserPet entities.
func (*UserPetSelect) Aggregate ¶
func (ups *UserPetSelect) Aggregate(fns ...AggregateFunc) *UserPetSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserPetSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserPetSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserPetSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserPetSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserPetSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserPetSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserPetSelect) Scan ¶
func (ups *UserPetSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserPetSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserPetUpdate ¶
type UserPetUpdate struct {
// contains filtered or unexported fields
}
UserPetUpdate is the builder for updating UserPet entities.
func (*UserPetUpdate) AddHungerPercentage ¶
func (upu *UserPetUpdate) AddHungerPercentage(f float64) *UserPetUpdate
AddHungerPercentage adds f to the "hunger_percentage" field.
func (*UserPetUpdate) ClearPet ¶
func (upu *UserPetUpdate) ClearPet() *UserPetUpdate
ClearPet clears the "pet" edge to the Pet entity.
func (*UserPetUpdate) ClearUser ¶
func (upu *UserPetUpdate) ClearUser() *UserPetUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserPetUpdate) Exec ¶
func (upu *UserPetUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserPetUpdate) ExecX ¶
func (upu *UserPetUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPetUpdate) Mutation ¶
func (upu *UserPetUpdate) Mutation() *UserPetMutation
Mutation returns the UserPetMutation object of the builder.
func (*UserPetUpdate) Save ¶
func (upu *UserPetUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserPetUpdate) SaveX ¶
func (upu *UserPetUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserPetUpdate) SetEnabledSvgGroupElementIds ¶
func (upu *UserPetUpdate) SetEnabledSvgGroupElementIds(m map[string]bool) *UserPetUpdate
SetEnabledSvgGroupElementIds sets the "enabled_svg_group_element_ids" field.
func (*UserPetUpdate) SetHungerPercentage ¶
func (upu *UserPetUpdate) SetHungerPercentage(f float64) *UserPetUpdate
SetHungerPercentage sets the "hunger_percentage" field.
func (*UserPetUpdate) SetPet ¶
func (upu *UserPetUpdate) SetPet(p *Pet) *UserPetUpdate
SetPet sets the "pet" edge to the Pet entity.
func (*UserPetUpdate) SetPetID ¶
func (upu *UserPetUpdate) SetPetID(i int) *UserPetUpdate
SetPetID sets the "pet_id" field.
func (*UserPetUpdate) SetUser ¶
func (upu *UserPetUpdate) SetUser(u *User) *UserPetUpdate
SetUser sets the "user" edge to the User entity.
func (*UserPetUpdate) SetUserID ¶
func (upu *UserPetUpdate) SetUserID(i int) *UserPetUpdate
SetUserID sets the "user_id" field.
func (*UserPetUpdate) Where ¶
func (upu *UserPetUpdate) Where(ps ...predicate.UserPet) *UserPetUpdate
Where appends a list predicates to the UserPetUpdate builder.
type UserPetUpdateOne ¶
type UserPetUpdateOne struct {
// contains filtered or unexported fields
}
UserPetUpdateOne is the builder for updating a single UserPet entity.
func (*UserPetUpdateOne) AddHungerPercentage ¶
func (upuo *UserPetUpdateOne) AddHungerPercentage(f float64) *UserPetUpdateOne
AddHungerPercentage adds f to the "hunger_percentage" field.
func (*UserPetUpdateOne) ClearPet ¶
func (upuo *UserPetUpdateOne) ClearPet() *UserPetUpdateOne
ClearPet clears the "pet" edge to the Pet entity.
func (*UserPetUpdateOne) ClearUser ¶
func (upuo *UserPetUpdateOne) ClearUser() *UserPetUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserPetUpdateOne) Exec ¶
func (upuo *UserPetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserPetUpdateOne) ExecX ¶
func (upuo *UserPetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPetUpdateOne) Mutation ¶
func (upuo *UserPetUpdateOne) Mutation() *UserPetMutation
Mutation returns the UserPetMutation object of the builder.
func (*UserPetUpdateOne) Save ¶
func (upuo *UserPetUpdateOne) Save(ctx context.Context) (*UserPet, error)
Save executes the query and returns the updated UserPet entity.
func (*UserPetUpdateOne) SaveX ¶
func (upuo *UserPetUpdateOne) SaveX(ctx context.Context) *UserPet
SaveX is like Save, but panics if an error occurs.
func (*UserPetUpdateOne) Select ¶
func (upuo *UserPetUpdateOne) Select(field string, fields ...string) *UserPetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserPetUpdateOne) SetEnabledSvgGroupElementIds ¶
func (upuo *UserPetUpdateOne) SetEnabledSvgGroupElementIds(m map[string]bool) *UserPetUpdateOne
SetEnabledSvgGroupElementIds sets the "enabled_svg_group_element_ids" field.
func (*UserPetUpdateOne) SetHungerPercentage ¶
func (upuo *UserPetUpdateOne) SetHungerPercentage(f float64) *UserPetUpdateOne
SetHungerPercentage sets the "hunger_percentage" field.
func (*UserPetUpdateOne) SetPet ¶
func (upuo *UserPetUpdateOne) SetPet(p *Pet) *UserPetUpdateOne
SetPet sets the "pet" edge to the Pet entity.
func (*UserPetUpdateOne) SetPetID ¶
func (upuo *UserPetUpdateOne) SetPetID(i int) *UserPetUpdateOne
SetPetID sets the "pet_id" field.
func (*UserPetUpdateOne) SetUser ¶
func (upuo *UserPetUpdateOne) SetUser(u *User) *UserPetUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserPetUpdateOne) SetUserID ¶
func (upuo *UserPetUpdateOne) SetUserID(i int) *UserPetUpdateOne
SetUserID sets the "user_id" field.
func (*UserPetUpdateOne) Where ¶
func (upuo *UserPetUpdateOne) Where(ps ...predicate.UserPet) *UserPetUpdateOne
Where appends a list predicates to the UserPetUpdate builder.
type UserPetUpsert ¶
UserPetUpsert is the "OnConflict" setter.
func (*UserPetUpsert) AddHungerPercentage ¶
func (u *UserPetUpsert) AddHungerPercentage(v float64) *UserPetUpsert
AddHungerPercentage adds v to the "hunger_percentage" field.
func (*UserPetUpsert) SetEnabledSvgGroupElementIds ¶
func (u *UserPetUpsert) SetEnabledSvgGroupElementIds(v map[string]bool) *UserPetUpsert
SetEnabledSvgGroupElementIds sets the "enabled_svg_group_element_ids" field.
func (*UserPetUpsert) SetHungerPercentage ¶
func (u *UserPetUpsert) SetHungerPercentage(v float64) *UserPetUpsert
SetHungerPercentage sets the "hunger_percentage" field.
func (*UserPetUpsert) SetPetID ¶
func (u *UserPetUpsert) SetPetID(v int) *UserPetUpsert
SetPetID sets the "pet_id" field.
func (*UserPetUpsert) SetUserID ¶
func (u *UserPetUpsert) SetUserID(v int) *UserPetUpsert
SetUserID sets the "user_id" field.
func (*UserPetUpsert) UpdateEnabledSvgGroupElementIds ¶
func (u *UserPetUpsert) UpdateEnabledSvgGroupElementIds() *UserPetUpsert
UpdateEnabledSvgGroupElementIds sets the "enabled_svg_group_element_ids" field to the value that was provided on create.
func (*UserPetUpsert) UpdateHungerPercentage ¶
func (u *UserPetUpsert) UpdateHungerPercentage() *UserPetUpsert
UpdateHungerPercentage sets the "hunger_percentage" field to the value that was provided on create.
func (*UserPetUpsert) UpdatePetID ¶
func (u *UserPetUpsert) UpdatePetID() *UserPetUpsert
UpdatePetID sets the "pet_id" field to the value that was provided on create.
func (*UserPetUpsert) UpdateUserID ¶
func (u *UserPetUpsert) UpdateUserID() *UserPetUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type UserPetUpsertBulk ¶
type UserPetUpsertBulk struct {
// contains filtered or unexported fields
}
UserPetUpsertBulk is the builder for "upsert"-ing a bulk of UserPet nodes.
func (*UserPetUpsertBulk) AddHungerPercentage ¶
func (u *UserPetUpsertBulk) AddHungerPercentage(v float64) *UserPetUpsertBulk
AddHungerPercentage adds v to the "hunger_percentage" field.
func (*UserPetUpsertBulk) DoNothing ¶
func (u *UserPetUpsertBulk) DoNothing() *UserPetUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserPetUpsertBulk) Exec ¶
func (u *UserPetUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserPetUpsertBulk) ExecX ¶
func (u *UserPetUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPetUpsertBulk) Ignore ¶
func (u *UserPetUpsertBulk) Ignore() *UserPetUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserPet.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserPetUpsertBulk) SetEnabledSvgGroupElementIds ¶
func (u *UserPetUpsertBulk) SetEnabledSvgGroupElementIds(v map[string]bool) *UserPetUpsertBulk
SetEnabledSvgGroupElementIds sets the "enabled_svg_group_element_ids" field.
func (*UserPetUpsertBulk) SetHungerPercentage ¶
func (u *UserPetUpsertBulk) SetHungerPercentage(v float64) *UserPetUpsertBulk
SetHungerPercentage sets the "hunger_percentage" field.
func (*UserPetUpsertBulk) SetPetID ¶
func (u *UserPetUpsertBulk) SetPetID(v int) *UserPetUpsertBulk
SetPetID sets the "pet_id" field.
func (*UserPetUpsertBulk) SetUserID ¶
func (u *UserPetUpsertBulk) SetUserID(v int) *UserPetUpsertBulk
SetUserID sets the "user_id" field.
func (*UserPetUpsertBulk) Update ¶
func (u *UserPetUpsertBulk) Update(set func(*UserPetUpsert)) *UserPetUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserPetCreateBulk.OnConflict documentation for more info.
func (*UserPetUpsertBulk) UpdateEnabledSvgGroupElementIds ¶
func (u *UserPetUpsertBulk) UpdateEnabledSvgGroupElementIds() *UserPetUpsertBulk
UpdateEnabledSvgGroupElementIds sets the "enabled_svg_group_element_ids" field to the value that was provided on create.
func (*UserPetUpsertBulk) UpdateHungerPercentage ¶
func (u *UserPetUpsertBulk) UpdateHungerPercentage() *UserPetUpsertBulk
UpdateHungerPercentage sets the "hunger_percentage" field to the value that was provided on create.
func (*UserPetUpsertBulk) UpdateNewValues ¶
func (u *UserPetUpsertBulk) UpdateNewValues() *UserPetUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserPet.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserPetUpsertBulk) UpdatePetID ¶
func (u *UserPetUpsertBulk) UpdatePetID() *UserPetUpsertBulk
UpdatePetID sets the "pet_id" field to the value that was provided on create.
func (*UserPetUpsertBulk) UpdateUserID ¶
func (u *UserPetUpsertBulk) UpdateUserID() *UserPetUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type UserPetUpsertOne ¶
type UserPetUpsertOne struct {
// contains filtered or unexported fields
}
UserPetUpsertOne is the builder for "upsert"-ing
one UserPet node.
func (*UserPetUpsertOne) AddHungerPercentage ¶
func (u *UserPetUpsertOne) AddHungerPercentage(v float64) *UserPetUpsertOne
AddHungerPercentage adds v to the "hunger_percentage" field.
func (*UserPetUpsertOne) DoNothing ¶
func (u *UserPetUpsertOne) DoNothing() *UserPetUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserPetUpsertOne) Exec ¶
func (u *UserPetUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserPetUpsertOne) ExecX ¶
func (u *UserPetUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserPetUpsertOne) Ignore ¶
func (u *UserPetUpsertOne) Ignore() *UserPetUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserPet.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserPetUpsertOne) SetEnabledSvgGroupElementIds ¶
func (u *UserPetUpsertOne) SetEnabledSvgGroupElementIds(v map[string]bool) *UserPetUpsertOne
SetEnabledSvgGroupElementIds sets the "enabled_svg_group_element_ids" field.
func (*UserPetUpsertOne) SetHungerPercentage ¶
func (u *UserPetUpsertOne) SetHungerPercentage(v float64) *UserPetUpsertOne
SetHungerPercentage sets the "hunger_percentage" field.
func (*UserPetUpsertOne) SetPetID ¶
func (u *UserPetUpsertOne) SetPetID(v int) *UserPetUpsertOne
SetPetID sets the "pet_id" field.
func (*UserPetUpsertOne) SetUserID ¶
func (u *UserPetUpsertOne) SetUserID(v int) *UserPetUpsertOne
SetUserID sets the "user_id" field.
func (*UserPetUpsertOne) Update ¶
func (u *UserPetUpsertOne) Update(set func(*UserPetUpsert)) *UserPetUpsertOne
Update allows overriding fields `UPDATE` values. See the UserPetCreate.OnConflict documentation for more info.
func (*UserPetUpsertOne) UpdateEnabledSvgGroupElementIds ¶
func (u *UserPetUpsertOne) UpdateEnabledSvgGroupElementIds() *UserPetUpsertOne
UpdateEnabledSvgGroupElementIds sets the "enabled_svg_group_element_ids" field to the value that was provided on create.
func (*UserPetUpsertOne) UpdateHungerPercentage ¶
func (u *UserPetUpsertOne) UpdateHungerPercentage() *UserPetUpsertOne
UpdateHungerPercentage sets the "hunger_percentage" field to the value that was provided on create.
func (*UserPetUpsertOne) UpdateNewValues ¶
func (u *UserPetUpsertOne) UpdateNewValues() *UserPetUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserPet.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserPetUpsertOne) UpdatePetID ¶
func (u *UserPetUpsertOne) UpdatePetID() *UserPetUpsertOne
UpdatePetID sets the "pet_id" field to the value that was provided on create.
func (*UserPetUpsertOne) UpdateUserID ¶
func (u *UserPetUpsertOne) UpdateUserID() *UserPetUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { FirstName string `json:"first_name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldFirstName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryAuthoredDeadlines ¶
func (uq *UserQuery) QueryAuthoredDeadlines() *DeadlineQuery
QueryAuthoredDeadlines chains the current query on the "authored_deadlines" edge.
func (*UserQuery) QueryForumPosts ¶
func (uq *UserQuery) QueryForumPosts() *ForumPostQuery
QueryForumPosts chains the current query on the "forum_posts" edge.
func (*UserQuery) QueryGroupUsers ¶
func (uq *UserQuery) QueryGroupUsers() *GroupUserQuery
QueryGroupUsers chains the current query on the "group_users" edge.
func (*UserQuery) QueryGroups ¶
func (uq *UserQuery) QueryGroups() *GroupQuery
QueryGroups chains the current query on the "groups" edge.
func (*UserQuery) QueryInstitution ¶
func (uq *UserQuery) QueryInstitution() *InstitutionQuery
QueryInstitution chains the current query on the "institution" edge.
func (*UserQuery) QueryReactedPosts ¶
func (uq *UserQuery) QueryReactedPosts() *ForumPostQuery
QueryReactedPosts chains the current query on the "reacted_posts" edge.
func (*UserQuery) QueryReactions ¶
func (uq *UserQuery) QueryReactions() *ReactionQuery
QueryReactions chains the current query on the "reactions" edge.
func (*UserQuery) QueryRedemptions ¶
func (uq *UserQuery) QueryRedemptions() *RedemptionQuery
QueryRedemptions chains the current query on the "redemptions" edge.
func (*UserQuery) QueryUserPets ¶
func (uq *UserQuery) QueryUserPets() *UserPetQuery
QueryUserPets chains the current query on the "user_pets" edge.
func (*UserQuery) QueryVotedDeadlines ¶
func (uq *UserQuery) QueryVotedDeadlines() *DeadlineQuery
QueryVotedDeadlines chains the current query on the "voted_deadlines" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { FirstName string `json:"first_name,omitempty"` } client.User.Query(). Select(user.FieldFirstName). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithAuthoredDeadlines ¶
func (uq *UserQuery) WithAuthoredDeadlines(opts ...func(*DeadlineQuery)) *UserQuery
WithAuthoredDeadlines tells the query-builder to eager-load the nodes that are connected to the "authored_deadlines" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithForumPosts ¶
func (uq *UserQuery) WithForumPosts(opts ...func(*ForumPostQuery)) *UserQuery
WithForumPosts tells the query-builder to eager-load the nodes that are connected to the "forum_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithGroupUsers ¶
func (uq *UserQuery) WithGroupUsers(opts ...func(*GroupUserQuery)) *UserQuery
WithGroupUsers tells the query-builder to eager-load the nodes that are connected to the "group_users" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithGroups ¶
func (uq *UserQuery) WithGroups(opts ...func(*GroupQuery)) *UserQuery
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.
func (*UserQuery) WithInstitution ¶
func (uq *UserQuery) WithInstitution(opts ...func(*InstitutionQuery)) *UserQuery
WithInstitution tells the query-builder to eager-load the nodes that are connected to the "institution" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithPet ¶
WithPet tells the query-builder to eager-load the nodes that are connected to the "pet" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithReactedPosts ¶
func (uq *UserQuery) WithReactedPosts(opts ...func(*ForumPostQuery)) *UserQuery
WithReactedPosts tells the query-builder to eager-load the nodes that are connected to the "reacted_posts" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithReactions ¶
func (uq *UserQuery) WithReactions(opts ...func(*ReactionQuery)) *UserQuery
WithReactions tells the query-builder to eager-load the nodes that are connected to the "reactions" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithRedemptions ¶
func (uq *UserQuery) WithRedemptions(opts ...func(*RedemptionQuery)) *UserQuery
WithRedemptions tells the query-builder to eager-load the nodes that are connected to the "redemptions" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithUserPets ¶
func (uq *UserQuery) WithUserPets(opts ...func(*UserPetQuery)) *UserQuery
WithUserPets tells the query-builder to eager-load the nodes that are connected to the "user_pets" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithVotedDeadlines ¶
func (uq *UserQuery) WithVotedDeadlines(opts ...func(*DeadlineQuery)) *UserQuery
WithVotedDeadlines tells the query-builder to eager-load the nodes that are connected to the "voted_deadlines" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddAuthoredDeadlineIDs ¶
func (uu *UserUpdate) AddAuthoredDeadlineIDs(ids ...int) *UserUpdate
AddAuthoredDeadlineIDs adds the "authored_deadlines" edge to the Deadline entity by IDs.
func (*UserUpdate) AddAuthoredDeadlines ¶
func (uu *UserUpdate) AddAuthoredDeadlines(d ...*Deadline) *UserUpdate
AddAuthoredDeadlines adds the "authored_deadlines" edges to the Deadline entity.
func (*UserUpdate) AddForumPostIDs ¶
func (uu *UserUpdate) AddForumPostIDs(ids ...int) *UserUpdate
AddForumPostIDs adds the "forum_posts" edge to the ForumPost entity by IDs.
func (*UserUpdate) AddForumPosts ¶
func (uu *UserUpdate) AddForumPosts(f ...*ForumPost) *UserUpdate
AddForumPosts adds the "forum_posts" edges to the ForumPost entity.
func (*UserUpdate) AddGroupIDs ¶
func (uu *UserUpdate) AddGroupIDs(ids ...int) *UserUpdate
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*UserUpdate) AddGroups ¶
func (uu *UserUpdate) AddGroups(g ...*Group) *UserUpdate
AddGroups adds the "groups" edges to the Group entity.
func (*UserUpdate) AddPet ¶
func (uu *UserUpdate) AddPet(p ...*Pet) *UserUpdate
AddPet adds the "pet" edges to the Pet entity.
func (*UserUpdate) AddPetIDs ¶
func (uu *UserUpdate) AddPetIDs(ids ...int) *UserUpdate
AddPetIDs adds the "pet" edge to the Pet entity by IDs.
func (*UserUpdate) AddPoints ¶
func (uu *UserUpdate) AddPoints(i int) *UserUpdate
AddPoints adds i to the "points" field.
func (*UserUpdate) AddPointsAwardedCount ¶
func (uu *UserUpdate) AddPointsAwardedCount(i int) *UserUpdate
AddPointsAwardedCount adds i to the "points_awarded_count" field.
func (*UserUpdate) AddReactedPostIDs ¶
func (uu *UserUpdate) AddReactedPostIDs(ids ...int) *UserUpdate
AddReactedPostIDs adds the "reacted_posts" edge to the ForumPost entity by IDs.
func (*UserUpdate) AddReactedPosts ¶
func (uu *UserUpdate) AddReactedPosts(f ...*ForumPost) *UserUpdate
AddReactedPosts adds the "reacted_posts" edges to the ForumPost entity.
func (*UserUpdate) AddRedemptionIDs ¶
func (uu *UserUpdate) AddRedemptionIDs(ids ...int) *UserUpdate
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by IDs.
func (*UserUpdate) AddRedemptions ¶
func (uu *UserUpdate) AddRedemptions(r ...*Redemption) *UserUpdate
AddRedemptions adds the "redemptions" edges to the Redemption entity.
func (*UserUpdate) AddVotedDeadlineIDs ¶
func (uu *UserUpdate) AddVotedDeadlineIDs(ids ...int) *UserUpdate
AddVotedDeadlineIDs adds the "voted_deadlines" edge to the Deadline entity by IDs.
func (*UserUpdate) AddVotedDeadlines ¶
func (uu *UserUpdate) AddVotedDeadlines(d ...*Deadline) *UserUpdate
AddVotedDeadlines adds the "voted_deadlines" edges to the Deadline entity.
func (*UserUpdate) ClearAuthoredDeadlines ¶
func (uu *UserUpdate) ClearAuthoredDeadlines() *UserUpdate
ClearAuthoredDeadlines clears all "authored_deadlines" edges to the Deadline entity.
func (*UserUpdate) ClearForumPosts ¶
func (uu *UserUpdate) ClearForumPosts() *UserUpdate
ClearForumPosts clears all "forum_posts" edges to the ForumPost entity.
func (*UserUpdate) ClearGroups ¶
func (uu *UserUpdate) ClearGroups() *UserUpdate
ClearGroups clears all "groups" edges to the Group entity.
func (*UserUpdate) ClearInstitution ¶
func (uu *UserUpdate) ClearInstitution() *UserUpdate
ClearInstitution clears the "institution" edge to the Institution entity.
func (*UserUpdate) ClearPet ¶
func (uu *UserUpdate) ClearPet() *UserUpdate
ClearPet clears all "pet" edges to the Pet entity.
func (*UserUpdate) ClearPointsAwardedResetTime ¶
func (uu *UserUpdate) ClearPointsAwardedResetTime() *UserUpdate
ClearPointsAwardedResetTime clears the value of the "points_awarded_reset_time" field.
func (*UserUpdate) ClearReactedPosts ¶
func (uu *UserUpdate) ClearReactedPosts() *UserUpdate
ClearReactedPosts clears all "reacted_posts" edges to the ForumPost entity.
func (*UserUpdate) ClearRedemptions ¶
func (uu *UserUpdate) ClearRedemptions() *UserUpdate
ClearRedemptions clears all "redemptions" edges to the Redemption entity.
func (*UserUpdate) ClearVotedDeadlines ¶
func (uu *UserUpdate) ClearVotedDeadlines() *UserUpdate
ClearVotedDeadlines clears all "voted_deadlines" edges to the Deadline entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveAuthoredDeadlineIDs ¶
func (uu *UserUpdate) RemoveAuthoredDeadlineIDs(ids ...int) *UserUpdate
RemoveAuthoredDeadlineIDs removes the "authored_deadlines" edge to Deadline entities by IDs.
func (*UserUpdate) RemoveAuthoredDeadlines ¶
func (uu *UserUpdate) RemoveAuthoredDeadlines(d ...*Deadline) *UserUpdate
RemoveAuthoredDeadlines removes "authored_deadlines" edges to Deadline entities.
func (*UserUpdate) RemoveForumPostIDs ¶
func (uu *UserUpdate) RemoveForumPostIDs(ids ...int) *UserUpdate
RemoveForumPostIDs removes the "forum_posts" edge to ForumPost entities by IDs.
func (*UserUpdate) RemoveForumPosts ¶
func (uu *UserUpdate) RemoveForumPosts(f ...*ForumPost) *UserUpdate
RemoveForumPosts removes "forum_posts" edges to ForumPost entities.
func (*UserUpdate) RemoveGroupIDs ¶
func (uu *UserUpdate) RemoveGroupIDs(ids ...int) *UserUpdate
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*UserUpdate) RemoveGroups ¶
func (uu *UserUpdate) RemoveGroups(g ...*Group) *UserUpdate
RemoveGroups removes "groups" edges to Group entities.
func (*UserUpdate) RemovePet ¶
func (uu *UserUpdate) RemovePet(p ...*Pet) *UserUpdate
RemovePet removes "pet" edges to Pet entities.
func (*UserUpdate) RemovePetIDs ¶
func (uu *UserUpdate) RemovePetIDs(ids ...int) *UserUpdate
RemovePetIDs removes the "pet" edge to Pet entities by IDs.
func (*UserUpdate) RemoveReactedPostIDs ¶
func (uu *UserUpdate) RemoveReactedPostIDs(ids ...int) *UserUpdate
RemoveReactedPostIDs removes the "reacted_posts" edge to ForumPost entities by IDs.
func (*UserUpdate) RemoveReactedPosts ¶
func (uu *UserUpdate) RemoveReactedPosts(f ...*ForumPost) *UserUpdate
RemoveReactedPosts removes "reacted_posts" edges to ForumPost entities.
func (*UserUpdate) RemoveRedemptionIDs ¶
func (uu *UserUpdate) RemoveRedemptionIDs(ids ...int) *UserUpdate
RemoveRedemptionIDs removes the "redemptions" edge to Redemption entities by IDs.
func (*UserUpdate) RemoveRedemptions ¶
func (uu *UserUpdate) RemoveRedemptions(r ...*Redemption) *UserUpdate
RemoveRedemptions removes "redemptions" edges to Redemption entities.
func (*UserUpdate) RemoveVotedDeadlineIDs ¶
func (uu *UserUpdate) RemoveVotedDeadlineIDs(ids ...int) *UserUpdate
RemoveVotedDeadlineIDs removes the "voted_deadlines" edge to Deadline entities by IDs.
func (*UserUpdate) RemoveVotedDeadlines ¶
func (uu *UserUpdate) RemoveVotedDeadlines(d ...*Deadline) *UserUpdate
RemoveVotedDeadlines removes "voted_deadlines" edges to Deadline entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetFirstName ¶
func (uu *UserUpdate) SetFirstName(s string) *UserUpdate
SetFirstName sets the "first_name" field.
func (*UserUpdate) SetGodMode ¶
func (uu *UserUpdate) SetGodMode(b bool) *UserUpdate
SetGodMode sets the "god_mode" field.
func (*UserUpdate) SetInstitution ¶
func (uu *UserUpdate) SetInstitution(i *Institution) *UserUpdate
SetInstitution sets the "institution" edge to the Institution entity.
func (*UserUpdate) SetInstitutionID ¶
func (uu *UserUpdate) SetInstitutionID(id int) *UserUpdate
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*UserUpdate) SetLastName ¶
func (uu *UserUpdate) SetLastName(s string) *UserUpdate
SetLastName sets the "last_name" field.
func (*UserUpdate) SetNillablePoints ¶
func (uu *UserUpdate) SetNillablePoints(i *int) *UserUpdate
SetNillablePoints sets the "points" field if the given value is not nil.
func (*UserUpdate) SetNillablePointsAwardedCount ¶
func (uu *UserUpdate) SetNillablePointsAwardedCount(i *int) *UserUpdate
SetNillablePointsAwardedCount sets the "points_awarded_count" field if the given value is not nil.
func (*UserUpdate) SetNillablePointsAwardedResetTime ¶
func (uu *UserUpdate) SetNillablePointsAwardedResetTime(t *time.Time) *UserUpdate
SetNillablePointsAwardedResetTime sets the "points_awarded_reset_time" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(h hash.Encoded) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetPoints ¶
func (uu *UserUpdate) SetPoints(i int) *UserUpdate
SetPoints sets the "points" field.
func (*UserUpdate) SetPointsAwardedCount ¶
func (uu *UserUpdate) SetPointsAwardedCount(i int) *UserUpdate
SetPointsAwardedCount sets the "points_awarded_count" field.
func (*UserUpdate) SetPointsAwardedResetTime ¶
func (uu *UserUpdate) SetPointsAwardedResetTime(t time.Time) *UserUpdate
SetPointsAwardedResetTime sets the "points_awarded_reset_time" field.
func (*UserUpdate) SetRole ¶
func (uu *UserUpdate) SetRole(i institution.Role) *UserUpdate
SetRole sets the "role" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddAuthoredDeadlineIDs ¶
func (uuo *UserUpdateOne) AddAuthoredDeadlineIDs(ids ...int) *UserUpdateOne
AddAuthoredDeadlineIDs adds the "authored_deadlines" edge to the Deadline entity by IDs.
func (*UserUpdateOne) AddAuthoredDeadlines ¶
func (uuo *UserUpdateOne) AddAuthoredDeadlines(d ...*Deadline) *UserUpdateOne
AddAuthoredDeadlines adds the "authored_deadlines" edges to the Deadline entity.
func (*UserUpdateOne) AddForumPostIDs ¶
func (uuo *UserUpdateOne) AddForumPostIDs(ids ...int) *UserUpdateOne
AddForumPostIDs adds the "forum_posts" edge to the ForumPost entity by IDs.
func (*UserUpdateOne) AddForumPosts ¶
func (uuo *UserUpdateOne) AddForumPosts(f ...*ForumPost) *UserUpdateOne
AddForumPosts adds the "forum_posts" edges to the ForumPost entity.
func (*UserUpdateOne) AddGroupIDs ¶
func (uuo *UserUpdateOne) AddGroupIDs(ids ...int) *UserUpdateOne
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*UserUpdateOne) AddGroups ¶
func (uuo *UserUpdateOne) AddGroups(g ...*Group) *UserUpdateOne
AddGroups adds the "groups" edges to the Group entity.
func (*UserUpdateOne) AddPet ¶
func (uuo *UserUpdateOne) AddPet(p ...*Pet) *UserUpdateOne
AddPet adds the "pet" edges to the Pet entity.
func (*UserUpdateOne) AddPetIDs ¶
func (uuo *UserUpdateOne) AddPetIDs(ids ...int) *UserUpdateOne
AddPetIDs adds the "pet" edge to the Pet entity by IDs.
func (*UserUpdateOne) AddPoints ¶
func (uuo *UserUpdateOne) AddPoints(i int) *UserUpdateOne
AddPoints adds i to the "points" field.
func (*UserUpdateOne) AddPointsAwardedCount ¶
func (uuo *UserUpdateOne) AddPointsAwardedCount(i int) *UserUpdateOne
AddPointsAwardedCount adds i to the "points_awarded_count" field.
func (*UserUpdateOne) AddReactedPostIDs ¶
func (uuo *UserUpdateOne) AddReactedPostIDs(ids ...int) *UserUpdateOne
AddReactedPostIDs adds the "reacted_posts" edge to the ForumPost entity by IDs.
func (*UserUpdateOne) AddReactedPosts ¶
func (uuo *UserUpdateOne) AddReactedPosts(f ...*ForumPost) *UserUpdateOne
AddReactedPosts adds the "reacted_posts" edges to the ForumPost entity.
func (*UserUpdateOne) AddRedemptionIDs ¶
func (uuo *UserUpdateOne) AddRedemptionIDs(ids ...int) *UserUpdateOne
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by IDs.
func (*UserUpdateOne) AddRedemptions ¶
func (uuo *UserUpdateOne) AddRedemptions(r ...*Redemption) *UserUpdateOne
AddRedemptions adds the "redemptions" edges to the Redemption entity.
func (*UserUpdateOne) AddVotedDeadlineIDs ¶
func (uuo *UserUpdateOne) AddVotedDeadlineIDs(ids ...int) *UserUpdateOne
AddVotedDeadlineIDs adds the "voted_deadlines" edge to the Deadline entity by IDs.
func (*UserUpdateOne) AddVotedDeadlines ¶
func (uuo *UserUpdateOne) AddVotedDeadlines(d ...*Deadline) *UserUpdateOne
AddVotedDeadlines adds the "voted_deadlines" edges to the Deadline entity.
func (*UserUpdateOne) ClearAuthoredDeadlines ¶
func (uuo *UserUpdateOne) ClearAuthoredDeadlines() *UserUpdateOne
ClearAuthoredDeadlines clears all "authored_deadlines" edges to the Deadline entity.
func (*UserUpdateOne) ClearForumPosts ¶
func (uuo *UserUpdateOne) ClearForumPosts() *UserUpdateOne
ClearForumPosts clears all "forum_posts" edges to the ForumPost entity.
func (*UserUpdateOne) ClearGroups ¶
func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne
ClearGroups clears all "groups" edges to the Group entity.
func (*UserUpdateOne) ClearInstitution ¶
func (uuo *UserUpdateOne) ClearInstitution() *UserUpdateOne
ClearInstitution clears the "institution" edge to the Institution entity.
func (*UserUpdateOne) ClearPet ¶
func (uuo *UserUpdateOne) ClearPet() *UserUpdateOne
ClearPet clears all "pet" edges to the Pet entity.
func (*UserUpdateOne) ClearPointsAwardedResetTime ¶
func (uuo *UserUpdateOne) ClearPointsAwardedResetTime() *UserUpdateOne
ClearPointsAwardedResetTime clears the value of the "points_awarded_reset_time" field.
func (*UserUpdateOne) ClearReactedPosts ¶
func (uuo *UserUpdateOne) ClearReactedPosts() *UserUpdateOne
ClearReactedPosts clears all "reacted_posts" edges to the ForumPost entity.
func (*UserUpdateOne) ClearRedemptions ¶
func (uuo *UserUpdateOne) ClearRedemptions() *UserUpdateOne
ClearRedemptions clears all "redemptions" edges to the Redemption entity.
func (*UserUpdateOne) ClearVotedDeadlines ¶
func (uuo *UserUpdateOne) ClearVotedDeadlines() *UserUpdateOne
ClearVotedDeadlines clears all "voted_deadlines" edges to the Deadline entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveAuthoredDeadlineIDs ¶
func (uuo *UserUpdateOne) RemoveAuthoredDeadlineIDs(ids ...int) *UserUpdateOne
RemoveAuthoredDeadlineIDs removes the "authored_deadlines" edge to Deadline entities by IDs.
func (*UserUpdateOne) RemoveAuthoredDeadlines ¶
func (uuo *UserUpdateOne) RemoveAuthoredDeadlines(d ...*Deadline) *UserUpdateOne
RemoveAuthoredDeadlines removes "authored_deadlines" edges to Deadline entities.
func (*UserUpdateOne) RemoveForumPostIDs ¶
func (uuo *UserUpdateOne) RemoveForumPostIDs(ids ...int) *UserUpdateOne
RemoveForumPostIDs removes the "forum_posts" edge to ForumPost entities by IDs.
func (*UserUpdateOne) RemoveForumPosts ¶
func (uuo *UserUpdateOne) RemoveForumPosts(f ...*ForumPost) *UserUpdateOne
RemoveForumPosts removes "forum_posts" edges to ForumPost entities.
func (*UserUpdateOne) RemoveGroupIDs ¶
func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...int) *UserUpdateOne
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*UserUpdateOne) RemoveGroups ¶
func (uuo *UserUpdateOne) RemoveGroups(g ...*Group) *UserUpdateOne
RemoveGroups removes "groups" edges to Group entities.
func (*UserUpdateOne) RemovePet ¶
func (uuo *UserUpdateOne) RemovePet(p ...*Pet) *UserUpdateOne
RemovePet removes "pet" edges to Pet entities.
func (*UserUpdateOne) RemovePetIDs ¶
func (uuo *UserUpdateOne) RemovePetIDs(ids ...int) *UserUpdateOne
RemovePetIDs removes the "pet" edge to Pet entities by IDs.
func (*UserUpdateOne) RemoveReactedPostIDs ¶
func (uuo *UserUpdateOne) RemoveReactedPostIDs(ids ...int) *UserUpdateOne
RemoveReactedPostIDs removes the "reacted_posts" edge to ForumPost entities by IDs.
func (*UserUpdateOne) RemoveReactedPosts ¶
func (uuo *UserUpdateOne) RemoveReactedPosts(f ...*ForumPost) *UserUpdateOne
RemoveReactedPosts removes "reacted_posts" edges to ForumPost entities.
func (*UserUpdateOne) RemoveRedemptionIDs ¶
func (uuo *UserUpdateOne) RemoveRedemptionIDs(ids ...int) *UserUpdateOne
RemoveRedemptionIDs removes the "redemptions" edge to Redemption entities by IDs.
func (*UserUpdateOne) RemoveRedemptions ¶
func (uuo *UserUpdateOne) RemoveRedemptions(r ...*Redemption) *UserUpdateOne
RemoveRedemptions removes "redemptions" edges to Redemption entities.
func (*UserUpdateOne) RemoveVotedDeadlineIDs ¶
func (uuo *UserUpdateOne) RemoveVotedDeadlineIDs(ids ...int) *UserUpdateOne
RemoveVotedDeadlineIDs removes the "voted_deadlines" edge to Deadline entities by IDs.
func (*UserUpdateOne) RemoveVotedDeadlines ¶
func (uuo *UserUpdateOne) RemoveVotedDeadlines(d ...*Deadline) *UserUpdateOne
RemoveVotedDeadlines removes "voted_deadlines" edges to Deadline entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetFirstName ¶
func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne
SetFirstName sets the "first_name" field.
func (*UserUpdateOne) SetGodMode ¶
func (uuo *UserUpdateOne) SetGodMode(b bool) *UserUpdateOne
SetGodMode sets the "god_mode" field.
func (*UserUpdateOne) SetInstitution ¶
func (uuo *UserUpdateOne) SetInstitution(i *Institution) *UserUpdateOne
SetInstitution sets the "institution" edge to the Institution entity.
func (*UserUpdateOne) SetInstitutionID ¶
func (uuo *UserUpdateOne) SetInstitutionID(id int) *UserUpdateOne
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*UserUpdateOne) SetLastName ¶
func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne
SetLastName sets the "last_name" field.
func (*UserUpdateOne) SetNillablePoints ¶
func (uuo *UserUpdateOne) SetNillablePoints(i *int) *UserUpdateOne
SetNillablePoints sets the "points" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePointsAwardedCount ¶
func (uuo *UserUpdateOne) SetNillablePointsAwardedCount(i *int) *UserUpdateOne
SetNillablePointsAwardedCount sets the "points_awarded_count" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePointsAwardedResetTime ¶
func (uuo *UserUpdateOne) SetNillablePointsAwardedResetTime(t *time.Time) *UserUpdateOne
SetNillablePointsAwardedResetTime sets the "points_awarded_reset_time" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(h hash.Encoded) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetPoints ¶
func (uuo *UserUpdateOne) SetPoints(i int) *UserUpdateOne
SetPoints sets the "points" field.
func (*UserUpdateOne) SetPointsAwardedCount ¶
func (uuo *UserUpdateOne) SetPointsAwardedCount(i int) *UserUpdateOne
SetPointsAwardedCount sets the "points_awarded_count" field.
func (*UserUpdateOne) SetPointsAwardedResetTime ¶
func (uuo *UserUpdateOne) SetPointsAwardedResetTime(t time.Time) *UserUpdateOne
SetPointsAwardedResetTime sets the "points_awarded_reset_time" field.
func (*UserUpdateOne) SetRole ¶
func (uuo *UserUpdateOne) SetRole(i institution.Role) *UserUpdateOne
SetRole sets the "role" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) AddPoints ¶
func (u *UserUpsert) AddPoints(v int) *UserUpsert
AddPoints adds v to the "points" field.
func (*UserUpsert) AddPointsAwardedCount ¶
func (u *UserUpsert) AddPointsAwardedCount(v int) *UserUpsert
AddPointsAwardedCount adds v to the "points_awarded_count" field.
func (*UserUpsert) ClearPointsAwardedResetTime ¶
func (u *UserUpsert) ClearPointsAwardedResetTime() *UserUpsert
ClearPointsAwardedResetTime clears the value of the "points_awarded_reset_time" field.
func (*UserUpsert) SetEmail ¶
func (u *UserUpsert) SetEmail(v string) *UserUpsert
SetEmail sets the "email" field.
func (*UserUpsert) SetFirstName ¶
func (u *UserUpsert) SetFirstName(v string) *UserUpsert
SetFirstName sets the "first_name" field.
func (*UserUpsert) SetGodMode ¶
func (u *UserUpsert) SetGodMode(v bool) *UserUpsert
SetGodMode sets the "god_mode" field.
func (*UserUpsert) SetLastName ¶
func (u *UserUpsert) SetLastName(v string) *UserUpsert
SetLastName sets the "last_name" field.
func (*UserUpsert) SetPassword ¶
func (u *UserUpsert) SetPassword(v hash.Encoded) *UserUpsert
SetPassword sets the "password" field.
func (*UserUpsert) SetPoints ¶
func (u *UserUpsert) SetPoints(v int) *UserUpsert
SetPoints sets the "points" field.
func (*UserUpsert) SetPointsAwardedCount ¶
func (u *UserUpsert) SetPointsAwardedCount(v int) *UserUpsert
SetPointsAwardedCount sets the "points_awarded_count" field.
func (*UserUpsert) SetPointsAwardedResetTime ¶
func (u *UserUpsert) SetPointsAwardedResetTime(v time.Time) *UserUpsert
SetPointsAwardedResetTime sets the "points_awarded_reset_time" field.
func (*UserUpsert) SetRole ¶
func (u *UserUpsert) SetRole(v institution.Role) *UserUpsert
SetRole sets the "role" field.
func (*UserUpsert) UpdateEmail ¶
func (u *UserUpsert) UpdateEmail() *UserUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsert) UpdateFirstName ¶
func (u *UserUpsert) UpdateFirstName() *UserUpsert
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*UserUpsert) UpdateGodMode ¶
func (u *UserUpsert) UpdateGodMode() *UserUpsert
UpdateGodMode sets the "god_mode" field to the value that was provided on create.
func (*UserUpsert) UpdateLastName ¶
func (u *UserUpsert) UpdateLastName() *UserUpsert
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*UserUpsert) UpdatePassword ¶
func (u *UserUpsert) UpdatePassword() *UserUpsert
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsert) UpdatePoints ¶
func (u *UserUpsert) UpdatePoints() *UserUpsert
UpdatePoints sets the "points" field to the value that was provided on create.
func (*UserUpsert) UpdatePointsAwardedCount ¶
func (u *UserUpsert) UpdatePointsAwardedCount() *UserUpsert
UpdatePointsAwardedCount sets the "points_awarded_count" field to the value that was provided on create.
func (*UserUpsert) UpdatePointsAwardedResetTime ¶
func (u *UserUpsert) UpdatePointsAwardedResetTime() *UserUpsert
UpdatePointsAwardedResetTime sets the "points_awarded_reset_time" field to the value that was provided on create.
func (*UserUpsert) UpdateRole ¶
func (u *UserUpsert) UpdateRole() *UserUpsert
UpdateRole sets the "role" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) AddPoints ¶
func (u *UserUpsertBulk) AddPoints(v int) *UserUpsertBulk
AddPoints adds v to the "points" field.
func (*UserUpsertBulk) AddPointsAwardedCount ¶
func (u *UserUpsertBulk) AddPointsAwardedCount(v int) *UserUpsertBulk
AddPointsAwardedCount adds v to the "points_awarded_count" field.
func (*UserUpsertBulk) ClearPointsAwardedResetTime ¶
func (u *UserUpsertBulk) ClearPointsAwardedResetTime() *UserUpsertBulk
ClearPointsAwardedResetTime clears the value of the "points_awarded_reset_time" field.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetEmail ¶
func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
SetEmail sets the "email" field.
func (*UserUpsertBulk) SetFirstName ¶
func (u *UserUpsertBulk) SetFirstName(v string) *UserUpsertBulk
SetFirstName sets the "first_name" field.
func (*UserUpsertBulk) SetGodMode ¶
func (u *UserUpsertBulk) SetGodMode(v bool) *UserUpsertBulk
SetGodMode sets the "god_mode" field.
func (*UserUpsertBulk) SetLastName ¶
func (u *UserUpsertBulk) SetLastName(v string) *UserUpsertBulk
SetLastName sets the "last_name" field.
func (*UserUpsertBulk) SetPassword ¶
func (u *UserUpsertBulk) SetPassword(v hash.Encoded) *UserUpsertBulk
SetPassword sets the "password" field.
func (*UserUpsertBulk) SetPoints ¶
func (u *UserUpsertBulk) SetPoints(v int) *UserUpsertBulk
SetPoints sets the "points" field.
func (*UserUpsertBulk) SetPointsAwardedCount ¶
func (u *UserUpsertBulk) SetPointsAwardedCount(v int) *UserUpsertBulk
SetPointsAwardedCount sets the "points_awarded_count" field.
func (*UserUpsertBulk) SetPointsAwardedResetTime ¶
func (u *UserUpsertBulk) SetPointsAwardedResetTime(v time.Time) *UserUpsertBulk
SetPointsAwardedResetTime sets the "points_awarded_reset_time" field.
func (*UserUpsertBulk) SetRole ¶
func (u *UserUpsertBulk) SetRole(v institution.Role) *UserUpsertBulk
SetRole sets the "role" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateEmail ¶
func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateFirstName ¶
func (u *UserUpsertBulk) UpdateFirstName() *UserUpsertBulk
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateGodMode ¶
func (u *UserUpsertBulk) UpdateGodMode() *UserUpsertBulk
UpdateGodMode sets the "god_mode" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateLastName ¶
func (u *UserUpsertBulk) UpdateLastName() *UserUpsertBulk
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserUpsertBulk) UpdatePassword ¶
func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertBulk) UpdatePoints ¶
func (u *UserUpsertBulk) UpdatePoints() *UserUpsertBulk
UpdatePoints sets the "points" field to the value that was provided on create.
func (*UserUpsertBulk) UpdatePointsAwardedCount ¶
func (u *UserUpsertBulk) UpdatePointsAwardedCount() *UserUpsertBulk
UpdatePointsAwardedCount sets the "points_awarded_count" field to the value that was provided on create.
func (*UserUpsertBulk) UpdatePointsAwardedResetTime ¶
func (u *UserUpsertBulk) UpdatePointsAwardedResetTime() *UserUpsertBulk
UpdatePointsAwardedResetTime sets the "points_awarded_reset_time" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateRole ¶
func (u *UserUpsertBulk) UpdateRole() *UserUpsertBulk
UpdateRole sets the "role" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) AddPoints ¶
func (u *UserUpsertOne) AddPoints(v int) *UserUpsertOne
AddPoints adds v to the "points" field.
func (*UserUpsertOne) AddPointsAwardedCount ¶
func (u *UserUpsertOne) AddPointsAwardedCount(v int) *UserUpsertOne
AddPointsAwardedCount adds v to the "points_awarded_count" field.
func (*UserUpsertOne) ClearPointsAwardedResetTime ¶
func (u *UserUpsertOne) ClearPointsAwardedResetTime() *UserUpsertOne
ClearPointsAwardedResetTime clears the value of the "points_awarded_reset_time" field.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) ID ¶
func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetEmail ¶
func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
SetEmail sets the "email" field.
func (*UserUpsertOne) SetFirstName ¶
func (u *UserUpsertOne) SetFirstName(v string) *UserUpsertOne
SetFirstName sets the "first_name" field.
func (*UserUpsertOne) SetGodMode ¶
func (u *UserUpsertOne) SetGodMode(v bool) *UserUpsertOne
SetGodMode sets the "god_mode" field.
func (*UserUpsertOne) SetLastName ¶
func (u *UserUpsertOne) SetLastName(v string) *UserUpsertOne
SetLastName sets the "last_name" field.
func (*UserUpsertOne) SetPassword ¶
func (u *UserUpsertOne) SetPassword(v hash.Encoded) *UserUpsertOne
SetPassword sets the "password" field.
func (*UserUpsertOne) SetPoints ¶
func (u *UserUpsertOne) SetPoints(v int) *UserUpsertOne
SetPoints sets the "points" field.
func (*UserUpsertOne) SetPointsAwardedCount ¶
func (u *UserUpsertOne) SetPointsAwardedCount(v int) *UserUpsertOne
SetPointsAwardedCount sets the "points_awarded_count" field.
func (*UserUpsertOne) SetPointsAwardedResetTime ¶
func (u *UserUpsertOne) SetPointsAwardedResetTime(v time.Time) *UserUpsertOne
SetPointsAwardedResetTime sets the "points_awarded_reset_time" field.
func (*UserUpsertOne) SetRole ¶
func (u *UserUpsertOne) SetRole(v institution.Role) *UserUpsertOne
SetRole sets the "role" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateEmail ¶
func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertOne) UpdateFirstName ¶
func (u *UserUpsertOne) UpdateFirstName() *UserUpsertOne
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateGodMode ¶
func (u *UserUpsertOne) UpdateGodMode() *UserUpsertOne
UpdateGodMode sets the "god_mode" field to the value that was provided on create.
func (*UserUpsertOne) UpdateLastName ¶
func (u *UserUpsertOne) UpdateLastName() *UserUpsertOne
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserUpsertOne) UpdatePassword ¶
func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertOne) UpdatePoints ¶
func (u *UserUpsertOne) UpdatePoints() *UserUpsertOne
UpdatePoints sets the "points" field to the value that was provided on create.
func (*UserUpsertOne) UpdatePointsAwardedCount ¶
func (u *UserUpsertOne) UpdatePointsAwardedCount() *UserUpsertOne
UpdatePointsAwardedCount sets the "points_awarded_count" field to the value that was provided on create.
func (*UserUpsertOne) UpdatePointsAwardedResetTime ¶
func (u *UserUpsertOne) UpdatePointsAwardedResetTime() *UserUpsertOne
UpdatePointsAwardedResetTime sets the "points_awarded_reset_time" field to the value that was provided on create.
func (*UserUpsertOne) UpdateRole ¶
func (u *UserUpsertOne) UpdateRole() *UserUpsertOne
UpdateRole sets the "role" field to the value that was provided on create.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Voucher ¶
type Voucher struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the prize Name string `json:"name,omitempty"` // Description of the prize Description string `json:"description,omitempty"` // Points required to redeem the prize PointsRequired int `json:"points_required,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the VoucherQuery when eager-loading is set. Edges VoucherEdges `json:"edges"` // contains filtered or unexported fields }
Voucher is the model entity for the Voucher schema.
func (*Voucher) QueryInstitution ¶
func (v *Voucher) QueryInstitution() *InstitutionQuery
QueryInstitution queries the "institution" edge of the Voucher entity.
func (*Voucher) QueryRedemptions ¶
func (v *Voucher) QueryRedemptions() *RedemptionQuery
QueryRedemptions queries the "redemptions" edge of the Voucher entity.
func (*Voucher) Unwrap ¶
Unwrap unwraps the Voucher 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 (*Voucher) Update ¶
func (v *Voucher) Update() *VoucherUpdateOne
Update returns a builder for updating this Voucher. Note that you need to call Voucher.Unwrap() before calling this method if this Voucher was returned from a transaction, and the transaction was committed or rolled back.
type VoucherClient ¶
type VoucherClient struct {
// contains filtered or unexported fields
}
VoucherClient is a client for the Voucher schema.
func NewVoucherClient ¶
func NewVoucherClient(c config) *VoucherClient
NewVoucherClient returns a client for the Voucher from the given config.
func (*VoucherClient) Create ¶
func (c *VoucherClient) Create() *VoucherCreate
Create returns a builder for creating a Voucher entity.
func (*VoucherClient) CreateBulk ¶
func (c *VoucherClient) CreateBulk(builders ...*VoucherCreate) *VoucherCreateBulk
CreateBulk returns a builder for creating a bulk of Voucher entities.
func (*VoucherClient) Delete ¶
func (c *VoucherClient) Delete() *VoucherDelete
Delete returns a delete builder for Voucher.
func (*VoucherClient) DeleteOne ¶
func (c *VoucherClient) DeleteOne(v *Voucher) *VoucherDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*VoucherClient) DeleteOneID ¶
func (c *VoucherClient) DeleteOneID(id int) *VoucherDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*VoucherClient) GetX ¶
func (c *VoucherClient) GetX(ctx context.Context, id int) *Voucher
GetX is like Get, but panics if an error occurs.
func (*VoucherClient) Hooks ¶
func (c *VoucherClient) Hooks() []Hook
Hooks returns the client hooks.
func (*VoucherClient) Intercept ¶
func (c *VoucherClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `voucher.Intercept(f(g(h())))`.
func (*VoucherClient) Interceptors ¶
func (c *VoucherClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*VoucherClient) Query ¶
func (c *VoucherClient) Query() *VoucherQuery
Query returns a query builder for Voucher.
func (*VoucherClient) QueryInstitution ¶
func (c *VoucherClient) QueryInstitution(v *Voucher) *InstitutionQuery
QueryInstitution queries the institution edge of a Voucher.
func (*VoucherClient) QueryRedemptions ¶
func (c *VoucherClient) QueryRedemptions(v *Voucher) *RedemptionQuery
QueryRedemptions queries the redemptions edge of a Voucher.
func (*VoucherClient) Update ¶
func (c *VoucherClient) Update() *VoucherUpdate
Update returns an update builder for Voucher.
func (*VoucherClient) UpdateOne ¶
func (c *VoucherClient) UpdateOne(v *Voucher) *VoucherUpdateOne
UpdateOne returns an update builder for the given entity.
func (*VoucherClient) UpdateOneID ¶
func (c *VoucherClient) UpdateOneID(id int) *VoucherUpdateOne
UpdateOneID returns an update builder for the given id.
func (*VoucherClient) Use ¶
func (c *VoucherClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `voucher.Hooks(f(g(h())))`.
type VoucherCreate ¶
type VoucherCreate struct {
// contains filtered or unexported fields
}
VoucherCreate is the builder for creating a Voucher entity.
func (*VoucherCreate) AddRedemptionIDs ¶
func (vc *VoucherCreate) AddRedemptionIDs(ids ...int) *VoucherCreate
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by IDs.
func (*VoucherCreate) AddRedemptions ¶
func (vc *VoucherCreate) AddRedemptions(r ...*Redemption) *VoucherCreate
AddRedemptions adds the "redemptions" edges to the Redemption entity.
func (*VoucherCreate) Exec ¶
func (vc *VoucherCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*VoucherCreate) ExecX ¶
func (vc *VoucherCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VoucherCreate) Mutation ¶
func (vc *VoucherCreate) Mutation() *VoucherMutation
Mutation returns the VoucherMutation object of the builder.
func (*VoucherCreate) OnConflict ¶
func (vc *VoucherCreate) OnConflict(opts ...sql.ConflictOption) *VoucherUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Voucher.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.VoucherUpsert) { SetName(v+v). }). Exec(ctx)
func (*VoucherCreate) OnConflictColumns ¶
func (vc *VoucherCreate) OnConflictColumns(columns ...string) *VoucherUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Voucher.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*VoucherCreate) Save ¶
func (vc *VoucherCreate) Save(ctx context.Context) (*Voucher, error)
Save creates the Voucher in the database.
func (*VoucherCreate) SaveX ¶
func (vc *VoucherCreate) SaveX(ctx context.Context) *Voucher
SaveX calls Save and panics if Save returns an error.
func (*VoucherCreate) SetDescription ¶
func (vc *VoucherCreate) SetDescription(s string) *VoucherCreate
SetDescription sets the "description" field.
func (*VoucherCreate) SetInstitution ¶
func (vc *VoucherCreate) SetInstitution(i *Institution) *VoucherCreate
SetInstitution sets the "institution" edge to the Institution entity.
func (*VoucherCreate) SetInstitutionID ¶
func (vc *VoucherCreate) SetInstitutionID(id int) *VoucherCreate
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*VoucherCreate) SetName ¶
func (vc *VoucherCreate) SetName(s string) *VoucherCreate
SetName sets the "name" field.
func (*VoucherCreate) SetPointsRequired ¶
func (vc *VoucherCreate) SetPointsRequired(i int) *VoucherCreate
SetPointsRequired sets the "points_required" field.
type VoucherCreateBulk ¶
type VoucherCreateBulk struct {
// contains filtered or unexported fields
}
VoucherCreateBulk is the builder for creating many Voucher entities in bulk.
func (*VoucherCreateBulk) Exec ¶
func (vcb *VoucherCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*VoucherCreateBulk) ExecX ¶
func (vcb *VoucherCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VoucherCreateBulk) OnConflict ¶
func (vcb *VoucherCreateBulk) OnConflict(opts ...sql.ConflictOption) *VoucherUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Voucher.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.VoucherUpsert) { SetName(v+v). }). Exec(ctx)
func (*VoucherCreateBulk) OnConflictColumns ¶
func (vcb *VoucherCreateBulk) OnConflictColumns(columns ...string) *VoucherUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Voucher.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type VoucherDelete ¶
type VoucherDelete struct {
// contains filtered or unexported fields
}
VoucherDelete is the builder for deleting a Voucher entity.
func (*VoucherDelete) Exec ¶
func (vd *VoucherDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*VoucherDelete) ExecX ¶
func (vd *VoucherDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*VoucherDelete) Where ¶
func (vd *VoucherDelete) Where(ps ...predicate.Voucher) *VoucherDelete
Where appends a list predicates to the VoucherDelete builder.
type VoucherDeleteOne ¶
type VoucherDeleteOne struct {
// contains filtered or unexported fields
}
VoucherDeleteOne is the builder for deleting a single Voucher entity.
func (*VoucherDeleteOne) Exec ¶
func (vdo *VoucherDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*VoucherDeleteOne) ExecX ¶
func (vdo *VoucherDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VoucherDeleteOne) Where ¶
func (vdo *VoucherDeleteOne) Where(ps ...predicate.Voucher) *VoucherDeleteOne
Where appends a list predicates to the VoucherDelete builder.
type VoucherEdges ¶
type VoucherEdges struct { // Redemptions that involve this prize Redemptions []*Redemption `json:"redemptions,omitempty"` // Institution that owns this voucher Institution *Institution `json:"institution,omitempty"` // contains filtered or unexported fields }
VoucherEdges holds the relations/edges for other nodes in the graph.
func (VoucherEdges) InstitutionOrErr ¶
func (e VoucherEdges) InstitutionOrErr() (*Institution, error)
InstitutionOrErr returns the Institution value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (VoucherEdges) RedemptionsOrErr ¶
func (e VoucherEdges) RedemptionsOrErr() ([]*Redemption, error)
RedemptionsOrErr returns the Redemptions value or an error if the edge was not loaded in eager-loading.
type VoucherGroupBy ¶
type VoucherGroupBy struct {
// contains filtered or unexported fields
}
VoucherGroupBy is the group-by builder for Voucher entities.
func (*VoucherGroupBy) Aggregate ¶
func (vgb *VoucherGroupBy) Aggregate(fns ...AggregateFunc) *VoucherGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*VoucherGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VoucherGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VoucherGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VoucherGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VoucherGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VoucherGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VoucherGroupBy) Scan ¶
func (vgb *VoucherGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VoucherGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VoucherMutation ¶
type VoucherMutation struct {
// contains filtered or unexported fields
}
VoucherMutation represents an operation that mutates the Voucher nodes in the graph.
func (*VoucherMutation) AddField ¶
func (m *VoucherMutation) 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 (*VoucherMutation) AddPointsRequired ¶
func (m *VoucherMutation) AddPointsRequired(i int)
AddPointsRequired adds i to the "points_required" field.
func (*VoucherMutation) AddRedemptionIDs ¶
func (m *VoucherMutation) AddRedemptionIDs(ids ...int)
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by ids.
func (*VoucherMutation) AddedEdges ¶
func (m *VoucherMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*VoucherMutation) AddedField ¶
func (m *VoucherMutation) 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 (*VoucherMutation) AddedFields ¶
func (m *VoucherMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*VoucherMutation) AddedIDs ¶
func (m *VoucherMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*VoucherMutation) AddedPointsRequired ¶
func (m *VoucherMutation) AddedPointsRequired() (r int, exists bool)
AddedPointsRequired returns the value that was added to the "points_required" field in this mutation.
func (*VoucherMutation) ClearEdge ¶
func (m *VoucherMutation) 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 (*VoucherMutation) ClearField ¶
func (m *VoucherMutation) 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 (*VoucherMutation) ClearInstitution ¶
func (m *VoucherMutation) ClearInstitution()
ClearInstitution clears the "institution" edge to the Institution entity.
func (*VoucherMutation) ClearRedemptions ¶
func (m *VoucherMutation) ClearRedemptions()
ClearRedemptions clears the "redemptions" edge to the Redemption entity.
func (*VoucherMutation) ClearedEdges ¶
func (m *VoucherMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*VoucherMutation) ClearedFields ¶
func (m *VoucherMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (VoucherMutation) Client ¶
func (m VoucherMutation) 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 (*VoucherMutation) Description ¶
func (m *VoucherMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*VoucherMutation) EdgeCleared ¶
func (m *VoucherMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*VoucherMutation) Field ¶
func (m *VoucherMutation) 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 (*VoucherMutation) FieldCleared ¶
func (m *VoucherMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*VoucherMutation) Fields ¶
func (m *VoucherMutation) 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 (*VoucherMutation) ID ¶
func (m *VoucherMutation) 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 (*VoucherMutation) IDs ¶
func (m *VoucherMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*VoucherMutation) InstitutionCleared ¶
func (m *VoucherMutation) InstitutionCleared() bool
InstitutionCleared reports if the "institution" edge to the Institution entity was cleared.
func (*VoucherMutation) InstitutionID ¶
func (m *VoucherMutation) InstitutionID() (id int, exists bool)
InstitutionID returns the "institution" edge ID in the mutation.
func (*VoucherMutation) InstitutionIDs ¶
func (m *VoucherMutation) InstitutionIDs() (ids []int)
InstitutionIDs returns the "institution" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InstitutionID instead. It exists only for internal usage by the builders.
func (*VoucherMutation) Name ¶
func (m *VoucherMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*VoucherMutation) OldDescription ¶
func (m *VoucherMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Voucher entity. If the Voucher object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VoucherMutation) 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 (*VoucherMutation) OldName ¶
func (m *VoucherMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Voucher entity. If the Voucher object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VoucherMutation) OldPointsRequired ¶
func (m *VoucherMutation) OldPointsRequired(ctx context.Context) (v int, err error)
OldPointsRequired returns the old "points_required" field's value of the Voucher entity. If the Voucher object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*VoucherMutation) PointsRequired ¶
func (m *VoucherMutation) PointsRequired() (r int, exists bool)
PointsRequired returns the value of the "points_required" field in the mutation.
func (*VoucherMutation) RedemptionsCleared ¶
func (m *VoucherMutation) RedemptionsCleared() bool
RedemptionsCleared reports if the "redemptions" edge to the Redemption entity was cleared.
func (*VoucherMutation) RedemptionsIDs ¶
func (m *VoucherMutation) RedemptionsIDs() (ids []int)
RedemptionsIDs returns the "redemptions" edge IDs in the mutation.
func (*VoucherMutation) RemoveRedemptionIDs ¶
func (m *VoucherMutation) RemoveRedemptionIDs(ids ...int)
RemoveRedemptionIDs removes the "redemptions" edge to the Redemption entity by IDs.
func (*VoucherMutation) RemovedEdges ¶
func (m *VoucherMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*VoucherMutation) RemovedIDs ¶
func (m *VoucherMutation) 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 (*VoucherMutation) RemovedRedemptionsIDs ¶
func (m *VoucherMutation) RemovedRedemptionsIDs() (ids []int)
RemovedRedemptions returns the removed IDs of the "redemptions" edge to the Redemption entity.
func (*VoucherMutation) ResetDescription ¶
func (m *VoucherMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*VoucherMutation) ResetEdge ¶
func (m *VoucherMutation) 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 (*VoucherMutation) ResetField ¶
func (m *VoucherMutation) 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 (*VoucherMutation) ResetInstitution ¶
func (m *VoucherMutation) ResetInstitution()
ResetInstitution resets all changes to the "institution" edge.
func (*VoucherMutation) ResetName ¶
func (m *VoucherMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*VoucherMutation) ResetPointsRequired ¶
func (m *VoucherMutation) ResetPointsRequired()
ResetPointsRequired resets all changes to the "points_required" field.
func (*VoucherMutation) ResetRedemptions ¶
func (m *VoucherMutation) ResetRedemptions()
ResetRedemptions resets all changes to the "redemptions" edge.
func (*VoucherMutation) SetDescription ¶
func (m *VoucherMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*VoucherMutation) SetField ¶
func (m *VoucherMutation) 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 (*VoucherMutation) SetInstitutionID ¶
func (m *VoucherMutation) SetInstitutionID(id int)
SetInstitutionID sets the "institution" edge to the Institution entity by id.
func (*VoucherMutation) SetName ¶
func (m *VoucherMutation) SetName(s string)
SetName sets the "name" field.
func (*VoucherMutation) SetOp ¶
func (m *VoucherMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*VoucherMutation) SetPointsRequired ¶
func (m *VoucherMutation) SetPointsRequired(i int)
SetPointsRequired sets the "points_required" field.
func (VoucherMutation) Tx ¶
func (m VoucherMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*VoucherMutation) Type ¶
func (m *VoucherMutation) Type() string
Type returns the node type of this mutation (Voucher).
func (*VoucherMutation) Where ¶
func (m *VoucherMutation) Where(ps ...predicate.Voucher)
Where appends a list predicates to the VoucherMutation builder.
func (*VoucherMutation) WhereP ¶
func (m *VoucherMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the VoucherMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type VoucherQuery ¶
type VoucherQuery struct {
// contains filtered or unexported fields
}
VoucherQuery is the builder for querying Voucher entities.
func (*VoucherQuery) Aggregate ¶
func (vq *VoucherQuery) Aggregate(fns ...AggregateFunc) *VoucherSelect
Aggregate returns a VoucherSelect configured with the given aggregations.
func (*VoucherQuery) All ¶
func (vq *VoucherQuery) All(ctx context.Context) ([]*Voucher, error)
All executes the query and returns a list of Vouchers.
func (*VoucherQuery) AllX ¶
func (vq *VoucherQuery) AllX(ctx context.Context) []*Voucher
AllX is like All, but panics if an error occurs.
func (*VoucherQuery) Clone ¶
func (vq *VoucherQuery) Clone() *VoucherQuery
Clone returns a duplicate of the VoucherQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*VoucherQuery) Count ¶
func (vq *VoucherQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*VoucherQuery) CountX ¶
func (vq *VoucherQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*VoucherQuery) Exist ¶
func (vq *VoucherQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*VoucherQuery) ExistX ¶
func (vq *VoucherQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*VoucherQuery) First ¶
func (vq *VoucherQuery) First(ctx context.Context) (*Voucher, error)
First returns the first Voucher entity from the query. Returns a *NotFoundError when no Voucher was found.
func (*VoucherQuery) FirstID ¶
func (vq *VoucherQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Voucher ID from the query. Returns a *NotFoundError when no Voucher ID was found.
func (*VoucherQuery) FirstIDX ¶
func (vq *VoucherQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*VoucherQuery) FirstX ¶
func (vq *VoucherQuery) FirstX(ctx context.Context) *Voucher
FirstX is like First, but panics if an error occurs.
func (*VoucherQuery) GroupBy ¶
func (vq *VoucherQuery) GroupBy(field string, fields ...string) *VoucherGroupBy
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Voucher.Query(). GroupBy(voucher.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*VoucherQuery) IDs ¶
func (vq *VoucherQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Voucher IDs.
func (*VoucherQuery) IDsX ¶
func (vq *VoucherQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*VoucherQuery) Limit ¶
func (vq *VoucherQuery) Limit(limit int) *VoucherQuery
Limit the number of records to be returned by this query.
func (*VoucherQuery) Offset ¶
func (vq *VoucherQuery) Offset(offset int) *VoucherQuery
Offset to start from.
func (*VoucherQuery) Only ¶
func (vq *VoucherQuery) Only(ctx context.Context) (*Voucher, error)
Only returns a single Voucher entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Voucher entity is found. Returns a *NotFoundError when no Voucher entities are found.
func (*VoucherQuery) OnlyID ¶
func (vq *VoucherQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Voucher ID in the query. Returns a *NotSingularError when more than one Voucher ID is found. Returns a *NotFoundError when no entities are found.
func (*VoucherQuery) OnlyIDX ¶
func (vq *VoucherQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*VoucherQuery) OnlyX ¶
func (vq *VoucherQuery) OnlyX(ctx context.Context) *Voucher
OnlyX is like Only, but panics if an error occurs.
func (*VoucherQuery) Order ¶
func (vq *VoucherQuery) Order(o ...voucher.OrderOption) *VoucherQuery
Order specifies how the records should be ordered.
func (*VoucherQuery) QueryInstitution ¶
func (vq *VoucherQuery) QueryInstitution() *InstitutionQuery
QueryInstitution chains the current query on the "institution" edge.
func (*VoucherQuery) QueryRedemptions ¶
func (vq *VoucherQuery) QueryRedemptions() *RedemptionQuery
QueryRedemptions chains the current query on the "redemptions" edge.
func (*VoucherQuery) Select ¶
func (vq *VoucherQuery) Select(fields ...string) *VoucherSelect
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 { Name string `json:"name,omitempty"` } client.Voucher.Query(). Select(voucher.FieldName). Scan(ctx, &v)
func (*VoucherQuery) Unique ¶
func (vq *VoucherQuery) Unique(unique bool) *VoucherQuery
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 (*VoucherQuery) Where ¶
func (vq *VoucherQuery) Where(ps ...predicate.Voucher) *VoucherQuery
Where adds a new predicate for the VoucherQuery builder.
func (*VoucherQuery) WithInstitution ¶
func (vq *VoucherQuery) WithInstitution(opts ...func(*InstitutionQuery)) *VoucherQuery
WithInstitution tells the query-builder to eager-load the nodes that are connected to the "institution" edge. The optional arguments are used to configure the query builder of the edge.
func (*VoucherQuery) WithRedemptions ¶
func (vq *VoucherQuery) WithRedemptions(opts ...func(*RedemptionQuery)) *VoucherQuery
WithRedemptions tells the query-builder to eager-load the nodes that are connected to the "redemptions" edge. The optional arguments are used to configure the query builder of the edge.
type VoucherSelect ¶
type VoucherSelect struct { *VoucherQuery // contains filtered or unexported fields }
VoucherSelect is the builder for selecting fields of Voucher entities.
func (*VoucherSelect) Aggregate ¶
func (vs *VoucherSelect) Aggregate(fns ...AggregateFunc) *VoucherSelect
Aggregate adds the given aggregation functions to the selector query.
func (*VoucherSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*VoucherSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*VoucherSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*VoucherSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*VoucherSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*VoucherSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*VoucherSelect) Scan ¶
func (vs *VoucherSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*VoucherSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type VoucherUpdate ¶
type VoucherUpdate struct {
// contains filtered or unexported fields
}
VoucherUpdate is the builder for updating Voucher entities.
func (*VoucherUpdate) AddPointsRequired ¶
func (vu *VoucherUpdate) AddPointsRequired(i int) *VoucherUpdate
AddPointsRequired adds i to the "points_required" field.
func (*VoucherUpdate) AddRedemptionIDs ¶
func (vu *VoucherUpdate) AddRedemptionIDs(ids ...int) *VoucherUpdate
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by IDs.
func (*VoucherUpdate) AddRedemptions ¶
func (vu *VoucherUpdate) AddRedemptions(r ...*Redemption) *VoucherUpdate
AddRedemptions adds the "redemptions" edges to the Redemption entity.
func (*VoucherUpdate) ClearInstitution ¶
func (vu *VoucherUpdate) ClearInstitution() *VoucherUpdate
ClearInstitution clears the "institution" edge to the Institution entity.
func (*VoucherUpdate) ClearRedemptions ¶
func (vu *VoucherUpdate) ClearRedemptions() *VoucherUpdate
ClearRedemptions clears all "redemptions" edges to the Redemption entity.
func (*VoucherUpdate) Exec ¶
func (vu *VoucherUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*VoucherUpdate) ExecX ¶
func (vu *VoucherUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VoucherUpdate) Mutation ¶
func (vu *VoucherUpdate) Mutation() *VoucherMutation
Mutation returns the VoucherMutation object of the builder.
func (*VoucherUpdate) RemoveRedemptionIDs ¶
func (vu *VoucherUpdate) RemoveRedemptionIDs(ids ...int) *VoucherUpdate
RemoveRedemptionIDs removes the "redemptions" edge to Redemption entities by IDs.
func (*VoucherUpdate) RemoveRedemptions ¶
func (vu *VoucherUpdate) RemoveRedemptions(r ...*Redemption) *VoucherUpdate
RemoveRedemptions removes "redemptions" edges to Redemption entities.
func (*VoucherUpdate) Save ¶
func (vu *VoucherUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*VoucherUpdate) SaveX ¶
func (vu *VoucherUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*VoucherUpdate) SetDescription ¶
func (vu *VoucherUpdate) SetDescription(s string) *VoucherUpdate
SetDescription sets the "description" field.
func (*VoucherUpdate) SetInstitution ¶
func (vu *VoucherUpdate) SetInstitution(i *Institution) *VoucherUpdate
SetInstitution sets the "institution" edge to the Institution entity.
func (*VoucherUpdate) SetInstitutionID ¶
func (vu *VoucherUpdate) SetInstitutionID(id int) *VoucherUpdate
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*VoucherUpdate) SetName ¶
func (vu *VoucherUpdate) SetName(s string) *VoucherUpdate
SetName sets the "name" field.
func (*VoucherUpdate) SetPointsRequired ¶
func (vu *VoucherUpdate) SetPointsRequired(i int) *VoucherUpdate
SetPointsRequired sets the "points_required" field.
func (*VoucherUpdate) Where ¶
func (vu *VoucherUpdate) Where(ps ...predicate.Voucher) *VoucherUpdate
Where appends a list predicates to the VoucherUpdate builder.
type VoucherUpdateOne ¶
type VoucherUpdateOne struct {
// contains filtered or unexported fields
}
VoucherUpdateOne is the builder for updating a single Voucher entity.
func (*VoucherUpdateOne) AddPointsRequired ¶
func (vuo *VoucherUpdateOne) AddPointsRequired(i int) *VoucherUpdateOne
AddPointsRequired adds i to the "points_required" field.
func (*VoucherUpdateOne) AddRedemptionIDs ¶
func (vuo *VoucherUpdateOne) AddRedemptionIDs(ids ...int) *VoucherUpdateOne
AddRedemptionIDs adds the "redemptions" edge to the Redemption entity by IDs.
func (*VoucherUpdateOne) AddRedemptions ¶
func (vuo *VoucherUpdateOne) AddRedemptions(r ...*Redemption) *VoucherUpdateOne
AddRedemptions adds the "redemptions" edges to the Redemption entity.
func (*VoucherUpdateOne) ClearInstitution ¶
func (vuo *VoucherUpdateOne) ClearInstitution() *VoucherUpdateOne
ClearInstitution clears the "institution" edge to the Institution entity.
func (*VoucherUpdateOne) ClearRedemptions ¶
func (vuo *VoucherUpdateOne) ClearRedemptions() *VoucherUpdateOne
ClearRedemptions clears all "redemptions" edges to the Redemption entity.
func (*VoucherUpdateOne) Exec ¶
func (vuo *VoucherUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*VoucherUpdateOne) ExecX ¶
func (vuo *VoucherUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VoucherUpdateOne) Mutation ¶
func (vuo *VoucherUpdateOne) Mutation() *VoucherMutation
Mutation returns the VoucherMutation object of the builder.
func (*VoucherUpdateOne) RemoveRedemptionIDs ¶
func (vuo *VoucherUpdateOne) RemoveRedemptionIDs(ids ...int) *VoucherUpdateOne
RemoveRedemptionIDs removes the "redemptions" edge to Redemption entities by IDs.
func (*VoucherUpdateOne) RemoveRedemptions ¶
func (vuo *VoucherUpdateOne) RemoveRedemptions(r ...*Redemption) *VoucherUpdateOne
RemoveRedemptions removes "redemptions" edges to Redemption entities.
func (*VoucherUpdateOne) Save ¶
func (vuo *VoucherUpdateOne) Save(ctx context.Context) (*Voucher, error)
Save executes the query and returns the updated Voucher entity.
func (*VoucherUpdateOne) SaveX ¶
func (vuo *VoucherUpdateOne) SaveX(ctx context.Context) *Voucher
SaveX is like Save, but panics if an error occurs.
func (*VoucherUpdateOne) Select ¶
func (vuo *VoucherUpdateOne) Select(field string, fields ...string) *VoucherUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*VoucherUpdateOne) SetDescription ¶
func (vuo *VoucherUpdateOne) SetDescription(s string) *VoucherUpdateOne
SetDescription sets the "description" field.
func (*VoucherUpdateOne) SetInstitution ¶
func (vuo *VoucherUpdateOne) SetInstitution(i *Institution) *VoucherUpdateOne
SetInstitution sets the "institution" edge to the Institution entity.
func (*VoucherUpdateOne) SetInstitutionID ¶
func (vuo *VoucherUpdateOne) SetInstitutionID(id int) *VoucherUpdateOne
SetInstitutionID sets the "institution" edge to the Institution entity by ID.
func (*VoucherUpdateOne) SetName ¶
func (vuo *VoucherUpdateOne) SetName(s string) *VoucherUpdateOne
SetName sets the "name" field.
func (*VoucherUpdateOne) SetPointsRequired ¶
func (vuo *VoucherUpdateOne) SetPointsRequired(i int) *VoucherUpdateOne
SetPointsRequired sets the "points_required" field.
func (*VoucherUpdateOne) Where ¶
func (vuo *VoucherUpdateOne) Where(ps ...predicate.Voucher) *VoucherUpdateOne
Where appends a list predicates to the VoucherUpdate builder.
type VoucherUpsert ¶
VoucherUpsert is the "OnConflict" setter.
func (*VoucherUpsert) AddPointsRequired ¶
func (u *VoucherUpsert) AddPointsRequired(v int) *VoucherUpsert
AddPointsRequired adds v to the "points_required" field.
func (*VoucherUpsert) SetDescription ¶
func (u *VoucherUpsert) SetDescription(v string) *VoucherUpsert
SetDescription sets the "description" field.
func (*VoucherUpsert) SetName ¶
func (u *VoucherUpsert) SetName(v string) *VoucherUpsert
SetName sets the "name" field.
func (*VoucherUpsert) SetPointsRequired ¶
func (u *VoucherUpsert) SetPointsRequired(v int) *VoucherUpsert
SetPointsRequired sets the "points_required" field.
func (*VoucherUpsert) UpdateDescription ¶
func (u *VoucherUpsert) UpdateDescription() *VoucherUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*VoucherUpsert) UpdateName ¶
func (u *VoucherUpsert) UpdateName() *VoucherUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*VoucherUpsert) UpdatePointsRequired ¶
func (u *VoucherUpsert) UpdatePointsRequired() *VoucherUpsert
UpdatePointsRequired sets the "points_required" field to the value that was provided on create.
type VoucherUpsertBulk ¶
type VoucherUpsertBulk struct {
// contains filtered or unexported fields
}
VoucherUpsertBulk is the builder for "upsert"-ing a bulk of Voucher nodes.
func (*VoucherUpsertBulk) AddPointsRequired ¶
func (u *VoucherUpsertBulk) AddPointsRequired(v int) *VoucherUpsertBulk
AddPointsRequired adds v to the "points_required" field.
func (*VoucherUpsertBulk) DoNothing ¶
func (u *VoucherUpsertBulk) DoNothing() *VoucherUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*VoucherUpsertBulk) Exec ¶
func (u *VoucherUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*VoucherUpsertBulk) ExecX ¶
func (u *VoucherUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VoucherUpsertBulk) Ignore ¶
func (u *VoucherUpsertBulk) Ignore() *VoucherUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Voucher.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*VoucherUpsertBulk) SetDescription ¶
func (u *VoucherUpsertBulk) SetDescription(v string) *VoucherUpsertBulk
SetDescription sets the "description" field.
func (*VoucherUpsertBulk) SetName ¶
func (u *VoucherUpsertBulk) SetName(v string) *VoucherUpsertBulk
SetName sets the "name" field.
func (*VoucherUpsertBulk) SetPointsRequired ¶
func (u *VoucherUpsertBulk) SetPointsRequired(v int) *VoucherUpsertBulk
SetPointsRequired sets the "points_required" field.
func (*VoucherUpsertBulk) Update ¶
func (u *VoucherUpsertBulk) Update(set func(*VoucherUpsert)) *VoucherUpsertBulk
Update allows overriding fields `UPDATE` values. See the VoucherCreateBulk.OnConflict documentation for more info.
func (*VoucherUpsertBulk) UpdateDescription ¶
func (u *VoucherUpsertBulk) UpdateDescription() *VoucherUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*VoucherUpsertBulk) UpdateName ¶
func (u *VoucherUpsertBulk) UpdateName() *VoucherUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*VoucherUpsertBulk) UpdateNewValues ¶
func (u *VoucherUpsertBulk) UpdateNewValues() *VoucherUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Voucher.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*VoucherUpsertBulk) UpdatePointsRequired ¶
func (u *VoucherUpsertBulk) UpdatePointsRequired() *VoucherUpsertBulk
UpdatePointsRequired sets the "points_required" field to the value that was provided on create.
type VoucherUpsertOne ¶
type VoucherUpsertOne struct {
// contains filtered or unexported fields
}
VoucherUpsertOne is the builder for "upsert"-ing
one Voucher node.
func (*VoucherUpsertOne) AddPointsRequired ¶
func (u *VoucherUpsertOne) AddPointsRequired(v int) *VoucherUpsertOne
AddPointsRequired adds v to the "points_required" field.
func (*VoucherUpsertOne) DoNothing ¶
func (u *VoucherUpsertOne) DoNothing() *VoucherUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*VoucherUpsertOne) Exec ¶
func (u *VoucherUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*VoucherUpsertOne) ExecX ¶
func (u *VoucherUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*VoucherUpsertOne) ID ¶
func (u *VoucherUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*VoucherUpsertOne) IDX ¶
func (u *VoucherUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*VoucherUpsertOne) Ignore ¶
func (u *VoucherUpsertOne) Ignore() *VoucherUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Voucher.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*VoucherUpsertOne) SetDescription ¶
func (u *VoucherUpsertOne) SetDescription(v string) *VoucherUpsertOne
SetDescription sets the "description" field.
func (*VoucherUpsertOne) SetName ¶
func (u *VoucherUpsertOne) SetName(v string) *VoucherUpsertOne
SetName sets the "name" field.
func (*VoucherUpsertOne) SetPointsRequired ¶
func (u *VoucherUpsertOne) SetPointsRequired(v int) *VoucherUpsertOne
SetPointsRequired sets the "points_required" field.
func (*VoucherUpsertOne) Update ¶
func (u *VoucherUpsertOne) Update(set func(*VoucherUpsert)) *VoucherUpsertOne
Update allows overriding fields `UPDATE` values. See the VoucherCreate.OnConflict documentation for more info.
func (*VoucherUpsertOne) UpdateDescription ¶
func (u *VoucherUpsertOne) UpdateDescription() *VoucherUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*VoucherUpsertOne) UpdateName ¶
func (u *VoucherUpsertOne) UpdateName() *VoucherUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*VoucherUpsertOne) UpdateNewValues ¶
func (u *VoucherUpsertOne) UpdateNewValues() *VoucherUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Voucher.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*VoucherUpsertOne) UpdatePointsRequired ¶
func (u *VoucherUpsertOne) UpdatePointsRequired() *VoucherUpsertOne
UpdatePointsRequired sets the "points_required" field to the value that was provided on create.
Source Files ¶
- accessory.go
- accessory_create.go
- accessory_delete.go
- accessory_query.go
- accessory_update.go
- client.go
- deadline.go
- deadline_create.go
- deadline_delete.go
- deadline_query.go
- deadline_update.go
- ent.go
- event.go
- event_create.go
- event_delete.go
- event_query.go
- event_update.go
- forum.go
- forum_create.go
- forum_delete.go
- forum_query.go
- forum_update.go
- forumpost.go
- forumpost_create.go
- forumpost_delete.go
- forumpost_query.go
- forumpost_update.go
- generate.go
- group.go
- group_create.go
- group_delete.go
- group_query.go
- group_update.go
- groupinvitelink.go
- groupinvitelink_create.go
- groupinvitelink_delete.go
- groupinvitelink_query.go
- groupinvitelink_update.go
- groupuser.go
- groupuser_create.go
- groupuser_delete.go
- groupuser_query.go
- groupuser_update.go
- institution.go
- institution_create.go
- institution_delete.go
- institution_query.go
- institution_update.go
- institutioninvitelink.go
- institutioninvitelink_create.go
- institutioninvitelink_delete.go
- institutioninvitelink_query.go
- institutioninvitelink_update.go
- jwtrevocation.go
- jwtrevocation_create.go
- jwtrevocation_delete.go
- jwtrevocation_query.go
- jwtrevocation_update.go
- milestone.go
- milestone_create.go
- milestone_delete.go
- milestone_query.go
- milestone_update.go
- mutation.go
- pet.go
- pet_create.go
- pet_delete.go
- pet_query.go
- pet_update.go
- reaction.go
- reaction_create.go
- reaction_delete.go
- reaction_query.go
- reaction_update.go
- redemption.go
- redemption_create.go
- redemption_delete.go
- redemption_query.go
- redemption_update.go
- runtime.go
- studyplan.go
- studyplan_create.go
- studyplan_delete.go
- studyplan_query.go
- studyplan_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- userpet.go
- userpet_create.go
- userpet_delete.go
- userpet_query.go
- userpet_update.go
- voucher.go
- voucher_create.go
- voucher_delete.go
- voucher_query.go
- voucher_update.go