Documentation
¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Attachment
- type AttachmentClient
- func (c *AttachmentClient) Create() *AttachmentCreate
- func (c *AttachmentClient) CreateBulk(builders ...*AttachmentCreate) *AttachmentCreateBulk
- func (c *AttachmentClient) Delete() *AttachmentDelete
- func (c *AttachmentClient) DeleteOne(_m *Attachment) *AttachmentDeleteOne
- func (c *AttachmentClient) DeleteOneID(id uuid.UUID) *AttachmentDeleteOne
- func (c *AttachmentClient) Get(ctx context.Context, id uuid.UUID) (*Attachment, error)
- func (c *AttachmentClient) GetX(ctx context.Context, id uuid.UUID) *Attachment
- func (c *AttachmentClient) Hooks() []Hook
- func (c *AttachmentClient) Intercept(interceptors ...Interceptor)
- func (c *AttachmentClient) Interceptors() []Interceptor
- func (c *AttachmentClient) MapCreateBulk(slice any, setFunc func(*AttachmentCreate, int)) *AttachmentCreateBulk
- func (c *AttachmentClient) Query() *AttachmentQuery
- func (c *AttachmentClient) QueryMessage(_m *Attachment) *MessageQuery
- func (c *AttachmentClient) Update() *AttachmentUpdate
- func (c *AttachmentClient) UpdateOne(_m *Attachment) *AttachmentUpdateOne
- func (c *AttachmentClient) UpdateOneID(id uuid.UUID) *AttachmentUpdateOne
- func (c *AttachmentClient) Use(hooks ...Hook)
- type AttachmentCreate
- func (_c *AttachmentCreate) Exec(ctx context.Context) error
- func (_c *AttachmentCreate) ExecX(ctx context.Context)
- func (_c *AttachmentCreate) Mutation() *AttachmentMutation
- func (_c *AttachmentCreate) Save(ctx context.Context) (*Attachment, error)
- func (_c *AttachmentCreate) SaveX(ctx context.Context) *Attachment
- func (_c *AttachmentCreate) SetFilename(v string) *AttachmentCreate
- func (_c *AttachmentCreate) SetID(v uuid.UUID) *AttachmentCreate
- func (_c *AttachmentCreate) SetMessage(v *Message) *AttachmentCreate
- func (_c *AttachmentCreate) SetMessageID(id uuid.UUID) *AttachmentCreate
- func (_c *AttachmentCreate) SetMimeType(v string) *AttachmentCreate
- func (_c *AttachmentCreate) SetNillableID(v *uuid.UUID) *AttachmentCreate
- func (_c *AttachmentCreate) SetNillableThumbnailPath(v *string) *AttachmentCreate
- func (_c *AttachmentCreate) SetPath(v string) *AttachmentCreate
- func (_c *AttachmentCreate) SetSizeBytes(v int64) *AttachmentCreate
- func (_c *AttachmentCreate) SetThumbnailPath(v string) *AttachmentCreate
- type AttachmentCreateBulk
- type AttachmentDelete
- type AttachmentDeleteOne
- type AttachmentEdges
- type AttachmentGroupBy
- func (_g *AttachmentGroupBy) Aggregate(fns ...AggregateFunc) *AttachmentGroupBy
- func (s *AttachmentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AttachmentGroupBy) BoolX(ctx context.Context) bool
- func (s *AttachmentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AttachmentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AttachmentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AttachmentGroupBy) Float64X(ctx context.Context) float64
- func (s *AttachmentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AttachmentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AttachmentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AttachmentGroupBy) IntX(ctx context.Context) int
- func (s *AttachmentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AttachmentGroupBy) IntsX(ctx context.Context) []int
- func (_g *AttachmentGroupBy) Scan(ctx context.Context, v any) error
- func (s *AttachmentGroupBy) ScanX(ctx context.Context, v any)
- func (s *AttachmentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AttachmentGroupBy) StringX(ctx context.Context) string
- func (s *AttachmentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AttachmentGroupBy) StringsX(ctx context.Context) []string
- type AttachmentMutation
- func (m *AttachmentMutation) AddField(name string, value ent.Value) error
- func (m *AttachmentMutation) AddSizeBytes(i int64)
- func (m *AttachmentMutation) AddedEdges() []string
- func (m *AttachmentMutation) AddedField(name string) (ent.Value, bool)
- func (m *AttachmentMutation) AddedFields() []string
- func (m *AttachmentMutation) AddedIDs(name string) []ent.Value
- func (m *AttachmentMutation) AddedSizeBytes() (r int64, exists bool)
- func (m *AttachmentMutation) ClearEdge(name string) error
- func (m *AttachmentMutation) ClearField(name string) error
- func (m *AttachmentMutation) ClearMessage()
- func (m *AttachmentMutation) ClearThumbnailPath()
- func (m *AttachmentMutation) ClearedEdges() []string
- func (m *AttachmentMutation) ClearedFields() []string
- func (m AttachmentMutation) Client() *Client
- func (m *AttachmentMutation) EdgeCleared(name string) bool
- func (m *AttachmentMutation) Field(name string) (ent.Value, bool)
- func (m *AttachmentMutation) FieldCleared(name string) bool
- func (m *AttachmentMutation) Fields() []string
- func (m *AttachmentMutation) Filename() (r string, exists bool)
- func (m *AttachmentMutation) ID() (id uuid.UUID, exists bool)
- func (m *AttachmentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AttachmentMutation) MessageCleared() bool
- func (m *AttachmentMutation) MessageID() (id uuid.UUID, exists bool)
- func (m *AttachmentMutation) MessageIDs() (ids []uuid.UUID)
- func (m *AttachmentMutation) MimeType() (r string, exists bool)
- func (m *AttachmentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AttachmentMutation) OldFilename(ctx context.Context) (v string, err error)
- func (m *AttachmentMutation) OldMimeType(ctx context.Context) (v string, err error)
- func (m *AttachmentMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *AttachmentMutation) OldSizeBytes(ctx context.Context) (v int64, err error)
- func (m *AttachmentMutation) OldThumbnailPath(ctx context.Context) (v *string, err error)
- func (m *AttachmentMutation) Op() Op
- func (m *AttachmentMutation) Path() (r string, exists bool)
- func (m *AttachmentMutation) RemovedEdges() []string
- func (m *AttachmentMutation) RemovedIDs(name string) []ent.Value
- func (m *AttachmentMutation) ResetEdge(name string) error
- func (m *AttachmentMutation) ResetField(name string) error
- func (m *AttachmentMutation) ResetFilename()
- func (m *AttachmentMutation) ResetMessage()
- func (m *AttachmentMutation) ResetMimeType()
- func (m *AttachmentMutation) ResetPath()
- func (m *AttachmentMutation) ResetSizeBytes()
- func (m *AttachmentMutation) ResetThumbnailPath()
- func (m *AttachmentMutation) SetField(name string, value ent.Value) error
- func (m *AttachmentMutation) SetFilename(s string)
- func (m *AttachmentMutation) SetID(id uuid.UUID)
- func (m *AttachmentMutation) SetMessageID(id uuid.UUID)
- func (m *AttachmentMutation) SetMimeType(s string)
- func (m *AttachmentMutation) SetOp(op Op)
- func (m *AttachmentMutation) SetPath(s string)
- func (m *AttachmentMutation) SetSizeBytes(i int64)
- func (m *AttachmentMutation) SetThumbnailPath(s string)
- func (m *AttachmentMutation) SizeBytes() (r int64, exists bool)
- func (m *AttachmentMutation) ThumbnailPath() (r string, exists bool)
- func (m *AttachmentMutation) ThumbnailPathCleared() bool
- func (m AttachmentMutation) Tx() (*Tx, error)
- func (m *AttachmentMutation) Type() string
- func (m *AttachmentMutation) Where(ps ...predicate.Attachment)
- func (m *AttachmentMutation) WhereP(ps ...func(*sql.Selector))
- type AttachmentQuery
- func (_q *AttachmentQuery) Aggregate(fns ...AggregateFunc) *AttachmentSelect
- func (_q *AttachmentQuery) All(ctx context.Context) ([]*Attachment, error)
- func (_q *AttachmentQuery) AllX(ctx context.Context) []*Attachment
- func (_q *AttachmentQuery) Clone() *AttachmentQuery
- func (_q *AttachmentQuery) Count(ctx context.Context) (int, error)
- func (_q *AttachmentQuery) CountX(ctx context.Context) int
- func (_q *AttachmentQuery) Exist(ctx context.Context) (bool, error)
- func (_q *AttachmentQuery) ExistX(ctx context.Context) bool
- func (_q *AttachmentQuery) First(ctx context.Context) (*Attachment, error)
- func (_q *AttachmentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *AttachmentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *AttachmentQuery) FirstX(ctx context.Context) *Attachment
- func (_q *AttachmentQuery) GroupBy(field string, fields ...string) *AttachmentGroupBy
- func (_q *AttachmentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *AttachmentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *AttachmentQuery) Limit(limit int) *AttachmentQuery
- func (_q *AttachmentQuery) Offset(offset int) *AttachmentQuery
- func (_q *AttachmentQuery) Only(ctx context.Context) (*Attachment, error)
- func (_q *AttachmentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *AttachmentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *AttachmentQuery) OnlyX(ctx context.Context) *Attachment
- func (_q *AttachmentQuery) Order(o ...attachment.OrderOption) *AttachmentQuery
- func (_q *AttachmentQuery) QueryMessage() *MessageQuery
- func (_q *AttachmentQuery) Select(fields ...string) *AttachmentSelect
- func (_q *AttachmentQuery) Unique(unique bool) *AttachmentQuery
- func (_q *AttachmentQuery) Where(ps ...predicate.Attachment) *AttachmentQuery
- func (_q *AttachmentQuery) WithMessage(opts ...func(*MessageQuery)) *AttachmentQuery
- type AttachmentSelect
- func (_s *AttachmentSelect) Aggregate(fns ...AggregateFunc) *AttachmentSelect
- func (s *AttachmentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AttachmentSelect) BoolX(ctx context.Context) bool
- func (s *AttachmentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AttachmentSelect) BoolsX(ctx context.Context) []bool
- func (s *AttachmentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AttachmentSelect) Float64X(ctx context.Context) float64
- func (s *AttachmentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AttachmentSelect) Float64sX(ctx context.Context) []float64
- func (s *AttachmentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AttachmentSelect) IntX(ctx context.Context) int
- func (s *AttachmentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AttachmentSelect) IntsX(ctx context.Context) []int
- func (_s *AttachmentSelect) Scan(ctx context.Context, v any) error
- func (s *AttachmentSelect) ScanX(ctx context.Context, v any)
- func (s *AttachmentSelect) String(ctx context.Context) (_ string, err error)
- func (s *AttachmentSelect) StringX(ctx context.Context) string
- func (s *AttachmentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AttachmentSelect) StringsX(ctx context.Context) []string
- type AttachmentUpdate
- func (_u *AttachmentUpdate) AddSizeBytes(v int64) *AttachmentUpdate
- func (_u *AttachmentUpdate) ClearMessage() *AttachmentUpdate
- func (_u *AttachmentUpdate) ClearThumbnailPath() *AttachmentUpdate
- func (_u *AttachmentUpdate) Exec(ctx context.Context) error
- func (_u *AttachmentUpdate) ExecX(ctx context.Context)
- func (_u *AttachmentUpdate) Mutation() *AttachmentMutation
- func (_u *AttachmentUpdate) Save(ctx context.Context) (int, error)
- func (_u *AttachmentUpdate) SaveX(ctx context.Context) int
- func (_u *AttachmentUpdate) SetFilename(v string) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetMessage(v *Message) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetMessageID(id uuid.UUID) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetMimeType(v string) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetNillableFilename(v *string) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetNillableMimeType(v *string) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetNillablePath(v *string) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetNillableSizeBytes(v *int64) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetNillableThumbnailPath(v *string) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetPath(v string) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetSizeBytes(v int64) *AttachmentUpdate
- func (_u *AttachmentUpdate) SetThumbnailPath(v string) *AttachmentUpdate
- func (_u *AttachmentUpdate) Where(ps ...predicate.Attachment) *AttachmentUpdate
- type AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) AddSizeBytes(v int64) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) ClearMessage() *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) ClearThumbnailPath() *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) Exec(ctx context.Context) error
- func (_u *AttachmentUpdateOne) ExecX(ctx context.Context)
- func (_u *AttachmentUpdateOne) Mutation() *AttachmentMutation
- func (_u *AttachmentUpdateOne) Save(ctx context.Context) (*Attachment, error)
- func (_u *AttachmentUpdateOne) SaveX(ctx context.Context) *Attachment
- func (_u *AttachmentUpdateOne) Select(field string, fields ...string) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetFilename(v string) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetMessage(v *Message) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetMessageID(id uuid.UUID) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetMimeType(v string) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetNillableFilename(v *string) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetNillableMimeType(v *string) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetNillablePath(v *string) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetNillableSizeBytes(v *int64) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetNillableThumbnailPath(v *string) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetPath(v string) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetSizeBytes(v int64) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) SetThumbnailPath(v string) *AttachmentUpdateOne
- func (_u *AttachmentUpdateOne) Where(ps ...predicate.Attachment) *AttachmentUpdateOne
- type Attachments
- 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 Comment
- type CommentClient
- func (c *CommentClient) Create() *CommentCreate
- func (c *CommentClient) CreateBulk(builders ...*CommentCreate) *CommentCreateBulk
- func (c *CommentClient) Delete() *CommentDelete
- func (c *CommentClient) DeleteOne(_m *Comment) *CommentDeleteOne
- func (c *CommentClient) DeleteOneID(id uuid.UUID) *CommentDeleteOne
- func (c *CommentClient) Get(ctx context.Context, id uuid.UUID) (*Comment, error)
- func (c *CommentClient) GetX(ctx context.Context, id uuid.UUID) *Comment
- func (c *CommentClient) Hooks() []Hook
- func (c *CommentClient) Intercept(interceptors ...Interceptor)
- func (c *CommentClient) Interceptors() []Interceptor
- func (c *CommentClient) MapCreateBulk(slice any, setFunc func(*CommentCreate, int)) *CommentCreateBulk
- func (c *CommentClient) Query() *CommentQuery
- func (c *CommentClient) Update() *CommentUpdate
- func (c *CommentClient) UpdateOne(_m *Comment) *CommentUpdateOne
- func (c *CommentClient) UpdateOneID(id uuid.UUID) *CommentUpdateOne
- func (c *CommentClient) Use(hooks ...Hook)
- type CommentCreate
- func (_c *CommentCreate) Exec(ctx context.Context) error
- func (_c *CommentCreate) ExecX(ctx context.Context)
- func (_c *CommentCreate) Mutation() *CommentMutation
- func (_c *CommentCreate) Save(ctx context.Context) (*Comment, error)
- func (_c *CommentCreate) SaveX(ctx context.Context) *Comment
- func (_c *CommentCreate) SetAuthor(v string) *CommentCreate
- func (_c *CommentCreate) SetBody(v string) *CommentCreate
- func (_c *CommentCreate) SetCreatedAt(v time.Time) *CommentCreate
- func (_c *CommentCreate) SetID(v uuid.UUID) *CommentCreate
- func (_c *CommentCreate) SetNillableCreatedAt(v *time.Time) *CommentCreate
- func (_c *CommentCreate) SetNillableID(v *uuid.UUID) *CommentCreate
- func (_c *CommentCreate) SetRound(v int) *CommentCreate
- func (_c *CommentCreate) SetTarget(v string) *CommentCreate
- func (_c *CommentCreate) SetTeam(v string) *CommentCreate
- type CommentCreateBulk
- type CommentDelete
- type CommentDeleteOne
- type CommentGroupBy
- func (_g *CommentGroupBy) Aggregate(fns ...AggregateFunc) *CommentGroupBy
- func (s *CommentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CommentGroupBy) BoolX(ctx context.Context) bool
- func (s *CommentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CommentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CommentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CommentGroupBy) Float64X(ctx context.Context) float64
- func (s *CommentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CommentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CommentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CommentGroupBy) IntX(ctx context.Context) int
- func (s *CommentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CommentGroupBy) IntsX(ctx context.Context) []int
- func (_g *CommentGroupBy) Scan(ctx context.Context, v any) error
- func (s *CommentGroupBy) ScanX(ctx context.Context, v any)
- func (s *CommentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CommentGroupBy) StringX(ctx context.Context) string
- func (s *CommentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CommentGroupBy) StringsX(ctx context.Context) []string
- type CommentMutation
- func (m *CommentMutation) AddField(name string, value ent.Value) error
- func (m *CommentMutation) AddRound(i int)
- func (m *CommentMutation) AddedEdges() []string
- func (m *CommentMutation) AddedField(name string) (ent.Value, bool)
- func (m *CommentMutation) AddedFields() []string
- func (m *CommentMutation) AddedIDs(name string) []ent.Value
- func (m *CommentMutation) AddedRound() (r int, exists bool)
- func (m *CommentMutation) Author() (r string, exists bool)
- func (m *CommentMutation) Body() (r string, exists bool)
- func (m *CommentMutation) ClearEdge(name string) error
- func (m *CommentMutation) ClearField(name string) error
- func (m *CommentMutation) ClearedEdges() []string
- func (m *CommentMutation) ClearedFields() []string
- func (m CommentMutation) Client() *Client
- func (m *CommentMutation) CreatedAt() (r time.Time, exists bool)
- func (m *CommentMutation) EdgeCleared(name string) bool
- func (m *CommentMutation) Field(name string) (ent.Value, bool)
- func (m *CommentMutation) FieldCleared(name string) bool
- func (m *CommentMutation) Fields() []string
- func (m *CommentMutation) ID() (id uuid.UUID, exists bool)
- func (m *CommentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *CommentMutation) OldAuthor(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldBody(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *CommentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CommentMutation) OldRound(ctx context.Context) (v int, err error)
- func (m *CommentMutation) OldTarget(ctx context.Context) (v string, err error)
- func (m *CommentMutation) OldTeam(ctx context.Context) (v string, err error)
- func (m *CommentMutation) Op() Op
- func (m *CommentMutation) RemovedEdges() []string
- func (m *CommentMutation) RemovedIDs(name string) []ent.Value
- func (m *CommentMutation) ResetAuthor()
- func (m *CommentMutation) ResetBody()
- func (m *CommentMutation) ResetCreatedAt()
- func (m *CommentMutation) ResetEdge(name string) error
- func (m *CommentMutation) ResetField(name string) error
- func (m *CommentMutation) ResetRound()
- func (m *CommentMutation) ResetTarget()
- func (m *CommentMutation) ResetTeam()
- func (m *CommentMutation) Round() (r int, exists bool)
- func (m *CommentMutation) SetAuthor(s string)
- func (m *CommentMutation) SetBody(s string)
- func (m *CommentMutation) SetCreatedAt(t time.Time)
- func (m *CommentMutation) SetField(name string, value ent.Value) error
- func (m *CommentMutation) SetID(id uuid.UUID)
- func (m *CommentMutation) SetOp(op Op)
- func (m *CommentMutation) SetRound(i int)
- func (m *CommentMutation) SetTarget(s string)
- func (m *CommentMutation) SetTeam(s string)
- func (m *CommentMutation) Target() (r string, exists bool)
- func (m *CommentMutation) Team() (r string, exists bool)
- func (m CommentMutation) Tx() (*Tx, error)
- func (m *CommentMutation) Type() string
- func (m *CommentMutation) Where(ps ...predicate.Comment)
- func (m *CommentMutation) WhereP(ps ...func(*sql.Selector))
- type CommentQuery
- func (_q *CommentQuery) Aggregate(fns ...AggregateFunc) *CommentSelect
- func (_q *CommentQuery) All(ctx context.Context) ([]*Comment, error)
- func (_q *CommentQuery) AllX(ctx context.Context) []*Comment
- func (_q *CommentQuery) Clone() *CommentQuery
- func (_q *CommentQuery) Count(ctx context.Context) (int, error)
- func (_q *CommentQuery) CountX(ctx context.Context) int
- func (_q *CommentQuery) Exist(ctx context.Context) (bool, error)
- func (_q *CommentQuery) ExistX(ctx context.Context) bool
- func (_q *CommentQuery) First(ctx context.Context) (*Comment, error)
- func (_q *CommentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CommentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *CommentQuery) FirstX(ctx context.Context) *Comment
- func (_q *CommentQuery) GroupBy(field string, fields ...string) *CommentGroupBy
- func (_q *CommentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *CommentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *CommentQuery) Limit(limit int) *CommentQuery
- func (_q *CommentQuery) Offset(offset int) *CommentQuery
- func (_q *CommentQuery) Only(ctx context.Context) (*Comment, error)
- func (_q *CommentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *CommentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *CommentQuery) OnlyX(ctx context.Context) *Comment
- func (_q *CommentQuery) Order(o ...comment.OrderOption) *CommentQuery
- func (_q *CommentQuery) Select(fields ...string) *CommentSelect
- func (_q *CommentQuery) Unique(unique bool) *CommentQuery
- func (_q *CommentQuery) Where(ps ...predicate.Comment) *CommentQuery
- type CommentSelect
- func (_s *CommentSelect) Aggregate(fns ...AggregateFunc) *CommentSelect
- func (s *CommentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CommentSelect) BoolX(ctx context.Context) bool
- func (s *CommentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CommentSelect) BoolsX(ctx context.Context) []bool
- func (s *CommentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CommentSelect) Float64X(ctx context.Context) float64
- func (s *CommentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CommentSelect) Float64sX(ctx context.Context) []float64
- func (s *CommentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CommentSelect) IntX(ctx context.Context) int
- func (s *CommentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CommentSelect) IntsX(ctx context.Context) []int
- func (_s *CommentSelect) Scan(ctx context.Context, v any) error
- func (s *CommentSelect) ScanX(ctx context.Context, v any)
- func (s *CommentSelect) String(ctx context.Context) (_ string, err error)
- func (s *CommentSelect) StringX(ctx context.Context) string
- func (s *CommentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CommentSelect) StringsX(ctx context.Context) []string
- type CommentUpdate
- func (_u *CommentUpdate) AddRound(v int) *CommentUpdate
- func (_u *CommentUpdate) Exec(ctx context.Context) error
- func (_u *CommentUpdate) ExecX(ctx context.Context)
- func (_u *CommentUpdate) Mutation() *CommentMutation
- func (_u *CommentUpdate) Save(ctx context.Context) (int, error)
- func (_u *CommentUpdate) SaveX(ctx context.Context) int
- func (_u *CommentUpdate) SetAuthor(v string) *CommentUpdate
- func (_u *CommentUpdate) SetBody(v string) *CommentUpdate
- func (_u *CommentUpdate) SetNillableAuthor(v *string) *CommentUpdate
- func (_u *CommentUpdate) SetNillableBody(v *string) *CommentUpdate
- func (_u *CommentUpdate) SetNillableRound(v *int) *CommentUpdate
- func (_u *CommentUpdate) SetNillableTarget(v *string) *CommentUpdate
- func (_u *CommentUpdate) SetNillableTeam(v *string) *CommentUpdate
- func (_u *CommentUpdate) SetRound(v int) *CommentUpdate
- func (_u *CommentUpdate) SetTarget(v string) *CommentUpdate
- func (_u *CommentUpdate) SetTeam(v string) *CommentUpdate
- func (_u *CommentUpdate) Where(ps ...predicate.Comment) *CommentUpdate
- type CommentUpdateOne
- func (_u *CommentUpdateOne) AddRound(v int) *CommentUpdateOne
- func (_u *CommentUpdateOne) Exec(ctx context.Context) error
- func (_u *CommentUpdateOne) ExecX(ctx context.Context)
- func (_u *CommentUpdateOne) Mutation() *CommentMutation
- func (_u *CommentUpdateOne) Save(ctx context.Context) (*Comment, error)
- func (_u *CommentUpdateOne) SaveX(ctx context.Context) *Comment
- func (_u *CommentUpdateOne) Select(field string, fields ...string) *CommentUpdateOne
- func (_u *CommentUpdateOne) SetAuthor(v string) *CommentUpdateOne
- func (_u *CommentUpdateOne) SetBody(v string) *CommentUpdateOne
- func (_u *CommentUpdateOne) SetNillableAuthor(v *string) *CommentUpdateOne
- func (_u *CommentUpdateOne) SetNillableBody(v *string) *CommentUpdateOne
- func (_u *CommentUpdateOne) SetNillableRound(v *int) *CommentUpdateOne
- func (_u *CommentUpdateOne) SetNillableTarget(v *string) *CommentUpdateOne
- func (_u *CommentUpdateOne) SetNillableTeam(v *string) *CommentUpdateOne
- func (_u *CommentUpdateOne) SetRound(v int) *CommentUpdateOne
- func (_u *CommentUpdateOne) SetTarget(v string) *CommentUpdateOne
- func (_u *CommentUpdateOne) SetTeam(v string) *CommentUpdateOne
- func (_u *CommentUpdateOne) Where(ps ...predicate.Comment) *CommentUpdateOne
- type Comments
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type InterceptFunc
- type Interceptor
- type Message
- type MessageClient
- func (c *MessageClient) Create() *MessageCreate
- func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
- func (c *MessageClient) Delete() *MessageDelete
- func (c *MessageClient) DeleteOne(_m *Message) *MessageDeleteOne
- func (c *MessageClient) DeleteOneID(id uuid.UUID) *MessageDeleteOne
- func (c *MessageClient) Get(ctx context.Context, id uuid.UUID) (*Message, error)
- func (c *MessageClient) GetX(ctx context.Context, id uuid.UUID) *Message
- func (c *MessageClient) Hooks() []Hook
- func (c *MessageClient) Intercept(interceptors ...Interceptor)
- func (c *MessageClient) Interceptors() []Interceptor
- func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
- func (c *MessageClient) Query() *MessageQuery
- func (c *MessageClient) QueryAttachments(_m *Message) *AttachmentQuery
- func (c *MessageClient) QueryReactions(_m *Message) *ReactionQuery
- func (c *MessageClient) Update() *MessageUpdate
- func (c *MessageClient) UpdateOne(_m *Message) *MessageUpdateOne
- func (c *MessageClient) UpdateOneID(id uuid.UUID) *MessageUpdateOne
- func (c *MessageClient) Use(hooks ...Hook)
- type MessageCreate
- func (_c *MessageCreate) AddAttachmentIDs(ids ...uuid.UUID) *MessageCreate
- func (_c *MessageCreate) AddAttachments(v ...*Attachment) *MessageCreate
- func (_c *MessageCreate) AddReactionIDs(ids ...uuid.UUID) *MessageCreate
- func (_c *MessageCreate) AddReactions(v ...*Reaction) *MessageCreate
- func (_c *MessageCreate) Exec(ctx context.Context) error
- func (_c *MessageCreate) ExecX(ctx context.Context)
- func (_c *MessageCreate) Mutation() *MessageMutation
- func (_c *MessageCreate) Save(ctx context.Context) (*Message, error)
- func (_c *MessageCreate) SaveX(ctx context.Context) *Message
- func (_c *MessageCreate) SetChannel(v message.Channel) *MessageCreate
- func (_c *MessageCreate) SetContent(v string) *MessageCreate
- func (_c *MessageCreate) SetCreatedAt(v time.Time) *MessageCreate
- func (_c *MessageCreate) SetID(v uuid.UUID) *MessageCreate
- func (_c *MessageCreate) SetMessageType(v message.MessageType) *MessageCreate
- func (_c *MessageCreate) SetNillableCreatedAt(v *time.Time) *MessageCreate
- func (_c *MessageCreate) SetNillableID(v *uuid.UUID) *MessageCreate
- func (_c *MessageCreate) SetNillableMessageType(v *message.MessageType) *MessageCreate
- func (_c *MessageCreate) SetNillableReplyToID(v *uuid.UUID) *MessageCreate
- func (_c *MessageCreate) SetNillableRuntime(v *string) *MessageCreate
- func (_c *MessageCreate) SetRecipient(v string) *MessageCreate
- func (_c *MessageCreate) SetReplyToID(v uuid.UUID) *MessageCreate
- func (_c *MessageCreate) SetRuntime(v string) *MessageCreate
- func (_c *MessageCreate) SetSender(v string) *MessageCreate
- func (_c *MessageCreate) SetTeam(v string) *MessageCreate
- type MessageCreateBulk
- type MessageDelete
- type MessageDeleteOne
- type MessageEdges
- type MessageGroupBy
- func (_g *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
- func (s *MessageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageGroupBy) BoolX(ctx context.Context) bool
- func (s *MessageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MessageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageGroupBy) Float64X(ctx context.Context) float64
- func (s *MessageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MessageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MessageGroupBy) IntX(ctx context.Context) int
- func (s *MessageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MessageGroupBy) IntsX(ctx context.Context) []int
- func (_g *MessageGroupBy) Scan(ctx context.Context, v any) error
- func (s *MessageGroupBy) ScanX(ctx context.Context, v any)
- func (s *MessageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MessageGroupBy) StringX(ctx context.Context) string
- func (s *MessageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MessageGroupBy) StringsX(ctx context.Context) []string
- type MessageMutation
- func (m *MessageMutation) AddAttachmentIDs(ids ...uuid.UUID)
- func (m *MessageMutation) AddField(name string, value ent.Value) error
- func (m *MessageMutation) AddReactionIDs(ids ...uuid.UUID)
- func (m *MessageMutation) AddedEdges() []string
- func (m *MessageMutation) AddedField(name string) (ent.Value, bool)
- func (m *MessageMutation) AddedFields() []string
- func (m *MessageMutation) AddedIDs(name string) []ent.Value
- func (m *MessageMutation) AttachmentsCleared() bool
- func (m *MessageMutation) AttachmentsIDs() (ids []uuid.UUID)
- func (m *MessageMutation) Channel() (r message.Channel, exists bool)
- func (m *MessageMutation) ClearAttachments()
- func (m *MessageMutation) ClearEdge(name string) error
- func (m *MessageMutation) ClearField(name string) error
- func (m *MessageMutation) ClearReactions()
- func (m *MessageMutation) ClearReplyToID()
- func (m *MessageMutation) ClearRuntime()
- func (m *MessageMutation) ClearedEdges() []string
- func (m *MessageMutation) ClearedFields() []string
- func (m MessageMutation) Client() *Client
- func (m *MessageMutation) Content() (r string, exists bool)
- func (m *MessageMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MessageMutation) EdgeCleared(name string) bool
- func (m *MessageMutation) Field(name string) (ent.Value, bool)
- func (m *MessageMutation) FieldCleared(name string) bool
- func (m *MessageMutation) Fields() []string
- func (m *MessageMutation) ID() (id uuid.UUID, exists bool)
- func (m *MessageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *MessageMutation) MessageType() (r message.MessageType, exists bool)
- func (m *MessageMutation) OldChannel(ctx context.Context) (v message.Channel, err error)
- func (m *MessageMutation) OldContent(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MessageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MessageMutation) OldMessageType(ctx context.Context) (v message.MessageType, err error)
- func (m *MessageMutation) OldRecipient(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldReplyToID(ctx context.Context) (v *uuid.UUID, err error)
- func (m *MessageMutation) OldRuntime(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldSender(ctx context.Context) (v string, err error)
- func (m *MessageMutation) OldTeam(ctx context.Context) (v string, err error)
- func (m *MessageMutation) Op() Op
- func (m *MessageMutation) ReactionsCleared() bool
- func (m *MessageMutation) ReactionsIDs() (ids []uuid.UUID)
- func (m *MessageMutation) Recipient() (r string, exists bool)
- func (m *MessageMutation) RemoveAttachmentIDs(ids ...uuid.UUID)
- func (m *MessageMutation) RemoveReactionIDs(ids ...uuid.UUID)
- func (m *MessageMutation) RemovedAttachmentsIDs() (ids []uuid.UUID)
- func (m *MessageMutation) RemovedEdges() []string
- func (m *MessageMutation) RemovedIDs(name string) []ent.Value
- func (m *MessageMutation) RemovedReactionsIDs() (ids []uuid.UUID)
- func (m *MessageMutation) ReplyToID() (r uuid.UUID, exists bool)
- func (m *MessageMutation) ReplyToIDCleared() bool
- func (m *MessageMutation) ResetAttachments()
- func (m *MessageMutation) ResetChannel()
- func (m *MessageMutation) ResetContent()
- func (m *MessageMutation) ResetCreatedAt()
- func (m *MessageMutation) ResetEdge(name string) error
- func (m *MessageMutation) ResetField(name string) error
- func (m *MessageMutation) ResetMessageType()
- func (m *MessageMutation) ResetReactions()
- func (m *MessageMutation) ResetRecipient()
- func (m *MessageMutation) ResetReplyToID()
- func (m *MessageMutation) ResetRuntime()
- func (m *MessageMutation) ResetSender()
- func (m *MessageMutation) ResetTeam()
- func (m *MessageMutation) Runtime() (r string, exists bool)
- func (m *MessageMutation) RuntimeCleared() bool
- func (m *MessageMutation) Sender() (r string, exists bool)
- func (m *MessageMutation) SetChannel(value message.Channel)
- func (m *MessageMutation) SetContent(s string)
- func (m *MessageMutation) SetCreatedAt(t time.Time)
- func (m *MessageMutation) SetField(name string, value ent.Value) error
- func (m *MessageMutation) SetID(id uuid.UUID)
- func (m *MessageMutation) SetMessageType(mt message.MessageType)
- func (m *MessageMutation) SetOp(op Op)
- func (m *MessageMutation) SetRecipient(s string)
- func (m *MessageMutation) SetReplyToID(u uuid.UUID)
- func (m *MessageMutation) SetRuntime(s string)
- func (m *MessageMutation) SetSender(s string)
- func (m *MessageMutation) SetTeam(s string)
- func (m *MessageMutation) Team() (r string, exists bool)
- func (m MessageMutation) Tx() (*Tx, error)
- func (m *MessageMutation) Type() string
- func (m *MessageMutation) Where(ps ...predicate.Message)
- func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
- type MessageQuery
- func (_q *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (_q *MessageQuery) All(ctx context.Context) ([]*Message, error)
- func (_q *MessageQuery) AllX(ctx context.Context) []*Message
- func (_q *MessageQuery) Clone() *MessageQuery
- func (_q *MessageQuery) Count(ctx context.Context) (int, error)
- func (_q *MessageQuery) CountX(ctx context.Context) int
- func (_q *MessageQuery) Exist(ctx context.Context) (bool, error)
- func (_q *MessageQuery) ExistX(ctx context.Context) bool
- func (_q *MessageQuery) First(ctx context.Context) (*Message, error)
- func (_q *MessageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *MessageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *MessageQuery) FirstX(ctx context.Context) *Message
- func (_q *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
- func (_q *MessageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *MessageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *MessageQuery) Limit(limit int) *MessageQuery
- func (_q *MessageQuery) Offset(offset int) *MessageQuery
- func (_q *MessageQuery) Only(ctx context.Context) (*Message, error)
- func (_q *MessageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *MessageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *MessageQuery) OnlyX(ctx context.Context) *Message
- func (_q *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
- func (_q *MessageQuery) QueryAttachments() *AttachmentQuery
- func (_q *MessageQuery) QueryReactions() *ReactionQuery
- func (_q *MessageQuery) Select(fields ...string) *MessageSelect
- func (_q *MessageQuery) Unique(unique bool) *MessageQuery
- func (_q *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
- func (_q *MessageQuery) WithAttachments(opts ...func(*AttachmentQuery)) *MessageQuery
- func (_q *MessageQuery) WithReactions(opts ...func(*ReactionQuery)) *MessageQuery
- type MessageSelect
- func (_s *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
- func (s *MessageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MessageSelect) BoolX(ctx context.Context) bool
- func (s *MessageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MessageSelect) BoolsX(ctx context.Context) []bool
- func (s *MessageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MessageSelect) Float64X(ctx context.Context) float64
- func (s *MessageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MessageSelect) Float64sX(ctx context.Context) []float64
- func (s *MessageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MessageSelect) IntX(ctx context.Context) int
- func (s *MessageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MessageSelect) IntsX(ctx context.Context) []int
- func (_s *MessageSelect) Scan(ctx context.Context, v any) error
- func (s *MessageSelect) ScanX(ctx context.Context, v any)
- func (s *MessageSelect) String(ctx context.Context) (_ string, err error)
- func (s *MessageSelect) StringX(ctx context.Context) string
- func (s *MessageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MessageSelect) StringsX(ctx context.Context) []string
- type MessageUpdate
- func (_u *MessageUpdate) AddAttachmentIDs(ids ...uuid.UUID) *MessageUpdate
- func (_u *MessageUpdate) AddAttachments(v ...*Attachment) *MessageUpdate
- func (_u *MessageUpdate) AddReactionIDs(ids ...uuid.UUID) *MessageUpdate
- func (_u *MessageUpdate) AddReactions(v ...*Reaction) *MessageUpdate
- func (_u *MessageUpdate) ClearAttachments() *MessageUpdate
- func (_u *MessageUpdate) ClearReactions() *MessageUpdate
- func (_u *MessageUpdate) ClearReplyToID() *MessageUpdate
- func (_u *MessageUpdate) ClearRuntime() *MessageUpdate
- func (_u *MessageUpdate) Exec(ctx context.Context) error
- func (_u *MessageUpdate) ExecX(ctx context.Context)
- func (_u *MessageUpdate) Mutation() *MessageMutation
- func (_u *MessageUpdate) RemoveAttachmentIDs(ids ...uuid.UUID) *MessageUpdate
- func (_u *MessageUpdate) RemoveAttachments(v ...*Attachment) *MessageUpdate
- func (_u *MessageUpdate) RemoveReactionIDs(ids ...uuid.UUID) *MessageUpdate
- func (_u *MessageUpdate) RemoveReactions(v ...*Reaction) *MessageUpdate
- func (_u *MessageUpdate) Save(ctx context.Context) (int, error)
- func (_u *MessageUpdate) SaveX(ctx context.Context) int
- func (_u *MessageUpdate) SetChannel(v message.Channel) *MessageUpdate
- func (_u *MessageUpdate) SetContent(v string) *MessageUpdate
- func (_u *MessageUpdate) SetMessageType(v message.MessageType) *MessageUpdate
- func (_u *MessageUpdate) SetNillableChannel(v *message.Channel) *MessageUpdate
- func (_u *MessageUpdate) SetNillableContent(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableMessageType(v *message.MessageType) *MessageUpdate
- func (_u *MessageUpdate) SetNillableRecipient(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableReplyToID(v *uuid.UUID) *MessageUpdate
- func (_u *MessageUpdate) SetNillableRuntime(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableSender(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetNillableTeam(v *string) *MessageUpdate
- func (_u *MessageUpdate) SetRecipient(v string) *MessageUpdate
- func (_u *MessageUpdate) SetReplyToID(v uuid.UUID) *MessageUpdate
- func (_u *MessageUpdate) SetRuntime(v string) *MessageUpdate
- func (_u *MessageUpdate) SetSender(v string) *MessageUpdate
- func (_u *MessageUpdate) SetTeam(v string) *MessageUpdate
- func (_u *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
- type MessageUpdateOne
- func (_u *MessageUpdateOne) AddAttachmentIDs(ids ...uuid.UUID) *MessageUpdateOne
- func (_u *MessageUpdateOne) AddAttachments(v ...*Attachment) *MessageUpdateOne
- func (_u *MessageUpdateOne) AddReactionIDs(ids ...uuid.UUID) *MessageUpdateOne
- func (_u *MessageUpdateOne) AddReactions(v ...*Reaction) *MessageUpdateOne
- func (_u *MessageUpdateOne) ClearAttachments() *MessageUpdateOne
- func (_u *MessageUpdateOne) ClearReactions() *MessageUpdateOne
- func (_u *MessageUpdateOne) ClearReplyToID() *MessageUpdateOne
- func (_u *MessageUpdateOne) ClearRuntime() *MessageUpdateOne
- func (_u *MessageUpdateOne) Exec(ctx context.Context) error
- func (_u *MessageUpdateOne) ExecX(ctx context.Context)
- func (_u *MessageUpdateOne) Mutation() *MessageMutation
- func (_u *MessageUpdateOne) RemoveAttachmentIDs(ids ...uuid.UUID) *MessageUpdateOne
- func (_u *MessageUpdateOne) RemoveAttachments(v ...*Attachment) *MessageUpdateOne
- func (_u *MessageUpdateOne) RemoveReactionIDs(ids ...uuid.UUID) *MessageUpdateOne
- func (_u *MessageUpdateOne) RemoveReactions(v ...*Reaction) *MessageUpdateOne
- func (_u *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
- func (_u *MessageUpdateOne) SaveX(ctx context.Context) *Message
- func (_u *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetChannel(v message.Channel) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetContent(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetMessageType(v message.MessageType) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableChannel(v *message.Channel) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableContent(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableMessageType(v *message.MessageType) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableRecipient(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableReplyToID(v *uuid.UUID) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableRuntime(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableSender(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetNillableTeam(v *string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetRecipient(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetReplyToID(v uuid.UUID) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetRuntime(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetSender(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) SetTeam(v string) *MessageUpdateOne
- func (_u *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
- type Messages
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Reaction
- type ReactionClient
- func (c *ReactionClient) Create() *ReactionCreate
- func (c *ReactionClient) CreateBulk(builders ...*ReactionCreate) *ReactionCreateBulk
- func (c *ReactionClient) Delete() *ReactionDelete
- func (c *ReactionClient) DeleteOne(_m *Reaction) *ReactionDeleteOne
- func (c *ReactionClient) DeleteOneID(id uuid.UUID) *ReactionDeleteOne
- func (c *ReactionClient) Get(ctx context.Context, id uuid.UUID) (*Reaction, error)
- func (c *ReactionClient) GetX(ctx context.Context, id uuid.UUID) *Reaction
- func (c *ReactionClient) Hooks() []Hook
- func (c *ReactionClient) Intercept(interceptors ...Interceptor)
- func (c *ReactionClient) Interceptors() []Interceptor
- func (c *ReactionClient) MapCreateBulk(slice any, setFunc func(*ReactionCreate, int)) *ReactionCreateBulk
- func (c *ReactionClient) Query() *ReactionQuery
- func (c *ReactionClient) QueryMessage(_m *Reaction) *MessageQuery
- func (c *ReactionClient) Update() *ReactionUpdate
- func (c *ReactionClient) UpdateOne(_m *Reaction) *ReactionUpdateOne
- func (c *ReactionClient) UpdateOneID(id uuid.UUID) *ReactionUpdateOne
- func (c *ReactionClient) Use(hooks ...Hook)
- type ReactionCreate
- func (_c *ReactionCreate) Exec(ctx context.Context) error
- func (_c *ReactionCreate) ExecX(ctx context.Context)
- func (_c *ReactionCreate) Mutation() *ReactionMutation
- func (_c *ReactionCreate) Save(ctx context.Context) (*Reaction, error)
- func (_c *ReactionCreate) SaveX(ctx context.Context) *Reaction
- func (_c *ReactionCreate) SetCreatedAt(v time.Time) *ReactionCreate
- func (_c *ReactionCreate) SetEmoji(v string) *ReactionCreate
- func (_c *ReactionCreate) SetFromAgent(v string) *ReactionCreate
- func (_c *ReactionCreate) SetID(v uuid.UUID) *ReactionCreate
- func (_c *ReactionCreate) SetMessage(v *Message) *ReactionCreate
- func (_c *ReactionCreate) SetMessageID(id uuid.UUID) *ReactionCreate
- func (_c *ReactionCreate) SetNillableCreatedAt(v *time.Time) *ReactionCreate
- func (_c *ReactionCreate) SetNillableID(v *uuid.UUID) *ReactionCreate
- type ReactionCreateBulk
- type ReactionDelete
- type ReactionDeleteOne
- type ReactionEdges
- type ReactionGroupBy
- func (_g *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 (_g *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) ClearMessage()
- func (m *ReactionMutation) ClearedEdges() []string
- func (m *ReactionMutation) ClearedFields() []string
- func (m ReactionMutation) Client() *Client
- func (m *ReactionMutation) CreatedAt() (r time.Time, exists bool)
- 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) FromAgent() (r string, exists bool)
- func (m *ReactionMutation) ID() (id uuid.UUID, exists bool)
- func (m *ReactionMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ReactionMutation) MessageCleared() bool
- func (m *ReactionMutation) MessageID() (id uuid.UUID, exists bool)
- func (m *ReactionMutation) MessageIDs() (ids []uuid.UUID)
- func (m *ReactionMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ReactionMutation) OldEmoji(ctx context.Context) (v string, err error)
- func (m *ReactionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ReactionMutation) OldFromAgent(ctx context.Context) (v string, err error)
- func (m *ReactionMutation) Op() Op
- func (m *ReactionMutation) RemovedEdges() []string
- func (m *ReactionMutation) RemovedIDs(name string) []ent.Value
- func (m *ReactionMutation) ResetCreatedAt()
- func (m *ReactionMutation) ResetEdge(name string) error
- func (m *ReactionMutation) ResetEmoji()
- func (m *ReactionMutation) ResetField(name string) error
- func (m *ReactionMutation) ResetFromAgent()
- func (m *ReactionMutation) ResetMessage()
- func (m *ReactionMutation) SetCreatedAt(t time.Time)
- func (m *ReactionMutation) SetEmoji(s string)
- func (m *ReactionMutation) SetField(name string, value ent.Value) error
- func (m *ReactionMutation) SetFromAgent(s string)
- func (m *ReactionMutation) SetID(id uuid.UUID)
- func (m *ReactionMutation) SetMessageID(id uuid.UUID)
- func (m *ReactionMutation) SetOp(op Op)
- func (m ReactionMutation) Tx() (*Tx, error)
- func (m *ReactionMutation) Type() string
- func (m *ReactionMutation) Where(ps ...predicate.Reaction)
- func (m *ReactionMutation) WhereP(ps ...func(*sql.Selector))
- type ReactionQuery
- func (_q *ReactionQuery) Aggregate(fns ...AggregateFunc) *ReactionSelect
- func (_q *ReactionQuery) All(ctx context.Context) ([]*Reaction, error)
- func (_q *ReactionQuery) AllX(ctx context.Context) []*Reaction
- func (_q *ReactionQuery) Clone() *ReactionQuery
- func (_q *ReactionQuery) Count(ctx context.Context) (int, error)
- func (_q *ReactionQuery) CountX(ctx context.Context) int
- func (_q *ReactionQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ReactionQuery) ExistX(ctx context.Context) bool
- func (_q *ReactionQuery) First(ctx context.Context) (*Reaction, error)
- func (_q *ReactionQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ReactionQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *ReactionQuery) FirstX(ctx context.Context) *Reaction
- func (_q *ReactionQuery) GroupBy(field string, fields ...string) *ReactionGroupBy
- func (_q *ReactionQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *ReactionQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *ReactionQuery) Limit(limit int) *ReactionQuery
- func (_q *ReactionQuery) Offset(offset int) *ReactionQuery
- func (_q *ReactionQuery) Only(ctx context.Context) (*Reaction, error)
- func (_q *ReactionQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ReactionQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *ReactionQuery) OnlyX(ctx context.Context) *Reaction
- func (_q *ReactionQuery) Order(o ...reaction.OrderOption) *ReactionQuery
- func (_q *ReactionQuery) QueryMessage() *MessageQuery
- func (_q *ReactionQuery) Select(fields ...string) *ReactionSelect
- func (_q *ReactionQuery) Unique(unique bool) *ReactionQuery
- func (_q *ReactionQuery) Where(ps ...predicate.Reaction) *ReactionQuery
- func (_q *ReactionQuery) WithMessage(opts ...func(*MessageQuery)) *ReactionQuery
- type ReactionSelect
- func (_s *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 (_s *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 (_u *ReactionUpdate) ClearMessage() *ReactionUpdate
- func (_u *ReactionUpdate) Exec(ctx context.Context) error
- func (_u *ReactionUpdate) ExecX(ctx context.Context)
- func (_u *ReactionUpdate) Mutation() *ReactionMutation
- func (_u *ReactionUpdate) Save(ctx context.Context) (int, error)
- func (_u *ReactionUpdate) SaveX(ctx context.Context) int
- func (_u *ReactionUpdate) SetEmoji(v string) *ReactionUpdate
- func (_u *ReactionUpdate) SetFromAgent(v string) *ReactionUpdate
- func (_u *ReactionUpdate) SetMessage(v *Message) *ReactionUpdate
- func (_u *ReactionUpdate) SetMessageID(id uuid.UUID) *ReactionUpdate
- func (_u *ReactionUpdate) SetNillableEmoji(v *string) *ReactionUpdate
- func (_u *ReactionUpdate) SetNillableFromAgent(v *string) *ReactionUpdate
- func (_u *ReactionUpdate) Where(ps ...predicate.Reaction) *ReactionUpdate
- type ReactionUpdateOne
- func (_u *ReactionUpdateOne) ClearMessage() *ReactionUpdateOne
- func (_u *ReactionUpdateOne) Exec(ctx context.Context) error
- func (_u *ReactionUpdateOne) ExecX(ctx context.Context)
- func (_u *ReactionUpdateOne) Mutation() *ReactionMutation
- func (_u *ReactionUpdateOne) Save(ctx context.Context) (*Reaction, error)
- func (_u *ReactionUpdateOne) SaveX(ctx context.Context) *Reaction
- func (_u *ReactionUpdateOne) Select(field string, fields ...string) *ReactionUpdateOne
- func (_u *ReactionUpdateOne) SetEmoji(v string) *ReactionUpdateOne
- func (_u *ReactionUpdateOne) SetFromAgent(v string) *ReactionUpdateOne
- func (_u *ReactionUpdateOne) SetMessage(v *Message) *ReactionUpdateOne
- func (_u *ReactionUpdateOne) SetMessageID(id uuid.UUID) *ReactionUpdateOne
- func (_u *ReactionUpdateOne) SetNillableEmoji(v *string) *ReactionUpdateOne
- func (_u *ReactionUpdateOne) SetNillableFromAgent(v *string) *ReactionUpdateOne
- func (_u *ReactionUpdateOne) Where(ps ...predicate.Reaction) *ReactionUpdateOne
- type Reactions
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type ToolUsage
- type ToolUsageClient
- func (c *ToolUsageClient) Create() *ToolUsageCreate
- func (c *ToolUsageClient) CreateBulk(builders ...*ToolUsageCreate) *ToolUsageCreateBulk
- func (c *ToolUsageClient) Delete() *ToolUsageDelete
- func (c *ToolUsageClient) DeleteOne(_m *ToolUsage) *ToolUsageDeleteOne
- func (c *ToolUsageClient) DeleteOneID(id uuid.UUID) *ToolUsageDeleteOne
- func (c *ToolUsageClient) Get(ctx context.Context, id uuid.UUID) (*ToolUsage, error)
- func (c *ToolUsageClient) GetX(ctx context.Context, id uuid.UUID) *ToolUsage
- func (c *ToolUsageClient) Hooks() []Hook
- func (c *ToolUsageClient) Intercept(interceptors ...Interceptor)
- func (c *ToolUsageClient) Interceptors() []Interceptor
- func (c *ToolUsageClient) MapCreateBulk(slice any, setFunc func(*ToolUsageCreate, int)) *ToolUsageCreateBulk
- func (c *ToolUsageClient) Query() *ToolUsageQuery
- func (c *ToolUsageClient) Update() *ToolUsageUpdate
- func (c *ToolUsageClient) UpdateOne(_m *ToolUsage) *ToolUsageUpdateOne
- func (c *ToolUsageClient) UpdateOneID(id uuid.UUID) *ToolUsageUpdateOne
- func (c *ToolUsageClient) Use(hooks ...Hook)
- type ToolUsageCreate
- func (_c *ToolUsageCreate) Exec(ctx context.Context) error
- func (_c *ToolUsageCreate) ExecX(ctx context.Context)
- func (_c *ToolUsageCreate) Mutation() *ToolUsageMutation
- func (_c *ToolUsageCreate) Save(ctx context.Context) (*ToolUsage, error)
- func (_c *ToolUsageCreate) SaveX(ctx context.Context) *ToolUsage
- func (_c *ToolUsageCreate) SetAgent(v string) *ToolUsageCreate
- func (_c *ToolUsageCreate) SetCommand(v string) *ToolUsageCreate
- func (_c *ToolUsageCreate) SetCreatedAt(v time.Time) *ToolUsageCreate
- func (_c *ToolUsageCreate) SetID(v uuid.UUID) *ToolUsageCreate
- func (_c *ToolUsageCreate) SetNillableCreatedAt(v *time.Time) *ToolUsageCreate
- func (_c *ToolUsageCreate) SetNillableID(v *uuid.UUID) *ToolUsageCreate
- func (_c *ToolUsageCreate) SetNillableTarget(v *string) *ToolUsageCreate
- func (_c *ToolUsageCreate) SetSubcommand(v string) *ToolUsageCreate
- func (_c *ToolUsageCreate) SetTarget(v string) *ToolUsageCreate
- func (_c *ToolUsageCreate) SetTeam(v string) *ToolUsageCreate
- type ToolUsageCreateBulk
- type ToolUsageDelete
- type ToolUsageDeleteOne
- type ToolUsageGroupBy
- func (_g *ToolUsageGroupBy) Aggregate(fns ...AggregateFunc) *ToolUsageGroupBy
- func (s *ToolUsageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ToolUsageGroupBy) BoolX(ctx context.Context) bool
- func (s *ToolUsageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ToolUsageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ToolUsageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ToolUsageGroupBy) Float64X(ctx context.Context) float64
- func (s *ToolUsageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ToolUsageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ToolUsageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ToolUsageGroupBy) IntX(ctx context.Context) int
- func (s *ToolUsageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ToolUsageGroupBy) IntsX(ctx context.Context) []int
- func (_g *ToolUsageGroupBy) Scan(ctx context.Context, v any) error
- func (s *ToolUsageGroupBy) ScanX(ctx context.Context, v any)
- func (s *ToolUsageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ToolUsageGroupBy) StringX(ctx context.Context) string
- func (s *ToolUsageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ToolUsageGroupBy) StringsX(ctx context.Context) []string
- type ToolUsageMutation
- func (m *ToolUsageMutation) AddField(name string, value ent.Value) error
- func (m *ToolUsageMutation) AddedEdges() []string
- func (m *ToolUsageMutation) AddedField(name string) (ent.Value, bool)
- func (m *ToolUsageMutation) AddedFields() []string
- func (m *ToolUsageMutation) AddedIDs(name string) []ent.Value
- func (m *ToolUsageMutation) Agent() (r string, exists bool)
- func (m *ToolUsageMutation) ClearEdge(name string) error
- func (m *ToolUsageMutation) ClearField(name string) error
- func (m *ToolUsageMutation) ClearTarget()
- func (m *ToolUsageMutation) ClearedEdges() []string
- func (m *ToolUsageMutation) ClearedFields() []string
- func (m ToolUsageMutation) Client() *Client
- func (m *ToolUsageMutation) Command() (r string, exists bool)
- func (m *ToolUsageMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ToolUsageMutation) EdgeCleared(name string) bool
- func (m *ToolUsageMutation) Field(name string) (ent.Value, bool)
- func (m *ToolUsageMutation) FieldCleared(name string) bool
- func (m *ToolUsageMutation) Fields() []string
- func (m *ToolUsageMutation) ID() (id uuid.UUID, exists bool)
- func (m *ToolUsageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ToolUsageMutation) OldAgent(ctx context.Context) (v string, err error)
- func (m *ToolUsageMutation) OldCommand(ctx context.Context) (v string, err error)
- func (m *ToolUsageMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ToolUsageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ToolUsageMutation) OldSubcommand(ctx context.Context) (v string, err error)
- func (m *ToolUsageMutation) OldTarget(ctx context.Context) (v string, err error)
- func (m *ToolUsageMutation) OldTeam(ctx context.Context) (v string, err error)
- func (m *ToolUsageMutation) Op() Op
- func (m *ToolUsageMutation) RemovedEdges() []string
- func (m *ToolUsageMutation) RemovedIDs(name string) []ent.Value
- func (m *ToolUsageMutation) ResetAgent()
- func (m *ToolUsageMutation) ResetCommand()
- func (m *ToolUsageMutation) ResetCreatedAt()
- func (m *ToolUsageMutation) ResetEdge(name string) error
- func (m *ToolUsageMutation) ResetField(name string) error
- func (m *ToolUsageMutation) ResetSubcommand()
- func (m *ToolUsageMutation) ResetTarget()
- func (m *ToolUsageMutation) ResetTeam()
- func (m *ToolUsageMutation) SetAgent(s string)
- func (m *ToolUsageMutation) SetCommand(s string)
- func (m *ToolUsageMutation) SetCreatedAt(t time.Time)
- func (m *ToolUsageMutation) SetField(name string, value ent.Value) error
- func (m *ToolUsageMutation) SetID(id uuid.UUID)
- func (m *ToolUsageMutation) SetOp(op Op)
- func (m *ToolUsageMutation) SetSubcommand(s string)
- func (m *ToolUsageMutation) SetTarget(s string)
- func (m *ToolUsageMutation) SetTeam(s string)
- func (m *ToolUsageMutation) Subcommand() (r string, exists bool)
- func (m *ToolUsageMutation) Target() (r string, exists bool)
- func (m *ToolUsageMutation) TargetCleared() bool
- func (m *ToolUsageMutation) Team() (r string, exists bool)
- func (m ToolUsageMutation) Tx() (*Tx, error)
- func (m *ToolUsageMutation) Type() string
- func (m *ToolUsageMutation) Where(ps ...predicate.ToolUsage)
- func (m *ToolUsageMutation) WhereP(ps ...func(*sql.Selector))
- type ToolUsageQuery
- func (_q *ToolUsageQuery) Aggregate(fns ...AggregateFunc) *ToolUsageSelect
- func (_q *ToolUsageQuery) All(ctx context.Context) ([]*ToolUsage, error)
- func (_q *ToolUsageQuery) AllX(ctx context.Context) []*ToolUsage
- func (_q *ToolUsageQuery) Clone() *ToolUsageQuery
- func (_q *ToolUsageQuery) Count(ctx context.Context) (int, error)
- func (_q *ToolUsageQuery) CountX(ctx context.Context) int
- func (_q *ToolUsageQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ToolUsageQuery) ExistX(ctx context.Context) bool
- func (_q *ToolUsageQuery) First(ctx context.Context) (*ToolUsage, error)
- func (_q *ToolUsageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ToolUsageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (_q *ToolUsageQuery) FirstX(ctx context.Context) *ToolUsage
- func (_q *ToolUsageQuery) GroupBy(field string, fields ...string) *ToolUsageGroupBy
- func (_q *ToolUsageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (_q *ToolUsageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (_q *ToolUsageQuery) Limit(limit int) *ToolUsageQuery
- func (_q *ToolUsageQuery) Offset(offset int) *ToolUsageQuery
- func (_q *ToolUsageQuery) Only(ctx context.Context) (*ToolUsage, error)
- func (_q *ToolUsageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (_q *ToolUsageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (_q *ToolUsageQuery) OnlyX(ctx context.Context) *ToolUsage
- func (_q *ToolUsageQuery) Order(o ...toolusage.OrderOption) *ToolUsageQuery
- func (_q *ToolUsageQuery) Select(fields ...string) *ToolUsageSelect
- func (_q *ToolUsageQuery) Unique(unique bool) *ToolUsageQuery
- func (_q *ToolUsageQuery) Where(ps ...predicate.ToolUsage) *ToolUsageQuery
- type ToolUsageSelect
- func (_s *ToolUsageSelect) Aggregate(fns ...AggregateFunc) *ToolUsageSelect
- func (s *ToolUsageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ToolUsageSelect) BoolX(ctx context.Context) bool
- func (s *ToolUsageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ToolUsageSelect) BoolsX(ctx context.Context) []bool
- func (s *ToolUsageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ToolUsageSelect) Float64X(ctx context.Context) float64
- func (s *ToolUsageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ToolUsageSelect) Float64sX(ctx context.Context) []float64
- func (s *ToolUsageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ToolUsageSelect) IntX(ctx context.Context) int
- func (s *ToolUsageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ToolUsageSelect) IntsX(ctx context.Context) []int
- func (_s *ToolUsageSelect) Scan(ctx context.Context, v any) error
- func (s *ToolUsageSelect) ScanX(ctx context.Context, v any)
- func (s *ToolUsageSelect) String(ctx context.Context) (_ string, err error)
- func (s *ToolUsageSelect) StringX(ctx context.Context) string
- func (s *ToolUsageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ToolUsageSelect) StringsX(ctx context.Context) []string
- type ToolUsageUpdate
- func (_u *ToolUsageUpdate) ClearTarget() *ToolUsageUpdate
- func (_u *ToolUsageUpdate) Exec(ctx context.Context) error
- func (_u *ToolUsageUpdate) ExecX(ctx context.Context)
- func (_u *ToolUsageUpdate) Mutation() *ToolUsageMutation
- func (_u *ToolUsageUpdate) Save(ctx context.Context) (int, error)
- func (_u *ToolUsageUpdate) SaveX(ctx context.Context) int
- func (_u *ToolUsageUpdate) SetAgent(v string) *ToolUsageUpdate
- func (_u *ToolUsageUpdate) SetCommand(v string) *ToolUsageUpdate
- func (_u *ToolUsageUpdate) SetNillableAgent(v *string) *ToolUsageUpdate
- func (_u *ToolUsageUpdate) SetNillableCommand(v *string) *ToolUsageUpdate
- func (_u *ToolUsageUpdate) SetNillableSubcommand(v *string) *ToolUsageUpdate
- func (_u *ToolUsageUpdate) SetNillableTarget(v *string) *ToolUsageUpdate
- func (_u *ToolUsageUpdate) SetNillableTeam(v *string) *ToolUsageUpdate
- func (_u *ToolUsageUpdate) SetSubcommand(v string) *ToolUsageUpdate
- func (_u *ToolUsageUpdate) SetTarget(v string) *ToolUsageUpdate
- func (_u *ToolUsageUpdate) SetTeam(v string) *ToolUsageUpdate
- func (_u *ToolUsageUpdate) Where(ps ...predicate.ToolUsage) *ToolUsageUpdate
- type ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) ClearTarget() *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) Exec(ctx context.Context) error
- func (_u *ToolUsageUpdateOne) ExecX(ctx context.Context)
- func (_u *ToolUsageUpdateOne) Mutation() *ToolUsageMutation
- func (_u *ToolUsageUpdateOne) Save(ctx context.Context) (*ToolUsage, error)
- func (_u *ToolUsageUpdateOne) SaveX(ctx context.Context) *ToolUsage
- func (_u *ToolUsageUpdateOne) Select(field string, fields ...string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) SetAgent(v string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) SetCommand(v string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) SetNillableAgent(v *string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) SetNillableCommand(v *string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) SetNillableSubcommand(v *string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) SetNillableTarget(v *string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) SetNillableTeam(v *string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) SetSubcommand(v string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) SetTarget(v string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) SetTeam(v string) *ToolUsageUpdateOne
- func (_u *ToolUsageUpdateOne) Where(ps ...predicate.ToolUsage) *ToolUsageUpdateOne
- type ToolUsages
- type TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAttachment = "Attachment" TypeComment = "Comment" TypeMessage = "Message" TypeReaction = "Reaction" TypeToolUsage = "ToolUsage" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Attachment ¶
type Attachment struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Filename holds the value of the "filename" field.
Filename string `json:"filename,omitempty"`
// MimeType holds the value of the "mime_type" field.
MimeType string `json:"mime_type,omitempty"`
// SizeBytes holds the value of the "size_bytes" field.
SizeBytes int64 `json:"size_bytes,omitempty"`
// relative path: {YYYY-MM}/{message_id}/{filename}
Path string `json:"path,omitempty"`
// ThumbnailPath holds the value of the "thumbnail_path" field.
ThumbnailPath *string `json:"thumbnail_path,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the AttachmentQuery when eager-loading is set.
Edges AttachmentEdges `json:"edges"`
// contains filtered or unexported fields
}
Attachment is the model entity for the Attachment schema.
func (*Attachment) QueryMessage ¶
func (_m *Attachment) QueryMessage() *MessageQuery
QueryMessage queries the "message" edge of the Attachment entity.
func (*Attachment) String ¶
func (_m *Attachment) String() string
String implements the fmt.Stringer.
func (*Attachment) Unwrap ¶
func (_m *Attachment) Unwrap() *Attachment
Unwrap unwraps the Attachment 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 (*Attachment) Update ¶
func (_m *Attachment) Update() *AttachmentUpdateOne
Update returns a builder for updating this Attachment. Note that you need to call Attachment.Unwrap() before calling this method if this Attachment was returned from a transaction, and the transaction was committed or rolled back.
type AttachmentClient ¶
type AttachmentClient struct {
// contains filtered or unexported fields
}
AttachmentClient is a client for the Attachment schema.
func NewAttachmentClient ¶
func NewAttachmentClient(c config) *AttachmentClient
NewAttachmentClient returns a client for the Attachment from the given config.
func (*AttachmentClient) Create ¶
func (c *AttachmentClient) Create() *AttachmentCreate
Create returns a builder for creating a Attachment entity.
func (*AttachmentClient) CreateBulk ¶
func (c *AttachmentClient) CreateBulk(builders ...*AttachmentCreate) *AttachmentCreateBulk
CreateBulk returns a builder for creating a bulk of Attachment entities.
func (*AttachmentClient) Delete ¶
func (c *AttachmentClient) Delete() *AttachmentDelete
Delete returns a delete builder for Attachment.
func (*AttachmentClient) DeleteOne ¶
func (c *AttachmentClient) DeleteOne(_m *Attachment) *AttachmentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AttachmentClient) DeleteOneID ¶
func (c *AttachmentClient) DeleteOneID(id uuid.UUID) *AttachmentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AttachmentClient) Get ¶
func (c *AttachmentClient) Get(ctx context.Context, id uuid.UUID) (*Attachment, error)
Get returns a Attachment entity by its id.
func (*AttachmentClient) GetX ¶
func (c *AttachmentClient) GetX(ctx context.Context, id uuid.UUID) *Attachment
GetX is like Get, but panics if an error occurs.
func (*AttachmentClient) Hooks ¶
func (c *AttachmentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AttachmentClient) Intercept ¶
func (c *AttachmentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `attachment.Intercept(f(g(h())))`.
func (*AttachmentClient) Interceptors ¶
func (c *AttachmentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AttachmentClient) MapCreateBulk ¶
func (c *AttachmentClient) MapCreateBulk(slice any, setFunc func(*AttachmentCreate, int)) *AttachmentCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*AttachmentClient) Query ¶
func (c *AttachmentClient) Query() *AttachmentQuery
Query returns a query builder for Attachment.
func (*AttachmentClient) QueryMessage ¶
func (c *AttachmentClient) QueryMessage(_m *Attachment) *MessageQuery
QueryMessage queries the message edge of a Attachment.
func (*AttachmentClient) Update ¶
func (c *AttachmentClient) Update() *AttachmentUpdate
Update returns an update builder for Attachment.
func (*AttachmentClient) UpdateOne ¶
func (c *AttachmentClient) UpdateOne(_m *Attachment) *AttachmentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AttachmentClient) UpdateOneID ¶
func (c *AttachmentClient) UpdateOneID(id uuid.UUID) *AttachmentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AttachmentClient) Use ¶
func (c *AttachmentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `attachment.Hooks(f(g(h())))`.
type AttachmentCreate ¶
type AttachmentCreate struct {
// contains filtered or unexported fields
}
AttachmentCreate is the builder for creating a Attachment entity.
func (*AttachmentCreate) Exec ¶
func (_c *AttachmentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentCreate) ExecX ¶
func (_c *AttachmentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentCreate) Mutation ¶
func (_c *AttachmentCreate) Mutation() *AttachmentMutation
Mutation returns the AttachmentMutation object of the builder.
func (*AttachmentCreate) Save ¶
func (_c *AttachmentCreate) Save(ctx context.Context) (*Attachment, error)
Save creates the Attachment in the database.
func (*AttachmentCreate) SaveX ¶
func (_c *AttachmentCreate) SaveX(ctx context.Context) *Attachment
SaveX calls Save and panics if Save returns an error.
func (*AttachmentCreate) SetFilename ¶
func (_c *AttachmentCreate) SetFilename(v string) *AttachmentCreate
SetFilename sets the "filename" field.
func (*AttachmentCreate) SetID ¶
func (_c *AttachmentCreate) SetID(v uuid.UUID) *AttachmentCreate
SetID sets the "id" field.
func (*AttachmentCreate) SetMessage ¶
func (_c *AttachmentCreate) SetMessage(v *Message) *AttachmentCreate
SetMessage sets the "message" edge to the Message entity.
func (*AttachmentCreate) SetMessageID ¶
func (_c *AttachmentCreate) SetMessageID(id uuid.UUID) *AttachmentCreate
SetMessageID sets the "message" edge to the Message entity by ID.
func (*AttachmentCreate) SetMimeType ¶
func (_c *AttachmentCreate) SetMimeType(v string) *AttachmentCreate
SetMimeType sets the "mime_type" field.
func (*AttachmentCreate) SetNillableID ¶
func (_c *AttachmentCreate) SetNillableID(v *uuid.UUID) *AttachmentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*AttachmentCreate) SetNillableThumbnailPath ¶
func (_c *AttachmentCreate) SetNillableThumbnailPath(v *string) *AttachmentCreate
SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.
func (*AttachmentCreate) SetPath ¶
func (_c *AttachmentCreate) SetPath(v string) *AttachmentCreate
SetPath sets the "path" field.
func (*AttachmentCreate) SetSizeBytes ¶
func (_c *AttachmentCreate) SetSizeBytes(v int64) *AttachmentCreate
SetSizeBytes sets the "size_bytes" field.
func (*AttachmentCreate) SetThumbnailPath ¶
func (_c *AttachmentCreate) SetThumbnailPath(v string) *AttachmentCreate
SetThumbnailPath sets the "thumbnail_path" field.
type AttachmentCreateBulk ¶
type AttachmentCreateBulk struct {
// contains filtered or unexported fields
}
AttachmentCreateBulk is the builder for creating many Attachment entities in bulk.
func (*AttachmentCreateBulk) Exec ¶
func (_c *AttachmentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentCreateBulk) ExecX ¶
func (_c *AttachmentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentCreateBulk) Save ¶
func (_c *AttachmentCreateBulk) Save(ctx context.Context) ([]*Attachment, error)
Save creates the Attachment entities in the database.
func (*AttachmentCreateBulk) SaveX ¶
func (_c *AttachmentCreateBulk) SaveX(ctx context.Context) []*Attachment
SaveX is like Save, but panics if an error occurs.
type AttachmentDelete ¶
type AttachmentDelete struct {
// contains filtered or unexported fields
}
AttachmentDelete is the builder for deleting a Attachment entity.
func (*AttachmentDelete) Exec ¶
func (_d *AttachmentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AttachmentDelete) ExecX ¶
func (_d *AttachmentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentDelete) Where ¶
func (_d *AttachmentDelete) Where(ps ...predicate.Attachment) *AttachmentDelete
Where appends a list predicates to the AttachmentDelete builder.
type AttachmentDeleteOne ¶
type AttachmentDeleteOne struct {
// contains filtered or unexported fields
}
AttachmentDeleteOne is the builder for deleting a single Attachment entity.
func (*AttachmentDeleteOne) Exec ¶
func (_d *AttachmentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AttachmentDeleteOne) ExecX ¶
func (_d *AttachmentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentDeleteOne) Where ¶
func (_d *AttachmentDeleteOne) Where(ps ...predicate.Attachment) *AttachmentDeleteOne
Where appends a list predicates to the AttachmentDelete builder.
type AttachmentEdges ¶
type AttachmentEdges struct {
// Message holds the value of the message edge.
Message *Message `json:"message,omitempty"`
// contains filtered or unexported fields
}
AttachmentEdges holds the relations/edges for other nodes in the graph.
func (AttachmentEdges) MessageOrErr ¶
func (e AttachmentEdges) MessageOrErr() (*Message, error)
MessageOrErr returns the Message value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AttachmentGroupBy ¶
type AttachmentGroupBy struct {
// contains filtered or unexported fields
}
AttachmentGroupBy is the group-by builder for Attachment entities.
func (*AttachmentGroupBy) Aggregate ¶
func (_g *AttachmentGroupBy) Aggregate(fns ...AggregateFunc) *AttachmentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AttachmentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AttachmentGroupBy) Scan ¶
func (_g *AttachmentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AttachmentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AttachmentMutation ¶
type AttachmentMutation struct {
// contains filtered or unexported fields
}
AttachmentMutation represents an operation that mutates the Attachment nodes in the graph.
func (*AttachmentMutation) AddField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) AddSizeBytes ¶
func (m *AttachmentMutation) AddSizeBytes(i int64)
AddSizeBytes adds i to the "size_bytes" field.
func (*AttachmentMutation) AddedEdges ¶
func (m *AttachmentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AttachmentMutation) AddedField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) AddedFields ¶
func (m *AttachmentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AttachmentMutation) AddedIDs ¶
func (m *AttachmentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AttachmentMutation) AddedSizeBytes ¶
func (m *AttachmentMutation) AddedSizeBytes() (r int64, exists bool)
AddedSizeBytes returns the value that was added to the "size_bytes" field in this mutation.
func (*AttachmentMutation) ClearEdge ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ClearField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ClearMessage ¶
func (m *AttachmentMutation) ClearMessage()
ClearMessage clears the "message" edge to the Message entity.
func (*AttachmentMutation) ClearThumbnailPath ¶
func (m *AttachmentMutation) ClearThumbnailPath()
ClearThumbnailPath clears the value of the "thumbnail_path" field.
func (*AttachmentMutation) ClearedEdges ¶
func (m *AttachmentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AttachmentMutation) ClearedFields ¶
func (m *AttachmentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AttachmentMutation) Client ¶
func (m AttachmentMutation) 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 (*AttachmentMutation) EdgeCleared ¶
func (m *AttachmentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AttachmentMutation) Field ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) FieldCleared ¶
func (m *AttachmentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AttachmentMutation) Fields ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) Filename ¶
func (m *AttachmentMutation) Filename() (r string, exists bool)
Filename returns the value of the "filename" field in the mutation.
func (*AttachmentMutation) ID ¶
func (m *AttachmentMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AttachmentMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AttachmentMutation) MessageCleared ¶
func (m *AttachmentMutation) MessageCleared() bool
MessageCleared reports if the "message" edge to the Message entity was cleared.
func (*AttachmentMutation) MessageID ¶
func (m *AttachmentMutation) MessageID() (id uuid.UUID, exists bool)
MessageID returns the "message" edge ID in the mutation.
func (*AttachmentMutation) MessageIDs ¶
func (m *AttachmentMutation) MessageIDs() (ids []uuid.UUID)
MessageIDs returns the "message" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MessageID instead. It exists only for internal usage by the builders.
func (*AttachmentMutation) MimeType ¶
func (m *AttachmentMutation) MimeType() (r string, exists bool)
MimeType returns the value of the "mime_type" field in the mutation.
func (*AttachmentMutation) 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 (*AttachmentMutation) OldFilename ¶
func (m *AttachmentMutation) OldFilename(ctx context.Context) (v string, err error)
OldFilename returns the old "filename" field's value of the Attachment entity. If the Attachment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AttachmentMutation) OldMimeType ¶
func (m *AttachmentMutation) OldMimeType(ctx context.Context) (v string, err error)
OldMimeType returns the old "mime_type" field's value of the Attachment entity. If the Attachment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AttachmentMutation) OldPath ¶
func (m *AttachmentMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the Attachment entity. If the Attachment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AttachmentMutation) OldSizeBytes ¶
func (m *AttachmentMutation) OldSizeBytes(ctx context.Context) (v int64, err error)
OldSizeBytes returns the old "size_bytes" field's value of the Attachment entity. If the Attachment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AttachmentMutation) OldThumbnailPath ¶
func (m *AttachmentMutation) OldThumbnailPath(ctx context.Context) (v *string, err error)
OldThumbnailPath returns the old "thumbnail_path" field's value of the Attachment entity. If the Attachment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AttachmentMutation) Path ¶
func (m *AttachmentMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*AttachmentMutation) RemovedEdges ¶
func (m *AttachmentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AttachmentMutation) RemovedIDs ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ResetEdge ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ResetField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) ResetFilename ¶
func (m *AttachmentMutation) ResetFilename()
ResetFilename resets all changes to the "filename" field.
func (*AttachmentMutation) ResetMessage ¶
func (m *AttachmentMutation) ResetMessage()
ResetMessage resets all changes to the "message" edge.
func (*AttachmentMutation) ResetMimeType ¶
func (m *AttachmentMutation) ResetMimeType()
ResetMimeType resets all changes to the "mime_type" field.
func (*AttachmentMutation) ResetPath ¶
func (m *AttachmentMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*AttachmentMutation) ResetSizeBytes ¶
func (m *AttachmentMutation) ResetSizeBytes()
ResetSizeBytes resets all changes to the "size_bytes" field.
func (*AttachmentMutation) ResetThumbnailPath ¶
func (m *AttachmentMutation) ResetThumbnailPath()
ResetThumbnailPath resets all changes to the "thumbnail_path" field.
func (*AttachmentMutation) SetField ¶
func (m *AttachmentMutation) 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 (*AttachmentMutation) SetFilename ¶
func (m *AttachmentMutation) SetFilename(s string)
SetFilename sets the "filename" field.
func (*AttachmentMutation) SetID ¶
func (m *AttachmentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Attachment entities.
func (*AttachmentMutation) SetMessageID ¶
func (m *AttachmentMutation) SetMessageID(id uuid.UUID)
SetMessageID sets the "message" edge to the Message entity by id.
func (*AttachmentMutation) SetMimeType ¶
func (m *AttachmentMutation) SetMimeType(s string)
SetMimeType sets the "mime_type" field.
func (*AttachmentMutation) SetOp ¶
func (m *AttachmentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AttachmentMutation) SetPath ¶
func (m *AttachmentMutation) SetPath(s string)
SetPath sets the "path" field.
func (*AttachmentMutation) SetSizeBytes ¶
func (m *AttachmentMutation) SetSizeBytes(i int64)
SetSizeBytes sets the "size_bytes" field.
func (*AttachmentMutation) SetThumbnailPath ¶
func (m *AttachmentMutation) SetThumbnailPath(s string)
SetThumbnailPath sets the "thumbnail_path" field.
func (*AttachmentMutation) SizeBytes ¶
func (m *AttachmentMutation) SizeBytes() (r int64, exists bool)
SizeBytes returns the value of the "size_bytes" field in the mutation.
func (*AttachmentMutation) ThumbnailPath ¶
func (m *AttachmentMutation) ThumbnailPath() (r string, exists bool)
ThumbnailPath returns the value of the "thumbnail_path" field in the mutation.
func (*AttachmentMutation) ThumbnailPathCleared ¶
func (m *AttachmentMutation) ThumbnailPathCleared() bool
ThumbnailPathCleared returns if the "thumbnail_path" field was cleared in this mutation.
func (AttachmentMutation) Tx ¶
func (m AttachmentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AttachmentMutation) Type ¶
func (m *AttachmentMutation) Type() string
Type returns the node type of this mutation (Attachment).
func (*AttachmentMutation) Where ¶
func (m *AttachmentMutation) Where(ps ...predicate.Attachment)
Where appends a list predicates to the AttachmentMutation builder.
func (*AttachmentMutation) WhereP ¶
func (m *AttachmentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AttachmentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AttachmentQuery ¶
type AttachmentQuery struct {
// contains filtered or unexported fields
}
AttachmentQuery is the builder for querying Attachment entities.
func (*AttachmentQuery) Aggregate ¶
func (_q *AttachmentQuery) Aggregate(fns ...AggregateFunc) *AttachmentSelect
Aggregate returns a AttachmentSelect configured with the given aggregations.
func (*AttachmentQuery) All ¶
func (_q *AttachmentQuery) All(ctx context.Context) ([]*Attachment, error)
All executes the query and returns a list of Attachments.
func (*AttachmentQuery) AllX ¶
func (_q *AttachmentQuery) AllX(ctx context.Context) []*Attachment
AllX is like All, but panics if an error occurs.
func (*AttachmentQuery) Clone ¶
func (_q *AttachmentQuery) Clone() *AttachmentQuery
Clone returns a duplicate of the AttachmentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AttachmentQuery) Count ¶
func (_q *AttachmentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AttachmentQuery) CountX ¶
func (_q *AttachmentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AttachmentQuery) Exist ¶
func (_q *AttachmentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AttachmentQuery) ExistX ¶
func (_q *AttachmentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AttachmentQuery) First ¶
func (_q *AttachmentQuery) First(ctx context.Context) (*Attachment, error)
First returns the first Attachment entity from the query. Returns a *NotFoundError when no Attachment was found.
func (*AttachmentQuery) FirstID ¶
FirstID returns the first Attachment ID from the query. Returns a *NotFoundError when no Attachment ID was found.
func (*AttachmentQuery) FirstIDX ¶
func (_q *AttachmentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AttachmentQuery) FirstX ¶
func (_q *AttachmentQuery) FirstX(ctx context.Context) *Attachment
FirstX is like First, but panics if an error occurs.
func (*AttachmentQuery) GroupBy ¶
func (_q *AttachmentQuery) GroupBy(field string, fields ...string) *AttachmentGroupBy
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 {
Filename string `json:"filename,omitempty"`
Count int `json:"count,omitempty"`
}
client.Attachment.Query().
GroupBy(attachment.FieldFilename).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*AttachmentQuery) IDsX ¶
func (_q *AttachmentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AttachmentQuery) Limit ¶
func (_q *AttachmentQuery) Limit(limit int) *AttachmentQuery
Limit the number of records to be returned by this query.
func (*AttachmentQuery) Offset ¶
func (_q *AttachmentQuery) Offset(offset int) *AttachmentQuery
Offset to start from.
func (*AttachmentQuery) Only ¶
func (_q *AttachmentQuery) Only(ctx context.Context) (*Attachment, error)
Only returns a single Attachment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Attachment entity is found. Returns a *NotFoundError when no Attachment entities are found.
func (*AttachmentQuery) OnlyID ¶
OnlyID is like Only, but returns the only Attachment ID in the query. Returns a *NotSingularError when more than one Attachment ID is found. Returns a *NotFoundError when no entities are found.
func (*AttachmentQuery) OnlyIDX ¶
func (_q *AttachmentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AttachmentQuery) OnlyX ¶
func (_q *AttachmentQuery) OnlyX(ctx context.Context) *Attachment
OnlyX is like Only, but panics if an error occurs.
func (*AttachmentQuery) Order ¶
func (_q *AttachmentQuery) Order(o ...attachment.OrderOption) *AttachmentQuery
Order specifies how the records should be ordered.
func (*AttachmentQuery) QueryMessage ¶
func (_q *AttachmentQuery) QueryMessage() *MessageQuery
QueryMessage chains the current query on the "message" edge.
func (*AttachmentQuery) Select ¶
func (_q *AttachmentQuery) Select(fields ...string) *AttachmentSelect
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 {
Filename string `json:"filename,omitempty"`
}
client.Attachment.Query().
Select(attachment.FieldFilename).
Scan(ctx, &v)
func (*AttachmentQuery) Unique ¶
func (_q *AttachmentQuery) Unique(unique bool) *AttachmentQuery
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 (*AttachmentQuery) Where ¶
func (_q *AttachmentQuery) Where(ps ...predicate.Attachment) *AttachmentQuery
Where adds a new predicate for the AttachmentQuery builder.
func (*AttachmentQuery) WithMessage ¶
func (_q *AttachmentQuery) WithMessage(opts ...func(*MessageQuery)) *AttachmentQuery
WithMessage tells the query-builder to eager-load the nodes that are connected to the "message" edge. The optional arguments are used to configure the query builder of the edge.
type AttachmentSelect ¶
type AttachmentSelect struct {
*AttachmentQuery
// contains filtered or unexported fields
}
AttachmentSelect is the builder for selecting fields of Attachment entities.
func (*AttachmentSelect) Aggregate ¶
func (_s *AttachmentSelect) Aggregate(fns ...AggregateFunc) *AttachmentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AttachmentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AttachmentSelect) Scan ¶
func (_s *AttachmentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AttachmentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AttachmentUpdate ¶
type AttachmentUpdate struct {
// contains filtered or unexported fields
}
AttachmentUpdate is the builder for updating Attachment entities.
func (*AttachmentUpdate) AddSizeBytes ¶
func (_u *AttachmentUpdate) AddSizeBytes(v int64) *AttachmentUpdate
AddSizeBytes adds value to the "size_bytes" field.
func (*AttachmentUpdate) ClearMessage ¶
func (_u *AttachmentUpdate) ClearMessage() *AttachmentUpdate
ClearMessage clears the "message" edge to the Message entity.
func (*AttachmentUpdate) ClearThumbnailPath ¶
func (_u *AttachmentUpdate) ClearThumbnailPath() *AttachmentUpdate
ClearThumbnailPath clears the value of the "thumbnail_path" field.
func (*AttachmentUpdate) Exec ¶
func (_u *AttachmentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachmentUpdate) ExecX ¶
func (_u *AttachmentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentUpdate) Mutation ¶
func (_u *AttachmentUpdate) Mutation() *AttachmentMutation
Mutation returns the AttachmentMutation object of the builder.
func (*AttachmentUpdate) Save ¶
func (_u *AttachmentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AttachmentUpdate) SaveX ¶
func (_u *AttachmentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AttachmentUpdate) SetFilename ¶
func (_u *AttachmentUpdate) SetFilename(v string) *AttachmentUpdate
SetFilename sets the "filename" field.
func (*AttachmentUpdate) SetMessage ¶
func (_u *AttachmentUpdate) SetMessage(v *Message) *AttachmentUpdate
SetMessage sets the "message" edge to the Message entity.
func (*AttachmentUpdate) SetMessageID ¶
func (_u *AttachmentUpdate) SetMessageID(id uuid.UUID) *AttachmentUpdate
SetMessageID sets the "message" edge to the Message entity by ID.
func (*AttachmentUpdate) SetMimeType ¶
func (_u *AttachmentUpdate) SetMimeType(v string) *AttachmentUpdate
SetMimeType sets the "mime_type" field.
func (*AttachmentUpdate) SetNillableFilename ¶
func (_u *AttachmentUpdate) SetNillableFilename(v *string) *AttachmentUpdate
SetNillableFilename sets the "filename" field if the given value is not nil.
func (*AttachmentUpdate) SetNillableMimeType ¶
func (_u *AttachmentUpdate) SetNillableMimeType(v *string) *AttachmentUpdate
SetNillableMimeType sets the "mime_type" field if the given value is not nil.
func (*AttachmentUpdate) SetNillablePath ¶
func (_u *AttachmentUpdate) SetNillablePath(v *string) *AttachmentUpdate
SetNillablePath sets the "path" field if the given value is not nil.
func (*AttachmentUpdate) SetNillableSizeBytes ¶
func (_u *AttachmentUpdate) SetNillableSizeBytes(v *int64) *AttachmentUpdate
SetNillableSizeBytes sets the "size_bytes" field if the given value is not nil.
func (*AttachmentUpdate) SetNillableThumbnailPath ¶
func (_u *AttachmentUpdate) SetNillableThumbnailPath(v *string) *AttachmentUpdate
SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.
func (*AttachmentUpdate) SetPath ¶
func (_u *AttachmentUpdate) SetPath(v string) *AttachmentUpdate
SetPath sets the "path" field.
func (*AttachmentUpdate) SetSizeBytes ¶
func (_u *AttachmentUpdate) SetSizeBytes(v int64) *AttachmentUpdate
SetSizeBytes sets the "size_bytes" field.
func (*AttachmentUpdate) SetThumbnailPath ¶
func (_u *AttachmentUpdate) SetThumbnailPath(v string) *AttachmentUpdate
SetThumbnailPath sets the "thumbnail_path" field.
func (*AttachmentUpdate) Where ¶
func (_u *AttachmentUpdate) Where(ps ...predicate.Attachment) *AttachmentUpdate
Where appends a list predicates to the AttachmentUpdate builder.
type AttachmentUpdateOne ¶
type AttachmentUpdateOne struct {
// contains filtered or unexported fields
}
AttachmentUpdateOne is the builder for updating a single Attachment entity.
func (*AttachmentUpdateOne) AddSizeBytes ¶
func (_u *AttachmentUpdateOne) AddSizeBytes(v int64) *AttachmentUpdateOne
AddSizeBytes adds value to the "size_bytes" field.
func (*AttachmentUpdateOne) ClearMessage ¶
func (_u *AttachmentUpdateOne) ClearMessage() *AttachmentUpdateOne
ClearMessage clears the "message" edge to the Message entity.
func (*AttachmentUpdateOne) ClearThumbnailPath ¶
func (_u *AttachmentUpdateOne) ClearThumbnailPath() *AttachmentUpdateOne
ClearThumbnailPath clears the value of the "thumbnail_path" field.
func (*AttachmentUpdateOne) Exec ¶
func (_u *AttachmentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AttachmentUpdateOne) ExecX ¶
func (_u *AttachmentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachmentUpdateOne) Mutation ¶
func (_u *AttachmentUpdateOne) Mutation() *AttachmentMutation
Mutation returns the AttachmentMutation object of the builder.
func (*AttachmentUpdateOne) Save ¶
func (_u *AttachmentUpdateOne) Save(ctx context.Context) (*Attachment, error)
Save executes the query and returns the updated Attachment entity.
func (*AttachmentUpdateOne) SaveX ¶
func (_u *AttachmentUpdateOne) SaveX(ctx context.Context) *Attachment
SaveX is like Save, but panics if an error occurs.
func (*AttachmentUpdateOne) Select ¶
func (_u *AttachmentUpdateOne) Select(field string, fields ...string) *AttachmentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AttachmentUpdateOne) SetFilename ¶
func (_u *AttachmentUpdateOne) SetFilename(v string) *AttachmentUpdateOne
SetFilename sets the "filename" field.
func (*AttachmentUpdateOne) SetMessage ¶
func (_u *AttachmentUpdateOne) SetMessage(v *Message) *AttachmentUpdateOne
SetMessage sets the "message" edge to the Message entity.
func (*AttachmentUpdateOne) SetMessageID ¶
func (_u *AttachmentUpdateOne) SetMessageID(id uuid.UUID) *AttachmentUpdateOne
SetMessageID sets the "message" edge to the Message entity by ID.
func (*AttachmentUpdateOne) SetMimeType ¶
func (_u *AttachmentUpdateOne) SetMimeType(v string) *AttachmentUpdateOne
SetMimeType sets the "mime_type" field.
func (*AttachmentUpdateOne) SetNillableFilename ¶
func (_u *AttachmentUpdateOne) SetNillableFilename(v *string) *AttachmentUpdateOne
SetNillableFilename sets the "filename" field if the given value is not nil.
func (*AttachmentUpdateOne) SetNillableMimeType ¶
func (_u *AttachmentUpdateOne) SetNillableMimeType(v *string) *AttachmentUpdateOne
SetNillableMimeType sets the "mime_type" field if the given value is not nil.
func (*AttachmentUpdateOne) SetNillablePath ¶
func (_u *AttachmentUpdateOne) SetNillablePath(v *string) *AttachmentUpdateOne
SetNillablePath sets the "path" field if the given value is not nil.
func (*AttachmentUpdateOne) SetNillableSizeBytes ¶
func (_u *AttachmentUpdateOne) SetNillableSizeBytes(v *int64) *AttachmentUpdateOne
SetNillableSizeBytes sets the "size_bytes" field if the given value is not nil.
func (*AttachmentUpdateOne) SetNillableThumbnailPath ¶
func (_u *AttachmentUpdateOne) SetNillableThumbnailPath(v *string) *AttachmentUpdateOne
SetNillableThumbnailPath sets the "thumbnail_path" field if the given value is not nil.
func (*AttachmentUpdateOne) SetPath ¶
func (_u *AttachmentUpdateOne) SetPath(v string) *AttachmentUpdateOne
SetPath sets the "path" field.
func (*AttachmentUpdateOne) SetSizeBytes ¶
func (_u *AttachmentUpdateOne) SetSizeBytes(v int64) *AttachmentUpdateOne
SetSizeBytes sets the "size_bytes" field.
func (*AttachmentUpdateOne) SetThumbnailPath ¶
func (_u *AttachmentUpdateOne) SetThumbnailPath(v string) *AttachmentUpdateOne
SetThumbnailPath sets the "thumbnail_path" field.
func (*AttachmentUpdateOne) Where ¶
func (_u *AttachmentUpdateOne) Where(ps ...predicate.Attachment) *AttachmentUpdateOne
Where appends a list predicates to the AttachmentUpdate builder.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// Attachment is the client for interacting with the Attachment builders.
Attachment *AttachmentClient
// Comment is the client for interacting with the Comment builders.
Comment *CommentClient
// Message is the client for interacting with the Message builders.
Message *MessageClient
// Reaction is the client for interacting with the Reaction builders.
Reaction *ReactionClient
// ToolUsage is the client for interacting with the ToolUsage builders.
ToolUsage *ToolUsageClient
// 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(). Attachment. 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 Comment ¶ added in v1.7.0
type Comment struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// taskwarrior task UUID
Target string `json:"target,omitempty"`
// Author holds the value of the "author" field.
Author string `json:"author,omitempty"`
// Body holds the value of the "body" field.
Body string `json:"body,omitempty"`
// Round holds the value of the "round" field.
Round int `json:"round,omitempty"`
// Team holds the value of the "team" field.
Team string `json:"team,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// contains filtered or unexported fields
}
Comment is the model entity for the Comment schema.
func (*Comment) Unwrap ¶ added in v1.7.0
Unwrap unwraps the Comment 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 (*Comment) Update ¶ added in v1.7.0
func (_m *Comment) Update() *CommentUpdateOne
Update returns a builder for updating this Comment. Note that you need to call Comment.Unwrap() before calling this method if this Comment was returned from a transaction, and the transaction was committed or rolled back.
type CommentClient ¶ added in v1.7.0
type CommentClient struct {
// contains filtered or unexported fields
}
CommentClient is a client for the Comment schema.
func NewCommentClient ¶ added in v1.7.0
func NewCommentClient(c config) *CommentClient
NewCommentClient returns a client for the Comment from the given config.
func (*CommentClient) Create ¶ added in v1.7.0
func (c *CommentClient) Create() *CommentCreate
Create returns a builder for creating a Comment entity.
func (*CommentClient) CreateBulk ¶ added in v1.7.0
func (c *CommentClient) CreateBulk(builders ...*CommentCreate) *CommentCreateBulk
CreateBulk returns a builder for creating a bulk of Comment entities.
func (*CommentClient) Delete ¶ added in v1.7.0
func (c *CommentClient) Delete() *CommentDelete
Delete returns a delete builder for Comment.
func (*CommentClient) DeleteOne ¶ added in v1.7.0
func (c *CommentClient) DeleteOne(_m *Comment) *CommentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CommentClient) DeleteOneID ¶ added in v1.7.0
func (c *CommentClient) DeleteOneID(id uuid.UUID) *CommentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*CommentClient) Hooks ¶ added in v1.7.0
func (c *CommentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CommentClient) Intercept ¶ added in v1.7.0
func (c *CommentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `comment.Intercept(f(g(h())))`.
func (*CommentClient) Interceptors ¶ added in v1.7.0
func (c *CommentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*CommentClient) MapCreateBulk ¶ added in v1.7.0
func (c *CommentClient) MapCreateBulk(slice any, setFunc func(*CommentCreate, int)) *CommentCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*CommentClient) Query ¶ added in v1.7.0
func (c *CommentClient) Query() *CommentQuery
Query returns a query builder for Comment.
func (*CommentClient) Update ¶ added in v1.7.0
func (c *CommentClient) Update() *CommentUpdate
Update returns an update builder for Comment.
func (*CommentClient) UpdateOne ¶ added in v1.7.0
func (c *CommentClient) UpdateOne(_m *Comment) *CommentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CommentClient) UpdateOneID ¶ added in v1.7.0
func (c *CommentClient) UpdateOneID(id uuid.UUID) *CommentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CommentClient) Use ¶ added in v1.7.0
func (c *CommentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `comment.Hooks(f(g(h())))`.
type CommentCreate ¶ added in v1.7.0
type CommentCreate struct {
// contains filtered or unexported fields
}
CommentCreate is the builder for creating a Comment entity.
func (*CommentCreate) Exec ¶ added in v1.7.0
func (_c *CommentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CommentCreate) ExecX ¶ added in v1.7.0
func (_c *CommentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentCreate) Mutation ¶ added in v1.7.0
func (_c *CommentCreate) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
func (*CommentCreate) Save ¶ added in v1.7.0
func (_c *CommentCreate) Save(ctx context.Context) (*Comment, error)
Save creates the Comment in the database.
func (*CommentCreate) SaveX ¶ added in v1.7.0
func (_c *CommentCreate) SaveX(ctx context.Context) *Comment
SaveX calls Save and panics if Save returns an error.
func (*CommentCreate) SetAuthor ¶ added in v1.7.0
func (_c *CommentCreate) SetAuthor(v string) *CommentCreate
SetAuthor sets the "author" field.
func (*CommentCreate) SetBody ¶ added in v1.7.0
func (_c *CommentCreate) SetBody(v string) *CommentCreate
SetBody sets the "body" field.
func (*CommentCreate) SetCreatedAt ¶ added in v1.7.0
func (_c *CommentCreate) SetCreatedAt(v time.Time) *CommentCreate
SetCreatedAt sets the "created_at" field.
func (*CommentCreate) SetID ¶ added in v1.7.0
func (_c *CommentCreate) SetID(v uuid.UUID) *CommentCreate
SetID sets the "id" field.
func (*CommentCreate) SetNillableCreatedAt ¶ added in v1.7.0
func (_c *CommentCreate) SetNillableCreatedAt(v *time.Time) *CommentCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*CommentCreate) SetNillableID ¶ added in v1.7.0
func (_c *CommentCreate) SetNillableID(v *uuid.UUID) *CommentCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*CommentCreate) SetRound ¶ added in v1.7.0
func (_c *CommentCreate) SetRound(v int) *CommentCreate
SetRound sets the "round" field.
func (*CommentCreate) SetTarget ¶ added in v1.7.0
func (_c *CommentCreate) SetTarget(v string) *CommentCreate
SetTarget sets the "target" field.
func (*CommentCreate) SetTeam ¶ added in v1.7.0
func (_c *CommentCreate) SetTeam(v string) *CommentCreate
SetTeam sets the "team" field.
type CommentCreateBulk ¶ added in v1.7.0
type CommentCreateBulk struct {
// contains filtered or unexported fields
}
CommentCreateBulk is the builder for creating many Comment entities in bulk.
func (*CommentCreateBulk) Exec ¶ added in v1.7.0
func (_c *CommentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CommentCreateBulk) ExecX ¶ added in v1.7.0
func (_c *CommentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CommentDelete ¶ added in v1.7.0
type CommentDelete struct {
// contains filtered or unexported fields
}
CommentDelete is the builder for deleting a Comment entity.
func (*CommentDelete) Exec ¶ added in v1.7.0
func (_d *CommentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CommentDelete) ExecX ¶ added in v1.7.0
func (_d *CommentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CommentDelete) Where ¶ added in v1.7.0
func (_d *CommentDelete) Where(ps ...predicate.Comment) *CommentDelete
Where appends a list predicates to the CommentDelete builder.
type CommentDeleteOne ¶ added in v1.7.0
type CommentDeleteOne struct {
// contains filtered or unexported fields
}
CommentDeleteOne is the builder for deleting a single Comment entity.
func (*CommentDeleteOne) Exec ¶ added in v1.7.0
func (_d *CommentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CommentDeleteOne) ExecX ¶ added in v1.7.0
func (_d *CommentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentDeleteOne) Where ¶ added in v1.7.0
func (_d *CommentDeleteOne) Where(ps ...predicate.Comment) *CommentDeleteOne
Where appends a list predicates to the CommentDelete builder.
type CommentGroupBy ¶ added in v1.7.0
type CommentGroupBy struct {
// contains filtered or unexported fields
}
CommentGroupBy is the group-by builder for Comment entities.
func (*CommentGroupBy) Aggregate ¶ added in v1.7.0
func (_g *CommentGroupBy) Aggregate(fns ...AggregateFunc) *CommentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CommentGroupBy) Bool ¶ added in v1.7.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Bools ¶ added in v1.7.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) BoolsX ¶ added in v1.7.0
BoolsX is like Bools, but panics if an error occurs.
func (*CommentGroupBy) Float64 ¶ added in v1.7.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Float64X ¶ added in v1.7.0
Float64X is like Float64, but panics if an error occurs.
func (*CommentGroupBy) Float64s ¶ added in v1.7.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Float64sX ¶ added in v1.7.0
Float64sX is like Float64s, but panics if an error occurs.
func (*CommentGroupBy) Int ¶ added in v1.7.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Ints ¶ added in v1.7.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) Scan ¶ added in v1.7.0
func (_g *CommentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CommentGroupBy) String ¶ added in v1.7.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*CommentGroupBy) StringX ¶ added in v1.7.0
StringX is like String, but panics if an error occurs.
type CommentMutation ¶ added in v1.7.0
type CommentMutation struct {
// contains filtered or unexported fields
}
CommentMutation represents an operation that mutates the Comment nodes in the graph.
func (*CommentMutation) AddField ¶ added in v1.7.0
func (m *CommentMutation) 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 (*CommentMutation) AddRound ¶ added in v1.7.0
func (m *CommentMutation) AddRound(i int)
AddRound adds i to the "round" field.
func (*CommentMutation) AddedEdges ¶ added in v1.7.0
func (m *CommentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CommentMutation) AddedField ¶ added in v1.7.0
func (m *CommentMutation) 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 (*CommentMutation) AddedFields ¶ added in v1.7.0
func (m *CommentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CommentMutation) AddedIDs ¶ added in v1.7.0
func (m *CommentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CommentMutation) AddedRound ¶ added in v1.7.0
func (m *CommentMutation) AddedRound() (r int, exists bool)
AddedRound returns the value that was added to the "round" field in this mutation.
func (*CommentMutation) Author ¶ added in v1.7.0
func (m *CommentMutation) Author() (r string, exists bool)
Author returns the value of the "author" field in the mutation.
func (*CommentMutation) Body ¶ added in v1.7.0
func (m *CommentMutation) Body() (r string, exists bool)
Body returns the value of the "body" field in the mutation.
func (*CommentMutation) ClearEdge ¶ added in v1.7.0
func (m *CommentMutation) 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 (*CommentMutation) ClearField ¶ added in v1.7.0
func (m *CommentMutation) 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 (*CommentMutation) ClearedEdges ¶ added in v1.7.0
func (m *CommentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CommentMutation) ClearedFields ¶ added in v1.7.0
func (m *CommentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CommentMutation) Client ¶ added in v1.7.0
func (m CommentMutation) 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 (*CommentMutation) CreatedAt ¶ added in v1.7.0
func (m *CommentMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*CommentMutation) EdgeCleared ¶ added in v1.7.0
func (m *CommentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CommentMutation) Field ¶ added in v1.7.0
func (m *CommentMutation) 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 (*CommentMutation) FieldCleared ¶ added in v1.7.0
func (m *CommentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CommentMutation) Fields ¶ added in v1.7.0
func (m *CommentMutation) 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 (*CommentMutation) ID ¶ added in v1.7.0
func (m *CommentMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*CommentMutation) IDs ¶ added in v1.7.0
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 (*CommentMutation) OldAuthor ¶ added in v1.7.0
func (m *CommentMutation) OldAuthor(ctx context.Context) (v string, err error)
OldAuthor returns the old "author" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldBody ¶ added in v1.7.0
func (m *CommentMutation) OldBody(ctx context.Context) (v string, err error)
OldBody returns the old "body" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldCreatedAt ¶ added in v1.7.0
OldCreatedAt returns the old "created_at" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldField ¶ added in v1.7.0
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 (*CommentMutation) OldRound ¶ added in v1.7.0
func (m *CommentMutation) OldRound(ctx context.Context) (v int, err error)
OldRound returns the old "round" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldTarget ¶ added in v1.7.0
func (m *CommentMutation) OldTarget(ctx context.Context) (v string, err error)
OldTarget returns the old "target" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) OldTeam ¶ added in v1.7.0
func (m *CommentMutation) OldTeam(ctx context.Context) (v string, err error)
OldTeam returns the old "team" field's value of the Comment entity. If the Comment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*CommentMutation) Op ¶ added in v1.7.0
func (m *CommentMutation) Op() Op
Op returns the operation name.
func (*CommentMutation) RemovedEdges ¶ added in v1.7.0
func (m *CommentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CommentMutation) RemovedIDs ¶ added in v1.7.0
func (m *CommentMutation) 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 (*CommentMutation) ResetAuthor ¶ added in v1.7.0
func (m *CommentMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" field.
func (*CommentMutation) ResetBody ¶ added in v1.7.0
func (m *CommentMutation) ResetBody()
ResetBody resets all changes to the "body" field.
func (*CommentMutation) ResetCreatedAt ¶ added in v1.7.0
func (m *CommentMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*CommentMutation) ResetEdge ¶ added in v1.7.0
func (m *CommentMutation) 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 (*CommentMutation) ResetField ¶ added in v1.7.0
func (m *CommentMutation) 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 (*CommentMutation) ResetRound ¶ added in v1.7.0
func (m *CommentMutation) ResetRound()
ResetRound resets all changes to the "round" field.
func (*CommentMutation) ResetTarget ¶ added in v1.7.0
func (m *CommentMutation) ResetTarget()
ResetTarget resets all changes to the "target" field.
func (*CommentMutation) ResetTeam ¶ added in v1.7.0
func (m *CommentMutation) ResetTeam()
ResetTeam resets all changes to the "team" field.
func (*CommentMutation) Round ¶ added in v1.7.0
func (m *CommentMutation) Round() (r int, exists bool)
Round returns the value of the "round" field in the mutation.
func (*CommentMutation) SetAuthor ¶ added in v1.7.0
func (m *CommentMutation) SetAuthor(s string)
SetAuthor sets the "author" field.
func (*CommentMutation) SetBody ¶ added in v1.7.0
func (m *CommentMutation) SetBody(s string)
SetBody sets the "body" field.
func (*CommentMutation) SetCreatedAt ¶ added in v1.7.0
func (m *CommentMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*CommentMutation) SetField ¶ added in v1.7.0
func (m *CommentMutation) 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 (*CommentMutation) SetID ¶ added in v1.7.0
func (m *CommentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Comment entities.
func (*CommentMutation) SetOp ¶ added in v1.7.0
func (m *CommentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*CommentMutation) SetRound ¶ added in v1.7.0
func (m *CommentMutation) SetRound(i int)
SetRound sets the "round" field.
func (*CommentMutation) SetTarget ¶ added in v1.7.0
func (m *CommentMutation) SetTarget(s string)
SetTarget sets the "target" field.
func (*CommentMutation) SetTeam ¶ added in v1.7.0
func (m *CommentMutation) SetTeam(s string)
SetTeam sets the "team" field.
func (*CommentMutation) Target ¶ added in v1.7.0
func (m *CommentMutation) Target() (r string, exists bool)
Target returns the value of the "target" field in the mutation.
func (*CommentMutation) Team ¶ added in v1.7.0
func (m *CommentMutation) Team() (r string, exists bool)
Team returns the value of the "team" field in the mutation.
func (CommentMutation) Tx ¶ added in v1.7.0
func (m CommentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CommentMutation) Type ¶ added in v1.7.0
func (m *CommentMutation) Type() string
Type returns the node type of this mutation (Comment).
func (*CommentMutation) Where ¶ added in v1.7.0
func (m *CommentMutation) Where(ps ...predicate.Comment)
Where appends a list predicates to the CommentMutation builder.
func (*CommentMutation) WhereP ¶ added in v1.7.0
func (m *CommentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the CommentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type CommentQuery ¶ added in v1.7.0
type CommentQuery struct {
// contains filtered or unexported fields
}
CommentQuery is the builder for querying Comment entities.
func (*CommentQuery) Aggregate ¶ added in v1.7.0
func (_q *CommentQuery) Aggregate(fns ...AggregateFunc) *CommentSelect
Aggregate returns a CommentSelect configured with the given aggregations.
func (*CommentQuery) All ¶ added in v1.7.0
func (_q *CommentQuery) All(ctx context.Context) ([]*Comment, error)
All executes the query and returns a list of Comments.
func (*CommentQuery) AllX ¶ added in v1.7.0
func (_q *CommentQuery) AllX(ctx context.Context) []*Comment
AllX is like All, but panics if an error occurs.
func (*CommentQuery) Clone ¶ added in v1.7.0
func (_q *CommentQuery) Clone() *CommentQuery
Clone returns a duplicate of the CommentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CommentQuery) Count ¶ added in v1.7.0
func (_q *CommentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CommentQuery) CountX ¶ added in v1.7.0
func (_q *CommentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CommentQuery) Exist ¶ added in v1.7.0
func (_q *CommentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CommentQuery) ExistX ¶ added in v1.7.0
func (_q *CommentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CommentQuery) First ¶ added in v1.7.0
func (_q *CommentQuery) First(ctx context.Context) (*Comment, error)
First returns the first Comment entity from the query. Returns a *NotFoundError when no Comment was found.
func (*CommentQuery) FirstID ¶ added in v1.7.0
FirstID returns the first Comment ID from the query. Returns a *NotFoundError when no Comment ID was found.
func (*CommentQuery) FirstIDX ¶ added in v1.7.0
func (_q *CommentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*CommentQuery) FirstX ¶ added in v1.7.0
func (_q *CommentQuery) FirstX(ctx context.Context) *Comment
FirstX is like First, but panics if an error occurs.
func (*CommentQuery) GroupBy ¶ added in v1.7.0
func (_q *CommentQuery) GroupBy(field string, fields ...string) *CommentGroupBy
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 {
Target string `json:"target,omitempty"`
Count int `json:"count,omitempty"`
}
client.Comment.Query().
GroupBy(comment.FieldTarget).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*CommentQuery) IDs ¶ added in v1.7.0
IDs executes the query and returns a list of Comment IDs.
func (*CommentQuery) IDsX ¶ added in v1.7.0
func (_q *CommentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*CommentQuery) Limit ¶ added in v1.7.0
func (_q *CommentQuery) Limit(limit int) *CommentQuery
Limit the number of records to be returned by this query.
func (*CommentQuery) Offset ¶ added in v1.7.0
func (_q *CommentQuery) Offset(offset int) *CommentQuery
Offset to start from.
func (*CommentQuery) Only ¶ added in v1.7.0
func (_q *CommentQuery) Only(ctx context.Context) (*Comment, error)
Only returns a single Comment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Comment entity is found. Returns a *NotFoundError when no Comment entities are found.
func (*CommentQuery) OnlyID ¶ added in v1.7.0
OnlyID is like Only, but returns the only Comment ID in the query. Returns a *NotSingularError when more than one Comment ID is found. Returns a *NotFoundError when no entities are found.
func (*CommentQuery) OnlyIDX ¶ added in v1.7.0
func (_q *CommentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CommentQuery) OnlyX ¶ added in v1.7.0
func (_q *CommentQuery) OnlyX(ctx context.Context) *Comment
OnlyX is like Only, but panics if an error occurs.
func (*CommentQuery) Order ¶ added in v1.7.0
func (_q *CommentQuery) Order(o ...comment.OrderOption) *CommentQuery
Order specifies how the records should be ordered.
func (*CommentQuery) Select ¶ added in v1.7.0
func (_q *CommentQuery) Select(fields ...string) *CommentSelect
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 {
Target string `json:"target,omitempty"`
}
client.Comment.Query().
Select(comment.FieldTarget).
Scan(ctx, &v)
func (*CommentQuery) Unique ¶ added in v1.7.0
func (_q *CommentQuery) Unique(unique bool) *CommentQuery
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 (*CommentQuery) Where ¶ added in v1.7.0
func (_q *CommentQuery) Where(ps ...predicate.Comment) *CommentQuery
Where adds a new predicate for the CommentQuery builder.
type CommentSelect ¶ added in v1.7.0
type CommentSelect struct {
*CommentQuery
// contains filtered or unexported fields
}
CommentSelect is the builder for selecting fields of Comment entities.
func (*CommentSelect) Aggregate ¶ added in v1.7.0
func (_s *CommentSelect) Aggregate(fns ...AggregateFunc) *CommentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*CommentSelect) Bool ¶ added in v1.7.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Bools ¶ added in v1.7.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Float64 ¶ added in v1.7.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Float64X ¶ added in v1.7.0
Float64X is like Float64, but panics if an error occurs.
func (*CommentSelect) Float64s ¶ added in v1.7.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Float64sX ¶ added in v1.7.0
Float64sX is like Float64s, but panics if an error occurs.
func (*CommentSelect) Int ¶ added in v1.7.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Ints ¶ added in v1.7.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CommentSelect) Scan ¶ added in v1.7.0
func (_s *CommentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CommentSelect) String ¶ added in v1.7.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*CommentSelect) StringX ¶ added in v1.7.0
StringX is like String, but panics if an error occurs.
type CommentUpdate ¶ added in v1.7.0
type CommentUpdate struct {
// contains filtered or unexported fields
}
CommentUpdate is the builder for updating Comment entities.
func (*CommentUpdate) AddRound ¶ added in v1.7.0
func (_u *CommentUpdate) AddRound(v int) *CommentUpdate
AddRound adds value to the "round" field.
func (*CommentUpdate) Exec ¶ added in v1.7.0
func (_u *CommentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CommentUpdate) ExecX ¶ added in v1.7.0
func (_u *CommentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentUpdate) Mutation ¶ added in v1.7.0
func (_u *CommentUpdate) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
func (*CommentUpdate) Save ¶ added in v1.7.0
func (_u *CommentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CommentUpdate) SaveX ¶ added in v1.7.0
func (_u *CommentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CommentUpdate) SetAuthor ¶ added in v1.7.0
func (_u *CommentUpdate) SetAuthor(v string) *CommentUpdate
SetAuthor sets the "author" field.
func (*CommentUpdate) SetBody ¶ added in v1.7.0
func (_u *CommentUpdate) SetBody(v string) *CommentUpdate
SetBody sets the "body" field.
func (*CommentUpdate) SetNillableAuthor ¶ added in v1.7.0
func (_u *CommentUpdate) SetNillableAuthor(v *string) *CommentUpdate
SetNillableAuthor sets the "author" field if the given value is not nil.
func (*CommentUpdate) SetNillableBody ¶ added in v1.7.0
func (_u *CommentUpdate) SetNillableBody(v *string) *CommentUpdate
SetNillableBody sets the "body" field if the given value is not nil.
func (*CommentUpdate) SetNillableRound ¶ added in v1.7.0
func (_u *CommentUpdate) SetNillableRound(v *int) *CommentUpdate
SetNillableRound sets the "round" field if the given value is not nil.
func (*CommentUpdate) SetNillableTarget ¶ added in v1.7.0
func (_u *CommentUpdate) SetNillableTarget(v *string) *CommentUpdate
SetNillableTarget sets the "target" field if the given value is not nil.
func (*CommentUpdate) SetNillableTeam ¶ added in v1.7.0
func (_u *CommentUpdate) SetNillableTeam(v *string) *CommentUpdate
SetNillableTeam sets the "team" field if the given value is not nil.
func (*CommentUpdate) SetRound ¶ added in v1.7.0
func (_u *CommentUpdate) SetRound(v int) *CommentUpdate
SetRound sets the "round" field.
func (*CommentUpdate) SetTarget ¶ added in v1.7.0
func (_u *CommentUpdate) SetTarget(v string) *CommentUpdate
SetTarget sets the "target" field.
func (*CommentUpdate) SetTeam ¶ added in v1.7.0
func (_u *CommentUpdate) SetTeam(v string) *CommentUpdate
SetTeam sets the "team" field.
func (*CommentUpdate) Where ¶ added in v1.7.0
func (_u *CommentUpdate) Where(ps ...predicate.Comment) *CommentUpdate
Where appends a list predicates to the CommentUpdate builder.
type CommentUpdateOne ¶ added in v1.7.0
type CommentUpdateOne struct {
// contains filtered or unexported fields
}
CommentUpdateOne is the builder for updating a single Comment entity.
func (*CommentUpdateOne) AddRound ¶ added in v1.7.0
func (_u *CommentUpdateOne) AddRound(v int) *CommentUpdateOne
AddRound adds value to the "round" field.
func (*CommentUpdateOne) Exec ¶ added in v1.7.0
func (_u *CommentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CommentUpdateOne) ExecX ¶ added in v1.7.0
func (_u *CommentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CommentUpdateOne) Mutation ¶ added in v1.7.0
func (_u *CommentUpdateOne) Mutation() *CommentMutation
Mutation returns the CommentMutation object of the builder.
func (*CommentUpdateOne) Save ¶ added in v1.7.0
func (_u *CommentUpdateOne) Save(ctx context.Context) (*Comment, error)
Save executes the query and returns the updated Comment entity.
func (*CommentUpdateOne) SaveX ¶ added in v1.7.0
func (_u *CommentUpdateOne) SaveX(ctx context.Context) *Comment
SaveX is like Save, but panics if an error occurs.
func (*CommentUpdateOne) Select ¶ added in v1.7.0
func (_u *CommentUpdateOne) Select(field string, fields ...string) *CommentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CommentUpdateOne) SetAuthor ¶ added in v1.7.0
func (_u *CommentUpdateOne) SetAuthor(v string) *CommentUpdateOne
SetAuthor sets the "author" field.
func (*CommentUpdateOne) SetBody ¶ added in v1.7.0
func (_u *CommentUpdateOne) SetBody(v string) *CommentUpdateOne
SetBody sets the "body" field.
func (*CommentUpdateOne) SetNillableAuthor ¶ added in v1.7.0
func (_u *CommentUpdateOne) SetNillableAuthor(v *string) *CommentUpdateOne
SetNillableAuthor sets the "author" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableBody ¶ added in v1.7.0
func (_u *CommentUpdateOne) SetNillableBody(v *string) *CommentUpdateOne
SetNillableBody sets the "body" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableRound ¶ added in v1.7.0
func (_u *CommentUpdateOne) SetNillableRound(v *int) *CommentUpdateOne
SetNillableRound sets the "round" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableTarget ¶ added in v1.7.0
func (_u *CommentUpdateOne) SetNillableTarget(v *string) *CommentUpdateOne
SetNillableTarget sets the "target" field if the given value is not nil.
func (*CommentUpdateOne) SetNillableTeam ¶ added in v1.7.0
func (_u *CommentUpdateOne) SetNillableTeam(v *string) *CommentUpdateOne
SetNillableTeam sets the "team" field if the given value is not nil.
func (*CommentUpdateOne) SetRound ¶ added in v1.7.0
func (_u *CommentUpdateOne) SetRound(v int) *CommentUpdateOne
SetRound sets the "round" field.
func (*CommentUpdateOne) SetTarget ¶ added in v1.7.0
func (_u *CommentUpdateOne) SetTarget(v string) *CommentUpdateOne
SetTarget sets the "target" field.
func (*CommentUpdateOne) SetTeam ¶ added in v1.7.0
func (_u *CommentUpdateOne) SetTeam(v string) *CommentUpdateOne
SetTeam sets the "team" field.
func (*CommentUpdateOne) Where ¶ added in v1.7.0
func (_u *CommentUpdateOne) Where(ps ...predicate.Comment) *CommentUpdateOne
Where appends a list predicates to the CommentUpdate builder.
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 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 Message ¶
type Message struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Sender holds the value of the "sender" field.
Sender string `json:"sender,omitempty"`
// use 'broadcast' for broadcast messages
Recipient string `json:"recipient,omitempty"`
// Content holds the value of the "content" field.
Content string `json:"content,omitempty"`
// MessageType holds the value of the "message_type" field.
MessageType message.MessageType `json:"message_type,omitempty"`
// Team holds the value of the "team" field.
Team string `json:"team,omitempty"`
// Channel holds the value of the "channel" field.
Channel message.Channel `json:"channel,omitempty"`
// optional — nil for human messages
Runtime string `json:"runtime,omitempty"`
// ReplyToID holds the value of the "reply_to_id" field.
ReplyToID *uuid.UUID `json:"reply_to_id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the MessageQuery when eager-loading is set.
Edges MessageEdges `json:"edges"`
// contains filtered or unexported fields
}
Message is the model entity for the Message schema.
func (*Message) QueryAttachments ¶
func (_m *Message) QueryAttachments() *AttachmentQuery
QueryAttachments queries the "attachments" edge of the Message entity.
func (*Message) QueryReactions ¶
func (_m *Message) QueryReactions() *ReactionQuery
QueryReactions queries the "reactions" edge of the Message entity.
func (*Message) Unwrap ¶
Unwrap unwraps the Message 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 (*Message) Update ¶
func (_m *Message) Update() *MessageUpdateOne
Update returns a builder for updating this Message. Note that you need to call Message.Unwrap() before calling this method if this Message was returned from a transaction, and the transaction was committed or rolled back.
type MessageClient ¶
type MessageClient struct {
// contains filtered or unexported fields
}
MessageClient is a client for the Message schema.
func NewMessageClient ¶
func NewMessageClient(c config) *MessageClient
NewMessageClient returns a client for the Message from the given config.
func (*MessageClient) Create ¶
func (c *MessageClient) Create() *MessageCreate
Create returns a builder for creating a Message entity.
func (*MessageClient) CreateBulk ¶
func (c *MessageClient) CreateBulk(builders ...*MessageCreate) *MessageCreateBulk
CreateBulk returns a builder for creating a bulk of Message entities.
func (*MessageClient) Delete ¶
func (c *MessageClient) Delete() *MessageDelete
Delete returns a delete builder for Message.
func (*MessageClient) DeleteOne ¶
func (c *MessageClient) DeleteOne(_m *Message) *MessageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MessageClient) DeleteOneID ¶
func (c *MessageClient) DeleteOneID(id uuid.UUID) *MessageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MessageClient) Hooks ¶
func (c *MessageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MessageClient) Intercept ¶
func (c *MessageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `message.Intercept(f(g(h())))`.
func (*MessageClient) Interceptors ¶
func (c *MessageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MessageClient) MapCreateBulk ¶
func (c *MessageClient) MapCreateBulk(slice any, setFunc func(*MessageCreate, int)) *MessageCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*MessageClient) Query ¶
func (c *MessageClient) Query() *MessageQuery
Query returns a query builder for Message.
func (*MessageClient) QueryAttachments ¶
func (c *MessageClient) QueryAttachments(_m *Message) *AttachmentQuery
QueryAttachments queries the attachments edge of a Message.
func (*MessageClient) QueryReactions ¶
func (c *MessageClient) QueryReactions(_m *Message) *ReactionQuery
QueryReactions queries the reactions edge of a Message.
func (*MessageClient) Update ¶
func (c *MessageClient) Update() *MessageUpdate
Update returns an update builder for Message.
func (*MessageClient) UpdateOne ¶
func (c *MessageClient) UpdateOne(_m *Message) *MessageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MessageClient) UpdateOneID ¶
func (c *MessageClient) UpdateOneID(id uuid.UUID) *MessageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MessageClient) Use ¶
func (c *MessageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `message.Hooks(f(g(h())))`.
type MessageCreate ¶
type MessageCreate struct {
// contains filtered or unexported fields
}
MessageCreate is the builder for creating a Message entity.
func (*MessageCreate) AddAttachmentIDs ¶
func (_c *MessageCreate) AddAttachmentIDs(ids ...uuid.UUID) *MessageCreate
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.
func (*MessageCreate) AddAttachments ¶
func (_c *MessageCreate) AddAttachments(v ...*Attachment) *MessageCreate
AddAttachments adds the "attachments" edges to the Attachment entity.
func (*MessageCreate) AddReactionIDs ¶
func (_c *MessageCreate) AddReactionIDs(ids ...uuid.UUID) *MessageCreate
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*MessageCreate) AddReactions ¶
func (_c *MessageCreate) AddReactions(v ...*Reaction) *MessageCreate
AddReactions adds the "reactions" edges to the Reaction entity.
func (*MessageCreate) Exec ¶
func (_c *MessageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreate) ExecX ¶
func (_c *MessageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageCreate) Mutation ¶
func (_c *MessageCreate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageCreate) Save ¶
func (_c *MessageCreate) Save(ctx context.Context) (*Message, error)
Save creates the Message in the database.
func (*MessageCreate) SaveX ¶
func (_c *MessageCreate) SaveX(ctx context.Context) *Message
SaveX calls Save and panics if Save returns an error.
func (*MessageCreate) SetChannel ¶
func (_c *MessageCreate) SetChannel(v message.Channel) *MessageCreate
SetChannel sets the "channel" field.
func (*MessageCreate) SetContent ¶
func (_c *MessageCreate) SetContent(v string) *MessageCreate
SetContent sets the "content" field.
func (*MessageCreate) SetCreatedAt ¶
func (_c *MessageCreate) SetCreatedAt(v time.Time) *MessageCreate
SetCreatedAt sets the "created_at" field.
func (*MessageCreate) SetID ¶
func (_c *MessageCreate) SetID(v uuid.UUID) *MessageCreate
SetID sets the "id" field.
func (*MessageCreate) SetMessageType ¶
func (_c *MessageCreate) SetMessageType(v message.MessageType) *MessageCreate
SetMessageType sets the "message_type" field.
func (*MessageCreate) SetNillableCreatedAt ¶
func (_c *MessageCreate) SetNillableCreatedAt(v *time.Time) *MessageCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MessageCreate) SetNillableID ¶
func (_c *MessageCreate) SetNillableID(v *uuid.UUID) *MessageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*MessageCreate) SetNillableMessageType ¶
func (_c *MessageCreate) SetNillableMessageType(v *message.MessageType) *MessageCreate
SetNillableMessageType sets the "message_type" field if the given value is not nil.
func (*MessageCreate) SetNillableReplyToID ¶
func (_c *MessageCreate) SetNillableReplyToID(v *uuid.UUID) *MessageCreate
SetNillableReplyToID sets the "reply_to_id" field if the given value is not nil.
func (*MessageCreate) SetNillableRuntime ¶
func (_c *MessageCreate) SetNillableRuntime(v *string) *MessageCreate
SetNillableRuntime sets the "runtime" field if the given value is not nil.
func (*MessageCreate) SetRecipient ¶
func (_c *MessageCreate) SetRecipient(v string) *MessageCreate
SetRecipient sets the "recipient" field.
func (*MessageCreate) SetReplyToID ¶
func (_c *MessageCreate) SetReplyToID(v uuid.UUID) *MessageCreate
SetReplyToID sets the "reply_to_id" field.
func (*MessageCreate) SetRuntime ¶
func (_c *MessageCreate) SetRuntime(v string) *MessageCreate
SetRuntime sets the "runtime" field.
func (*MessageCreate) SetSender ¶
func (_c *MessageCreate) SetSender(v string) *MessageCreate
SetSender sets the "sender" field.
func (*MessageCreate) SetTeam ¶
func (_c *MessageCreate) SetTeam(v string) *MessageCreate
SetTeam sets the "team" field.
type MessageCreateBulk ¶
type MessageCreateBulk struct {
// contains filtered or unexported fields
}
MessageCreateBulk is the builder for creating many Message entities in bulk.
func (*MessageCreateBulk) Exec ¶
func (_c *MessageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageCreateBulk) ExecX ¶
func (_c *MessageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MessageDelete ¶
type MessageDelete struct {
// contains filtered or unexported fields
}
MessageDelete is the builder for deleting a Message entity.
func (*MessageDelete) Exec ¶
func (_d *MessageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MessageDelete) ExecX ¶
func (_d *MessageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MessageDelete) Where ¶
func (_d *MessageDelete) Where(ps ...predicate.Message) *MessageDelete
Where appends a list predicates to the MessageDelete builder.
type MessageDeleteOne ¶
type MessageDeleteOne struct {
// contains filtered or unexported fields
}
MessageDeleteOne is the builder for deleting a single Message entity.
func (*MessageDeleteOne) Exec ¶
func (_d *MessageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MessageDeleteOne) ExecX ¶
func (_d *MessageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageDeleteOne) Where ¶
func (_d *MessageDeleteOne) Where(ps ...predicate.Message) *MessageDeleteOne
Where appends a list predicates to the MessageDelete builder.
type MessageEdges ¶
type MessageEdges struct {
// Attachments holds the value of the attachments edge.
Attachments []*Attachment `json:"attachments,omitempty"`
// Reactions holds the value of the reactions edge.
Reactions []*Reaction `json:"reactions,omitempty"`
// contains filtered or unexported fields
}
MessageEdges holds the relations/edges for other nodes in the graph.
func (MessageEdges) AttachmentsOrErr ¶
func (e MessageEdges) AttachmentsOrErr() ([]*Attachment, error)
AttachmentsOrErr returns the Attachments value or an error if the edge was not loaded in eager-loading.
func (MessageEdges) ReactionsOrErr ¶
func (e MessageEdges) ReactionsOrErr() ([]*Reaction, error)
ReactionsOrErr returns the Reactions value or an error if the edge was not loaded in eager-loading.
type MessageGroupBy ¶
type MessageGroupBy struct {
// contains filtered or unexported fields
}
MessageGroupBy is the group-by builder for Message entities.
func (*MessageGroupBy) Aggregate ¶
func (_g *MessageGroupBy) Aggregate(fns ...AggregateFunc) *MessageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MessageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageGroupBy) Scan ¶
func (_g *MessageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageMutation ¶
type MessageMutation struct {
// contains filtered or unexported fields
}
MessageMutation represents an operation that mutates the Message nodes in the graph.
func (*MessageMutation) AddAttachmentIDs ¶
func (m *MessageMutation) AddAttachmentIDs(ids ...uuid.UUID)
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by ids.
func (*MessageMutation) AddField ¶
func (m *MessageMutation) 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 (*MessageMutation) AddReactionIDs ¶
func (m *MessageMutation) AddReactionIDs(ids ...uuid.UUID)
AddReactionIDs adds the "reactions" edge to the Reaction entity by ids.
func (*MessageMutation) AddedEdges ¶
func (m *MessageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MessageMutation) AddedField ¶
func (m *MessageMutation) 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 (*MessageMutation) AddedFields ¶
func (m *MessageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MessageMutation) AddedIDs ¶
func (m *MessageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MessageMutation) AttachmentsCleared ¶
func (m *MessageMutation) AttachmentsCleared() bool
AttachmentsCleared reports if the "attachments" edge to the Attachment entity was cleared.
func (*MessageMutation) AttachmentsIDs ¶
func (m *MessageMutation) AttachmentsIDs() (ids []uuid.UUID)
AttachmentsIDs returns the "attachments" edge IDs in the mutation.
func (*MessageMutation) Channel ¶
func (m *MessageMutation) Channel() (r message.Channel, exists bool)
Channel returns the value of the "channel" field in the mutation.
func (*MessageMutation) ClearAttachments ¶
func (m *MessageMutation) ClearAttachments()
ClearAttachments clears the "attachments" edge to the Attachment entity.
func (*MessageMutation) ClearEdge ¶
func (m *MessageMutation) 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 (*MessageMutation) ClearField ¶
func (m *MessageMutation) 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 (*MessageMutation) ClearReactions ¶
func (m *MessageMutation) ClearReactions()
ClearReactions clears the "reactions" edge to the Reaction entity.
func (*MessageMutation) ClearReplyToID ¶
func (m *MessageMutation) ClearReplyToID()
ClearReplyToID clears the value of the "reply_to_id" field.
func (*MessageMutation) ClearRuntime ¶
func (m *MessageMutation) ClearRuntime()
ClearRuntime clears the value of the "runtime" field.
func (*MessageMutation) ClearedEdges ¶
func (m *MessageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MessageMutation) ClearedFields ¶
func (m *MessageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MessageMutation) Client ¶
func (m MessageMutation) 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 (*MessageMutation) Content ¶
func (m *MessageMutation) Content() (r string, exists bool)
Content returns the value of the "content" field in the mutation.
func (*MessageMutation) CreatedAt ¶
func (m *MessageMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MessageMutation) EdgeCleared ¶
func (m *MessageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MessageMutation) Field ¶
func (m *MessageMutation) 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 (*MessageMutation) FieldCleared ¶
func (m *MessageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MessageMutation) Fields ¶
func (m *MessageMutation) 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 (*MessageMutation) ID ¶
func (m *MessageMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MessageMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MessageMutation) MessageType ¶
func (m *MessageMutation) MessageType() (r message.MessageType, exists bool)
MessageType returns the value of the "message_type" field in the mutation.
func (*MessageMutation) OldChannel ¶
OldChannel returns the old "channel" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldContent ¶
func (m *MessageMutation) OldContent(ctx context.Context) (v string, err error)
OldContent returns the old "content" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) 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 (*MessageMutation) OldMessageType ¶
func (m *MessageMutation) OldMessageType(ctx context.Context) (v message.MessageType, err error)
OldMessageType returns the old "message_type" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldRecipient ¶
func (m *MessageMutation) OldRecipient(ctx context.Context) (v string, err error)
OldRecipient returns the old "recipient" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldReplyToID ¶
OldReplyToID returns the old "reply_to_id" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldRuntime ¶
func (m *MessageMutation) OldRuntime(ctx context.Context) (v string, err error)
OldRuntime returns the old "runtime" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldSender ¶
func (m *MessageMutation) OldSender(ctx context.Context) (v string, err error)
OldSender returns the old "sender" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) OldTeam ¶
func (m *MessageMutation) OldTeam(ctx context.Context) (v string, err error)
OldTeam returns the old "team" field's value of the Message entity. If the Message object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MessageMutation) ReactionsCleared ¶
func (m *MessageMutation) ReactionsCleared() bool
ReactionsCleared reports if the "reactions" edge to the Reaction entity was cleared.
func (*MessageMutation) ReactionsIDs ¶
func (m *MessageMutation) ReactionsIDs() (ids []uuid.UUID)
ReactionsIDs returns the "reactions" edge IDs in the mutation.
func (*MessageMutation) Recipient ¶
func (m *MessageMutation) Recipient() (r string, exists bool)
Recipient returns the value of the "recipient" field in the mutation.
func (*MessageMutation) RemoveAttachmentIDs ¶
func (m *MessageMutation) RemoveAttachmentIDs(ids ...uuid.UUID)
RemoveAttachmentIDs removes the "attachments" edge to the Attachment entity by IDs.
func (*MessageMutation) RemoveReactionIDs ¶
func (m *MessageMutation) RemoveReactionIDs(ids ...uuid.UUID)
RemoveReactionIDs removes the "reactions" edge to the Reaction entity by IDs.
func (*MessageMutation) RemovedAttachmentsIDs ¶
func (m *MessageMutation) RemovedAttachmentsIDs() (ids []uuid.UUID)
RemovedAttachments returns the removed IDs of the "attachments" edge to the Attachment entity.
func (*MessageMutation) RemovedEdges ¶
func (m *MessageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MessageMutation) RemovedIDs ¶
func (m *MessageMutation) 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 (*MessageMutation) RemovedReactionsIDs ¶
func (m *MessageMutation) RemovedReactionsIDs() (ids []uuid.UUID)
RemovedReactions returns the removed IDs of the "reactions" edge to the Reaction entity.
func (*MessageMutation) ReplyToID ¶
func (m *MessageMutation) ReplyToID() (r uuid.UUID, exists bool)
ReplyToID returns the value of the "reply_to_id" field in the mutation.
func (*MessageMutation) ReplyToIDCleared ¶
func (m *MessageMutation) ReplyToIDCleared() bool
ReplyToIDCleared returns if the "reply_to_id" field was cleared in this mutation.
func (*MessageMutation) ResetAttachments ¶
func (m *MessageMutation) ResetAttachments()
ResetAttachments resets all changes to the "attachments" edge.
func (*MessageMutation) ResetChannel ¶
func (m *MessageMutation) ResetChannel()
ResetChannel resets all changes to the "channel" field.
func (*MessageMutation) ResetContent ¶
func (m *MessageMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*MessageMutation) ResetCreatedAt ¶
func (m *MessageMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MessageMutation) ResetEdge ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetField ¶
func (m *MessageMutation) 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 (*MessageMutation) ResetMessageType ¶
func (m *MessageMutation) ResetMessageType()
ResetMessageType resets all changes to the "message_type" field.
func (*MessageMutation) ResetReactions ¶
func (m *MessageMutation) ResetReactions()
ResetReactions resets all changes to the "reactions" edge.
func (*MessageMutation) ResetRecipient ¶
func (m *MessageMutation) ResetRecipient()
ResetRecipient resets all changes to the "recipient" field.
func (*MessageMutation) ResetReplyToID ¶
func (m *MessageMutation) ResetReplyToID()
ResetReplyToID resets all changes to the "reply_to_id" field.
func (*MessageMutation) ResetRuntime ¶
func (m *MessageMutation) ResetRuntime()
ResetRuntime resets all changes to the "runtime" field.
func (*MessageMutation) ResetSender ¶
func (m *MessageMutation) ResetSender()
ResetSender resets all changes to the "sender" field.
func (*MessageMutation) ResetTeam ¶
func (m *MessageMutation) ResetTeam()
ResetTeam resets all changes to the "team" field.
func (*MessageMutation) Runtime ¶
func (m *MessageMutation) Runtime() (r string, exists bool)
Runtime returns the value of the "runtime" field in the mutation.
func (*MessageMutation) RuntimeCleared ¶
func (m *MessageMutation) RuntimeCleared() bool
RuntimeCleared returns if the "runtime" field was cleared in this mutation.
func (*MessageMutation) Sender ¶
func (m *MessageMutation) Sender() (r string, exists bool)
Sender returns the value of the "sender" field in the mutation.
func (*MessageMutation) SetChannel ¶
func (m *MessageMutation) SetChannel(value message.Channel)
SetChannel sets the "channel" field.
func (*MessageMutation) SetContent ¶
func (m *MessageMutation) SetContent(s string)
SetContent sets the "content" field.
func (*MessageMutation) SetCreatedAt ¶
func (m *MessageMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MessageMutation) SetField ¶
func (m *MessageMutation) 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 (*MessageMutation) SetID ¶
func (m *MessageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Message entities.
func (*MessageMutation) SetMessageType ¶
func (m *MessageMutation) SetMessageType(mt message.MessageType)
SetMessageType sets the "message_type" field.
func (*MessageMutation) SetOp ¶
func (m *MessageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MessageMutation) SetRecipient ¶
func (m *MessageMutation) SetRecipient(s string)
SetRecipient sets the "recipient" field.
func (*MessageMutation) SetReplyToID ¶
func (m *MessageMutation) SetReplyToID(u uuid.UUID)
SetReplyToID sets the "reply_to_id" field.
func (*MessageMutation) SetRuntime ¶
func (m *MessageMutation) SetRuntime(s string)
SetRuntime sets the "runtime" field.
func (*MessageMutation) SetSender ¶
func (m *MessageMutation) SetSender(s string)
SetSender sets the "sender" field.
func (*MessageMutation) SetTeam ¶
func (m *MessageMutation) SetTeam(s string)
SetTeam sets the "team" field.
func (*MessageMutation) Team ¶
func (m *MessageMutation) Team() (r string, exists bool)
Team returns the value of the "team" field in the mutation.
func (MessageMutation) Tx ¶
func (m MessageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MessageMutation) Type ¶
func (m *MessageMutation) Type() string
Type returns the node type of this mutation (Message).
func (*MessageMutation) Where ¶
func (m *MessageMutation) Where(ps ...predicate.Message)
Where appends a list predicates to the MessageMutation builder.
func (*MessageMutation) WhereP ¶
func (m *MessageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MessageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MessageQuery ¶
type MessageQuery struct {
// contains filtered or unexported fields
}
MessageQuery is the builder for querying Message entities.
func (*MessageQuery) Aggregate ¶
func (_q *MessageQuery) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate returns a MessageSelect configured with the given aggregations.
func (*MessageQuery) All ¶
func (_q *MessageQuery) All(ctx context.Context) ([]*Message, error)
All executes the query and returns a list of Messages.
func (*MessageQuery) AllX ¶
func (_q *MessageQuery) AllX(ctx context.Context) []*Message
AllX is like All, but panics if an error occurs.
func (*MessageQuery) Clone ¶
func (_q *MessageQuery) Clone() *MessageQuery
Clone returns a duplicate of the MessageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MessageQuery) Count ¶
func (_q *MessageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MessageQuery) CountX ¶
func (_q *MessageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MessageQuery) Exist ¶
func (_q *MessageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MessageQuery) ExistX ¶
func (_q *MessageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MessageQuery) First ¶
func (_q *MessageQuery) First(ctx context.Context) (*Message, error)
First returns the first Message entity from the query. Returns a *NotFoundError when no Message was found.
func (*MessageQuery) FirstID ¶
FirstID returns the first Message ID from the query. Returns a *NotFoundError when no Message ID was found.
func (*MessageQuery) FirstIDX ¶
func (_q *MessageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*MessageQuery) FirstX ¶
func (_q *MessageQuery) FirstX(ctx context.Context) *Message
FirstX is like First, but panics if an error occurs.
func (*MessageQuery) GroupBy ¶
func (_q *MessageQuery) GroupBy(field string, fields ...string) *MessageGroupBy
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 {
Sender string `json:"sender,omitempty"`
Count int `json:"count,omitempty"`
}
client.Message.Query().
GroupBy(message.FieldSender).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*MessageQuery) IDsX ¶
func (_q *MessageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*MessageQuery) Limit ¶
func (_q *MessageQuery) Limit(limit int) *MessageQuery
Limit the number of records to be returned by this query.
func (*MessageQuery) Offset ¶
func (_q *MessageQuery) Offset(offset int) *MessageQuery
Offset to start from.
func (*MessageQuery) Only ¶
func (_q *MessageQuery) Only(ctx context.Context) (*Message, error)
Only returns a single Message entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Message entity is found. Returns a *NotFoundError when no Message entities are found.
func (*MessageQuery) OnlyID ¶
OnlyID is like Only, but returns the only Message ID in the query. Returns a *NotSingularError when more than one Message ID is found. Returns a *NotFoundError when no entities are found.
func (*MessageQuery) OnlyIDX ¶
func (_q *MessageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MessageQuery) OnlyX ¶
func (_q *MessageQuery) OnlyX(ctx context.Context) *Message
OnlyX is like Only, but panics if an error occurs.
func (*MessageQuery) Order ¶
func (_q *MessageQuery) Order(o ...message.OrderOption) *MessageQuery
Order specifies how the records should be ordered.
func (*MessageQuery) QueryAttachments ¶
func (_q *MessageQuery) QueryAttachments() *AttachmentQuery
QueryAttachments chains the current query on the "attachments" edge.
func (*MessageQuery) QueryReactions ¶
func (_q *MessageQuery) QueryReactions() *ReactionQuery
QueryReactions chains the current query on the "reactions" edge.
func (*MessageQuery) Select ¶
func (_q *MessageQuery) Select(fields ...string) *MessageSelect
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 {
Sender string `json:"sender,omitempty"`
}
client.Message.Query().
Select(message.FieldSender).
Scan(ctx, &v)
func (*MessageQuery) Unique ¶
func (_q *MessageQuery) Unique(unique bool) *MessageQuery
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 (*MessageQuery) Where ¶
func (_q *MessageQuery) Where(ps ...predicate.Message) *MessageQuery
Where adds a new predicate for the MessageQuery builder.
func (*MessageQuery) WithAttachments ¶
func (_q *MessageQuery) WithAttachments(opts ...func(*AttachmentQuery)) *MessageQuery
WithAttachments tells the query-builder to eager-load the nodes that are connected to the "attachments" edge. The optional arguments are used to configure the query builder of the edge.
func (*MessageQuery) WithReactions ¶
func (_q *MessageQuery) WithReactions(opts ...func(*ReactionQuery)) *MessageQuery
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 MessageSelect ¶
type MessageSelect struct {
*MessageQuery
// contains filtered or unexported fields
}
MessageSelect is the builder for selecting fields of Message entities.
func (*MessageSelect) Aggregate ¶
func (_s *MessageSelect) Aggregate(fns ...AggregateFunc) *MessageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MessageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MessageSelect) Scan ¶
func (_s *MessageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MessageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MessageUpdate ¶
type MessageUpdate struct {
// contains filtered or unexported fields
}
MessageUpdate is the builder for updating Message entities.
func (*MessageUpdate) AddAttachmentIDs ¶
func (_u *MessageUpdate) AddAttachmentIDs(ids ...uuid.UUID) *MessageUpdate
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.
func (*MessageUpdate) AddAttachments ¶
func (_u *MessageUpdate) AddAttachments(v ...*Attachment) *MessageUpdate
AddAttachments adds the "attachments" edges to the Attachment entity.
func (*MessageUpdate) AddReactionIDs ¶
func (_u *MessageUpdate) AddReactionIDs(ids ...uuid.UUID) *MessageUpdate
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*MessageUpdate) AddReactions ¶
func (_u *MessageUpdate) AddReactions(v ...*Reaction) *MessageUpdate
AddReactions adds the "reactions" edges to the Reaction entity.
func (*MessageUpdate) ClearAttachments ¶
func (_u *MessageUpdate) ClearAttachments() *MessageUpdate
ClearAttachments clears all "attachments" edges to the Attachment entity.
func (*MessageUpdate) ClearReactions ¶
func (_u *MessageUpdate) ClearReactions() *MessageUpdate
ClearReactions clears all "reactions" edges to the Reaction entity.
func (*MessageUpdate) ClearReplyToID ¶
func (_u *MessageUpdate) ClearReplyToID() *MessageUpdate
ClearReplyToID clears the value of the "reply_to_id" field.
func (*MessageUpdate) ClearRuntime ¶
func (_u *MessageUpdate) ClearRuntime() *MessageUpdate
ClearRuntime clears the value of the "runtime" field.
func (*MessageUpdate) Exec ¶
func (_u *MessageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MessageUpdate) ExecX ¶
func (_u *MessageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdate) Mutation ¶
func (_u *MessageUpdate) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdate) RemoveAttachmentIDs ¶
func (_u *MessageUpdate) RemoveAttachmentIDs(ids ...uuid.UUID) *MessageUpdate
RemoveAttachmentIDs removes the "attachments" edge to Attachment entities by IDs.
func (*MessageUpdate) RemoveAttachments ¶
func (_u *MessageUpdate) RemoveAttachments(v ...*Attachment) *MessageUpdate
RemoveAttachments removes "attachments" edges to Attachment entities.
func (*MessageUpdate) RemoveReactionIDs ¶
func (_u *MessageUpdate) RemoveReactionIDs(ids ...uuid.UUID) *MessageUpdate
RemoveReactionIDs removes the "reactions" edge to Reaction entities by IDs.
func (*MessageUpdate) RemoveReactions ¶
func (_u *MessageUpdate) RemoveReactions(v ...*Reaction) *MessageUpdate
RemoveReactions removes "reactions" edges to Reaction entities.
func (*MessageUpdate) Save ¶
func (_u *MessageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MessageUpdate) SaveX ¶
func (_u *MessageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdate) SetChannel ¶
func (_u *MessageUpdate) SetChannel(v message.Channel) *MessageUpdate
SetChannel sets the "channel" field.
func (*MessageUpdate) SetContent ¶
func (_u *MessageUpdate) SetContent(v string) *MessageUpdate
SetContent sets the "content" field.
func (*MessageUpdate) SetMessageType ¶
func (_u *MessageUpdate) SetMessageType(v message.MessageType) *MessageUpdate
SetMessageType sets the "message_type" field.
func (*MessageUpdate) SetNillableChannel ¶
func (_u *MessageUpdate) SetNillableChannel(v *message.Channel) *MessageUpdate
SetNillableChannel sets the "channel" field if the given value is not nil.
func (*MessageUpdate) SetNillableContent ¶
func (_u *MessageUpdate) SetNillableContent(v *string) *MessageUpdate
SetNillableContent sets the "content" field if the given value is not nil.
func (*MessageUpdate) SetNillableMessageType ¶
func (_u *MessageUpdate) SetNillableMessageType(v *message.MessageType) *MessageUpdate
SetNillableMessageType sets the "message_type" field if the given value is not nil.
func (*MessageUpdate) SetNillableRecipient ¶
func (_u *MessageUpdate) SetNillableRecipient(v *string) *MessageUpdate
SetNillableRecipient sets the "recipient" field if the given value is not nil.
func (*MessageUpdate) SetNillableReplyToID ¶
func (_u *MessageUpdate) SetNillableReplyToID(v *uuid.UUID) *MessageUpdate
SetNillableReplyToID sets the "reply_to_id" field if the given value is not nil.
func (*MessageUpdate) SetNillableRuntime ¶
func (_u *MessageUpdate) SetNillableRuntime(v *string) *MessageUpdate
SetNillableRuntime sets the "runtime" field if the given value is not nil.
func (*MessageUpdate) SetNillableSender ¶
func (_u *MessageUpdate) SetNillableSender(v *string) *MessageUpdate
SetNillableSender sets the "sender" field if the given value is not nil.
func (*MessageUpdate) SetNillableTeam ¶
func (_u *MessageUpdate) SetNillableTeam(v *string) *MessageUpdate
SetNillableTeam sets the "team" field if the given value is not nil.
func (*MessageUpdate) SetRecipient ¶
func (_u *MessageUpdate) SetRecipient(v string) *MessageUpdate
SetRecipient sets the "recipient" field.
func (*MessageUpdate) SetReplyToID ¶
func (_u *MessageUpdate) SetReplyToID(v uuid.UUID) *MessageUpdate
SetReplyToID sets the "reply_to_id" field.
func (*MessageUpdate) SetRuntime ¶
func (_u *MessageUpdate) SetRuntime(v string) *MessageUpdate
SetRuntime sets the "runtime" field.
func (*MessageUpdate) SetSender ¶
func (_u *MessageUpdate) SetSender(v string) *MessageUpdate
SetSender sets the "sender" field.
func (*MessageUpdate) SetTeam ¶
func (_u *MessageUpdate) SetTeam(v string) *MessageUpdate
SetTeam sets the "team" field.
func (*MessageUpdate) Where ¶
func (_u *MessageUpdate) Where(ps ...predicate.Message) *MessageUpdate
Where appends a list predicates to the MessageUpdate builder.
type MessageUpdateOne ¶
type MessageUpdateOne struct {
// contains filtered or unexported fields
}
MessageUpdateOne is the builder for updating a single Message entity.
func (*MessageUpdateOne) AddAttachmentIDs ¶
func (_u *MessageUpdateOne) AddAttachmentIDs(ids ...uuid.UUID) *MessageUpdateOne
AddAttachmentIDs adds the "attachments" edge to the Attachment entity by IDs.
func (*MessageUpdateOne) AddAttachments ¶
func (_u *MessageUpdateOne) AddAttachments(v ...*Attachment) *MessageUpdateOne
AddAttachments adds the "attachments" edges to the Attachment entity.
func (*MessageUpdateOne) AddReactionIDs ¶
func (_u *MessageUpdateOne) AddReactionIDs(ids ...uuid.UUID) *MessageUpdateOne
AddReactionIDs adds the "reactions" edge to the Reaction entity by IDs.
func (*MessageUpdateOne) AddReactions ¶
func (_u *MessageUpdateOne) AddReactions(v ...*Reaction) *MessageUpdateOne
AddReactions adds the "reactions" edges to the Reaction entity.
func (*MessageUpdateOne) ClearAttachments ¶
func (_u *MessageUpdateOne) ClearAttachments() *MessageUpdateOne
ClearAttachments clears all "attachments" edges to the Attachment entity.
func (*MessageUpdateOne) ClearReactions ¶
func (_u *MessageUpdateOne) ClearReactions() *MessageUpdateOne
ClearReactions clears all "reactions" edges to the Reaction entity.
func (*MessageUpdateOne) ClearReplyToID ¶
func (_u *MessageUpdateOne) ClearReplyToID() *MessageUpdateOne
ClearReplyToID clears the value of the "reply_to_id" field.
func (*MessageUpdateOne) ClearRuntime ¶
func (_u *MessageUpdateOne) ClearRuntime() *MessageUpdateOne
ClearRuntime clears the value of the "runtime" field.
func (*MessageUpdateOne) Exec ¶
func (_u *MessageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MessageUpdateOne) ExecX ¶
func (_u *MessageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MessageUpdateOne) Mutation ¶
func (_u *MessageUpdateOne) Mutation() *MessageMutation
Mutation returns the MessageMutation object of the builder.
func (*MessageUpdateOne) RemoveAttachmentIDs ¶
func (_u *MessageUpdateOne) RemoveAttachmentIDs(ids ...uuid.UUID) *MessageUpdateOne
RemoveAttachmentIDs removes the "attachments" edge to Attachment entities by IDs.
func (*MessageUpdateOne) RemoveAttachments ¶
func (_u *MessageUpdateOne) RemoveAttachments(v ...*Attachment) *MessageUpdateOne
RemoveAttachments removes "attachments" edges to Attachment entities.
func (*MessageUpdateOne) RemoveReactionIDs ¶
func (_u *MessageUpdateOne) RemoveReactionIDs(ids ...uuid.UUID) *MessageUpdateOne
RemoveReactionIDs removes the "reactions" edge to Reaction entities by IDs.
func (*MessageUpdateOne) RemoveReactions ¶
func (_u *MessageUpdateOne) RemoveReactions(v ...*Reaction) *MessageUpdateOne
RemoveReactions removes "reactions" edges to Reaction entities.
func (*MessageUpdateOne) Save ¶
func (_u *MessageUpdateOne) Save(ctx context.Context) (*Message, error)
Save executes the query and returns the updated Message entity.
func (*MessageUpdateOne) SaveX ¶
func (_u *MessageUpdateOne) SaveX(ctx context.Context) *Message
SaveX is like Save, but panics if an error occurs.
func (*MessageUpdateOne) Select ¶
func (_u *MessageUpdateOne) Select(field string, fields ...string) *MessageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MessageUpdateOne) SetChannel ¶
func (_u *MessageUpdateOne) SetChannel(v message.Channel) *MessageUpdateOne
SetChannel sets the "channel" field.
func (*MessageUpdateOne) SetContent ¶
func (_u *MessageUpdateOne) SetContent(v string) *MessageUpdateOne
SetContent sets the "content" field.
func (*MessageUpdateOne) SetMessageType ¶
func (_u *MessageUpdateOne) SetMessageType(v message.MessageType) *MessageUpdateOne
SetMessageType sets the "message_type" field.
func (*MessageUpdateOne) SetNillableChannel ¶
func (_u *MessageUpdateOne) SetNillableChannel(v *message.Channel) *MessageUpdateOne
SetNillableChannel sets the "channel" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableContent ¶
func (_u *MessageUpdateOne) SetNillableContent(v *string) *MessageUpdateOne
SetNillableContent sets the "content" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableMessageType ¶
func (_u *MessageUpdateOne) SetNillableMessageType(v *message.MessageType) *MessageUpdateOne
SetNillableMessageType sets the "message_type" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableRecipient ¶
func (_u *MessageUpdateOne) SetNillableRecipient(v *string) *MessageUpdateOne
SetNillableRecipient sets the "recipient" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableReplyToID ¶
func (_u *MessageUpdateOne) SetNillableReplyToID(v *uuid.UUID) *MessageUpdateOne
SetNillableReplyToID sets the "reply_to_id" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableRuntime ¶
func (_u *MessageUpdateOne) SetNillableRuntime(v *string) *MessageUpdateOne
SetNillableRuntime sets the "runtime" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableSender ¶
func (_u *MessageUpdateOne) SetNillableSender(v *string) *MessageUpdateOne
SetNillableSender sets the "sender" field if the given value is not nil.
func (*MessageUpdateOne) SetNillableTeam ¶
func (_u *MessageUpdateOne) SetNillableTeam(v *string) *MessageUpdateOne
SetNillableTeam sets the "team" field if the given value is not nil.
func (*MessageUpdateOne) SetRecipient ¶
func (_u *MessageUpdateOne) SetRecipient(v string) *MessageUpdateOne
SetRecipient sets the "recipient" field.
func (*MessageUpdateOne) SetReplyToID ¶
func (_u *MessageUpdateOne) SetReplyToID(v uuid.UUID) *MessageUpdateOne
SetReplyToID sets the "reply_to_id" field.
func (*MessageUpdateOne) SetRuntime ¶
func (_u *MessageUpdateOne) SetRuntime(v string) *MessageUpdateOne
SetRuntime sets the "runtime" field.
func (*MessageUpdateOne) SetSender ¶
func (_u *MessageUpdateOne) SetSender(v string) *MessageUpdateOne
SetSender sets the "sender" field.
func (*MessageUpdateOne) SetTeam ¶
func (_u *MessageUpdateOne) SetTeam(v string) *MessageUpdateOne
SetTeam sets the "team" field.
func (*MessageUpdateOne) Where ¶
func (_u *MessageUpdateOne) Where(ps ...predicate.Message) *MessageUpdateOne
Where appends a list predicates to the MessageUpdate builder.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type Reaction ¶
type Reaction struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Emoji holds the value of the "emoji" field.
Emoji string `json:"emoji,omitempty"`
// FromAgent holds the value of the "from_agent" field.
FromAgent string `json:"from_agent,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,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) QueryMessage ¶
func (_m *Reaction) QueryMessage() *MessageQuery
QueryMessage queries the "message" 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 (_m *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) DeleteOne ¶
func (c *ReactionClient) DeleteOne(_m *Reaction) *ReactionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ReactionClient) DeleteOneID ¶
func (c *ReactionClient) DeleteOneID(id uuid.UUID) *ReactionDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
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) MapCreateBulk ¶
func (c *ReactionClient) MapCreateBulk(slice any, setFunc func(*ReactionCreate, int)) *ReactionCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ReactionClient) Query ¶
func (c *ReactionClient) Query() *ReactionQuery
Query returns a query builder for Reaction.
func (*ReactionClient) QueryMessage ¶
func (c *ReactionClient) QueryMessage(_m *Reaction) *MessageQuery
QueryMessage queries the message 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(_m *Reaction) *ReactionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ReactionClient) UpdateOneID ¶
func (c *ReactionClient) UpdateOneID(id uuid.UUID) *ReactionUpdateOne
UpdateOneID returns an update builder for the given id.
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 (_c *ReactionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionCreate) ExecX ¶
func (_c *ReactionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionCreate) Mutation ¶
func (_c *ReactionCreate) Mutation() *ReactionMutation
Mutation returns the ReactionMutation object of the builder.
func (*ReactionCreate) Save ¶
func (_c *ReactionCreate) Save(ctx context.Context) (*Reaction, error)
Save creates the Reaction in the database.
func (*ReactionCreate) SaveX ¶
func (_c *ReactionCreate) SaveX(ctx context.Context) *Reaction
SaveX calls Save and panics if Save returns an error.
func (*ReactionCreate) SetCreatedAt ¶
func (_c *ReactionCreate) SetCreatedAt(v time.Time) *ReactionCreate
SetCreatedAt sets the "created_at" field.
func (*ReactionCreate) SetEmoji ¶
func (_c *ReactionCreate) SetEmoji(v string) *ReactionCreate
SetEmoji sets the "emoji" field.
func (*ReactionCreate) SetFromAgent ¶
func (_c *ReactionCreate) SetFromAgent(v string) *ReactionCreate
SetFromAgent sets the "from_agent" field.
func (*ReactionCreate) SetID ¶
func (_c *ReactionCreate) SetID(v uuid.UUID) *ReactionCreate
SetID sets the "id" field.
func (*ReactionCreate) SetMessage ¶
func (_c *ReactionCreate) SetMessage(v *Message) *ReactionCreate
SetMessage sets the "message" edge to the Message entity.
func (*ReactionCreate) SetMessageID ¶
func (_c *ReactionCreate) SetMessageID(id uuid.UUID) *ReactionCreate
SetMessageID sets the "message" edge to the Message entity by ID.
func (*ReactionCreate) SetNillableCreatedAt ¶
func (_c *ReactionCreate) SetNillableCreatedAt(v *time.Time) *ReactionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ReactionCreate) SetNillableID ¶
func (_c *ReactionCreate) SetNillableID(v *uuid.UUID) *ReactionCreate
SetNillableID sets the "id" field if the given value is not nil.
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 (_c *ReactionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionCreateBulk) ExecX ¶
func (_c *ReactionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ReactionDelete ¶
type ReactionDelete struct {
// contains filtered or unexported fields
}
ReactionDelete is the builder for deleting a Reaction entity.
func (*ReactionDelete) Exec ¶
func (_d *ReactionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ReactionDelete) ExecX ¶
func (_d *ReactionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ReactionDelete) Where ¶
func (_d *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 (_d *ReactionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ReactionDeleteOne) ExecX ¶
func (_d *ReactionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionDeleteOne) Where ¶
func (_d *ReactionDeleteOne) Where(ps ...predicate.Reaction) *ReactionDeleteOne
Where appends a list predicates to the ReactionDelete builder.
type ReactionEdges ¶
type ReactionEdges struct {
// Message holds the value of the message edge.
Message *Message `json:"message,omitempty"`
// contains filtered or unexported fields
}
ReactionEdges holds the relations/edges for other nodes in the graph.
func (ReactionEdges) MessageOrErr ¶
func (e ReactionEdges) MessageOrErr() (*Message, error)
MessageOrErr returns the Message 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 (_g *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 (_g *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) ClearMessage ¶
func (m *ReactionMutation) ClearMessage()
ClearMessage clears the "message" edge to the Message 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) CreatedAt ¶
func (m *ReactionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
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) FromAgent ¶
func (m *ReactionMutation) FromAgent() (r string, exists bool)
FromAgent returns the value of the "from_agent" field in the mutation.
func (*ReactionMutation) ID ¶
func (m *ReactionMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ReactionMutation) IDs ¶
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ReactionMutation) MessageCleared ¶
func (m *ReactionMutation) MessageCleared() bool
MessageCleared reports if the "message" edge to the Message entity was cleared.
func (*ReactionMutation) MessageID ¶
func (m *ReactionMutation) MessageID() (id uuid.UUID, exists bool)
MessageID returns the "message" edge ID in the mutation.
func (*ReactionMutation) MessageIDs ¶
func (m *ReactionMutation) MessageIDs() (ids []uuid.UUID)
MessageIDs returns the "message" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use MessageID instead. It exists only for internal usage by the builders.
func (*ReactionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Reaction entity. If the Reaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ReactionMutation) OldEmoji ¶
func (m *ReactionMutation) OldEmoji(ctx context.Context) (v string, err error)
OldEmoji returns the old "emoji" field's value of the Reaction entity. If the Reaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
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) OldFromAgent ¶
func (m *ReactionMutation) OldFromAgent(ctx context.Context) (v string, err error)
OldFromAgent returns the old "from_agent" field's value of the Reaction entity. If the Reaction object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
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) ResetCreatedAt ¶
func (m *ReactionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
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) ResetFromAgent ¶
func (m *ReactionMutation) ResetFromAgent()
ResetFromAgent resets all changes to the "from_agent" field.
func (*ReactionMutation) ResetMessage ¶
func (m *ReactionMutation) ResetMessage()
ResetMessage resets all changes to the "message" edge.
func (*ReactionMutation) SetCreatedAt ¶
func (m *ReactionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" 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) SetFromAgent ¶
func (m *ReactionMutation) SetFromAgent(s string)
SetFromAgent sets the "from_agent" field.
func (*ReactionMutation) SetID ¶
func (m *ReactionMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Reaction entities.
func (*ReactionMutation) SetMessageID ¶
func (m *ReactionMutation) SetMessageID(id uuid.UUID)
SetMessageID sets the "message" edge to the Message entity by id.
func (*ReactionMutation) SetOp ¶
func (m *ReactionMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
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) 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 (_q *ReactionQuery) Aggregate(fns ...AggregateFunc) *ReactionSelect
Aggregate returns a ReactionSelect configured with the given aggregations.
func (*ReactionQuery) All ¶
func (_q *ReactionQuery) All(ctx context.Context) ([]*Reaction, error)
All executes the query and returns a list of Reactions.
func (*ReactionQuery) AllX ¶
func (_q *ReactionQuery) AllX(ctx context.Context) []*Reaction
AllX is like All, but panics if an error occurs.
func (*ReactionQuery) Clone ¶
func (_q *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 (_q *ReactionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ReactionQuery) CountX ¶
func (_q *ReactionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ReactionQuery) Exist ¶
func (_q *ReactionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ReactionQuery) ExistX ¶
func (_q *ReactionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ReactionQuery) First ¶
func (_q *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) FirstID ¶
FirstID returns the first Reaction ID from the query. Returns a *NotFoundError when no Reaction ID was found.
func (*ReactionQuery) FirstIDX ¶
func (_q *ReactionQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ReactionQuery) FirstX ¶
func (_q *ReactionQuery) FirstX(ctx context.Context) *Reaction
FirstX is like First, but panics if an error occurs.
func (*ReactionQuery) GroupBy ¶
func (_q *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 {
Emoji string `json:"emoji,omitempty"`
Count int `json:"count,omitempty"`
}
client.Reaction.Query().
GroupBy(reaction.FieldEmoji).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ReactionQuery) IDsX ¶
func (_q *ReactionQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ReactionQuery) Limit ¶
func (_q *ReactionQuery) Limit(limit int) *ReactionQuery
Limit the number of records to be returned by this query.
func (*ReactionQuery) Offset ¶
func (_q *ReactionQuery) Offset(offset int) *ReactionQuery
Offset to start from.
func (*ReactionQuery) Only ¶
func (_q *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) OnlyID ¶
OnlyID is like Only, but returns the only Reaction ID in the query. Returns a *NotSingularError when more than one Reaction ID is found. Returns a *NotFoundError when no entities are found.
func (*ReactionQuery) OnlyIDX ¶
func (_q *ReactionQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ReactionQuery) OnlyX ¶
func (_q *ReactionQuery) OnlyX(ctx context.Context) *Reaction
OnlyX is like Only, but panics if an error occurs.
func (*ReactionQuery) Order ¶
func (_q *ReactionQuery) Order(o ...reaction.OrderOption) *ReactionQuery
Order specifies how the records should be ordered.
func (*ReactionQuery) QueryMessage ¶
func (_q *ReactionQuery) QueryMessage() *MessageQuery
QueryMessage chains the current query on the "message" edge.
func (*ReactionQuery) Select ¶
func (_q *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 {
Emoji string `json:"emoji,omitempty"`
}
client.Reaction.Query().
Select(reaction.FieldEmoji).
Scan(ctx, &v)
func (*ReactionQuery) Unique ¶
func (_q *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 (_q *ReactionQuery) Where(ps ...predicate.Reaction) *ReactionQuery
Where adds a new predicate for the ReactionQuery builder.
func (*ReactionQuery) WithMessage ¶
func (_q *ReactionQuery) WithMessage(opts ...func(*MessageQuery)) *ReactionQuery
WithMessage tells the query-builder to eager-load the nodes that are connected to the "message" 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 (_s *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 (_s *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) ClearMessage ¶
func (_u *ReactionUpdate) ClearMessage() *ReactionUpdate
ClearMessage clears the "message" edge to the Message entity.
func (*ReactionUpdate) Exec ¶
func (_u *ReactionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ReactionUpdate) ExecX ¶
func (_u *ReactionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionUpdate) Mutation ¶
func (_u *ReactionUpdate) Mutation() *ReactionMutation
Mutation returns the ReactionMutation object of the builder.
func (*ReactionUpdate) Save ¶
func (_u *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 (_u *ReactionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ReactionUpdate) SetEmoji ¶
func (_u *ReactionUpdate) SetEmoji(v string) *ReactionUpdate
SetEmoji sets the "emoji" field.
func (*ReactionUpdate) SetFromAgent ¶
func (_u *ReactionUpdate) SetFromAgent(v string) *ReactionUpdate
SetFromAgent sets the "from_agent" field.
func (*ReactionUpdate) SetMessage ¶
func (_u *ReactionUpdate) SetMessage(v *Message) *ReactionUpdate
SetMessage sets the "message" edge to the Message entity.
func (*ReactionUpdate) SetMessageID ¶
func (_u *ReactionUpdate) SetMessageID(id uuid.UUID) *ReactionUpdate
SetMessageID sets the "message" edge to the Message entity by ID.
func (*ReactionUpdate) SetNillableEmoji ¶
func (_u *ReactionUpdate) SetNillableEmoji(v *string) *ReactionUpdate
SetNillableEmoji sets the "emoji" field if the given value is not nil.
func (*ReactionUpdate) SetNillableFromAgent ¶
func (_u *ReactionUpdate) SetNillableFromAgent(v *string) *ReactionUpdate
SetNillableFromAgent sets the "from_agent" field if the given value is not nil.
func (*ReactionUpdate) Where ¶
func (_u *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) ClearMessage ¶
func (_u *ReactionUpdateOne) ClearMessage() *ReactionUpdateOne
ClearMessage clears the "message" edge to the Message entity.
func (*ReactionUpdateOne) Exec ¶
func (_u *ReactionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ReactionUpdateOne) ExecX ¶
func (_u *ReactionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ReactionUpdateOne) Mutation ¶
func (_u *ReactionUpdateOne) Mutation() *ReactionMutation
Mutation returns the ReactionMutation object of the builder.
func (*ReactionUpdateOne) Save ¶
func (_u *ReactionUpdateOne) Save(ctx context.Context) (*Reaction, error)
Save executes the query and returns the updated Reaction entity.
func (*ReactionUpdateOne) SaveX ¶
func (_u *ReactionUpdateOne) SaveX(ctx context.Context) *Reaction
SaveX is like Save, but panics if an error occurs.
func (*ReactionUpdateOne) Select ¶
func (_u *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 (_u *ReactionUpdateOne) SetEmoji(v string) *ReactionUpdateOne
SetEmoji sets the "emoji" field.
func (*ReactionUpdateOne) SetFromAgent ¶
func (_u *ReactionUpdateOne) SetFromAgent(v string) *ReactionUpdateOne
SetFromAgent sets the "from_agent" field.
func (*ReactionUpdateOne) SetMessage ¶
func (_u *ReactionUpdateOne) SetMessage(v *Message) *ReactionUpdateOne
SetMessage sets the "message" edge to the Message entity.
func (*ReactionUpdateOne) SetMessageID ¶
func (_u *ReactionUpdateOne) SetMessageID(id uuid.UUID) *ReactionUpdateOne
SetMessageID sets the "message" edge to the Message entity by ID.
func (*ReactionUpdateOne) SetNillableEmoji ¶
func (_u *ReactionUpdateOne) SetNillableEmoji(v *string) *ReactionUpdateOne
SetNillableEmoji sets the "emoji" field if the given value is not nil.
func (*ReactionUpdateOne) SetNillableFromAgent ¶
func (_u *ReactionUpdateOne) SetNillableFromAgent(v *string) *ReactionUpdateOne
SetNillableFromAgent sets the "from_agent" field if the given value is not nil.
func (*ReactionUpdateOne) Where ¶
func (_u *ReactionUpdateOne) Where(ps ...predicate.Reaction) *ReactionUpdateOne
Where appends a list predicates to the ReactionUpdate builder.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Rollback(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type ToolUsage ¶ added in v1.1.0
type ToolUsage struct {
// ID of the ent.
ID uuid.UUID `json:"id,omitempty"`
// Agent holds the value of the "agent" field.
Agent string `json:"agent,omitempty"`
// Team holds the value of the "team" field.
Team string `json:"team,omitempty"`
// Command holds the value of the "command" field.
Command string `json:"command,omitempty"`
// Subcommand holds the value of the "subcommand" field.
Subcommand string `json:"subcommand,omitempty"`
// Target holds the value of the "target" field.
Target string `json:"target,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// contains filtered or unexported fields
}
ToolUsage is the model entity for the ToolUsage schema.
func (*ToolUsage) Unwrap ¶ added in v1.1.0
Unwrap unwraps the ToolUsage 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 (*ToolUsage) Update ¶ added in v1.1.0
func (_m *ToolUsage) Update() *ToolUsageUpdateOne
Update returns a builder for updating this ToolUsage. Note that you need to call ToolUsage.Unwrap() before calling this method if this ToolUsage was returned from a transaction, and the transaction was committed or rolled back.
type ToolUsageClient ¶ added in v1.1.0
type ToolUsageClient struct {
// contains filtered or unexported fields
}
ToolUsageClient is a client for the ToolUsage schema.
func NewToolUsageClient ¶ added in v1.1.0
func NewToolUsageClient(c config) *ToolUsageClient
NewToolUsageClient returns a client for the ToolUsage from the given config.
func (*ToolUsageClient) Create ¶ added in v1.1.0
func (c *ToolUsageClient) Create() *ToolUsageCreate
Create returns a builder for creating a ToolUsage entity.
func (*ToolUsageClient) CreateBulk ¶ added in v1.1.0
func (c *ToolUsageClient) CreateBulk(builders ...*ToolUsageCreate) *ToolUsageCreateBulk
CreateBulk returns a builder for creating a bulk of ToolUsage entities.
func (*ToolUsageClient) Delete ¶ added in v1.1.0
func (c *ToolUsageClient) Delete() *ToolUsageDelete
Delete returns a delete builder for ToolUsage.
func (*ToolUsageClient) DeleteOne ¶ added in v1.1.0
func (c *ToolUsageClient) DeleteOne(_m *ToolUsage) *ToolUsageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ToolUsageClient) DeleteOneID ¶ added in v1.1.0
func (c *ToolUsageClient) DeleteOneID(id uuid.UUID) *ToolUsageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ToolUsageClient) Hooks ¶ added in v1.1.0
func (c *ToolUsageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ToolUsageClient) Intercept ¶ added in v1.1.0
func (c *ToolUsageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `toolusage.Intercept(f(g(h())))`.
func (*ToolUsageClient) Interceptors ¶ added in v1.1.0
func (c *ToolUsageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ToolUsageClient) MapCreateBulk ¶ added in v1.1.0
func (c *ToolUsageClient) MapCreateBulk(slice any, setFunc func(*ToolUsageCreate, int)) *ToolUsageCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*ToolUsageClient) Query ¶ added in v1.1.0
func (c *ToolUsageClient) Query() *ToolUsageQuery
Query returns a query builder for ToolUsage.
func (*ToolUsageClient) Update ¶ added in v1.1.0
func (c *ToolUsageClient) Update() *ToolUsageUpdate
Update returns an update builder for ToolUsage.
func (*ToolUsageClient) UpdateOne ¶ added in v1.1.0
func (c *ToolUsageClient) UpdateOne(_m *ToolUsage) *ToolUsageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ToolUsageClient) UpdateOneID ¶ added in v1.1.0
func (c *ToolUsageClient) UpdateOneID(id uuid.UUID) *ToolUsageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ToolUsageClient) Use ¶ added in v1.1.0
func (c *ToolUsageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `toolusage.Hooks(f(g(h())))`.
type ToolUsageCreate ¶ added in v1.1.0
type ToolUsageCreate struct {
// contains filtered or unexported fields
}
ToolUsageCreate is the builder for creating a ToolUsage entity.
func (*ToolUsageCreate) Exec ¶ added in v1.1.0
func (_c *ToolUsageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ToolUsageCreate) ExecX ¶ added in v1.1.0
func (_c *ToolUsageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ToolUsageCreate) Mutation ¶ added in v1.1.0
func (_c *ToolUsageCreate) Mutation() *ToolUsageMutation
Mutation returns the ToolUsageMutation object of the builder.
func (*ToolUsageCreate) Save ¶ added in v1.1.0
func (_c *ToolUsageCreate) Save(ctx context.Context) (*ToolUsage, error)
Save creates the ToolUsage in the database.
func (*ToolUsageCreate) SaveX ¶ added in v1.1.0
func (_c *ToolUsageCreate) SaveX(ctx context.Context) *ToolUsage
SaveX calls Save and panics if Save returns an error.
func (*ToolUsageCreate) SetAgent ¶ added in v1.1.0
func (_c *ToolUsageCreate) SetAgent(v string) *ToolUsageCreate
SetAgent sets the "agent" field.
func (*ToolUsageCreate) SetCommand ¶ added in v1.1.0
func (_c *ToolUsageCreate) SetCommand(v string) *ToolUsageCreate
SetCommand sets the "command" field.
func (*ToolUsageCreate) SetCreatedAt ¶ added in v1.1.0
func (_c *ToolUsageCreate) SetCreatedAt(v time.Time) *ToolUsageCreate
SetCreatedAt sets the "created_at" field.
func (*ToolUsageCreate) SetID ¶ added in v1.1.0
func (_c *ToolUsageCreate) SetID(v uuid.UUID) *ToolUsageCreate
SetID sets the "id" field.
func (*ToolUsageCreate) SetNillableCreatedAt ¶ added in v1.1.0
func (_c *ToolUsageCreate) SetNillableCreatedAt(v *time.Time) *ToolUsageCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ToolUsageCreate) SetNillableID ¶ added in v1.1.0
func (_c *ToolUsageCreate) SetNillableID(v *uuid.UUID) *ToolUsageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ToolUsageCreate) SetNillableTarget ¶ added in v1.1.0
func (_c *ToolUsageCreate) SetNillableTarget(v *string) *ToolUsageCreate
SetNillableTarget sets the "target" field if the given value is not nil.
func (*ToolUsageCreate) SetSubcommand ¶ added in v1.1.0
func (_c *ToolUsageCreate) SetSubcommand(v string) *ToolUsageCreate
SetSubcommand sets the "subcommand" field.
func (*ToolUsageCreate) SetTarget ¶ added in v1.1.0
func (_c *ToolUsageCreate) SetTarget(v string) *ToolUsageCreate
SetTarget sets the "target" field.
func (*ToolUsageCreate) SetTeam ¶ added in v1.1.0
func (_c *ToolUsageCreate) SetTeam(v string) *ToolUsageCreate
SetTeam sets the "team" field.
type ToolUsageCreateBulk ¶ added in v1.1.0
type ToolUsageCreateBulk struct {
// contains filtered or unexported fields
}
ToolUsageCreateBulk is the builder for creating many ToolUsage entities in bulk.
func (*ToolUsageCreateBulk) Exec ¶ added in v1.1.0
func (_c *ToolUsageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ToolUsageCreateBulk) ExecX ¶ added in v1.1.0
func (_c *ToolUsageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ToolUsageDelete ¶ added in v1.1.0
type ToolUsageDelete struct {
// contains filtered or unexported fields
}
ToolUsageDelete is the builder for deleting a ToolUsage entity.
func (*ToolUsageDelete) Exec ¶ added in v1.1.0
func (_d *ToolUsageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ToolUsageDelete) ExecX ¶ added in v1.1.0
func (_d *ToolUsageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ToolUsageDelete) Where ¶ added in v1.1.0
func (_d *ToolUsageDelete) Where(ps ...predicate.ToolUsage) *ToolUsageDelete
Where appends a list predicates to the ToolUsageDelete builder.
type ToolUsageDeleteOne ¶ added in v1.1.0
type ToolUsageDeleteOne struct {
// contains filtered or unexported fields
}
ToolUsageDeleteOne is the builder for deleting a single ToolUsage entity.
func (*ToolUsageDeleteOne) Exec ¶ added in v1.1.0
func (_d *ToolUsageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ToolUsageDeleteOne) ExecX ¶ added in v1.1.0
func (_d *ToolUsageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ToolUsageDeleteOne) Where ¶ added in v1.1.0
func (_d *ToolUsageDeleteOne) Where(ps ...predicate.ToolUsage) *ToolUsageDeleteOne
Where appends a list predicates to the ToolUsageDelete builder.
type ToolUsageGroupBy ¶ added in v1.1.0
type ToolUsageGroupBy struct {
// contains filtered or unexported fields
}
ToolUsageGroupBy is the group-by builder for ToolUsage entities.
func (*ToolUsageGroupBy) Aggregate ¶ added in v1.1.0
func (_g *ToolUsageGroupBy) Aggregate(fns ...AggregateFunc) *ToolUsageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ToolUsageGroupBy) Bool ¶ added in v1.1.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ToolUsageGroupBy) Bools ¶ added in v1.1.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ToolUsageGroupBy) BoolsX ¶ added in v1.1.0
BoolsX is like Bools, but panics if an error occurs.
func (*ToolUsageGroupBy) Float64 ¶ added in v1.1.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ToolUsageGroupBy) Float64X ¶ added in v1.1.0
Float64X is like Float64, but panics if an error occurs.
func (*ToolUsageGroupBy) Float64s ¶ added in v1.1.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ToolUsageGroupBy) Float64sX ¶ added in v1.1.0
Float64sX is like Float64s, but panics if an error occurs.
func (*ToolUsageGroupBy) Int ¶ added in v1.1.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ToolUsageGroupBy) Ints ¶ added in v1.1.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ToolUsageGroupBy) Scan ¶ added in v1.1.0
func (_g *ToolUsageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ToolUsageGroupBy) String ¶ added in v1.1.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ToolUsageGroupBy) StringX ¶ added in v1.1.0
StringX is like String, but panics if an error occurs.
type ToolUsageMutation ¶ added in v1.1.0
type ToolUsageMutation struct {
// contains filtered or unexported fields
}
ToolUsageMutation represents an operation that mutates the ToolUsage nodes in the graph.
func (*ToolUsageMutation) AddField ¶ added in v1.1.0
func (m *ToolUsageMutation) 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 (*ToolUsageMutation) AddedEdges ¶ added in v1.1.0
func (m *ToolUsageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ToolUsageMutation) AddedField ¶ added in v1.1.0
func (m *ToolUsageMutation) 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 (*ToolUsageMutation) AddedFields ¶ added in v1.1.0
func (m *ToolUsageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ToolUsageMutation) AddedIDs ¶ added in v1.1.0
func (m *ToolUsageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ToolUsageMutation) Agent ¶ added in v1.1.0
func (m *ToolUsageMutation) Agent() (r string, exists bool)
Agent returns the value of the "agent" field in the mutation.
func (*ToolUsageMutation) ClearEdge ¶ added in v1.1.0
func (m *ToolUsageMutation) 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 (*ToolUsageMutation) ClearField ¶ added in v1.1.0
func (m *ToolUsageMutation) 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 (*ToolUsageMutation) ClearTarget ¶ added in v1.1.0
func (m *ToolUsageMutation) ClearTarget()
ClearTarget clears the value of the "target" field.
func (*ToolUsageMutation) ClearedEdges ¶ added in v1.1.0
func (m *ToolUsageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ToolUsageMutation) ClearedFields ¶ added in v1.1.0
func (m *ToolUsageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ToolUsageMutation) Client ¶ added in v1.1.0
func (m ToolUsageMutation) 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 (*ToolUsageMutation) Command ¶ added in v1.1.0
func (m *ToolUsageMutation) Command() (r string, exists bool)
Command returns the value of the "command" field in the mutation.
func (*ToolUsageMutation) CreatedAt ¶ added in v1.1.0
func (m *ToolUsageMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ToolUsageMutation) EdgeCleared ¶ added in v1.1.0
func (m *ToolUsageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ToolUsageMutation) Field ¶ added in v1.1.0
func (m *ToolUsageMutation) 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 (*ToolUsageMutation) FieldCleared ¶ added in v1.1.0
func (m *ToolUsageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ToolUsageMutation) Fields ¶ added in v1.1.0
func (m *ToolUsageMutation) 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 (*ToolUsageMutation) ID ¶ added in v1.1.0
func (m *ToolUsageMutation) ID() (id uuid.UUID, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ToolUsageMutation) IDs ¶ added in v1.1.0
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 (*ToolUsageMutation) OldAgent ¶ added in v1.1.0
func (m *ToolUsageMutation) OldAgent(ctx context.Context) (v string, err error)
OldAgent returns the old "agent" field's value of the ToolUsage entity. If the ToolUsage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ToolUsageMutation) OldCommand ¶ added in v1.1.0
func (m *ToolUsageMutation) OldCommand(ctx context.Context) (v string, err error)
OldCommand returns the old "command" field's value of the ToolUsage entity. If the ToolUsage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ToolUsageMutation) OldCreatedAt ¶ added in v1.1.0
OldCreatedAt returns the old "created_at" field's value of the ToolUsage entity. If the ToolUsage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ToolUsageMutation) OldField ¶ added in v1.1.0
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 (*ToolUsageMutation) OldSubcommand ¶ added in v1.1.0
func (m *ToolUsageMutation) OldSubcommand(ctx context.Context) (v string, err error)
OldSubcommand returns the old "subcommand" field's value of the ToolUsage entity. If the ToolUsage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ToolUsageMutation) OldTarget ¶ added in v1.1.0
func (m *ToolUsageMutation) OldTarget(ctx context.Context) (v string, err error)
OldTarget returns the old "target" field's value of the ToolUsage entity. If the ToolUsage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ToolUsageMutation) OldTeam ¶ added in v1.1.0
func (m *ToolUsageMutation) OldTeam(ctx context.Context) (v string, err error)
OldTeam returns the old "team" field's value of the ToolUsage entity. If the ToolUsage object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ToolUsageMutation) Op ¶ added in v1.1.0
func (m *ToolUsageMutation) Op() Op
Op returns the operation name.
func (*ToolUsageMutation) RemovedEdges ¶ added in v1.1.0
func (m *ToolUsageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ToolUsageMutation) RemovedIDs ¶ added in v1.1.0
func (m *ToolUsageMutation) 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 (*ToolUsageMutation) ResetAgent ¶ added in v1.1.0
func (m *ToolUsageMutation) ResetAgent()
ResetAgent resets all changes to the "agent" field.
func (*ToolUsageMutation) ResetCommand ¶ added in v1.1.0
func (m *ToolUsageMutation) ResetCommand()
ResetCommand resets all changes to the "command" field.
func (*ToolUsageMutation) ResetCreatedAt ¶ added in v1.1.0
func (m *ToolUsageMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ToolUsageMutation) ResetEdge ¶ added in v1.1.0
func (m *ToolUsageMutation) 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 (*ToolUsageMutation) ResetField ¶ added in v1.1.0
func (m *ToolUsageMutation) 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 (*ToolUsageMutation) ResetSubcommand ¶ added in v1.1.0
func (m *ToolUsageMutation) ResetSubcommand()
ResetSubcommand resets all changes to the "subcommand" field.
func (*ToolUsageMutation) ResetTarget ¶ added in v1.1.0
func (m *ToolUsageMutation) ResetTarget()
ResetTarget resets all changes to the "target" field.
func (*ToolUsageMutation) ResetTeam ¶ added in v1.1.0
func (m *ToolUsageMutation) ResetTeam()
ResetTeam resets all changes to the "team" field.
func (*ToolUsageMutation) SetAgent ¶ added in v1.1.0
func (m *ToolUsageMutation) SetAgent(s string)
SetAgent sets the "agent" field.
func (*ToolUsageMutation) SetCommand ¶ added in v1.1.0
func (m *ToolUsageMutation) SetCommand(s string)
SetCommand sets the "command" field.
func (*ToolUsageMutation) SetCreatedAt ¶ added in v1.1.0
func (m *ToolUsageMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ToolUsageMutation) SetField ¶ added in v1.1.0
func (m *ToolUsageMutation) 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 (*ToolUsageMutation) SetID ¶ added in v1.1.0
func (m *ToolUsageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ToolUsage entities.
func (*ToolUsageMutation) SetOp ¶ added in v1.1.0
func (m *ToolUsageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ToolUsageMutation) SetSubcommand ¶ added in v1.1.0
func (m *ToolUsageMutation) SetSubcommand(s string)
SetSubcommand sets the "subcommand" field.
func (*ToolUsageMutation) SetTarget ¶ added in v1.1.0
func (m *ToolUsageMutation) SetTarget(s string)
SetTarget sets the "target" field.
func (*ToolUsageMutation) SetTeam ¶ added in v1.1.0
func (m *ToolUsageMutation) SetTeam(s string)
SetTeam sets the "team" field.
func (*ToolUsageMutation) Subcommand ¶ added in v1.1.0
func (m *ToolUsageMutation) Subcommand() (r string, exists bool)
Subcommand returns the value of the "subcommand" field in the mutation.
func (*ToolUsageMutation) Target ¶ added in v1.1.0
func (m *ToolUsageMutation) Target() (r string, exists bool)
Target returns the value of the "target" field in the mutation.
func (*ToolUsageMutation) TargetCleared ¶ added in v1.1.0
func (m *ToolUsageMutation) TargetCleared() bool
TargetCleared returns if the "target" field was cleared in this mutation.
func (*ToolUsageMutation) Team ¶ added in v1.1.0
func (m *ToolUsageMutation) Team() (r string, exists bool)
Team returns the value of the "team" field in the mutation.
func (ToolUsageMutation) Tx ¶ added in v1.1.0
func (m ToolUsageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ToolUsageMutation) Type ¶ added in v1.1.0
func (m *ToolUsageMutation) Type() string
Type returns the node type of this mutation (ToolUsage).
func (*ToolUsageMutation) Where ¶ added in v1.1.0
func (m *ToolUsageMutation) Where(ps ...predicate.ToolUsage)
Where appends a list predicates to the ToolUsageMutation builder.
func (*ToolUsageMutation) WhereP ¶ added in v1.1.0
func (m *ToolUsageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ToolUsageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ToolUsageQuery ¶ added in v1.1.0
type ToolUsageQuery struct {
// contains filtered or unexported fields
}
ToolUsageQuery is the builder for querying ToolUsage entities.
func (*ToolUsageQuery) Aggregate ¶ added in v1.1.0
func (_q *ToolUsageQuery) Aggregate(fns ...AggregateFunc) *ToolUsageSelect
Aggregate returns a ToolUsageSelect configured with the given aggregations.
func (*ToolUsageQuery) All ¶ added in v1.1.0
func (_q *ToolUsageQuery) All(ctx context.Context) ([]*ToolUsage, error)
All executes the query and returns a list of ToolUsages.
func (*ToolUsageQuery) AllX ¶ added in v1.1.0
func (_q *ToolUsageQuery) AllX(ctx context.Context) []*ToolUsage
AllX is like All, but panics if an error occurs.
func (*ToolUsageQuery) Clone ¶ added in v1.1.0
func (_q *ToolUsageQuery) Clone() *ToolUsageQuery
Clone returns a duplicate of the ToolUsageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ToolUsageQuery) Count ¶ added in v1.1.0
func (_q *ToolUsageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ToolUsageQuery) CountX ¶ added in v1.1.0
func (_q *ToolUsageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ToolUsageQuery) Exist ¶ added in v1.1.0
func (_q *ToolUsageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ToolUsageQuery) ExistX ¶ added in v1.1.0
func (_q *ToolUsageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ToolUsageQuery) First ¶ added in v1.1.0
func (_q *ToolUsageQuery) First(ctx context.Context) (*ToolUsage, error)
First returns the first ToolUsage entity from the query. Returns a *NotFoundError when no ToolUsage was found.
func (*ToolUsageQuery) FirstID ¶ added in v1.1.0
FirstID returns the first ToolUsage ID from the query. Returns a *NotFoundError when no ToolUsage ID was found.
func (*ToolUsageQuery) FirstIDX ¶ added in v1.1.0
func (_q *ToolUsageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ToolUsageQuery) FirstX ¶ added in v1.1.0
func (_q *ToolUsageQuery) FirstX(ctx context.Context) *ToolUsage
FirstX is like First, but panics if an error occurs.
func (*ToolUsageQuery) GroupBy ¶ added in v1.1.0
func (_q *ToolUsageQuery) GroupBy(field string, fields ...string) *ToolUsageGroupBy
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 {
Agent string `json:"agent,omitempty"`
Count int `json:"count,omitempty"`
}
client.ToolUsage.Query().
GroupBy(toolusage.FieldAgent).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*ToolUsageQuery) IDs ¶ added in v1.1.0
IDs executes the query and returns a list of ToolUsage IDs.
func (*ToolUsageQuery) IDsX ¶ added in v1.1.0
func (_q *ToolUsageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ToolUsageQuery) Limit ¶ added in v1.1.0
func (_q *ToolUsageQuery) Limit(limit int) *ToolUsageQuery
Limit the number of records to be returned by this query.
func (*ToolUsageQuery) Offset ¶ added in v1.1.0
func (_q *ToolUsageQuery) Offset(offset int) *ToolUsageQuery
Offset to start from.
func (*ToolUsageQuery) Only ¶ added in v1.1.0
func (_q *ToolUsageQuery) Only(ctx context.Context) (*ToolUsage, error)
Only returns a single ToolUsage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ToolUsage entity is found. Returns a *NotFoundError when no ToolUsage entities are found.
func (*ToolUsageQuery) OnlyID ¶ added in v1.1.0
OnlyID is like Only, but returns the only ToolUsage ID in the query. Returns a *NotSingularError when more than one ToolUsage ID is found. Returns a *NotFoundError when no entities are found.
func (*ToolUsageQuery) OnlyIDX ¶ added in v1.1.0
func (_q *ToolUsageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ToolUsageQuery) OnlyX ¶ added in v1.1.0
func (_q *ToolUsageQuery) OnlyX(ctx context.Context) *ToolUsage
OnlyX is like Only, but panics if an error occurs.
func (*ToolUsageQuery) Order ¶ added in v1.1.0
func (_q *ToolUsageQuery) Order(o ...toolusage.OrderOption) *ToolUsageQuery
Order specifies how the records should be ordered.
func (*ToolUsageQuery) Select ¶ added in v1.1.0
func (_q *ToolUsageQuery) Select(fields ...string) *ToolUsageSelect
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 {
Agent string `json:"agent,omitempty"`
}
client.ToolUsage.Query().
Select(toolusage.FieldAgent).
Scan(ctx, &v)
func (*ToolUsageQuery) Unique ¶ added in v1.1.0
func (_q *ToolUsageQuery) Unique(unique bool) *ToolUsageQuery
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 (*ToolUsageQuery) Where ¶ added in v1.1.0
func (_q *ToolUsageQuery) Where(ps ...predicate.ToolUsage) *ToolUsageQuery
Where adds a new predicate for the ToolUsageQuery builder.
type ToolUsageSelect ¶ added in v1.1.0
type ToolUsageSelect struct {
*ToolUsageQuery
// contains filtered or unexported fields
}
ToolUsageSelect is the builder for selecting fields of ToolUsage entities.
func (*ToolUsageSelect) Aggregate ¶ added in v1.1.0
func (_s *ToolUsageSelect) Aggregate(fns ...AggregateFunc) *ToolUsageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ToolUsageSelect) Bool ¶ added in v1.1.0
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ToolUsageSelect) Bools ¶ added in v1.1.0
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ToolUsageSelect) BoolsX ¶ added in v1.1.0
BoolsX is like Bools, but panics if an error occurs.
func (*ToolUsageSelect) Float64 ¶ added in v1.1.0
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ToolUsageSelect) Float64X ¶ added in v1.1.0
Float64X is like Float64, but panics if an error occurs.
func (*ToolUsageSelect) Float64s ¶ added in v1.1.0
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ToolUsageSelect) Float64sX ¶ added in v1.1.0
Float64sX is like Float64s, but panics if an error occurs.
func (*ToolUsageSelect) Int ¶ added in v1.1.0
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ToolUsageSelect) Ints ¶ added in v1.1.0
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ToolUsageSelect) Scan ¶ added in v1.1.0
func (_s *ToolUsageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ToolUsageSelect) String ¶ added in v1.1.0
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ToolUsageSelect) StringX ¶ added in v1.1.0
StringX is like String, but panics if an error occurs.
type ToolUsageUpdate ¶ added in v1.1.0
type ToolUsageUpdate struct {
// contains filtered or unexported fields
}
ToolUsageUpdate is the builder for updating ToolUsage entities.
func (*ToolUsageUpdate) ClearTarget ¶ added in v1.1.0
func (_u *ToolUsageUpdate) ClearTarget() *ToolUsageUpdate
ClearTarget clears the value of the "target" field.
func (*ToolUsageUpdate) Exec ¶ added in v1.1.0
func (_u *ToolUsageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ToolUsageUpdate) ExecX ¶ added in v1.1.0
func (_u *ToolUsageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ToolUsageUpdate) Mutation ¶ added in v1.1.0
func (_u *ToolUsageUpdate) Mutation() *ToolUsageMutation
Mutation returns the ToolUsageMutation object of the builder.
func (*ToolUsageUpdate) Save ¶ added in v1.1.0
func (_u *ToolUsageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ToolUsageUpdate) SaveX ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ToolUsageUpdate) SetAgent ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SetAgent(v string) *ToolUsageUpdate
SetAgent sets the "agent" field.
func (*ToolUsageUpdate) SetCommand ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SetCommand(v string) *ToolUsageUpdate
SetCommand sets the "command" field.
func (*ToolUsageUpdate) SetNillableAgent ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SetNillableAgent(v *string) *ToolUsageUpdate
SetNillableAgent sets the "agent" field if the given value is not nil.
func (*ToolUsageUpdate) SetNillableCommand ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SetNillableCommand(v *string) *ToolUsageUpdate
SetNillableCommand sets the "command" field if the given value is not nil.
func (*ToolUsageUpdate) SetNillableSubcommand ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SetNillableSubcommand(v *string) *ToolUsageUpdate
SetNillableSubcommand sets the "subcommand" field if the given value is not nil.
func (*ToolUsageUpdate) SetNillableTarget ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SetNillableTarget(v *string) *ToolUsageUpdate
SetNillableTarget sets the "target" field if the given value is not nil.
func (*ToolUsageUpdate) SetNillableTeam ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SetNillableTeam(v *string) *ToolUsageUpdate
SetNillableTeam sets the "team" field if the given value is not nil.
func (*ToolUsageUpdate) SetSubcommand ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SetSubcommand(v string) *ToolUsageUpdate
SetSubcommand sets the "subcommand" field.
func (*ToolUsageUpdate) SetTarget ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SetTarget(v string) *ToolUsageUpdate
SetTarget sets the "target" field.
func (*ToolUsageUpdate) SetTeam ¶ added in v1.1.0
func (_u *ToolUsageUpdate) SetTeam(v string) *ToolUsageUpdate
SetTeam sets the "team" field.
func (*ToolUsageUpdate) Where ¶ added in v1.1.0
func (_u *ToolUsageUpdate) Where(ps ...predicate.ToolUsage) *ToolUsageUpdate
Where appends a list predicates to the ToolUsageUpdate builder.
type ToolUsageUpdateOne ¶ added in v1.1.0
type ToolUsageUpdateOne struct {
// contains filtered or unexported fields
}
ToolUsageUpdateOne is the builder for updating a single ToolUsage entity.
func (*ToolUsageUpdateOne) ClearTarget ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) ClearTarget() *ToolUsageUpdateOne
ClearTarget clears the value of the "target" field.
func (*ToolUsageUpdateOne) Exec ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ToolUsageUpdateOne) ExecX ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ToolUsageUpdateOne) Mutation ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) Mutation() *ToolUsageMutation
Mutation returns the ToolUsageMutation object of the builder.
func (*ToolUsageUpdateOne) Save ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) Save(ctx context.Context) (*ToolUsage, error)
Save executes the query and returns the updated ToolUsage entity.
func (*ToolUsageUpdateOne) SaveX ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SaveX(ctx context.Context) *ToolUsage
SaveX is like Save, but panics if an error occurs.
func (*ToolUsageUpdateOne) Select ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) Select(field string, fields ...string) *ToolUsageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ToolUsageUpdateOne) SetAgent ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SetAgent(v string) *ToolUsageUpdateOne
SetAgent sets the "agent" field.
func (*ToolUsageUpdateOne) SetCommand ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SetCommand(v string) *ToolUsageUpdateOne
SetCommand sets the "command" field.
func (*ToolUsageUpdateOne) SetNillableAgent ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SetNillableAgent(v *string) *ToolUsageUpdateOne
SetNillableAgent sets the "agent" field if the given value is not nil.
func (*ToolUsageUpdateOne) SetNillableCommand ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SetNillableCommand(v *string) *ToolUsageUpdateOne
SetNillableCommand sets the "command" field if the given value is not nil.
func (*ToolUsageUpdateOne) SetNillableSubcommand ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SetNillableSubcommand(v *string) *ToolUsageUpdateOne
SetNillableSubcommand sets the "subcommand" field if the given value is not nil.
func (*ToolUsageUpdateOne) SetNillableTarget ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SetNillableTarget(v *string) *ToolUsageUpdateOne
SetNillableTarget sets the "target" field if the given value is not nil.
func (*ToolUsageUpdateOne) SetNillableTeam ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SetNillableTeam(v *string) *ToolUsageUpdateOne
SetNillableTeam sets the "team" field if the given value is not nil.
func (*ToolUsageUpdateOne) SetSubcommand ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SetSubcommand(v string) *ToolUsageUpdateOne
SetSubcommand sets the "subcommand" field.
func (*ToolUsageUpdateOne) SetTarget ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SetTarget(v string) *ToolUsageUpdateOne
SetTarget sets the "target" field.
func (*ToolUsageUpdateOne) SetTeam ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) SetTeam(v string) *ToolUsageUpdateOne
SetTeam sets the "team" field.
func (*ToolUsageUpdateOne) Where ¶ added in v1.1.0
func (_u *ToolUsageUpdateOne) Where(ps ...predicate.ToolUsage) *ToolUsageUpdateOne
Where appends a list predicates to the ToolUsageUpdate builder.
type ToolUsages ¶ added in v1.1.0
type ToolUsages []*ToolUsage
ToolUsages is a parsable slice of ToolUsage.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// Attachment is the client for interacting with the Attachment builders.
Attachment *AttachmentClient
// Comment is the client for interacting with the Comment builders.
Comment *CommentClient
// Message is the client for interacting with the Message builders.
Message *MessageClient
// Reaction is the client for interacting with the Reaction builders.
Reaction *ReactionClient
// ToolUsage is the client for interacting with the ToolUsage builders.
ToolUsage *ToolUsageClient
// 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 ValidationError ¶
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- attachment.go
- attachment_create.go
- attachment_delete.go
- attachment_query.go
- attachment_update.go
- client.go
- comment.go
- comment_create.go
- comment_delete.go
- comment_query.go
- comment_update.go
- ent.go
- generate.go
- message.go
- message_create.go
- message_delete.go
- message_query.go
- message_update.go
- mutation.go
- reaction.go
- reaction_create.go
- reaction_delete.go
- reaction_query.go
- reaction_update.go
- runtime.go
- toolusage.go
- toolusage_create.go
- toolusage_delete.go
- toolusage_query.go
- toolusage_update.go
- tx.go