Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type AttachedFile
- type AttachedFileClient
- func (c *AttachedFileClient) Create() *AttachedFileCreate
- func (c *AttachedFileClient) CreateBulk(builders ...*AttachedFileCreate) *AttachedFileCreateBulk
- func (c *AttachedFileClient) Delete() *AttachedFileDelete
- func (c *AttachedFileClient) DeleteOne(af *AttachedFile) *AttachedFileDeleteOne
- func (c *AttachedFileClient) DeleteOneID(id int) *AttachedFileDeleteOne
- func (c *AttachedFileClient) Get(ctx context.Context, id int) (*AttachedFile, error)
- func (c *AttachedFileClient) GetX(ctx context.Context, id int) *AttachedFile
- func (c *AttachedFileClient) Hooks() []Hook
- func (c *AttachedFileClient) Intercept(interceptors ...Interceptor)
- func (c *AttachedFileClient) Interceptors() []Interceptor
- func (c *AttachedFileClient) Query() *AttachedFileQuery
- func (c *AttachedFileClient) QueryFi(af *AttachedFile) *FileQuery
- func (c *AttachedFileClient) QueryProc(af *AttachedFile) *ProcessQuery
- func (c *AttachedFileClient) Update() *AttachedFileUpdate
- func (c *AttachedFileClient) UpdateOne(af *AttachedFile) *AttachedFileUpdateOne
- func (c *AttachedFileClient) UpdateOneID(id int) *AttachedFileUpdateOne
- func (c *AttachedFileClient) Use(hooks ...Hook)
- type AttachedFileCreate
- func (afc *AttachedFileCreate) Exec(ctx context.Context) error
- func (afc *AttachedFileCreate) ExecX(ctx context.Context)
- func (afc *AttachedFileCreate) Mutation() *AttachedFileMutation
- func (afc *AttachedFileCreate) OnConflict(opts ...sql.ConflictOption) *AttachedFileUpsertOne
- func (afc *AttachedFileCreate) OnConflictColumns(columns ...string) *AttachedFileUpsertOne
- func (afc *AttachedFileCreate) Save(ctx context.Context) (*AttachedFile, error)
- func (afc *AttachedFileCreate) SaveX(ctx context.Context) *AttachedFile
- func (afc *AttachedFileCreate) SetAttachTime(t time.Time) *AttachedFileCreate
- func (afc *AttachedFileCreate) SetFID(i int) *AttachedFileCreate
- func (afc *AttachedFileCreate) SetFi(f *File) *AttachedFileCreate
- func (afc *AttachedFileCreate) SetFiID(id int) *AttachedFileCreate
- func (afc *AttachedFileCreate) SetNillableAttachTime(t *time.Time) *AttachedFileCreate
- func (afc *AttachedFileCreate) SetProc(p *Process) *AttachedFileCreate
- func (afc *AttachedFileCreate) SetProcID(i int) *AttachedFileCreate
- type AttachedFileCreateBulk
- func (afcb *AttachedFileCreateBulk) Exec(ctx context.Context) error
- func (afcb *AttachedFileCreateBulk) ExecX(ctx context.Context)
- func (afcb *AttachedFileCreateBulk) OnConflict(opts ...sql.ConflictOption) *AttachedFileUpsertBulk
- func (afcb *AttachedFileCreateBulk) OnConflictColumns(columns ...string) *AttachedFileUpsertBulk
- func (afcb *AttachedFileCreateBulk) Save(ctx context.Context) ([]*AttachedFile, error)
- func (afcb *AttachedFileCreateBulk) SaveX(ctx context.Context) []*AttachedFile
- type AttachedFileDelete
- type AttachedFileDeleteOne
- type AttachedFileEdges
- type AttachedFileFilter
- func (f *AttachedFileFilter) Where(p entql.P)
- func (f *AttachedFileFilter) WhereAttachTime(p entql.TimeP)
- func (f *AttachedFileFilter) WhereFID(p entql.IntP)
- func (f *AttachedFileFilter) WhereHasFi()
- func (f *AttachedFileFilter) WhereHasFiWith(preds ...predicate.File)
- func (f *AttachedFileFilter) WhereHasProc()
- func (f *AttachedFileFilter) WhereHasProcWith(preds ...predicate.Process)
- func (f *AttachedFileFilter) WhereID(p entql.IntP)
- func (f *AttachedFileFilter) WhereProcID(p entql.IntP)
- type AttachedFileGroupBy
- func (afgb *AttachedFileGroupBy) Aggregate(fns ...AggregateFunc) *AttachedFileGroupBy
- func (s *AttachedFileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AttachedFileGroupBy) BoolX(ctx context.Context) bool
- func (s *AttachedFileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AttachedFileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AttachedFileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AttachedFileGroupBy) Float64X(ctx context.Context) float64
- func (s *AttachedFileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AttachedFileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AttachedFileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AttachedFileGroupBy) IntX(ctx context.Context) int
- func (s *AttachedFileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AttachedFileGroupBy) IntsX(ctx context.Context) []int
- func (afgb *AttachedFileGroupBy) Scan(ctx context.Context, v any) error
- func (s *AttachedFileGroupBy) ScanX(ctx context.Context, v any)
- func (s *AttachedFileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AttachedFileGroupBy) StringX(ctx context.Context) string
- func (s *AttachedFileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AttachedFileGroupBy) StringsX(ctx context.Context) []string
- type AttachedFileMutation
- func (m *AttachedFileMutation) AddField(name string, value ent.Value) error
- func (m *AttachedFileMutation) AddedEdges() []string
- func (m *AttachedFileMutation) AddedField(name string) (ent.Value, bool)
- func (m *AttachedFileMutation) AddedFields() []string
- func (m *AttachedFileMutation) AddedIDs(name string) []ent.Value
- func (m *AttachedFileMutation) AttachTime() (r time.Time, exists bool)
- func (m *AttachedFileMutation) ClearEdge(name string) error
- func (m *AttachedFileMutation) ClearFi()
- func (m *AttachedFileMutation) ClearField(name string) error
- func (m *AttachedFileMutation) ClearProc()
- func (m *AttachedFileMutation) ClearedEdges() []string
- func (m *AttachedFileMutation) ClearedFields() []string
- func (m AttachedFileMutation) Client() *Client
- func (m *AttachedFileMutation) EdgeCleared(name string) bool
- func (m *AttachedFileMutation) FID() (r int, exists bool)
- func (m *AttachedFileMutation) FiCleared() bool
- func (m *AttachedFileMutation) FiID() (id int, exists bool)
- func (m *AttachedFileMutation) FiIDs() (ids []int)
- func (m *AttachedFileMutation) Field(name string) (ent.Value, bool)
- func (m *AttachedFileMutation) FieldCleared(name string) bool
- func (m *AttachedFileMutation) Fields() []string
- func (m *AttachedFileMutation) Filter() *AttachedFileFilter
- func (m *AttachedFileMutation) ID() (id int, exists bool)
- func (m *AttachedFileMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AttachedFileMutation) OldAttachTime(ctx context.Context) (v time.Time, err error)
- func (m *AttachedFileMutation) OldFID(ctx context.Context) (v int, err error)
- func (m *AttachedFileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AttachedFileMutation) OldProcID(ctx context.Context) (v int, err error)
- func (m *AttachedFileMutation) Op() Op
- func (m *AttachedFileMutation) ProcCleared() bool
- func (m *AttachedFileMutation) ProcID() (r int, exists bool)
- func (m *AttachedFileMutation) ProcIDs() (ids []int)
- func (m *AttachedFileMutation) RemovedEdges() []string
- func (m *AttachedFileMutation) RemovedIDs(name string) []ent.Value
- func (m *AttachedFileMutation) ResetAttachTime()
- func (m *AttachedFileMutation) ResetEdge(name string) error
- func (m *AttachedFileMutation) ResetFID()
- func (m *AttachedFileMutation) ResetFi()
- func (m *AttachedFileMutation) ResetField(name string) error
- func (m *AttachedFileMutation) ResetProc()
- func (m *AttachedFileMutation) ResetProcID()
- func (m *AttachedFileMutation) SetAttachTime(t time.Time)
- func (m *AttachedFileMutation) SetFID(i int)
- func (m *AttachedFileMutation) SetFiID(id int)
- func (m *AttachedFileMutation) SetField(name string, value ent.Value) error
- func (m *AttachedFileMutation) SetOp(op Op)
- func (m *AttachedFileMutation) SetProcID(i int)
- func (m AttachedFileMutation) Tx() (*Tx, error)
- func (m *AttachedFileMutation) Type() string
- func (m *AttachedFileMutation) Where(ps ...predicate.AttachedFile)
- func (m *AttachedFileMutation) WhereP(ps ...func(*sql.Selector))
- type AttachedFileQuery
- func (afq *AttachedFileQuery) Aggregate(fns ...AggregateFunc) *AttachedFileSelect
- func (afq *AttachedFileQuery) All(ctx context.Context) ([]*AttachedFile, error)
- func (afq *AttachedFileQuery) AllX(ctx context.Context) []*AttachedFile
- func (afq *AttachedFileQuery) Clone() *AttachedFileQuery
- func (afq *AttachedFileQuery) Count(ctx context.Context) (int, error)
- func (afq *AttachedFileQuery) CountX(ctx context.Context) int
- func (afq *AttachedFileQuery) Exist(ctx context.Context) (bool, error)
- func (afq *AttachedFileQuery) ExistX(ctx context.Context) bool
- func (afq *AttachedFileQuery) Filter() *AttachedFileFilter
- func (afq *AttachedFileQuery) First(ctx context.Context) (*AttachedFile, error)
- func (afq *AttachedFileQuery) FirstID(ctx context.Context) (id int, err error)
- func (afq *AttachedFileQuery) FirstIDX(ctx context.Context) int
- func (afq *AttachedFileQuery) FirstX(ctx context.Context) *AttachedFile
- func (afq *AttachedFileQuery) GroupBy(field string, fields ...string) *AttachedFileGroupBy
- func (afq *AttachedFileQuery) IDs(ctx context.Context) (ids []int, err error)
- func (afq *AttachedFileQuery) IDsX(ctx context.Context) []int
- func (afq *AttachedFileQuery) Limit(limit int) *AttachedFileQuery
- func (afq *AttachedFileQuery) Offset(offset int) *AttachedFileQuery
- func (afq *AttachedFileQuery) Only(ctx context.Context) (*AttachedFile, error)
- func (afq *AttachedFileQuery) OnlyID(ctx context.Context) (id int, err error)
- func (afq *AttachedFileQuery) OnlyIDX(ctx context.Context) int
- func (afq *AttachedFileQuery) OnlyX(ctx context.Context) *AttachedFile
- func (afq *AttachedFileQuery) Order(o ...OrderFunc) *AttachedFileQuery
- func (afq *AttachedFileQuery) QueryFi() *FileQuery
- func (afq *AttachedFileQuery) QueryProc() *ProcessQuery
- func (afq *AttachedFileQuery) Select(fields ...string) *AttachedFileSelect
- func (afq *AttachedFileQuery) Unique(unique bool) *AttachedFileQuery
- func (afq *AttachedFileQuery) Where(ps ...predicate.AttachedFile) *AttachedFileQuery
- func (afq *AttachedFileQuery) WithFi(opts ...func(*FileQuery)) *AttachedFileQuery
- func (afq *AttachedFileQuery) WithProc(opts ...func(*ProcessQuery)) *AttachedFileQuery
- type AttachedFileSelect
- func (afs *AttachedFileSelect) Aggregate(fns ...AggregateFunc) *AttachedFileSelect
- func (s *AttachedFileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AttachedFileSelect) BoolX(ctx context.Context) bool
- func (s *AttachedFileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AttachedFileSelect) BoolsX(ctx context.Context) []bool
- func (s *AttachedFileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AttachedFileSelect) Float64X(ctx context.Context) float64
- func (s *AttachedFileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AttachedFileSelect) Float64sX(ctx context.Context) []float64
- func (s *AttachedFileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AttachedFileSelect) IntX(ctx context.Context) int
- func (s *AttachedFileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AttachedFileSelect) IntsX(ctx context.Context) []int
- func (afs *AttachedFileSelect) Scan(ctx context.Context, v any) error
- func (s *AttachedFileSelect) ScanX(ctx context.Context, v any)
- func (s *AttachedFileSelect) String(ctx context.Context) (_ string, err error)
- func (s *AttachedFileSelect) StringX(ctx context.Context) string
- func (s *AttachedFileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AttachedFileSelect) StringsX(ctx context.Context) []string
- type AttachedFileUpdate
- func (afu *AttachedFileUpdate) ClearFi() *AttachedFileUpdate
- func (afu *AttachedFileUpdate) ClearProc() *AttachedFileUpdate
- func (afu *AttachedFileUpdate) Exec(ctx context.Context) error
- func (afu *AttachedFileUpdate) ExecX(ctx context.Context)
- func (afu *AttachedFileUpdate) Mutation() *AttachedFileMutation
- func (afu *AttachedFileUpdate) Save(ctx context.Context) (int, error)
- func (afu *AttachedFileUpdate) SaveX(ctx context.Context) int
- func (afu *AttachedFileUpdate) SetAttachTime(t time.Time) *AttachedFileUpdate
- func (afu *AttachedFileUpdate) SetFID(i int) *AttachedFileUpdate
- func (afu *AttachedFileUpdate) SetFi(f *File) *AttachedFileUpdate
- func (afu *AttachedFileUpdate) SetFiID(id int) *AttachedFileUpdate
- func (afu *AttachedFileUpdate) SetNillableAttachTime(t *time.Time) *AttachedFileUpdate
- func (afu *AttachedFileUpdate) SetProc(p *Process) *AttachedFileUpdate
- func (afu *AttachedFileUpdate) SetProcID(i int) *AttachedFileUpdate
- func (afu *AttachedFileUpdate) Where(ps ...predicate.AttachedFile) *AttachedFileUpdate
- type AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) ClearFi() *AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) ClearProc() *AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) Exec(ctx context.Context) error
- func (afuo *AttachedFileUpdateOne) ExecX(ctx context.Context)
- func (afuo *AttachedFileUpdateOne) Mutation() *AttachedFileMutation
- func (afuo *AttachedFileUpdateOne) Save(ctx context.Context) (*AttachedFile, error)
- func (afuo *AttachedFileUpdateOne) SaveX(ctx context.Context) *AttachedFile
- func (afuo *AttachedFileUpdateOne) Select(field string, fields ...string) *AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) SetAttachTime(t time.Time) *AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) SetFID(i int) *AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) SetFi(f *File) *AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) SetFiID(id int) *AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) SetNillableAttachTime(t *time.Time) *AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) SetProc(p *Process) *AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) SetProcID(i int) *AttachedFileUpdateOne
- func (afuo *AttachedFileUpdateOne) Where(ps ...predicate.AttachedFile) *AttachedFileUpdateOne
- type AttachedFileUpsert
- func (u *AttachedFileUpsert) SetAttachTime(v time.Time) *AttachedFileUpsert
- func (u *AttachedFileUpsert) SetFID(v int) *AttachedFileUpsert
- func (u *AttachedFileUpsert) SetProcID(v int) *AttachedFileUpsert
- func (u *AttachedFileUpsert) UpdateAttachTime() *AttachedFileUpsert
- func (u *AttachedFileUpsert) UpdateFID() *AttachedFileUpsert
- func (u *AttachedFileUpsert) UpdateProcID() *AttachedFileUpsert
- type AttachedFileUpsertBulk
- func (u *AttachedFileUpsertBulk) DoNothing() *AttachedFileUpsertBulk
- func (u *AttachedFileUpsertBulk) Exec(ctx context.Context) error
- func (u *AttachedFileUpsertBulk) ExecX(ctx context.Context)
- func (u *AttachedFileUpsertBulk) Ignore() *AttachedFileUpsertBulk
- func (u *AttachedFileUpsertBulk) SetAttachTime(v time.Time) *AttachedFileUpsertBulk
- func (u *AttachedFileUpsertBulk) SetFID(v int) *AttachedFileUpsertBulk
- func (u *AttachedFileUpsertBulk) SetProcID(v int) *AttachedFileUpsertBulk
- func (u *AttachedFileUpsertBulk) Update(set func(*AttachedFileUpsert)) *AttachedFileUpsertBulk
- func (u *AttachedFileUpsertBulk) UpdateAttachTime() *AttachedFileUpsertBulk
- func (u *AttachedFileUpsertBulk) UpdateFID() *AttachedFileUpsertBulk
- func (u *AttachedFileUpsertBulk) UpdateNewValues() *AttachedFileUpsertBulk
- func (u *AttachedFileUpsertBulk) UpdateProcID() *AttachedFileUpsertBulk
- type AttachedFileUpsertOne
- func (u *AttachedFileUpsertOne) DoNothing() *AttachedFileUpsertOne
- func (u *AttachedFileUpsertOne) Exec(ctx context.Context) error
- func (u *AttachedFileUpsertOne) ExecX(ctx context.Context)
- func (u *AttachedFileUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *AttachedFileUpsertOne) IDX(ctx context.Context) int
- func (u *AttachedFileUpsertOne) Ignore() *AttachedFileUpsertOne
- func (u *AttachedFileUpsertOne) SetAttachTime(v time.Time) *AttachedFileUpsertOne
- func (u *AttachedFileUpsertOne) SetFID(v int) *AttachedFileUpsertOne
- func (u *AttachedFileUpsertOne) SetProcID(v int) *AttachedFileUpsertOne
- func (u *AttachedFileUpsertOne) Update(set func(*AttachedFileUpsert)) *AttachedFileUpsertOne
- func (u *AttachedFileUpsertOne) UpdateAttachTime() *AttachedFileUpsertOne
- func (u *AttachedFileUpsertOne) UpdateFID() *AttachedFileUpsertOne
- func (u *AttachedFileUpsertOne) UpdateNewValues() *AttachedFileUpsertOne
- func (u *AttachedFileUpsertOne) UpdateProcID() *AttachedFileUpsertOne
- type AttachedFiles
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type File
- type FileClient
- func (c *FileClient) Create() *FileCreate
- func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
- func (c *FileClient) Delete() *FileDelete
- func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
- func (c *FileClient) DeleteOneID(id int) *FileDeleteOne
- func (c *FileClient) Get(ctx context.Context, id int) (*File, error)
- func (c *FileClient) GetX(ctx context.Context, id int) *File
- func (c *FileClient) Hooks() []Hook
- func (c *FileClient) Intercept(interceptors ...Interceptor)
- func (c *FileClient) Interceptors() []Interceptor
- func (c *FileClient) Query() *FileQuery
- func (c *FileClient) QueryProcesses(f *File) *ProcessQuery
- func (c *FileClient) Update() *FileUpdate
- func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
- func (c *FileClient) UpdateOneID(id int) *FileUpdateOne
- func (c *FileClient) Use(hooks ...Hook)
- type FileCreate
- func (fc *FileCreate) AddProcessIDs(ids ...int) *FileCreate
- func (fc *FileCreate) AddProcesses(p ...*Process) *FileCreate
- func (fc *FileCreate) Exec(ctx context.Context) error
- func (fc *FileCreate) ExecX(ctx context.Context)
- func (fc *FileCreate) Mutation() *FileMutation
- func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne
- func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne
- func (fc *FileCreate) Save(ctx context.Context) (*File, error)
- func (fc *FileCreate) SaveX(ctx context.Context) *File
- func (fc *FileCreate) SetName(s string) *FileCreate
- type FileCreateBulk
- func (fcb *FileCreateBulk) Exec(ctx context.Context) error
- func (fcb *FileCreateBulk) ExecX(ctx context.Context)
- func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk
- func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk
- func (fcb *FileCreateBulk) Save(ctx context.Context) ([]*File, error)
- func (fcb *FileCreateBulk) SaveX(ctx context.Context) []*File
- type FileDelete
- type FileDeleteOne
- type FileEdges
- type FileFilter
- type FileGroupBy
- func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
- func (s *FileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileGroupBy) BoolX(ctx context.Context) bool
- func (s *FileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileGroupBy) Float64X(ctx context.Context) float64
- func (s *FileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FileGroupBy) IntX(ctx context.Context) int
- func (s *FileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FileGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
- func (s *FileGroupBy) ScanX(ctx context.Context, v any)
- func (s *FileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FileGroupBy) StringX(ctx context.Context) string
- func (s *FileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FileGroupBy) StringsX(ctx context.Context) []string
- type FileMutation
- func (m *FileMutation) AddField(name string, value ent.Value) error
- func (m *FileMutation) AddProcessIDs(ids ...int)
- func (m *FileMutation) AddedEdges() []string
- func (m *FileMutation) AddedField(name string) (ent.Value, bool)
- func (m *FileMutation) AddedFields() []string
- func (m *FileMutation) AddedIDs(name string) []ent.Value
- func (m *FileMutation) ClearEdge(name string) error
- func (m *FileMutation) ClearField(name string) error
- func (m *FileMutation) ClearProcesses()
- func (m *FileMutation) ClearedEdges() []string
- func (m *FileMutation) ClearedFields() []string
- func (m FileMutation) Client() *Client
- func (m *FileMutation) EdgeCleared(name string) bool
- func (m *FileMutation) Field(name string) (ent.Value, bool)
- func (m *FileMutation) FieldCleared(name string) bool
- func (m *FileMutation) Fields() []string
- func (m *FileMutation) Filter() *FileFilter
- func (m *FileMutation) ID() (id int, exists bool)
- func (m *FileMutation) IDs(ctx context.Context) ([]int, error)
- func (m *FileMutation) Name() (r string, exists bool)
- func (m *FileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FileMutation) OldName(ctx context.Context) (v string, err error)
- func (m *FileMutation) Op() Op
- func (m *FileMutation) ProcessesCleared() bool
- func (m *FileMutation) ProcessesIDs() (ids []int)
- func (m *FileMutation) RemoveProcessIDs(ids ...int)
- func (m *FileMutation) RemovedEdges() []string
- func (m *FileMutation) RemovedIDs(name string) []ent.Value
- func (m *FileMutation) RemovedProcessesIDs() (ids []int)
- func (m *FileMutation) ResetEdge(name string) error
- func (m *FileMutation) ResetField(name string) error
- func (m *FileMutation) ResetName()
- func (m *FileMutation) ResetProcesses()
- func (m *FileMutation) SetField(name string, value ent.Value) error
- func (m *FileMutation) SetName(s string)
- func (m *FileMutation) SetOp(op Op)
- func (m FileMutation) Tx() (*Tx, error)
- func (m *FileMutation) Type() string
- func (m *FileMutation) Where(ps ...predicate.File)
- func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
- type FileQuery
- func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
- func (fq *FileQuery) All(ctx context.Context) ([]*File, error)
- func (fq *FileQuery) AllX(ctx context.Context) []*File
- func (fq *FileQuery) Clone() *FileQuery
- func (fq *FileQuery) Count(ctx context.Context) (int, error)
- func (fq *FileQuery) CountX(ctx context.Context) int
- func (fq *FileQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FileQuery) ExistX(ctx context.Context) bool
- func (fq *FileQuery) Filter() *FileFilter
- func (fq *FileQuery) First(ctx context.Context) (*File, error)
- func (fq *FileQuery) FirstID(ctx context.Context) (id int, err error)
- func (fq *FileQuery) FirstIDX(ctx context.Context) int
- func (fq *FileQuery) FirstX(ctx context.Context) *File
- func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
- func (fq *FileQuery) IDs(ctx context.Context) (ids []int, err error)
- func (fq *FileQuery) IDsX(ctx context.Context) []int
- func (fq *FileQuery) Limit(limit int) *FileQuery
- func (fq *FileQuery) Offset(offset int) *FileQuery
- func (fq *FileQuery) Only(ctx context.Context) (*File, error)
- func (fq *FileQuery) OnlyID(ctx context.Context) (id int, err error)
- func (fq *FileQuery) OnlyIDX(ctx context.Context) int
- func (fq *FileQuery) OnlyX(ctx context.Context) *File
- func (fq *FileQuery) Order(o ...OrderFunc) *FileQuery
- func (fq *FileQuery) QueryProcesses() *ProcessQuery
- func (fq *FileQuery) Select(fields ...string) *FileSelect
- func (fq *FileQuery) Unique(unique bool) *FileQuery
- func (fq *FileQuery) Where(ps ...predicate.File) *FileQuery
- func (fq *FileQuery) WithProcesses(opts ...func(*ProcessQuery)) *FileQuery
- type FileSelect
- func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
- func (s *FileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileSelect) BoolX(ctx context.Context) bool
- func (s *FileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FileSelect) BoolsX(ctx context.Context) []bool
- func (s *FileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileSelect) Float64X(ctx context.Context) float64
- func (s *FileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileSelect) Float64sX(ctx context.Context) []float64
- func (s *FileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FileSelect) IntX(ctx context.Context) int
- func (s *FileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FileSelect) IntsX(ctx context.Context) []int
- func (fs *FileSelect) Scan(ctx context.Context, v any) error
- func (s *FileSelect) ScanX(ctx context.Context, v any)
- func (s *FileSelect) String(ctx context.Context) (_ string, err error)
- func (s *FileSelect) StringX(ctx context.Context) string
- func (s *FileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FileSelect) StringsX(ctx context.Context) []string
- type FileUpdate
- func (fu *FileUpdate) AddProcessIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) AddProcesses(p ...*Process) *FileUpdate
- func (fu *FileUpdate) ClearProcesses() *FileUpdate
- func (fu *FileUpdate) Exec(ctx context.Context) error
- func (fu *FileUpdate) ExecX(ctx context.Context)
- func (fu *FileUpdate) Mutation() *FileMutation
- func (fu *FileUpdate) RemoveProcessIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) RemoveProcesses(p ...*Process) *FileUpdate
- func (fu *FileUpdate) Save(ctx context.Context) (int, error)
- func (fu *FileUpdate) SaveX(ctx context.Context) int
- func (fu *FileUpdate) SetName(s string) *FileUpdate
- func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
- type FileUpdateOne
- func (fuo *FileUpdateOne) AddProcessIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) AddProcesses(p ...*Process) *FileUpdateOne
- func (fuo *FileUpdateOne) ClearProcesses() *FileUpdateOne
- func (fuo *FileUpdateOne) Exec(ctx context.Context) error
- func (fuo *FileUpdateOne) ExecX(ctx context.Context)
- func (fuo *FileUpdateOne) Mutation() *FileMutation
- func (fuo *FileUpdateOne) RemoveProcessIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveProcesses(p ...*Process) *FileUpdateOne
- func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
- func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
- func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
- type FileUpsert
- type FileUpsertBulk
- func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk
- func (u *FileUpsertBulk) Exec(ctx context.Context) error
- func (u *FileUpsertBulk) ExecX(ctx context.Context)
- func (u *FileUpsertBulk) Ignore() *FileUpsertBulk
- func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk
- func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk
- type FileUpsertOne
- func (u *FileUpsertOne) DoNothing() *FileUpsertOne
- func (u *FileUpsertOne) Exec(ctx context.Context) error
- func (u *FileUpsertOne) ExecX(ctx context.Context)
- func (u *FileUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *FileUpsertOne) IDX(ctx context.Context) int
- func (u *FileUpsertOne) Ignore() *FileUpsertOne
- func (u *FileUpsertOne) SetName(v string) *FileUpsertOne
- func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne
- func (u *FileUpsertOne) UpdateName() *FileUpsertOne
- func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne
- type Files
- type Friendship
- type FriendshipClient
- func (c *FriendshipClient) Create() *FriendshipCreate
- func (c *FriendshipClient) CreateBulk(builders ...*FriendshipCreate) *FriendshipCreateBulk
- func (c *FriendshipClient) Delete() *FriendshipDelete
- func (c *FriendshipClient) DeleteOne(f *Friendship) *FriendshipDeleteOne
- func (c *FriendshipClient) DeleteOneID(id int) *FriendshipDeleteOne
- func (c *FriendshipClient) Get(ctx context.Context, id int) (*Friendship, error)
- func (c *FriendshipClient) GetX(ctx context.Context, id int) *Friendship
- func (c *FriendshipClient) Hooks() []Hook
- func (c *FriendshipClient) Intercept(interceptors ...Interceptor)
- func (c *FriendshipClient) Interceptors() []Interceptor
- func (c *FriendshipClient) Query() *FriendshipQuery
- func (c *FriendshipClient) QueryFriend(f *Friendship) *UserQuery
- func (c *FriendshipClient) QueryUser(f *Friendship) *UserQuery
- func (c *FriendshipClient) Update() *FriendshipUpdate
- func (c *FriendshipClient) UpdateOne(f *Friendship) *FriendshipUpdateOne
- func (c *FriendshipClient) UpdateOneID(id int) *FriendshipUpdateOne
- func (c *FriendshipClient) Use(hooks ...Hook)
- type FriendshipCreate
- func (fc *FriendshipCreate) Exec(ctx context.Context) error
- func (fc *FriendshipCreate) ExecX(ctx context.Context)
- func (fc *FriendshipCreate) Mutation() *FriendshipMutation
- func (fc *FriendshipCreate) OnConflict(opts ...sql.ConflictOption) *FriendshipUpsertOne
- func (fc *FriendshipCreate) OnConflictColumns(columns ...string) *FriendshipUpsertOne
- func (fc *FriendshipCreate) Save(ctx context.Context) (*Friendship, error)
- func (fc *FriendshipCreate) SaveX(ctx context.Context) *Friendship
- func (fc *FriendshipCreate) SetCreatedAt(t time.Time) *FriendshipCreate
- func (fc *FriendshipCreate) SetFriend(u *User) *FriendshipCreate
- func (fc *FriendshipCreate) SetFriendID(i int) *FriendshipCreate
- func (fc *FriendshipCreate) SetNillableCreatedAt(t *time.Time) *FriendshipCreate
- func (fc *FriendshipCreate) SetNillableWeight(i *int) *FriendshipCreate
- func (fc *FriendshipCreate) SetUser(u *User) *FriendshipCreate
- func (fc *FriendshipCreate) SetUserID(i int) *FriendshipCreate
- func (fc *FriendshipCreate) SetWeight(i int) *FriendshipCreate
- type FriendshipCreateBulk
- func (fcb *FriendshipCreateBulk) Exec(ctx context.Context) error
- func (fcb *FriendshipCreateBulk) ExecX(ctx context.Context)
- func (fcb *FriendshipCreateBulk) OnConflict(opts ...sql.ConflictOption) *FriendshipUpsertBulk
- func (fcb *FriendshipCreateBulk) OnConflictColumns(columns ...string) *FriendshipUpsertBulk
- func (fcb *FriendshipCreateBulk) Save(ctx context.Context) ([]*Friendship, error)
- func (fcb *FriendshipCreateBulk) SaveX(ctx context.Context) []*Friendship
- type FriendshipDelete
- type FriendshipDeleteOne
- type FriendshipEdges
- type FriendshipFilter
- func (f *FriendshipFilter) Where(p entql.P)
- func (f *FriendshipFilter) WhereCreatedAt(p entql.TimeP)
- func (f *FriendshipFilter) WhereFriendID(p entql.IntP)
- func (f *FriendshipFilter) WhereHasFriend()
- func (f *FriendshipFilter) WhereHasFriendWith(preds ...predicate.User)
- func (f *FriendshipFilter) WhereHasUser()
- func (f *FriendshipFilter) WhereHasUserWith(preds ...predicate.User)
- func (f *FriendshipFilter) WhereID(p entql.IntP)
- func (f *FriendshipFilter) WhereUserID(p entql.IntP)
- func (f *FriendshipFilter) WhereWeight(p entql.IntP)
- type FriendshipGroupBy
- func (fgb *FriendshipGroupBy) Aggregate(fns ...AggregateFunc) *FriendshipGroupBy
- func (s *FriendshipGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FriendshipGroupBy) BoolX(ctx context.Context) bool
- func (s *FriendshipGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FriendshipGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FriendshipGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FriendshipGroupBy) Float64X(ctx context.Context) float64
- func (s *FriendshipGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FriendshipGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FriendshipGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FriendshipGroupBy) IntX(ctx context.Context) int
- func (s *FriendshipGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FriendshipGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FriendshipGroupBy) Scan(ctx context.Context, v any) error
- func (s *FriendshipGroupBy) ScanX(ctx context.Context, v any)
- func (s *FriendshipGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FriendshipGroupBy) StringX(ctx context.Context) string
- func (s *FriendshipGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FriendshipGroupBy) StringsX(ctx context.Context) []string
- type FriendshipMutation
- func (m *FriendshipMutation) AddField(name string, value ent.Value) error
- func (m *FriendshipMutation) AddWeight(i int)
- func (m *FriendshipMutation) AddedEdges() []string
- func (m *FriendshipMutation) AddedField(name string) (ent.Value, bool)
- func (m *FriendshipMutation) AddedFields() []string
- func (m *FriendshipMutation) AddedIDs(name string) []ent.Value
- func (m *FriendshipMutation) AddedWeight() (r int, exists bool)
- func (m *FriendshipMutation) ClearEdge(name string) error
- func (m *FriendshipMutation) ClearField(name string) error
- func (m *FriendshipMutation) ClearFriend()
- func (m *FriendshipMutation) ClearUser()
- func (m *FriendshipMutation) ClearedEdges() []string
- func (m *FriendshipMutation) ClearedFields() []string
- func (m FriendshipMutation) Client() *Client
- func (m *FriendshipMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FriendshipMutation) EdgeCleared(name string) bool
- func (m *FriendshipMutation) Field(name string) (ent.Value, bool)
- func (m *FriendshipMutation) FieldCleared(name string) bool
- func (m *FriendshipMutation) Fields() []string
- func (m *FriendshipMutation) Filter() *FriendshipFilter
- func (m *FriendshipMutation) FriendCleared() bool
- func (m *FriendshipMutation) FriendID() (r int, exists bool)
- func (m *FriendshipMutation) FriendIDs() (ids []int)
- func (m *FriendshipMutation) ID() (id int, exists bool)
- func (m *FriendshipMutation) IDs(ctx context.Context) ([]int, error)
- func (m *FriendshipMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FriendshipMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FriendshipMutation) OldFriendID(ctx context.Context) (v int, err error)
- func (m *FriendshipMutation) OldUserID(ctx context.Context) (v int, err error)
- func (m *FriendshipMutation) OldWeight(ctx context.Context) (v int, err error)
- func (m *FriendshipMutation) Op() Op
- func (m *FriendshipMutation) RemovedEdges() []string
- func (m *FriendshipMutation) RemovedIDs(name string) []ent.Value
- func (m *FriendshipMutation) ResetCreatedAt()
- func (m *FriendshipMutation) ResetEdge(name string) error
- func (m *FriendshipMutation) ResetField(name string) error
- func (m *FriendshipMutation) ResetFriend()
- func (m *FriendshipMutation) ResetFriendID()
- func (m *FriendshipMutation) ResetUser()
- func (m *FriendshipMutation) ResetUserID()
- func (m *FriendshipMutation) ResetWeight()
- func (m *FriendshipMutation) SetCreatedAt(t time.Time)
- func (m *FriendshipMutation) SetField(name string, value ent.Value) error
- func (m *FriendshipMutation) SetFriendID(i int)
- func (m *FriendshipMutation) SetOp(op Op)
- func (m *FriendshipMutation) SetUserID(i int)
- func (m *FriendshipMutation) SetWeight(i int)
- func (m FriendshipMutation) Tx() (*Tx, error)
- func (m *FriendshipMutation) Type() string
- func (m *FriendshipMutation) UserCleared() bool
- func (m *FriendshipMutation) UserID() (r int, exists bool)
- func (m *FriendshipMutation) UserIDs() (ids []int)
- func (m *FriendshipMutation) Weight() (r int, exists bool)
- func (m *FriendshipMutation) Where(ps ...predicate.Friendship)
- func (m *FriendshipMutation) WhereP(ps ...func(*sql.Selector))
- type FriendshipQuery
- func (fq *FriendshipQuery) Aggregate(fns ...AggregateFunc) *FriendshipSelect
- func (fq *FriendshipQuery) All(ctx context.Context) ([]*Friendship, error)
- func (fq *FriendshipQuery) AllX(ctx context.Context) []*Friendship
- func (fq *FriendshipQuery) Clone() *FriendshipQuery
- func (fq *FriendshipQuery) Count(ctx context.Context) (int, error)
- func (fq *FriendshipQuery) CountX(ctx context.Context) int
- func (fq *FriendshipQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FriendshipQuery) ExistX(ctx context.Context) bool
- func (fq *FriendshipQuery) Filter() *FriendshipFilter
- func (fq *FriendshipQuery) First(ctx context.Context) (*Friendship, error)
- func (fq *FriendshipQuery) FirstID(ctx context.Context) (id int, err error)
- func (fq *FriendshipQuery) FirstIDX(ctx context.Context) int
- func (fq *FriendshipQuery) FirstX(ctx context.Context) *Friendship
- func (fq *FriendshipQuery) GroupBy(field string, fields ...string) *FriendshipGroupBy
- func (fq *FriendshipQuery) IDs(ctx context.Context) (ids []int, err error)
- func (fq *FriendshipQuery) IDsX(ctx context.Context) []int
- func (fq *FriendshipQuery) Limit(limit int) *FriendshipQuery
- func (fq *FriendshipQuery) Offset(offset int) *FriendshipQuery
- func (fq *FriendshipQuery) Only(ctx context.Context) (*Friendship, error)
- func (fq *FriendshipQuery) OnlyID(ctx context.Context) (id int, err error)
- func (fq *FriendshipQuery) OnlyIDX(ctx context.Context) int
- func (fq *FriendshipQuery) OnlyX(ctx context.Context) *Friendship
- func (fq *FriendshipQuery) Order(o ...OrderFunc) *FriendshipQuery
- func (fq *FriendshipQuery) QueryFriend() *UserQuery
- func (fq *FriendshipQuery) QueryUser() *UserQuery
- func (fq *FriendshipQuery) Select(fields ...string) *FriendshipSelect
- func (fq *FriendshipQuery) Unique(unique bool) *FriendshipQuery
- func (fq *FriendshipQuery) Where(ps ...predicate.Friendship) *FriendshipQuery
- func (fq *FriendshipQuery) WithFriend(opts ...func(*UserQuery)) *FriendshipQuery
- func (fq *FriendshipQuery) WithUser(opts ...func(*UserQuery)) *FriendshipQuery
- type FriendshipSelect
- func (fs *FriendshipSelect) Aggregate(fns ...AggregateFunc) *FriendshipSelect
- func (s *FriendshipSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FriendshipSelect) BoolX(ctx context.Context) bool
- func (s *FriendshipSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FriendshipSelect) BoolsX(ctx context.Context) []bool
- func (s *FriendshipSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FriendshipSelect) Float64X(ctx context.Context) float64
- func (s *FriendshipSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FriendshipSelect) Float64sX(ctx context.Context) []float64
- func (s *FriendshipSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FriendshipSelect) IntX(ctx context.Context) int
- func (s *FriendshipSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FriendshipSelect) IntsX(ctx context.Context) []int
- func (fs *FriendshipSelect) Scan(ctx context.Context, v any) error
- func (s *FriendshipSelect) ScanX(ctx context.Context, v any)
- func (s *FriendshipSelect) String(ctx context.Context) (_ string, err error)
- func (s *FriendshipSelect) StringX(ctx context.Context) string
- func (s *FriendshipSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FriendshipSelect) StringsX(ctx context.Context) []string
- type FriendshipUpdate
- func (fu *FriendshipUpdate) AddWeight(i int) *FriendshipUpdate
- func (fu *FriendshipUpdate) Exec(ctx context.Context) error
- func (fu *FriendshipUpdate) ExecX(ctx context.Context)
- func (fu *FriendshipUpdate) Mutation() *FriendshipMutation
- func (fu *FriendshipUpdate) Save(ctx context.Context) (int, error)
- func (fu *FriendshipUpdate) SaveX(ctx context.Context) int
- func (fu *FriendshipUpdate) SetCreatedAt(t time.Time) *FriendshipUpdate
- func (fu *FriendshipUpdate) SetNillableCreatedAt(t *time.Time) *FriendshipUpdate
- func (fu *FriendshipUpdate) SetNillableWeight(i *int) *FriendshipUpdate
- func (fu *FriendshipUpdate) SetWeight(i int) *FriendshipUpdate
- func (fu *FriendshipUpdate) Where(ps ...predicate.Friendship) *FriendshipUpdate
- type FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) AddWeight(i int) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) Exec(ctx context.Context) error
- func (fuo *FriendshipUpdateOne) ExecX(ctx context.Context)
- func (fuo *FriendshipUpdateOne) Mutation() *FriendshipMutation
- func (fuo *FriendshipUpdateOne) Save(ctx context.Context) (*Friendship, error)
- func (fuo *FriendshipUpdateOne) SaveX(ctx context.Context) *Friendship
- func (fuo *FriendshipUpdateOne) Select(field string, fields ...string) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) SetCreatedAt(t time.Time) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) SetNillableCreatedAt(t *time.Time) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) SetNillableWeight(i *int) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) SetWeight(i int) *FriendshipUpdateOne
- func (fuo *FriendshipUpdateOne) Where(ps ...predicate.Friendship) *FriendshipUpdateOne
- type FriendshipUpsert
- func (u *FriendshipUpsert) AddWeight(v int) *FriendshipUpsert
- func (u *FriendshipUpsert) SetCreatedAt(v time.Time) *FriendshipUpsert
- func (u *FriendshipUpsert) SetWeight(v int) *FriendshipUpsert
- func (u *FriendshipUpsert) UpdateCreatedAt() *FriendshipUpsert
- func (u *FriendshipUpsert) UpdateWeight() *FriendshipUpsert
- type FriendshipUpsertBulk
- func (u *FriendshipUpsertBulk) AddWeight(v int) *FriendshipUpsertBulk
- func (u *FriendshipUpsertBulk) DoNothing() *FriendshipUpsertBulk
- func (u *FriendshipUpsertBulk) Exec(ctx context.Context) error
- func (u *FriendshipUpsertBulk) ExecX(ctx context.Context)
- func (u *FriendshipUpsertBulk) Ignore() *FriendshipUpsertBulk
- func (u *FriendshipUpsertBulk) SetCreatedAt(v time.Time) *FriendshipUpsertBulk
- func (u *FriendshipUpsertBulk) SetWeight(v int) *FriendshipUpsertBulk
- func (u *FriendshipUpsertBulk) Update(set func(*FriendshipUpsert)) *FriendshipUpsertBulk
- func (u *FriendshipUpsertBulk) UpdateCreatedAt() *FriendshipUpsertBulk
- func (u *FriendshipUpsertBulk) UpdateNewValues() *FriendshipUpsertBulk
- func (u *FriendshipUpsertBulk) UpdateWeight() *FriendshipUpsertBulk
- type FriendshipUpsertOne
- func (u *FriendshipUpsertOne) AddWeight(v int) *FriendshipUpsertOne
- func (u *FriendshipUpsertOne) DoNothing() *FriendshipUpsertOne
- func (u *FriendshipUpsertOne) Exec(ctx context.Context) error
- func (u *FriendshipUpsertOne) ExecX(ctx context.Context)
- func (u *FriendshipUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *FriendshipUpsertOne) IDX(ctx context.Context) int
- func (u *FriendshipUpsertOne) Ignore() *FriendshipUpsertOne
- func (u *FriendshipUpsertOne) SetCreatedAt(v time.Time) *FriendshipUpsertOne
- func (u *FriendshipUpsertOne) SetWeight(v int) *FriendshipUpsertOne
- func (u *FriendshipUpsertOne) Update(set func(*FriendshipUpsert)) *FriendshipUpsertOne
- func (u *FriendshipUpsertOne) UpdateCreatedAt() *FriendshipUpsertOne
- func (u *FriendshipUpsertOne) UpdateNewValues() *FriendshipUpsertOne
- func (u *FriendshipUpsertOne) UpdateWeight() *FriendshipUpsertOne
- type Friendships
- type Group
- type GroupClient
- func (c *GroupClient) Create() *GroupCreate
- func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
- func (c *GroupClient) Delete() *GroupDelete
- func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
- func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
- func (c *GroupClient) Get(ctx context.Context, id int) (*Group, error)
- func (c *GroupClient) GetX(ctx context.Context, id int) *Group
- func (c *GroupClient) Hooks() []Hook
- func (c *GroupClient) Intercept(interceptors ...Interceptor)
- func (c *GroupClient) Interceptors() []Interceptor
- func (c *GroupClient) Query() *GroupQuery
- func (c *GroupClient) QueryGroupTags(gr *Group) *GroupTagQuery
- func (c *GroupClient) QueryJoinedUsers(gr *Group) *UserGroupQuery
- func (c *GroupClient) QueryTags(gr *Group) *TagQuery
- func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
- func (c *GroupClient) Update() *GroupUpdate
- func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
- func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne
- func (c *GroupClient) Use(hooks ...Hook)
- type GroupCreate
- func (gc *GroupCreate) AddGroupTagIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddGroupTags(g ...*GroupTag) *GroupCreate
- func (gc *GroupCreate) AddJoinedUserIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddJoinedUsers(u ...*UserGroup) *GroupCreate
- func (gc *GroupCreate) AddTagIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddTags(t ...*Tag) *GroupCreate
- func (gc *GroupCreate) AddUserIDs(ids ...int) *GroupCreate
- func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
- func (gc *GroupCreate) Exec(ctx context.Context) error
- func (gc *GroupCreate) ExecX(ctx context.Context)
- func (gc *GroupCreate) Mutation() *GroupMutation
- func (gc *GroupCreate) OnConflict(opts ...sql.ConflictOption) *GroupUpsertOne
- func (gc *GroupCreate) OnConflictColumns(columns ...string) *GroupUpsertOne
- func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
- func (gc *GroupCreate) SaveX(ctx context.Context) *Group
- func (gc *GroupCreate) SetName(s string) *GroupCreate
- func (gc *GroupCreate) SetNillableName(s *string) *GroupCreate
- type GroupCreateBulk
- func (gcb *GroupCreateBulk) Exec(ctx context.Context) error
- func (gcb *GroupCreateBulk) ExecX(ctx context.Context)
- func (gcb *GroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupUpsertBulk
- func (gcb *GroupCreateBulk) OnConflictColumns(columns ...string) *GroupUpsertBulk
- func (gcb *GroupCreateBulk) Save(ctx context.Context) ([]*Group, error)
- func (gcb *GroupCreateBulk) SaveX(ctx context.Context) []*Group
- type GroupDelete
- type GroupDeleteOne
- type GroupEdges
- type GroupFilter
- func (f *GroupFilter) Where(p entql.P)
- func (f *GroupFilter) WhereHasGroupTags()
- func (f *GroupFilter) WhereHasGroupTagsWith(preds ...predicate.GroupTag)
- func (f *GroupFilter) WhereHasJoinedUsers()
- func (f *GroupFilter) WhereHasJoinedUsersWith(preds ...predicate.UserGroup)
- func (f *GroupFilter) WhereHasTags()
- func (f *GroupFilter) WhereHasTagsWith(preds ...predicate.Tag)
- func (f *GroupFilter) WhereHasUsers()
- func (f *GroupFilter) WhereHasUsersWith(preds ...predicate.User)
- func (f *GroupFilter) WhereID(p entql.IntP)
- func (f *GroupFilter) WhereName(p entql.StringP)
- type GroupGroupBy
- func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
- func (s *GroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupGroupBy) BoolX(ctx context.Context) bool
- func (s *GroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupGroupBy) Float64X(ctx context.Context) float64
- func (s *GroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroupGroupBy) IntX(ctx context.Context) int
- func (s *GroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroupGroupBy) IntsX(ctx context.Context) []int
- func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroupGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroupGroupBy) StringX(ctx context.Context) string
- func (s *GroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroupGroupBy) StringsX(ctx context.Context) []string
- type GroupMutation
- func (m *GroupMutation) AddField(name string, value ent.Value) error
- func (m *GroupMutation) AddGroupTagIDs(ids ...int)
- func (m *GroupMutation) AddJoinedUserIDs(ids ...int)
- func (m *GroupMutation) AddTagIDs(ids ...int)
- func (m *GroupMutation) AddUserIDs(ids ...int)
- func (m *GroupMutation) AddedEdges() []string
- func (m *GroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupMutation) AddedFields() []string
- func (m *GroupMutation) AddedIDs(name string) []ent.Value
- func (m *GroupMutation) ClearEdge(name string) error
- func (m *GroupMutation) ClearField(name string) error
- func (m *GroupMutation) ClearGroupTags()
- func (m *GroupMutation) ClearJoinedUsers()
- func (m *GroupMutation) ClearTags()
- func (m *GroupMutation) ClearUsers()
- func (m *GroupMutation) ClearedEdges() []string
- func (m *GroupMutation) ClearedFields() []string
- func (m GroupMutation) Client() *Client
- func (m *GroupMutation) EdgeCleared(name string) bool
- func (m *GroupMutation) Field(name string) (ent.Value, bool)
- func (m *GroupMutation) FieldCleared(name string) bool
- func (m *GroupMutation) Fields() []string
- func (m *GroupMutation) Filter() *GroupFilter
- func (m *GroupMutation) GroupTagsCleared() bool
- func (m *GroupMutation) GroupTagsIDs() (ids []int)
- func (m *GroupMutation) ID() (id int, exists bool)
- func (m *GroupMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GroupMutation) JoinedUsersCleared() bool
- func (m *GroupMutation) JoinedUsersIDs() (ids []int)
- func (m *GroupMutation) Name() (r string, exists bool)
- func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
- func (m *GroupMutation) Op() Op
- func (m *GroupMutation) RemoveGroupTagIDs(ids ...int)
- func (m *GroupMutation) RemoveJoinedUserIDs(ids ...int)
- func (m *GroupMutation) RemoveTagIDs(ids ...int)
- func (m *GroupMutation) RemoveUserIDs(ids ...int)
- func (m *GroupMutation) RemovedEdges() []string
- func (m *GroupMutation) RemovedGroupTagsIDs() (ids []int)
- func (m *GroupMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupMutation) RemovedJoinedUsersIDs() (ids []int)
- func (m *GroupMutation) RemovedTagsIDs() (ids []int)
- func (m *GroupMutation) RemovedUsersIDs() (ids []int)
- func (m *GroupMutation) ResetEdge(name string) error
- func (m *GroupMutation) ResetField(name string) error
- func (m *GroupMutation) ResetGroupTags()
- func (m *GroupMutation) ResetJoinedUsers()
- func (m *GroupMutation) ResetName()
- func (m *GroupMutation) ResetTags()
- func (m *GroupMutation) ResetUsers()
- func (m *GroupMutation) SetField(name string, value ent.Value) error
- func (m *GroupMutation) SetName(s string)
- func (m *GroupMutation) SetOp(op Op)
- func (m *GroupMutation) TagsCleared() bool
- func (m *GroupMutation) TagsIDs() (ids []int)
- func (m GroupMutation) Tx() (*Tx, error)
- func (m *GroupMutation) Type() string
- func (m *GroupMutation) UsersCleared() bool
- func (m *GroupMutation) UsersIDs() (ids []int)
- func (m *GroupMutation) Where(ps ...predicate.Group)
- func (m *GroupMutation) WhereP(ps ...func(*sql.Selector))
- type GroupQuery
- func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect
- func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
- func (gq *GroupQuery) AllX(ctx context.Context) []*Group
- func (gq *GroupQuery) Clone() *GroupQuery
- func (gq *GroupQuery) Count(ctx context.Context) (int, error)
- func (gq *GroupQuery) CountX(ctx context.Context) int
- func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
- func (gq *GroupQuery) ExistX(ctx context.Context) bool
- func (gq *GroupQuery) Filter() *GroupFilter
- func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)
- func (gq *GroupQuery) FirstIDX(ctx context.Context) int
- func (gq *GroupQuery) FirstX(ctx context.Context) *Group
- func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
- func (gq *GroupQuery) IDs(ctx context.Context) (ids []int, err error)
- func (gq *GroupQuery) IDsX(ctx context.Context) []int
- func (gq *GroupQuery) Limit(limit int) *GroupQuery
- func (gq *GroupQuery) Offset(offset int) *GroupQuery
- func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
- func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)
- func (gq *GroupQuery) OnlyIDX(ctx context.Context) int
- func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
- func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery
- func (gq *GroupQuery) QueryGroupTags() *GroupTagQuery
- func (gq *GroupQuery) QueryJoinedUsers() *UserGroupQuery
- func (gq *GroupQuery) QueryTags() *TagQuery
- func (gq *GroupQuery) QueryUsers() *UserQuery
- func (gq *GroupQuery) Select(fields ...string) *GroupSelect
- func (gq *GroupQuery) Unique(unique bool) *GroupQuery
- func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
- func (gq *GroupQuery) WithGroupTags(opts ...func(*GroupTagQuery)) *GroupQuery
- func (gq *GroupQuery) WithJoinedUsers(opts ...func(*UserGroupQuery)) *GroupQuery
- func (gq *GroupQuery) WithTags(opts ...func(*TagQuery)) *GroupQuery
- func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
- type GroupSelect
- func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect
- func (s *GroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupSelect) BoolX(ctx context.Context) bool
- func (s *GroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupSelect) BoolsX(ctx context.Context) []bool
- func (s *GroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupSelect) Float64X(ctx context.Context) float64
- func (s *GroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupSelect) Float64sX(ctx context.Context) []float64
- func (s *GroupSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroupSelect) IntX(ctx context.Context) int
- func (s *GroupSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroupSelect) IntsX(ctx context.Context) []int
- func (gs *GroupSelect) Scan(ctx context.Context, v any) error
- func (s *GroupSelect) ScanX(ctx context.Context, v any)
- func (s *GroupSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroupSelect) StringX(ctx context.Context) string
- func (s *GroupSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroupSelect) StringsX(ctx context.Context) []string
- type GroupTag
- type GroupTagClient
- func (c *GroupTagClient) Create() *GroupTagCreate
- func (c *GroupTagClient) CreateBulk(builders ...*GroupTagCreate) *GroupTagCreateBulk
- func (c *GroupTagClient) Delete() *GroupTagDelete
- func (c *GroupTagClient) DeleteOne(gt *GroupTag) *GroupTagDeleteOne
- func (c *GroupTagClient) DeleteOneID(id int) *GroupTagDeleteOne
- func (c *GroupTagClient) Get(ctx context.Context, id int) (*GroupTag, error)
- func (c *GroupTagClient) GetX(ctx context.Context, id int) *GroupTag
- func (c *GroupTagClient) Hooks() []Hook
- func (c *GroupTagClient) Intercept(interceptors ...Interceptor)
- func (c *GroupTagClient) Interceptors() []Interceptor
- func (c *GroupTagClient) Query() *GroupTagQuery
- func (c *GroupTagClient) QueryGroup(gt *GroupTag) *GroupQuery
- func (c *GroupTagClient) QueryTag(gt *GroupTag) *TagQuery
- func (c *GroupTagClient) Update() *GroupTagUpdate
- func (c *GroupTagClient) UpdateOne(gt *GroupTag) *GroupTagUpdateOne
- func (c *GroupTagClient) UpdateOneID(id int) *GroupTagUpdateOne
- func (c *GroupTagClient) Use(hooks ...Hook)
- type GroupTagCreate
- func (gtc *GroupTagCreate) Exec(ctx context.Context) error
- func (gtc *GroupTagCreate) ExecX(ctx context.Context)
- func (gtc *GroupTagCreate) Mutation() *GroupTagMutation
- func (gtc *GroupTagCreate) OnConflict(opts ...sql.ConflictOption) *GroupTagUpsertOne
- func (gtc *GroupTagCreate) OnConflictColumns(columns ...string) *GroupTagUpsertOne
- func (gtc *GroupTagCreate) Save(ctx context.Context) (*GroupTag, error)
- func (gtc *GroupTagCreate) SaveX(ctx context.Context) *GroupTag
- func (gtc *GroupTagCreate) SetGroup(g *Group) *GroupTagCreate
- func (gtc *GroupTagCreate) SetGroupID(i int) *GroupTagCreate
- func (gtc *GroupTagCreate) SetTag(t *Tag) *GroupTagCreate
- func (gtc *GroupTagCreate) SetTagID(i int) *GroupTagCreate
- type GroupTagCreateBulk
- func (gtcb *GroupTagCreateBulk) Exec(ctx context.Context) error
- func (gtcb *GroupTagCreateBulk) ExecX(ctx context.Context)
- func (gtcb *GroupTagCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupTagUpsertBulk
- func (gtcb *GroupTagCreateBulk) OnConflictColumns(columns ...string) *GroupTagUpsertBulk
- func (gtcb *GroupTagCreateBulk) Save(ctx context.Context) ([]*GroupTag, error)
- func (gtcb *GroupTagCreateBulk) SaveX(ctx context.Context) []*GroupTag
- type GroupTagDelete
- type GroupTagDeleteOne
- type GroupTagEdges
- type GroupTagFilter
- func (f *GroupTagFilter) Where(p entql.P)
- func (f *GroupTagFilter) WhereGroupID(p entql.IntP)
- func (f *GroupTagFilter) WhereHasGroup()
- func (f *GroupTagFilter) WhereHasGroupWith(preds ...predicate.Group)
- func (f *GroupTagFilter) WhereHasTag()
- func (f *GroupTagFilter) WhereHasTagWith(preds ...predicate.Tag)
- func (f *GroupTagFilter) WhereID(p entql.IntP)
- func (f *GroupTagFilter) WhereTagID(p entql.IntP)
- type GroupTagGroupBy
- func (gtgb *GroupTagGroupBy) Aggregate(fns ...AggregateFunc) *GroupTagGroupBy
- func (s *GroupTagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupTagGroupBy) BoolX(ctx context.Context) bool
- func (s *GroupTagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupTagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GroupTagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupTagGroupBy) Float64X(ctx context.Context) float64
- func (s *GroupTagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupTagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GroupTagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GroupTagGroupBy) IntX(ctx context.Context) int
- func (s *GroupTagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GroupTagGroupBy) IntsX(ctx context.Context) []int
- func (gtgb *GroupTagGroupBy) Scan(ctx context.Context, v any) error
- func (s *GroupTagGroupBy) ScanX(ctx context.Context, v any)
- func (s *GroupTagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GroupTagGroupBy) StringX(ctx context.Context) string
- func (s *GroupTagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GroupTagGroupBy) StringsX(ctx context.Context) []string
- type GroupTagMutation
- func (m *GroupTagMutation) AddField(name string, value ent.Value) error
- func (m *GroupTagMutation) AddedEdges() []string
- func (m *GroupTagMutation) AddedField(name string) (ent.Value, bool)
- func (m *GroupTagMutation) AddedFields() []string
- func (m *GroupTagMutation) AddedIDs(name string) []ent.Value
- func (m *GroupTagMutation) ClearEdge(name string) error
- func (m *GroupTagMutation) ClearField(name string) error
- func (m *GroupTagMutation) ClearGroup()
- func (m *GroupTagMutation) ClearTag()
- func (m *GroupTagMutation) ClearedEdges() []string
- func (m *GroupTagMutation) ClearedFields() []string
- func (m GroupTagMutation) Client() *Client
- func (m *GroupTagMutation) EdgeCleared(name string) bool
- func (m *GroupTagMutation) Field(name string) (ent.Value, bool)
- func (m *GroupTagMutation) FieldCleared(name string) bool
- func (m *GroupTagMutation) Fields() []string
- func (m *GroupTagMutation) Filter() *GroupTagFilter
- func (m *GroupTagMutation) GroupCleared() bool
- func (m *GroupTagMutation) GroupID() (r int, exists bool)
- func (m *GroupTagMutation) GroupIDs() (ids []int)
- func (m *GroupTagMutation) ID() (id int, exists bool)
- func (m *GroupTagMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GroupTagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GroupTagMutation) OldGroupID(ctx context.Context) (v int, err error)
- func (m *GroupTagMutation) OldTagID(ctx context.Context) (v int, err error)
- func (m *GroupTagMutation) Op() Op
- func (m *GroupTagMutation) RemovedEdges() []string
- func (m *GroupTagMutation) RemovedIDs(name string) []ent.Value
- func (m *GroupTagMutation) ResetEdge(name string) error
- func (m *GroupTagMutation) ResetField(name string) error
- func (m *GroupTagMutation) ResetGroup()
- func (m *GroupTagMutation) ResetGroupID()
- func (m *GroupTagMutation) ResetTag()
- func (m *GroupTagMutation) ResetTagID()
- func (m *GroupTagMutation) SetField(name string, value ent.Value) error
- func (m *GroupTagMutation) SetGroupID(i int)
- func (m *GroupTagMutation) SetOp(op Op)
- func (m *GroupTagMutation) SetTagID(i int)
- func (m *GroupTagMutation) TagCleared() bool
- func (m *GroupTagMutation) TagID() (r int, exists bool)
- func (m *GroupTagMutation) TagIDs() (ids []int)
- func (m GroupTagMutation) Tx() (*Tx, error)
- func (m *GroupTagMutation) Type() string
- func (m *GroupTagMutation) Where(ps ...predicate.GroupTag)
- func (m *GroupTagMutation) WhereP(ps ...func(*sql.Selector))
- type GroupTagQuery
- func (gtq *GroupTagQuery) Aggregate(fns ...AggregateFunc) *GroupTagSelect
- func (gtq *GroupTagQuery) All(ctx context.Context) ([]*GroupTag, error)
- func (gtq *GroupTagQuery) AllX(ctx context.Context) []*GroupTag
- func (gtq *GroupTagQuery) Clone() *GroupTagQuery
- func (gtq *GroupTagQuery) Count(ctx context.Context) (int, error)
- func (gtq *GroupTagQuery) CountX(ctx context.Context) int
- func (gtq *GroupTagQuery) Exist(ctx context.Context) (bool, error)
- func (gtq *GroupTagQuery) ExistX(ctx context.Context) bool
- func (gtq *GroupTagQuery) Filter() *GroupTagFilter
- func (gtq *GroupTagQuery) First(ctx context.Context) (*GroupTag, error)
- func (gtq *GroupTagQuery) FirstID(ctx context.Context) (id int, err error)
- func (gtq *GroupTagQuery) FirstIDX(ctx context.Context) int
- func (gtq *GroupTagQuery) FirstX(ctx context.Context) *GroupTag
- func (gtq *GroupTagQuery) GroupBy(field string, fields ...string) *GroupTagGroupBy
- func (gtq *GroupTagQuery) IDs(ctx context.Context) (ids []int, err error)
- func (gtq *GroupTagQuery) IDsX(ctx context.Context) []int
- func (gtq *GroupTagQuery) Limit(limit int) *GroupTagQuery
- func (gtq *GroupTagQuery) Offset(offset int) *GroupTagQuery
- func (gtq *GroupTagQuery) Only(ctx context.Context) (*GroupTag, error)
- func (gtq *GroupTagQuery) OnlyID(ctx context.Context) (id int, err error)
- func (gtq *GroupTagQuery) OnlyIDX(ctx context.Context) int
- func (gtq *GroupTagQuery) OnlyX(ctx context.Context) *GroupTag
- func (gtq *GroupTagQuery) Order(o ...OrderFunc) *GroupTagQuery
- func (gtq *GroupTagQuery) QueryGroup() *GroupQuery
- func (gtq *GroupTagQuery) QueryTag() *TagQuery
- func (gtq *GroupTagQuery) Select(fields ...string) *GroupTagSelect
- func (gtq *GroupTagQuery) Unique(unique bool) *GroupTagQuery
- func (gtq *GroupTagQuery) Where(ps ...predicate.GroupTag) *GroupTagQuery
- func (gtq *GroupTagQuery) WithGroup(opts ...func(*GroupQuery)) *GroupTagQuery
- func (gtq *GroupTagQuery) WithTag(opts ...func(*TagQuery)) *GroupTagQuery
- type GroupTagSelect
- func (gts *GroupTagSelect) Aggregate(fns ...AggregateFunc) *GroupTagSelect
- func (s *GroupTagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GroupTagSelect) BoolX(ctx context.Context) bool
- func (s *GroupTagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GroupTagSelect) BoolsX(ctx context.Context) []bool
- func (s *GroupTagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GroupTagSelect) Float64X(ctx context.Context) float64
- func (s *GroupTagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GroupTagSelect) Float64sX(ctx context.Context) []float64
- func (s *GroupTagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GroupTagSelect) IntX(ctx context.Context) int
- func (s *GroupTagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GroupTagSelect) IntsX(ctx context.Context) []int
- func (gts *GroupTagSelect) Scan(ctx context.Context, v any) error
- func (s *GroupTagSelect) ScanX(ctx context.Context, v any)
- func (s *GroupTagSelect) String(ctx context.Context) (_ string, err error)
- func (s *GroupTagSelect) StringX(ctx context.Context) string
- func (s *GroupTagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GroupTagSelect) StringsX(ctx context.Context) []string
- type GroupTagUpdate
- func (gtu *GroupTagUpdate) ClearGroup() *GroupTagUpdate
- func (gtu *GroupTagUpdate) ClearTag() *GroupTagUpdate
- func (gtu *GroupTagUpdate) Exec(ctx context.Context) error
- func (gtu *GroupTagUpdate) ExecX(ctx context.Context)
- func (gtu *GroupTagUpdate) Mutation() *GroupTagMutation
- func (gtu *GroupTagUpdate) Save(ctx context.Context) (int, error)
- func (gtu *GroupTagUpdate) SaveX(ctx context.Context) int
- func (gtu *GroupTagUpdate) SetGroup(g *Group) *GroupTagUpdate
- func (gtu *GroupTagUpdate) SetGroupID(i int) *GroupTagUpdate
- func (gtu *GroupTagUpdate) SetTag(t *Tag) *GroupTagUpdate
- func (gtu *GroupTagUpdate) SetTagID(i int) *GroupTagUpdate
- func (gtu *GroupTagUpdate) Where(ps ...predicate.GroupTag) *GroupTagUpdate
- type GroupTagUpdateOne
- func (gtuo *GroupTagUpdateOne) ClearGroup() *GroupTagUpdateOne
- func (gtuo *GroupTagUpdateOne) ClearTag() *GroupTagUpdateOne
- func (gtuo *GroupTagUpdateOne) Exec(ctx context.Context) error
- func (gtuo *GroupTagUpdateOne) ExecX(ctx context.Context)
- func (gtuo *GroupTagUpdateOne) Mutation() *GroupTagMutation
- func (gtuo *GroupTagUpdateOne) Save(ctx context.Context) (*GroupTag, error)
- func (gtuo *GroupTagUpdateOne) SaveX(ctx context.Context) *GroupTag
- func (gtuo *GroupTagUpdateOne) Select(field string, fields ...string) *GroupTagUpdateOne
- func (gtuo *GroupTagUpdateOne) SetGroup(g *Group) *GroupTagUpdateOne
- func (gtuo *GroupTagUpdateOne) SetGroupID(i int) *GroupTagUpdateOne
- func (gtuo *GroupTagUpdateOne) SetTag(t *Tag) *GroupTagUpdateOne
- func (gtuo *GroupTagUpdateOne) SetTagID(i int) *GroupTagUpdateOne
- func (gtuo *GroupTagUpdateOne) Where(ps ...predicate.GroupTag) *GroupTagUpdateOne
- type GroupTagUpsert
- type GroupTagUpsertBulk
- func (u *GroupTagUpsertBulk) DoNothing() *GroupTagUpsertBulk
- func (u *GroupTagUpsertBulk) Exec(ctx context.Context) error
- func (u *GroupTagUpsertBulk) ExecX(ctx context.Context)
- func (u *GroupTagUpsertBulk) Ignore() *GroupTagUpsertBulk
- func (u *GroupTagUpsertBulk) SetGroupID(v int) *GroupTagUpsertBulk
- func (u *GroupTagUpsertBulk) SetTagID(v int) *GroupTagUpsertBulk
- func (u *GroupTagUpsertBulk) Update(set func(*GroupTagUpsert)) *GroupTagUpsertBulk
- func (u *GroupTagUpsertBulk) UpdateGroupID() *GroupTagUpsertBulk
- func (u *GroupTagUpsertBulk) UpdateNewValues() *GroupTagUpsertBulk
- func (u *GroupTagUpsertBulk) UpdateTagID() *GroupTagUpsertBulk
- type GroupTagUpsertOne
- func (u *GroupTagUpsertOne) DoNothing() *GroupTagUpsertOne
- func (u *GroupTagUpsertOne) Exec(ctx context.Context) error
- func (u *GroupTagUpsertOne) ExecX(ctx context.Context)
- func (u *GroupTagUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *GroupTagUpsertOne) IDX(ctx context.Context) int
- func (u *GroupTagUpsertOne) Ignore() *GroupTagUpsertOne
- func (u *GroupTagUpsertOne) SetGroupID(v int) *GroupTagUpsertOne
- func (u *GroupTagUpsertOne) SetTagID(v int) *GroupTagUpsertOne
- func (u *GroupTagUpsertOne) Update(set func(*GroupTagUpsert)) *GroupTagUpsertOne
- func (u *GroupTagUpsertOne) UpdateGroupID() *GroupTagUpsertOne
- func (u *GroupTagUpsertOne) UpdateNewValues() *GroupTagUpsertOne
- func (u *GroupTagUpsertOne) UpdateTagID() *GroupTagUpsertOne
- type GroupTags
- type GroupUpdate
- func (gu *GroupUpdate) AddGroupTagIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddGroupTags(g ...*GroupTag) *GroupUpdate
- func (gu *GroupUpdate) AddJoinedUserIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddJoinedUsers(u ...*UserGroup) *GroupUpdate
- func (gu *GroupUpdate) AddTagIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddTags(t ...*Tag) *GroupUpdate
- func (gu *GroupUpdate) AddUserIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) ClearGroupTags() *GroupUpdate
- func (gu *GroupUpdate) ClearJoinedUsers() *GroupUpdate
- func (gu *GroupUpdate) ClearTags() *GroupUpdate
- func (gu *GroupUpdate) ClearUsers() *GroupUpdate
- func (gu *GroupUpdate) Exec(ctx context.Context) error
- func (gu *GroupUpdate) ExecX(ctx context.Context)
- func (gu *GroupUpdate) Mutation() *GroupMutation
- func (gu *GroupUpdate) RemoveGroupTagIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveGroupTags(g ...*GroupTag) *GroupUpdate
- func (gu *GroupUpdate) RemoveJoinedUserIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveJoinedUsers(u ...*UserGroup) *GroupUpdate
- func (gu *GroupUpdate) RemoveTagIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveTags(t ...*Tag) *GroupUpdate
- func (gu *GroupUpdate) RemoveUserIDs(ids ...int) *GroupUpdate
- func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
- func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
- func (gu *GroupUpdate) SaveX(ctx context.Context) int
- func (gu *GroupUpdate) SetName(s string) *GroupUpdate
- func (gu *GroupUpdate) SetNillableName(s *string) *GroupUpdate
- func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
- type GroupUpdateOne
- func (guo *GroupUpdateOne) AddGroupTagIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddGroupTags(g ...*GroupTag) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddJoinedUserIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddJoinedUsers(u ...*UserGroup) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddTagIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddTags(t ...*Tag) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddUserIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearGroupTags() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearJoinedUsers() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearTags() *GroupUpdateOne
- func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
- func (guo *GroupUpdateOne) Exec(ctx context.Context) error
- func (guo *GroupUpdateOne) ExecX(ctx context.Context)
- func (guo *GroupUpdateOne) Mutation() *GroupMutation
- func (guo *GroupUpdateOne) RemoveGroupTagIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveGroupTags(g ...*GroupTag) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveJoinedUserIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveJoinedUsers(u ...*UserGroup) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveTagIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveTags(t ...*Tag) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveUserIDs(ids ...int) *GroupUpdateOne
- func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
- func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
- func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
- func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
- func (guo *GroupUpdateOne) SetNillableName(s *string) *GroupUpdateOne
- func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne
- type GroupUpsert
- type GroupUpsertBulk
- func (u *GroupUpsertBulk) DoNothing() *GroupUpsertBulk
- func (u *GroupUpsertBulk) Exec(ctx context.Context) error
- func (u *GroupUpsertBulk) ExecX(ctx context.Context)
- func (u *GroupUpsertBulk) Ignore() *GroupUpsertBulk
- func (u *GroupUpsertBulk) SetName(v string) *GroupUpsertBulk
- func (u *GroupUpsertBulk) Update(set func(*GroupUpsert)) *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateName() *GroupUpsertBulk
- func (u *GroupUpsertBulk) UpdateNewValues() *GroupUpsertBulk
- type GroupUpsertOne
- func (u *GroupUpsertOne) DoNothing() *GroupUpsertOne
- func (u *GroupUpsertOne) Exec(ctx context.Context) error
- func (u *GroupUpsertOne) ExecX(ctx context.Context)
- func (u *GroupUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *GroupUpsertOne) IDX(ctx context.Context) int
- func (u *GroupUpsertOne) Ignore() *GroupUpsertOne
- func (u *GroupUpsertOne) SetName(v string) *GroupUpsertOne
- func (u *GroupUpsertOne) Update(set func(*GroupUpsert)) *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateName() *GroupUpsertOne
- func (u *GroupUpsertOne) UpdateNewValues() *GroupUpsertOne
- type Groups
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Process
- type ProcessClient
- func (c *ProcessClient) Create() *ProcessCreate
- func (c *ProcessClient) CreateBulk(builders ...*ProcessCreate) *ProcessCreateBulk
- func (c *ProcessClient) Delete() *ProcessDelete
- func (c *ProcessClient) DeleteOne(pr *Process) *ProcessDeleteOne
- func (c *ProcessClient) DeleteOneID(id int) *ProcessDeleteOne
- func (c *ProcessClient) Get(ctx context.Context, id int) (*Process, error)
- func (c *ProcessClient) GetX(ctx context.Context, id int) *Process
- func (c *ProcessClient) Hooks() []Hook
- func (c *ProcessClient) Intercept(interceptors ...Interceptor)
- func (c *ProcessClient) Interceptors() []Interceptor
- func (c *ProcessClient) Query() *ProcessQuery
- func (c *ProcessClient) QueryAttachedFiles(pr *Process) *AttachedFileQuery
- func (c *ProcessClient) QueryFiles(pr *Process) *FileQuery
- func (c *ProcessClient) Update() *ProcessUpdate
- func (c *ProcessClient) UpdateOne(pr *Process) *ProcessUpdateOne
- func (c *ProcessClient) UpdateOneID(id int) *ProcessUpdateOne
- func (c *ProcessClient) Use(hooks ...Hook)
- type ProcessCreate
- func (pc *ProcessCreate) AddAttachedFileIDs(ids ...int) *ProcessCreate
- func (pc *ProcessCreate) AddAttachedFiles(a ...*AttachedFile) *ProcessCreate
- func (pc *ProcessCreate) AddFileIDs(ids ...int) *ProcessCreate
- func (pc *ProcessCreate) AddFiles(f ...*File) *ProcessCreate
- func (pc *ProcessCreate) Exec(ctx context.Context) error
- func (pc *ProcessCreate) ExecX(ctx context.Context)
- func (pc *ProcessCreate) Mutation() *ProcessMutation
- func (pc *ProcessCreate) OnConflict(opts ...sql.ConflictOption) *ProcessUpsertOne
- func (pc *ProcessCreate) OnConflictColumns(columns ...string) *ProcessUpsertOne
- func (pc *ProcessCreate) Save(ctx context.Context) (*Process, error)
- func (pc *ProcessCreate) SaveX(ctx context.Context) *Process
- type ProcessCreateBulk
- func (pcb *ProcessCreateBulk) Exec(ctx context.Context) error
- func (pcb *ProcessCreateBulk) ExecX(ctx context.Context)
- func (pcb *ProcessCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProcessUpsertBulk
- func (pcb *ProcessCreateBulk) OnConflictColumns(columns ...string) *ProcessUpsertBulk
- func (pcb *ProcessCreateBulk) Save(ctx context.Context) ([]*Process, error)
- func (pcb *ProcessCreateBulk) SaveX(ctx context.Context) []*Process
- type ProcessDelete
- type ProcessDeleteOne
- type ProcessEdges
- type ProcessFilter
- func (f *ProcessFilter) Where(p entql.P)
- func (f *ProcessFilter) WhereHasAttachedFiles()
- func (f *ProcessFilter) WhereHasAttachedFilesWith(preds ...predicate.AttachedFile)
- func (f *ProcessFilter) WhereHasFiles()
- func (f *ProcessFilter) WhereHasFilesWith(preds ...predicate.File)
- func (f *ProcessFilter) WhereID(p entql.IntP)
- type ProcessGroupBy
- func (pgb *ProcessGroupBy) Aggregate(fns ...AggregateFunc) *ProcessGroupBy
- func (s *ProcessGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProcessGroupBy) BoolX(ctx context.Context) bool
- func (s *ProcessGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProcessGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProcessGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProcessGroupBy) Float64X(ctx context.Context) float64
- func (s *ProcessGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProcessGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProcessGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProcessGroupBy) IntX(ctx context.Context) int
- func (s *ProcessGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProcessGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProcessGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProcessGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProcessGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProcessGroupBy) StringX(ctx context.Context) string
- func (s *ProcessGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProcessGroupBy) StringsX(ctx context.Context) []string
- type ProcessMutation
- func (m *ProcessMutation) AddAttachedFileIDs(ids ...int)
- func (m *ProcessMutation) AddField(name string, value ent.Value) error
- func (m *ProcessMutation) AddFileIDs(ids ...int)
- func (m *ProcessMutation) AddedEdges() []string
- func (m *ProcessMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProcessMutation) AddedFields() []string
- func (m *ProcessMutation) AddedIDs(name string) []ent.Value
- func (m *ProcessMutation) AttachedFilesCleared() bool
- func (m *ProcessMutation) AttachedFilesIDs() (ids []int)
- func (m *ProcessMutation) ClearAttachedFiles()
- func (m *ProcessMutation) ClearEdge(name string) error
- func (m *ProcessMutation) ClearField(name string) error
- func (m *ProcessMutation) ClearFiles()
- func (m *ProcessMutation) ClearedEdges() []string
- func (m *ProcessMutation) ClearedFields() []string
- func (m ProcessMutation) Client() *Client
- func (m *ProcessMutation) EdgeCleared(name string) bool
- func (m *ProcessMutation) Field(name string) (ent.Value, bool)
- func (m *ProcessMutation) FieldCleared(name string) bool
- func (m *ProcessMutation) Fields() []string
- func (m *ProcessMutation) FilesCleared() bool
- func (m *ProcessMutation) FilesIDs() (ids []int)
- func (m *ProcessMutation) Filter() *ProcessFilter
- func (m *ProcessMutation) ID() (id int, exists bool)
- func (m *ProcessMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ProcessMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProcessMutation) Op() Op
- func (m *ProcessMutation) RemoveAttachedFileIDs(ids ...int)
- func (m *ProcessMutation) RemoveFileIDs(ids ...int)
- func (m *ProcessMutation) RemovedAttachedFilesIDs() (ids []int)
- func (m *ProcessMutation) RemovedEdges() []string
- func (m *ProcessMutation) RemovedFilesIDs() (ids []int)
- func (m *ProcessMutation) RemovedIDs(name string) []ent.Value
- func (m *ProcessMutation) ResetAttachedFiles()
- func (m *ProcessMutation) ResetEdge(name string) error
- func (m *ProcessMutation) ResetField(name string) error
- func (m *ProcessMutation) ResetFiles()
- func (m *ProcessMutation) SetField(name string, value ent.Value) error
- func (m *ProcessMutation) SetOp(op Op)
- func (m ProcessMutation) Tx() (*Tx, error)
- func (m *ProcessMutation) Type() string
- func (m *ProcessMutation) Where(ps ...predicate.Process)
- func (m *ProcessMutation) WhereP(ps ...func(*sql.Selector))
- type ProcessQuery
- func (pq *ProcessQuery) Aggregate(fns ...AggregateFunc) *ProcessSelect
- func (pq *ProcessQuery) All(ctx context.Context) ([]*Process, error)
- func (pq *ProcessQuery) AllX(ctx context.Context) []*Process
- func (pq *ProcessQuery) Clone() *ProcessQuery
- func (pq *ProcessQuery) Count(ctx context.Context) (int, error)
- func (pq *ProcessQuery) CountX(ctx context.Context) int
- func (pq *ProcessQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProcessQuery) ExistX(ctx context.Context) bool
- func (pq *ProcessQuery) Filter() *ProcessFilter
- func (pq *ProcessQuery) First(ctx context.Context) (*Process, error)
- func (pq *ProcessQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *ProcessQuery) FirstIDX(ctx context.Context) int
- func (pq *ProcessQuery) FirstX(ctx context.Context) *Process
- func (pq *ProcessQuery) GroupBy(field string, fields ...string) *ProcessGroupBy
- func (pq *ProcessQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pq *ProcessQuery) IDsX(ctx context.Context) []int
- func (pq *ProcessQuery) Limit(limit int) *ProcessQuery
- func (pq *ProcessQuery) Offset(offset int) *ProcessQuery
- func (pq *ProcessQuery) Only(ctx context.Context) (*Process, error)
- func (pq *ProcessQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *ProcessQuery) OnlyIDX(ctx context.Context) int
- func (pq *ProcessQuery) OnlyX(ctx context.Context) *Process
- func (pq *ProcessQuery) Order(o ...OrderFunc) *ProcessQuery
- func (pq *ProcessQuery) QueryAttachedFiles() *AttachedFileQuery
- func (pq *ProcessQuery) QueryFiles() *FileQuery
- func (pq *ProcessQuery) Select(fields ...string) *ProcessSelect
- func (pq *ProcessQuery) Unique(unique bool) *ProcessQuery
- func (pq *ProcessQuery) Where(ps ...predicate.Process) *ProcessQuery
- func (pq *ProcessQuery) WithAttachedFiles(opts ...func(*AttachedFileQuery)) *ProcessQuery
- func (pq *ProcessQuery) WithFiles(opts ...func(*FileQuery)) *ProcessQuery
- type ProcessSelect
- func (ps *ProcessSelect) Aggregate(fns ...AggregateFunc) *ProcessSelect
- func (s *ProcessSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProcessSelect) BoolX(ctx context.Context) bool
- func (s *ProcessSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProcessSelect) BoolsX(ctx context.Context) []bool
- func (s *ProcessSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProcessSelect) Float64X(ctx context.Context) float64
- func (s *ProcessSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProcessSelect) Float64sX(ctx context.Context) []float64
- func (s *ProcessSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProcessSelect) IntX(ctx context.Context) int
- func (s *ProcessSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProcessSelect) IntsX(ctx context.Context) []int
- func (ps *ProcessSelect) Scan(ctx context.Context, v any) error
- func (s *ProcessSelect) ScanX(ctx context.Context, v any)
- func (s *ProcessSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProcessSelect) StringX(ctx context.Context) string
- func (s *ProcessSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProcessSelect) StringsX(ctx context.Context) []string
- type ProcessUpdate
- func (pu *ProcessUpdate) AddAttachedFileIDs(ids ...int) *ProcessUpdate
- func (pu *ProcessUpdate) AddAttachedFiles(a ...*AttachedFile) *ProcessUpdate
- func (pu *ProcessUpdate) AddFileIDs(ids ...int) *ProcessUpdate
- func (pu *ProcessUpdate) AddFiles(f ...*File) *ProcessUpdate
- func (pu *ProcessUpdate) ClearAttachedFiles() *ProcessUpdate
- func (pu *ProcessUpdate) ClearFiles() *ProcessUpdate
- func (pu *ProcessUpdate) Exec(ctx context.Context) error
- func (pu *ProcessUpdate) ExecX(ctx context.Context)
- func (pu *ProcessUpdate) Mutation() *ProcessMutation
- func (pu *ProcessUpdate) RemoveAttachedFileIDs(ids ...int) *ProcessUpdate
- func (pu *ProcessUpdate) RemoveAttachedFiles(a ...*AttachedFile) *ProcessUpdate
- func (pu *ProcessUpdate) RemoveFileIDs(ids ...int) *ProcessUpdate
- func (pu *ProcessUpdate) RemoveFiles(f ...*File) *ProcessUpdate
- func (pu *ProcessUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProcessUpdate) SaveX(ctx context.Context) int
- func (pu *ProcessUpdate) Where(ps ...predicate.Process) *ProcessUpdate
- type ProcessUpdateOne
- func (puo *ProcessUpdateOne) AddAttachedFileIDs(ids ...int) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) AddAttachedFiles(a ...*AttachedFile) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) AddFileIDs(ids ...int) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) AddFiles(f ...*File) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) ClearAttachedFiles() *ProcessUpdateOne
- func (puo *ProcessUpdateOne) ClearFiles() *ProcessUpdateOne
- func (puo *ProcessUpdateOne) Exec(ctx context.Context) error
- func (puo *ProcessUpdateOne) ExecX(ctx context.Context)
- func (puo *ProcessUpdateOne) Mutation() *ProcessMutation
- func (puo *ProcessUpdateOne) RemoveAttachedFileIDs(ids ...int) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) RemoveAttachedFiles(a ...*AttachedFile) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) RemoveFileIDs(ids ...int) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) RemoveFiles(f ...*File) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) Save(ctx context.Context) (*Process, error)
- func (puo *ProcessUpdateOne) SaveX(ctx context.Context) *Process
- func (puo *ProcessUpdateOne) Select(field string, fields ...string) *ProcessUpdateOne
- func (puo *ProcessUpdateOne) Where(ps ...predicate.Process) *ProcessUpdateOne
- type ProcessUpsert
- type ProcessUpsertBulk
- func (u *ProcessUpsertBulk) DoNothing() *ProcessUpsertBulk
- func (u *ProcessUpsertBulk) Exec(ctx context.Context) error
- func (u *ProcessUpsertBulk) ExecX(ctx context.Context)
- func (u *ProcessUpsertBulk) Ignore() *ProcessUpsertBulk
- func (u *ProcessUpsertBulk) Update(set func(*ProcessUpsert)) *ProcessUpsertBulk
- func (u *ProcessUpsertBulk) UpdateNewValues() *ProcessUpsertBulk
- type ProcessUpsertOne
- func (u *ProcessUpsertOne) DoNothing() *ProcessUpsertOne
- func (u *ProcessUpsertOne) Exec(ctx context.Context) error
- func (u *ProcessUpsertOne) ExecX(ctx context.Context)
- func (u *ProcessUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *ProcessUpsertOne) IDX(ctx context.Context) int
- func (u *ProcessUpsertOne) Ignore() *ProcessUpsertOne
- func (u *ProcessUpsertOne) Update(set func(*ProcessUpsert)) *ProcessUpsertOne
- func (u *ProcessUpsertOne) UpdateNewValues() *ProcessUpsertOne
- type Processes
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Relationship
- type RelationshipClient
- func (c *RelationshipClient) Create() *RelationshipCreate
- func (c *RelationshipClient) CreateBulk(builders ...*RelationshipCreate) *RelationshipCreateBulk
- func (c *RelationshipClient) Delete() *RelationshipDelete
- func (c *RelationshipClient) Hooks() []Hook
- func (c *RelationshipClient) Intercept(interceptors ...Interceptor)
- func (c *RelationshipClient) Interceptors() []Interceptor
- func (c *RelationshipClient) Query() *RelationshipQuery
- func (c *RelationshipClient) QueryInfo(r *Relationship) *RelationshipInfoQuery
- func (c *RelationshipClient) QueryRelative(r *Relationship) *UserQuery
- func (c *RelationshipClient) QueryUser(r *Relationship) *UserQuery
- func (c *RelationshipClient) Update() *RelationshipUpdate
- func (c *RelationshipClient) UpdateOne(r *Relationship) *RelationshipUpdateOne
- func (c *RelationshipClient) Use(hooks ...Hook)
- type RelationshipCreate
- func (rc *RelationshipCreate) Exec(ctx context.Context) error
- func (rc *RelationshipCreate) ExecX(ctx context.Context)
- func (rc *RelationshipCreate) Mutation() *RelationshipMutation
- func (rc *RelationshipCreate) OnConflict(opts ...sql.ConflictOption) *RelationshipUpsertOne
- func (rc *RelationshipCreate) OnConflictColumns(columns ...string) *RelationshipUpsertOne
- func (rc *RelationshipCreate) Save(ctx context.Context) (*Relationship, error)
- func (rc *RelationshipCreate) SaveX(ctx context.Context) *Relationship
- func (rc *RelationshipCreate) SetInfo(r *RelationshipInfo) *RelationshipCreate
- func (rc *RelationshipCreate) SetInfoID(i int) *RelationshipCreate
- func (rc *RelationshipCreate) SetNillableInfoID(i *int) *RelationshipCreate
- func (rc *RelationshipCreate) SetNillableWeight(i *int) *RelationshipCreate
- func (rc *RelationshipCreate) SetRelative(u *User) *RelationshipCreate
- func (rc *RelationshipCreate) SetRelativeID(i int) *RelationshipCreate
- func (rc *RelationshipCreate) SetUser(u *User) *RelationshipCreate
- func (rc *RelationshipCreate) SetUserID(i int) *RelationshipCreate
- func (rc *RelationshipCreate) SetWeight(i int) *RelationshipCreate
- type RelationshipCreateBulk
- func (rcb *RelationshipCreateBulk) Exec(ctx context.Context) error
- func (rcb *RelationshipCreateBulk) ExecX(ctx context.Context)
- func (rcb *RelationshipCreateBulk) OnConflict(opts ...sql.ConflictOption) *RelationshipUpsertBulk
- func (rcb *RelationshipCreateBulk) OnConflictColumns(columns ...string) *RelationshipUpsertBulk
- func (rcb *RelationshipCreateBulk) Save(ctx context.Context) ([]*Relationship, error)
- func (rcb *RelationshipCreateBulk) SaveX(ctx context.Context) []*Relationship
- type RelationshipDelete
- type RelationshipDeleteOne
- type RelationshipEdges
- type RelationshipFilter
- func (f *RelationshipFilter) Where(p entql.P)
- func (f *RelationshipFilter) WhereHasInfo()
- func (f *RelationshipFilter) WhereHasInfoWith(preds ...predicate.RelationshipInfo)
- func (f *RelationshipFilter) WhereHasRelative()
- func (f *RelationshipFilter) WhereHasRelativeWith(preds ...predicate.User)
- func (f *RelationshipFilter) WhereHasUser()
- func (f *RelationshipFilter) WhereHasUserWith(preds ...predicate.User)
- func (f *RelationshipFilter) WhereInfoID(p entql.IntP)
- func (f *RelationshipFilter) WhereRelativeID(p entql.IntP)
- func (f *RelationshipFilter) WhereUserID(p entql.IntP)
- func (f *RelationshipFilter) WhereWeight(p entql.IntP)
- type RelationshipGroupBy
- func (rgb *RelationshipGroupBy) Aggregate(fns ...AggregateFunc) *RelationshipGroupBy
- func (s *RelationshipGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RelationshipGroupBy) BoolX(ctx context.Context) bool
- func (s *RelationshipGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RelationshipGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RelationshipGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RelationshipGroupBy) Float64X(ctx context.Context) float64
- func (s *RelationshipGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RelationshipGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RelationshipGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RelationshipGroupBy) IntX(ctx context.Context) int
- func (s *RelationshipGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RelationshipGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RelationshipGroupBy) Scan(ctx context.Context, v any) error
- func (s *RelationshipGroupBy) ScanX(ctx context.Context, v any)
- func (s *RelationshipGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RelationshipGroupBy) StringX(ctx context.Context) string
- func (s *RelationshipGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RelationshipGroupBy) StringsX(ctx context.Context) []string
- type RelationshipInfo
- type RelationshipInfoClient
- func (c *RelationshipInfoClient) Create() *RelationshipInfoCreate
- func (c *RelationshipInfoClient) CreateBulk(builders ...*RelationshipInfoCreate) *RelationshipInfoCreateBulk
- func (c *RelationshipInfoClient) Delete() *RelationshipInfoDelete
- func (c *RelationshipInfoClient) DeleteOne(ri *RelationshipInfo) *RelationshipInfoDeleteOne
- func (c *RelationshipInfoClient) DeleteOneID(id int) *RelationshipInfoDeleteOne
- func (c *RelationshipInfoClient) Get(ctx context.Context, id int) (*RelationshipInfo, error)
- func (c *RelationshipInfoClient) GetX(ctx context.Context, id int) *RelationshipInfo
- func (c *RelationshipInfoClient) Hooks() []Hook
- func (c *RelationshipInfoClient) Intercept(interceptors ...Interceptor)
- func (c *RelationshipInfoClient) Interceptors() []Interceptor
- func (c *RelationshipInfoClient) Query() *RelationshipInfoQuery
- func (c *RelationshipInfoClient) Update() *RelationshipInfoUpdate
- func (c *RelationshipInfoClient) UpdateOne(ri *RelationshipInfo) *RelationshipInfoUpdateOne
- func (c *RelationshipInfoClient) UpdateOneID(id int) *RelationshipInfoUpdateOne
- func (c *RelationshipInfoClient) Use(hooks ...Hook)
- type RelationshipInfoCreate
- func (ric *RelationshipInfoCreate) Exec(ctx context.Context) error
- func (ric *RelationshipInfoCreate) ExecX(ctx context.Context)
- func (ric *RelationshipInfoCreate) Mutation() *RelationshipInfoMutation
- func (ric *RelationshipInfoCreate) OnConflict(opts ...sql.ConflictOption) *RelationshipInfoUpsertOne
- func (ric *RelationshipInfoCreate) OnConflictColumns(columns ...string) *RelationshipInfoUpsertOne
- func (ric *RelationshipInfoCreate) Save(ctx context.Context) (*RelationshipInfo, error)
- func (ric *RelationshipInfoCreate) SaveX(ctx context.Context) *RelationshipInfo
- func (ric *RelationshipInfoCreate) SetText(s string) *RelationshipInfoCreate
- type RelationshipInfoCreateBulk
- func (ricb *RelationshipInfoCreateBulk) Exec(ctx context.Context) error
- func (ricb *RelationshipInfoCreateBulk) ExecX(ctx context.Context)
- func (ricb *RelationshipInfoCreateBulk) OnConflict(opts ...sql.ConflictOption) *RelationshipInfoUpsertBulk
- func (ricb *RelationshipInfoCreateBulk) OnConflictColumns(columns ...string) *RelationshipInfoUpsertBulk
- func (ricb *RelationshipInfoCreateBulk) Save(ctx context.Context) ([]*RelationshipInfo, error)
- func (ricb *RelationshipInfoCreateBulk) SaveX(ctx context.Context) []*RelationshipInfo
- type RelationshipInfoDelete
- type RelationshipInfoDeleteOne
- type RelationshipInfoFilter
- type RelationshipInfoGroupBy
- func (rigb *RelationshipInfoGroupBy) Aggregate(fns ...AggregateFunc) *RelationshipInfoGroupBy
- func (s *RelationshipInfoGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RelationshipInfoGroupBy) BoolX(ctx context.Context) bool
- func (s *RelationshipInfoGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RelationshipInfoGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RelationshipInfoGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RelationshipInfoGroupBy) Float64X(ctx context.Context) float64
- func (s *RelationshipInfoGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RelationshipInfoGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RelationshipInfoGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RelationshipInfoGroupBy) IntX(ctx context.Context) int
- func (s *RelationshipInfoGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RelationshipInfoGroupBy) IntsX(ctx context.Context) []int
- func (rigb *RelationshipInfoGroupBy) Scan(ctx context.Context, v any) error
- func (s *RelationshipInfoGroupBy) ScanX(ctx context.Context, v any)
- func (s *RelationshipInfoGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RelationshipInfoGroupBy) StringX(ctx context.Context) string
- func (s *RelationshipInfoGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RelationshipInfoGroupBy) StringsX(ctx context.Context) []string
- type RelationshipInfoMutation
- func (m *RelationshipInfoMutation) AddField(name string, value ent.Value) error
- func (m *RelationshipInfoMutation) AddedEdges() []string
- func (m *RelationshipInfoMutation) AddedField(name string) (ent.Value, bool)
- func (m *RelationshipInfoMutation) AddedFields() []string
- func (m *RelationshipInfoMutation) AddedIDs(name string) []ent.Value
- func (m *RelationshipInfoMutation) ClearEdge(name string) error
- func (m *RelationshipInfoMutation) ClearField(name string) error
- func (m *RelationshipInfoMutation) ClearedEdges() []string
- func (m *RelationshipInfoMutation) ClearedFields() []string
- func (m RelationshipInfoMutation) Client() *Client
- func (m *RelationshipInfoMutation) EdgeCleared(name string) bool
- func (m *RelationshipInfoMutation) Field(name string) (ent.Value, bool)
- func (m *RelationshipInfoMutation) FieldCleared(name string) bool
- func (m *RelationshipInfoMutation) Fields() []string
- func (m *RelationshipInfoMutation) Filter() *RelationshipInfoFilter
- func (m *RelationshipInfoMutation) ID() (id int, exists bool)
- func (m *RelationshipInfoMutation) IDs(ctx context.Context) ([]int, error)
- func (m *RelationshipInfoMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RelationshipInfoMutation) OldText(ctx context.Context) (v string, err error)
- func (m *RelationshipInfoMutation) Op() Op
- func (m *RelationshipInfoMutation) RemovedEdges() []string
- func (m *RelationshipInfoMutation) RemovedIDs(name string) []ent.Value
- func (m *RelationshipInfoMutation) ResetEdge(name string) error
- func (m *RelationshipInfoMutation) ResetField(name string) error
- func (m *RelationshipInfoMutation) ResetText()
- func (m *RelationshipInfoMutation) SetField(name string, value ent.Value) error
- func (m *RelationshipInfoMutation) SetOp(op Op)
- func (m *RelationshipInfoMutation) SetText(s string)
- func (m *RelationshipInfoMutation) Text() (r string, exists bool)
- func (m RelationshipInfoMutation) Tx() (*Tx, error)
- func (m *RelationshipInfoMutation) Type() string
- func (m *RelationshipInfoMutation) Where(ps ...predicate.RelationshipInfo)
- func (m *RelationshipInfoMutation) WhereP(ps ...func(*sql.Selector))
- type RelationshipInfoQuery
- func (riq *RelationshipInfoQuery) Aggregate(fns ...AggregateFunc) *RelationshipInfoSelect
- func (riq *RelationshipInfoQuery) All(ctx context.Context) ([]*RelationshipInfo, error)
- func (riq *RelationshipInfoQuery) AllX(ctx context.Context) []*RelationshipInfo
- func (riq *RelationshipInfoQuery) Clone() *RelationshipInfoQuery
- func (riq *RelationshipInfoQuery) Count(ctx context.Context) (int, error)
- func (riq *RelationshipInfoQuery) CountX(ctx context.Context) int
- func (riq *RelationshipInfoQuery) Exist(ctx context.Context) (bool, error)
- func (riq *RelationshipInfoQuery) ExistX(ctx context.Context) bool
- func (riq *RelationshipInfoQuery) Filter() *RelationshipInfoFilter
- func (riq *RelationshipInfoQuery) First(ctx context.Context) (*RelationshipInfo, error)
- func (riq *RelationshipInfoQuery) FirstID(ctx context.Context) (id int, err error)
- func (riq *RelationshipInfoQuery) FirstIDX(ctx context.Context) int
- func (riq *RelationshipInfoQuery) FirstX(ctx context.Context) *RelationshipInfo
- func (riq *RelationshipInfoQuery) GroupBy(field string, fields ...string) *RelationshipInfoGroupBy
- func (riq *RelationshipInfoQuery) IDs(ctx context.Context) (ids []int, err error)
- func (riq *RelationshipInfoQuery) IDsX(ctx context.Context) []int
- func (riq *RelationshipInfoQuery) Limit(limit int) *RelationshipInfoQuery
- func (riq *RelationshipInfoQuery) Offset(offset int) *RelationshipInfoQuery
- func (riq *RelationshipInfoQuery) Only(ctx context.Context) (*RelationshipInfo, error)
- func (riq *RelationshipInfoQuery) OnlyID(ctx context.Context) (id int, err error)
- func (riq *RelationshipInfoQuery) OnlyIDX(ctx context.Context) int
- func (riq *RelationshipInfoQuery) OnlyX(ctx context.Context) *RelationshipInfo
- func (riq *RelationshipInfoQuery) Order(o ...OrderFunc) *RelationshipInfoQuery
- func (riq *RelationshipInfoQuery) Select(fields ...string) *RelationshipInfoSelect
- func (riq *RelationshipInfoQuery) Unique(unique bool) *RelationshipInfoQuery
- func (riq *RelationshipInfoQuery) Where(ps ...predicate.RelationshipInfo) *RelationshipInfoQuery
- type RelationshipInfoSelect
- func (ris *RelationshipInfoSelect) Aggregate(fns ...AggregateFunc) *RelationshipInfoSelect
- func (s *RelationshipInfoSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RelationshipInfoSelect) BoolX(ctx context.Context) bool
- func (s *RelationshipInfoSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RelationshipInfoSelect) BoolsX(ctx context.Context) []bool
- func (s *RelationshipInfoSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RelationshipInfoSelect) Float64X(ctx context.Context) float64
- func (s *RelationshipInfoSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RelationshipInfoSelect) Float64sX(ctx context.Context) []float64
- func (s *RelationshipInfoSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RelationshipInfoSelect) IntX(ctx context.Context) int
- func (s *RelationshipInfoSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RelationshipInfoSelect) IntsX(ctx context.Context) []int
- func (ris *RelationshipInfoSelect) Scan(ctx context.Context, v any) error
- func (s *RelationshipInfoSelect) ScanX(ctx context.Context, v any)
- func (s *RelationshipInfoSelect) String(ctx context.Context) (_ string, err error)
- func (s *RelationshipInfoSelect) StringX(ctx context.Context) string
- func (s *RelationshipInfoSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RelationshipInfoSelect) StringsX(ctx context.Context) []string
- type RelationshipInfoUpdate
- func (riu *RelationshipInfoUpdate) Exec(ctx context.Context) error
- func (riu *RelationshipInfoUpdate) ExecX(ctx context.Context)
- func (riu *RelationshipInfoUpdate) Mutation() *RelationshipInfoMutation
- func (riu *RelationshipInfoUpdate) Save(ctx context.Context) (int, error)
- func (riu *RelationshipInfoUpdate) SaveX(ctx context.Context) int
- func (riu *RelationshipInfoUpdate) SetText(s string) *RelationshipInfoUpdate
- func (riu *RelationshipInfoUpdate) Where(ps ...predicate.RelationshipInfo) *RelationshipInfoUpdate
- type RelationshipInfoUpdateOne
- func (riuo *RelationshipInfoUpdateOne) Exec(ctx context.Context) error
- func (riuo *RelationshipInfoUpdateOne) ExecX(ctx context.Context)
- func (riuo *RelationshipInfoUpdateOne) Mutation() *RelationshipInfoMutation
- func (riuo *RelationshipInfoUpdateOne) Save(ctx context.Context) (*RelationshipInfo, error)
- func (riuo *RelationshipInfoUpdateOne) SaveX(ctx context.Context) *RelationshipInfo
- func (riuo *RelationshipInfoUpdateOne) Select(field string, fields ...string) *RelationshipInfoUpdateOne
- func (riuo *RelationshipInfoUpdateOne) SetText(s string) *RelationshipInfoUpdateOne
- func (riuo *RelationshipInfoUpdateOne) Where(ps ...predicate.RelationshipInfo) *RelationshipInfoUpdateOne
- type RelationshipInfoUpsert
- type RelationshipInfoUpsertBulk
- func (u *RelationshipInfoUpsertBulk) DoNothing() *RelationshipInfoUpsertBulk
- func (u *RelationshipInfoUpsertBulk) Exec(ctx context.Context) error
- func (u *RelationshipInfoUpsertBulk) ExecX(ctx context.Context)
- func (u *RelationshipInfoUpsertBulk) Ignore() *RelationshipInfoUpsertBulk
- func (u *RelationshipInfoUpsertBulk) SetText(v string) *RelationshipInfoUpsertBulk
- func (u *RelationshipInfoUpsertBulk) Update(set func(*RelationshipInfoUpsert)) *RelationshipInfoUpsertBulk
- func (u *RelationshipInfoUpsertBulk) UpdateNewValues() *RelationshipInfoUpsertBulk
- func (u *RelationshipInfoUpsertBulk) UpdateText() *RelationshipInfoUpsertBulk
- type RelationshipInfoUpsertOne
- func (u *RelationshipInfoUpsertOne) DoNothing() *RelationshipInfoUpsertOne
- func (u *RelationshipInfoUpsertOne) Exec(ctx context.Context) error
- func (u *RelationshipInfoUpsertOne) ExecX(ctx context.Context)
- func (u *RelationshipInfoUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *RelationshipInfoUpsertOne) IDX(ctx context.Context) int
- func (u *RelationshipInfoUpsertOne) Ignore() *RelationshipInfoUpsertOne
- func (u *RelationshipInfoUpsertOne) SetText(v string) *RelationshipInfoUpsertOne
- func (u *RelationshipInfoUpsertOne) Update(set func(*RelationshipInfoUpsert)) *RelationshipInfoUpsertOne
- func (u *RelationshipInfoUpsertOne) UpdateNewValues() *RelationshipInfoUpsertOne
- func (u *RelationshipInfoUpsertOne) UpdateText() *RelationshipInfoUpsertOne
- type RelationshipInfos
- type RelationshipMutation
- func (m *RelationshipMutation) AddField(name string, value ent.Value) error
- func (m *RelationshipMutation) AddWeight(i int)
- func (m *RelationshipMutation) AddedEdges() []string
- func (m *RelationshipMutation) AddedField(name string) (ent.Value, bool)
- func (m *RelationshipMutation) AddedFields() []string
- func (m *RelationshipMutation) AddedIDs(name string) []ent.Value
- func (m *RelationshipMutation) AddedWeight() (r int, exists bool)
- func (m *RelationshipMutation) ClearEdge(name string) error
- func (m *RelationshipMutation) ClearField(name string) error
- func (m *RelationshipMutation) ClearInfo()
- func (m *RelationshipMutation) ClearInfoID()
- func (m *RelationshipMutation) ClearRelative()
- func (m *RelationshipMutation) ClearUser()
- func (m *RelationshipMutation) ClearedEdges() []string
- func (m *RelationshipMutation) ClearedFields() []string
- func (m RelationshipMutation) Client() *Client
- func (m *RelationshipMutation) EdgeCleared(name string) bool
- func (m *RelationshipMutation) Field(name string) (ent.Value, bool)
- func (m *RelationshipMutation) FieldCleared(name string) bool
- func (m *RelationshipMutation) Fields() []string
- func (m *RelationshipMutation) Filter() *RelationshipFilter
- func (m *RelationshipMutation) InfoCleared() bool
- func (m *RelationshipMutation) InfoID() (r int, exists bool)
- func (m *RelationshipMutation) InfoIDCleared() bool
- func (m *RelationshipMutation) InfoIDs() (ids []int)
- func (m *RelationshipMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RelationshipMutation) Op() Op
- func (m *RelationshipMutation) RelativeCleared() bool
- func (m *RelationshipMutation) RelativeID() (r int, exists bool)
- func (m *RelationshipMutation) RelativeIDs() (ids []int)
- func (m *RelationshipMutation) RemovedEdges() []string
- func (m *RelationshipMutation) RemovedIDs(name string) []ent.Value
- func (m *RelationshipMutation) ResetEdge(name string) error
- func (m *RelationshipMutation) ResetField(name string) error
- func (m *RelationshipMutation) ResetInfo()
- func (m *RelationshipMutation) ResetInfoID()
- func (m *RelationshipMutation) ResetRelative()
- func (m *RelationshipMutation) ResetRelativeID()
- func (m *RelationshipMutation) ResetUser()
- func (m *RelationshipMutation) ResetUserID()
- func (m *RelationshipMutation) ResetWeight()
- func (m *RelationshipMutation) SetField(name string, value ent.Value) error
- func (m *RelationshipMutation) SetInfoID(i int)
- func (m *RelationshipMutation) SetOp(op Op)
- func (m *RelationshipMutation) SetRelativeID(i int)
- func (m *RelationshipMutation) SetUserID(i int)
- func (m *RelationshipMutation) SetWeight(i int)
- func (m RelationshipMutation) Tx() (*Tx, error)
- func (m *RelationshipMutation) Type() string
- func (m *RelationshipMutation) UserCleared() bool
- func (m *RelationshipMutation) UserID() (r int, exists bool)
- func (m *RelationshipMutation) UserIDs() (ids []int)
- func (m *RelationshipMutation) Weight() (r int, exists bool)
- func (m *RelationshipMutation) Where(ps ...predicate.Relationship)
- func (m *RelationshipMutation) WhereP(ps ...func(*sql.Selector))
- type RelationshipQuery
- func (rq *RelationshipQuery) Aggregate(fns ...AggregateFunc) *RelationshipSelect
- func (rq *RelationshipQuery) All(ctx context.Context) ([]*Relationship, error)
- func (rq *RelationshipQuery) AllX(ctx context.Context) []*Relationship
- func (rq *RelationshipQuery) Clone() *RelationshipQuery
- func (rq *RelationshipQuery) Count(ctx context.Context) (int, error)
- func (rq *RelationshipQuery) CountX(ctx context.Context) int
- func (rq *RelationshipQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RelationshipQuery) ExistX(ctx context.Context) bool
- func (rq *RelationshipQuery) Filter() *RelationshipFilter
- func (rq *RelationshipQuery) First(ctx context.Context) (*Relationship, error)
- func (rq *RelationshipQuery) FirstX(ctx context.Context) *Relationship
- func (rq *RelationshipQuery) GroupBy(field string, fields ...string) *RelationshipGroupBy
- func (rq *RelationshipQuery) Limit(limit int) *RelationshipQuery
- func (rq *RelationshipQuery) Offset(offset int) *RelationshipQuery
- func (rq *RelationshipQuery) Only(ctx context.Context) (*Relationship, error)
- func (rq *RelationshipQuery) OnlyX(ctx context.Context) *Relationship
- func (rq *RelationshipQuery) Order(o ...OrderFunc) *RelationshipQuery
- func (rq *RelationshipQuery) QueryInfo() *RelationshipInfoQuery
- func (rq *RelationshipQuery) QueryRelative() *UserQuery
- func (rq *RelationshipQuery) QueryUser() *UserQuery
- func (rq *RelationshipQuery) Select(fields ...string) *RelationshipSelect
- func (rq *RelationshipQuery) Unique(unique bool) *RelationshipQuery
- func (rq *RelationshipQuery) Where(ps ...predicate.Relationship) *RelationshipQuery
- func (rq *RelationshipQuery) WithInfo(opts ...func(*RelationshipInfoQuery)) *RelationshipQuery
- func (rq *RelationshipQuery) WithRelative(opts ...func(*UserQuery)) *RelationshipQuery
- func (rq *RelationshipQuery) WithUser(opts ...func(*UserQuery)) *RelationshipQuery
- type RelationshipSelect
- func (rs *RelationshipSelect) Aggregate(fns ...AggregateFunc) *RelationshipSelect
- func (s *RelationshipSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RelationshipSelect) BoolX(ctx context.Context) bool
- func (s *RelationshipSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RelationshipSelect) BoolsX(ctx context.Context) []bool
- func (s *RelationshipSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RelationshipSelect) Float64X(ctx context.Context) float64
- func (s *RelationshipSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RelationshipSelect) Float64sX(ctx context.Context) []float64
- func (s *RelationshipSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RelationshipSelect) IntX(ctx context.Context) int
- func (s *RelationshipSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RelationshipSelect) IntsX(ctx context.Context) []int
- func (rs *RelationshipSelect) Scan(ctx context.Context, v any) error
- func (s *RelationshipSelect) ScanX(ctx context.Context, v any)
- func (s *RelationshipSelect) String(ctx context.Context) (_ string, err error)
- func (s *RelationshipSelect) StringX(ctx context.Context) string
- func (s *RelationshipSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RelationshipSelect) StringsX(ctx context.Context) []string
- type RelationshipUpdate
- func (ru *RelationshipUpdate) AddWeight(i int) *RelationshipUpdate
- func (ru *RelationshipUpdate) ClearInfo() *RelationshipUpdate
- func (ru *RelationshipUpdate) ClearInfoID() *RelationshipUpdate
- func (ru *RelationshipUpdate) ClearRelative() *RelationshipUpdate
- func (ru *RelationshipUpdate) ClearUser() *RelationshipUpdate
- func (ru *RelationshipUpdate) Exec(ctx context.Context) error
- func (ru *RelationshipUpdate) ExecX(ctx context.Context)
- func (ru *RelationshipUpdate) Mutation() *RelationshipMutation
- func (ru *RelationshipUpdate) Save(ctx context.Context) (int, error)
- func (ru *RelationshipUpdate) SaveX(ctx context.Context) int
- func (ru *RelationshipUpdate) SetInfo(r *RelationshipInfo) *RelationshipUpdate
- func (ru *RelationshipUpdate) SetInfoID(i int) *RelationshipUpdate
- func (ru *RelationshipUpdate) SetNillableInfoID(i *int) *RelationshipUpdate
- func (ru *RelationshipUpdate) SetNillableWeight(i *int) *RelationshipUpdate
- func (ru *RelationshipUpdate) SetRelative(u *User) *RelationshipUpdate
- func (ru *RelationshipUpdate) SetRelativeID(i int) *RelationshipUpdate
- func (ru *RelationshipUpdate) SetUser(u *User) *RelationshipUpdate
- func (ru *RelationshipUpdate) SetUserID(i int) *RelationshipUpdate
- func (ru *RelationshipUpdate) SetWeight(i int) *RelationshipUpdate
- func (ru *RelationshipUpdate) Where(ps ...predicate.Relationship) *RelationshipUpdate
- type RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) AddWeight(i int) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) ClearInfo() *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) ClearInfoID() *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) ClearRelative() *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) ClearUser() *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) Exec(ctx context.Context) error
- func (ruo *RelationshipUpdateOne) ExecX(ctx context.Context)
- func (ruo *RelationshipUpdateOne) Mutation() *RelationshipMutation
- func (ruo *RelationshipUpdateOne) Save(ctx context.Context) (*Relationship, error)
- func (ruo *RelationshipUpdateOne) SaveX(ctx context.Context) *Relationship
- func (ruo *RelationshipUpdateOne) Select(field string, fields ...string) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) SetInfo(r *RelationshipInfo) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) SetInfoID(i int) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) SetNillableInfoID(i *int) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) SetNillableWeight(i *int) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) SetRelative(u *User) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) SetRelativeID(i int) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) SetUser(u *User) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) SetUserID(i int) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) SetWeight(i int) *RelationshipUpdateOne
- func (ruo *RelationshipUpdateOne) Where(ps ...predicate.Relationship) *RelationshipUpdateOne
- type RelationshipUpsert
- func (u *RelationshipUpsert) AddWeight(v int) *RelationshipUpsert
- func (u *RelationshipUpsert) ClearInfoID() *RelationshipUpsert
- func (u *RelationshipUpsert) SetInfoID(v int) *RelationshipUpsert
- func (u *RelationshipUpsert) SetRelativeID(v int) *RelationshipUpsert
- func (u *RelationshipUpsert) SetUserID(v int) *RelationshipUpsert
- func (u *RelationshipUpsert) SetWeight(v int) *RelationshipUpsert
- func (u *RelationshipUpsert) UpdateInfoID() *RelationshipUpsert
- func (u *RelationshipUpsert) UpdateRelativeID() *RelationshipUpsert
- func (u *RelationshipUpsert) UpdateUserID() *RelationshipUpsert
- func (u *RelationshipUpsert) UpdateWeight() *RelationshipUpsert
- type RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) AddWeight(v int) *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) ClearInfoID() *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) DoNothing() *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) Exec(ctx context.Context) error
- func (u *RelationshipUpsertBulk) ExecX(ctx context.Context)
- func (u *RelationshipUpsertBulk) Ignore() *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) SetInfoID(v int) *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) SetRelativeID(v int) *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) SetUserID(v int) *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) SetWeight(v int) *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) Update(set func(*RelationshipUpsert)) *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) UpdateInfoID() *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) UpdateNewValues() *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) UpdateRelativeID() *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) UpdateUserID() *RelationshipUpsertBulk
- func (u *RelationshipUpsertBulk) UpdateWeight() *RelationshipUpsertBulk
- type RelationshipUpsertOne
- func (u *RelationshipUpsertOne) AddWeight(v int) *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) ClearInfoID() *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) DoNothing() *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) Exec(ctx context.Context) error
- func (u *RelationshipUpsertOne) ExecX(ctx context.Context)
- func (u *RelationshipUpsertOne) Ignore() *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) SetInfoID(v int) *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) SetRelativeID(v int) *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) SetUserID(v int) *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) SetWeight(v int) *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) Update(set func(*RelationshipUpsert)) *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) UpdateInfoID() *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) UpdateNewValues() *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) UpdateRelativeID() *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) UpdateUserID() *RelationshipUpsertOne
- func (u *RelationshipUpsertOne) UpdateWeight() *RelationshipUpsertOne
- type Relationships
- type Role
- type RoleClient
- func (c *RoleClient) Create() *RoleCreate
- func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk
- func (c *RoleClient) Delete() *RoleDelete
- func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne
- func (c *RoleClient) DeleteOneID(id int) *RoleDeleteOne
- func (c *RoleClient) Get(ctx context.Context, id int) (*Role, error)
- func (c *RoleClient) GetX(ctx context.Context, id int) *Role
- func (c *RoleClient) Hooks() []Hook
- func (c *RoleClient) Intercept(interceptors ...Interceptor)
- func (c *RoleClient) Interceptors() []Interceptor
- func (c *RoleClient) Query() *RoleQuery
- func (c *RoleClient) QueryRolesUsers(r *Role) *RoleUserQuery
- func (c *RoleClient) QueryUser(r *Role) *UserQuery
- func (c *RoleClient) Update() *RoleUpdate
- func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
- func (c *RoleClient) UpdateOneID(id int) *RoleUpdateOne
- func (c *RoleClient) Use(hooks ...Hook)
- type RoleCreate
- func (rc *RoleCreate) AddUser(u ...*User) *RoleCreate
- func (rc *RoleCreate) AddUserIDs(ids ...int) *RoleCreate
- func (rc *RoleCreate) Exec(ctx context.Context) error
- func (rc *RoleCreate) ExecX(ctx context.Context)
- func (rc *RoleCreate) Mutation() *RoleMutation
- func (rc *RoleCreate) OnConflict(opts ...sql.ConflictOption) *RoleUpsertOne
- func (rc *RoleCreate) OnConflictColumns(columns ...string) *RoleUpsertOne
- func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)
- func (rc *RoleCreate) SaveX(ctx context.Context) *Role
- func (rc *RoleCreate) SetCreatedAt(t time.Time) *RoleCreate
- func (rc *RoleCreate) SetName(s string) *RoleCreate
- func (rc *RoleCreate) SetNillableCreatedAt(t *time.Time) *RoleCreate
- type RoleCreateBulk
- func (rcb *RoleCreateBulk) Exec(ctx context.Context) error
- func (rcb *RoleCreateBulk) ExecX(ctx context.Context)
- func (rcb *RoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *RoleUpsertBulk
- func (rcb *RoleCreateBulk) OnConflictColumns(columns ...string) *RoleUpsertBulk
- func (rcb *RoleCreateBulk) Save(ctx context.Context) ([]*Role, error)
- func (rcb *RoleCreateBulk) SaveX(ctx context.Context) []*Role
- type RoleDelete
- type RoleDeleteOne
- type RoleEdges
- type RoleFilter
- func (f *RoleFilter) Where(p entql.P)
- func (f *RoleFilter) WhereCreatedAt(p entql.TimeP)
- func (f *RoleFilter) WhereHasRolesUsers()
- func (f *RoleFilter) WhereHasRolesUsersWith(preds ...predicate.RoleUser)
- func (f *RoleFilter) WhereHasUser()
- func (f *RoleFilter) WhereHasUserWith(preds ...predicate.User)
- func (f *RoleFilter) WhereID(p entql.IntP)
- func (f *RoleFilter) WhereName(p entql.StringP)
- type RoleGroupBy
- func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy
- func (s *RoleGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleGroupBy) BoolX(ctx context.Context) bool
- func (s *RoleGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RoleGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleGroupBy) Float64X(ctx context.Context) float64
- func (s *RoleGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RoleGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RoleGroupBy) IntX(ctx context.Context) int
- func (s *RoleGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RoleGroupBy) IntsX(ctx context.Context) []int
- func (rgb *RoleGroupBy) Scan(ctx context.Context, v any) error
- func (s *RoleGroupBy) ScanX(ctx context.Context, v any)
- func (s *RoleGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RoleGroupBy) StringX(ctx context.Context) string
- func (s *RoleGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RoleGroupBy) StringsX(ctx context.Context) []string
- type RoleMutation
- func (m *RoleMutation) AddField(name string, value ent.Value) error
- func (m *RoleMutation) AddUserIDs(ids ...int)
- func (m *RoleMutation) AddedEdges() []string
- func (m *RoleMutation) AddedField(name string) (ent.Value, bool)
- func (m *RoleMutation) AddedFields() []string
- func (m *RoleMutation) AddedIDs(name string) []ent.Value
- func (m *RoleMutation) ClearEdge(name string) error
- func (m *RoleMutation) ClearField(name string) error
- func (m *RoleMutation) ClearUser()
- func (m *RoleMutation) ClearedEdges() []string
- func (m *RoleMutation) ClearedFields() []string
- func (m RoleMutation) Client() *Client
- func (m *RoleMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RoleMutation) EdgeCleared(name string) bool
- func (m *RoleMutation) Field(name string) (ent.Value, bool)
- func (m *RoleMutation) FieldCleared(name string) bool
- func (m *RoleMutation) Fields() []string
- func (m *RoleMutation) Filter() *RoleFilter
- func (m *RoleMutation) ID() (id int, exists bool)
- func (m *RoleMutation) IDs(ctx context.Context) ([]int, error)
- func (m *RoleMutation) Name() (r string, exists bool)
- func (m *RoleMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *RoleMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RoleMutation) OldName(ctx context.Context) (v string, err error)
- func (m *RoleMutation) Op() Op
- func (m *RoleMutation) RemoveUserIDs(ids ...int)
- func (m *RoleMutation) RemovedEdges() []string
- func (m *RoleMutation) RemovedIDs(name string) []ent.Value
- func (m *RoleMutation) RemovedUserIDs() (ids []int)
- func (m *RoleMutation) ResetCreatedAt()
- func (m *RoleMutation) ResetEdge(name string) error
- func (m *RoleMutation) ResetField(name string) error
- func (m *RoleMutation) ResetName()
- func (m *RoleMutation) ResetUser()
- func (m *RoleMutation) SetCreatedAt(t time.Time)
- func (m *RoleMutation) SetField(name string, value ent.Value) error
- func (m *RoleMutation) SetName(s string)
- func (m *RoleMutation) SetOp(op Op)
- func (m RoleMutation) Tx() (*Tx, error)
- func (m *RoleMutation) Type() string
- func (m *RoleMutation) UserCleared() bool
- func (m *RoleMutation) UserIDs() (ids []int)
- func (m *RoleMutation) Where(ps ...predicate.Role)
- func (m *RoleMutation) WhereP(ps ...func(*sql.Selector))
- type RoleQuery
- func (rq *RoleQuery) Aggregate(fns ...AggregateFunc) *RoleSelect
- func (rq *RoleQuery) All(ctx context.Context) ([]*Role, error)
- func (rq *RoleQuery) AllX(ctx context.Context) []*Role
- func (rq *RoleQuery) Clone() *RoleQuery
- func (rq *RoleQuery) Count(ctx context.Context) (int, error)
- func (rq *RoleQuery) CountX(ctx context.Context) int
- func (rq *RoleQuery) Exist(ctx context.Context) (bool, error)
- func (rq *RoleQuery) ExistX(ctx context.Context) bool
- func (rq *RoleQuery) Filter() *RoleFilter
- func (rq *RoleQuery) First(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) FirstID(ctx context.Context) (id int, err error)
- func (rq *RoleQuery) FirstIDX(ctx context.Context) int
- func (rq *RoleQuery) FirstX(ctx context.Context) *Role
- func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy
- func (rq *RoleQuery) IDs(ctx context.Context) (ids []int, err error)
- func (rq *RoleQuery) IDsX(ctx context.Context) []int
- func (rq *RoleQuery) Limit(limit int) *RoleQuery
- func (rq *RoleQuery) Offset(offset int) *RoleQuery
- func (rq *RoleQuery) Only(ctx context.Context) (*Role, error)
- func (rq *RoleQuery) OnlyID(ctx context.Context) (id int, err error)
- func (rq *RoleQuery) OnlyIDX(ctx context.Context) int
- func (rq *RoleQuery) OnlyX(ctx context.Context) *Role
- func (rq *RoleQuery) Order(o ...OrderFunc) *RoleQuery
- func (rq *RoleQuery) QueryRolesUsers() *RoleUserQuery
- func (rq *RoleQuery) QueryUser() *UserQuery
- func (rq *RoleQuery) Select(fields ...string) *RoleSelect
- func (rq *RoleQuery) Unique(unique bool) *RoleQuery
- func (rq *RoleQuery) Where(ps ...predicate.Role) *RoleQuery
- func (rq *RoleQuery) WithRolesUsers(opts ...func(*RoleUserQuery)) *RoleQuery
- func (rq *RoleQuery) WithUser(opts ...func(*UserQuery)) *RoleQuery
- type RoleSelect
- func (rs *RoleSelect) Aggregate(fns ...AggregateFunc) *RoleSelect
- func (s *RoleSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleSelect) BoolX(ctx context.Context) bool
- func (s *RoleSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleSelect) BoolsX(ctx context.Context) []bool
- func (s *RoleSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleSelect) Float64X(ctx context.Context) float64
- func (s *RoleSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleSelect) Float64sX(ctx context.Context) []float64
- func (s *RoleSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RoleSelect) IntX(ctx context.Context) int
- func (s *RoleSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RoleSelect) IntsX(ctx context.Context) []int
- func (rs *RoleSelect) Scan(ctx context.Context, v any) error
- func (s *RoleSelect) ScanX(ctx context.Context, v any)
- func (s *RoleSelect) String(ctx context.Context) (_ string, err error)
- func (s *RoleSelect) StringX(ctx context.Context) string
- func (s *RoleSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RoleSelect) StringsX(ctx context.Context) []string
- type RoleUpdate
- func (ru *RoleUpdate) AddUser(u ...*User) *RoleUpdate
- func (ru *RoleUpdate) AddUserIDs(ids ...int) *RoleUpdate
- func (ru *RoleUpdate) ClearUser() *RoleUpdate
- func (ru *RoleUpdate) Exec(ctx context.Context) error
- func (ru *RoleUpdate) ExecX(ctx context.Context)
- func (ru *RoleUpdate) Mutation() *RoleMutation
- func (ru *RoleUpdate) RemoveUser(u ...*User) *RoleUpdate
- func (ru *RoleUpdate) RemoveUserIDs(ids ...int) *RoleUpdate
- func (ru *RoleUpdate) Save(ctx context.Context) (int, error)
- func (ru *RoleUpdate) SaveX(ctx context.Context) int
- func (ru *RoleUpdate) SetCreatedAt(t time.Time) *RoleUpdate
- func (ru *RoleUpdate) SetName(s string) *RoleUpdate
- func (ru *RoleUpdate) SetNillableCreatedAt(t *time.Time) *RoleUpdate
- func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
- type RoleUpdateOne
- func (ruo *RoleUpdateOne) AddUser(u ...*User) *RoleUpdateOne
- func (ruo *RoleUpdateOne) AddUserIDs(ids ...int) *RoleUpdateOne
- func (ruo *RoleUpdateOne) ClearUser() *RoleUpdateOne
- func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
- func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
- func (ruo *RoleUpdateOne) Mutation() *RoleMutation
- func (ruo *RoleUpdateOne) RemoveUser(u ...*User) *RoleUpdateOne
- func (ruo *RoleUpdateOne) RemoveUserIDs(ids ...int) *RoleUpdateOne
- func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)
- func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role
- func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetCreatedAt(t time.Time) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetName(s string) *RoleUpdateOne
- func (ruo *RoleUpdateOne) SetNillableCreatedAt(t *time.Time) *RoleUpdateOne
- func (ruo *RoleUpdateOne) Where(ps ...predicate.Role) *RoleUpdateOne
- type RoleUpsert
- type RoleUpsertBulk
- func (u *RoleUpsertBulk) DoNothing() *RoleUpsertBulk
- func (u *RoleUpsertBulk) Exec(ctx context.Context) error
- func (u *RoleUpsertBulk) ExecX(ctx context.Context)
- func (u *RoleUpsertBulk) Ignore() *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetCreatedAt(v time.Time) *RoleUpsertBulk
- func (u *RoleUpsertBulk) SetName(v string) *RoleUpsertBulk
- func (u *RoleUpsertBulk) Update(set func(*RoleUpsert)) *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateCreatedAt() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateName() *RoleUpsertBulk
- func (u *RoleUpsertBulk) UpdateNewValues() *RoleUpsertBulk
- type RoleUpsertOne
- func (u *RoleUpsertOne) DoNothing() *RoleUpsertOne
- func (u *RoleUpsertOne) Exec(ctx context.Context) error
- func (u *RoleUpsertOne) ExecX(ctx context.Context)
- func (u *RoleUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *RoleUpsertOne) IDX(ctx context.Context) int
- func (u *RoleUpsertOne) Ignore() *RoleUpsertOne
- func (u *RoleUpsertOne) SetCreatedAt(v time.Time) *RoleUpsertOne
- func (u *RoleUpsertOne) SetName(v string) *RoleUpsertOne
- func (u *RoleUpsertOne) Update(set func(*RoleUpsert)) *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateCreatedAt() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateName() *RoleUpsertOne
- func (u *RoleUpsertOne) UpdateNewValues() *RoleUpsertOne
- type RoleUser
- type RoleUserClient
- func (c *RoleUserClient) Create() *RoleUserCreate
- func (c *RoleUserClient) CreateBulk(builders ...*RoleUserCreate) *RoleUserCreateBulk
- func (c *RoleUserClient) Delete() *RoleUserDelete
- func (c *RoleUserClient) Hooks() []Hook
- func (c *RoleUserClient) Intercept(interceptors ...Interceptor)
- func (c *RoleUserClient) Interceptors() []Interceptor
- func (c *RoleUserClient) Query() *RoleUserQuery
- func (c *RoleUserClient) QueryRole(ru *RoleUser) *RoleQuery
- func (c *RoleUserClient) QueryUser(ru *RoleUser) *UserQuery
- func (c *RoleUserClient) Update() *RoleUserUpdate
- func (c *RoleUserClient) UpdateOne(ru *RoleUser) *RoleUserUpdateOne
- func (c *RoleUserClient) Use(hooks ...Hook)
- type RoleUserCreate
- func (ruc *RoleUserCreate) Exec(ctx context.Context) error
- func (ruc *RoleUserCreate) ExecX(ctx context.Context)
- func (ruc *RoleUserCreate) Mutation() *RoleUserMutation
- func (ruc *RoleUserCreate) OnConflict(opts ...sql.ConflictOption) *RoleUserUpsertOne
- func (ruc *RoleUserCreate) OnConflictColumns(columns ...string) *RoleUserUpsertOne
- func (ruc *RoleUserCreate) Save(ctx context.Context) (*RoleUser, error)
- func (ruc *RoleUserCreate) SaveX(ctx context.Context) *RoleUser
- func (ruc *RoleUserCreate) SetCreatedAt(t time.Time) *RoleUserCreate
- func (ruc *RoleUserCreate) SetNillableCreatedAt(t *time.Time) *RoleUserCreate
- func (ruc *RoleUserCreate) SetRole(r *Role) *RoleUserCreate
- func (ruc *RoleUserCreate) SetRoleID(i int) *RoleUserCreate
- func (ruc *RoleUserCreate) SetUser(u *User) *RoleUserCreate
- func (ruc *RoleUserCreate) SetUserID(i int) *RoleUserCreate
- type RoleUserCreateBulk
- func (rucb *RoleUserCreateBulk) Exec(ctx context.Context) error
- func (rucb *RoleUserCreateBulk) ExecX(ctx context.Context)
- func (rucb *RoleUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *RoleUserUpsertBulk
- func (rucb *RoleUserCreateBulk) OnConflictColumns(columns ...string) *RoleUserUpsertBulk
- func (rucb *RoleUserCreateBulk) Save(ctx context.Context) ([]*RoleUser, error)
- func (rucb *RoleUserCreateBulk) SaveX(ctx context.Context) []*RoleUser
- type RoleUserDelete
- type RoleUserDeleteOne
- type RoleUserEdges
- type RoleUserFilter
- func (f *RoleUserFilter) Where(p entql.P)
- func (f *RoleUserFilter) WhereCreatedAt(p entql.TimeP)
- func (f *RoleUserFilter) WhereHasRole()
- func (f *RoleUserFilter) WhereHasRoleWith(preds ...predicate.Role)
- func (f *RoleUserFilter) WhereHasUser()
- func (f *RoleUserFilter) WhereHasUserWith(preds ...predicate.User)
- func (f *RoleUserFilter) WhereRoleID(p entql.IntP)
- func (f *RoleUserFilter) WhereUserID(p entql.IntP)
- type RoleUserGroupBy
- func (rugb *RoleUserGroupBy) Aggregate(fns ...AggregateFunc) *RoleUserGroupBy
- func (s *RoleUserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleUserGroupBy) BoolX(ctx context.Context) bool
- func (s *RoleUserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleUserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *RoleUserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleUserGroupBy) Float64X(ctx context.Context) float64
- func (s *RoleUserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleUserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *RoleUserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *RoleUserGroupBy) IntX(ctx context.Context) int
- func (s *RoleUserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *RoleUserGroupBy) IntsX(ctx context.Context) []int
- func (rugb *RoleUserGroupBy) Scan(ctx context.Context, v any) error
- func (s *RoleUserGroupBy) ScanX(ctx context.Context, v any)
- func (s *RoleUserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *RoleUserGroupBy) StringX(ctx context.Context) string
- func (s *RoleUserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *RoleUserGroupBy) StringsX(ctx context.Context) []string
- type RoleUserMutation
- func (m *RoleUserMutation) AddField(name string, value ent.Value) error
- func (m *RoleUserMutation) AddedEdges() []string
- func (m *RoleUserMutation) AddedField(name string) (ent.Value, bool)
- func (m *RoleUserMutation) AddedFields() []string
- func (m *RoleUserMutation) AddedIDs(name string) []ent.Value
- func (m *RoleUserMutation) ClearEdge(name string) error
- func (m *RoleUserMutation) ClearField(name string) error
- func (m *RoleUserMutation) ClearRole()
- func (m *RoleUserMutation) ClearUser()
- func (m *RoleUserMutation) ClearedEdges() []string
- func (m *RoleUserMutation) ClearedFields() []string
- func (m RoleUserMutation) Client() *Client
- func (m *RoleUserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *RoleUserMutation) EdgeCleared(name string) bool
- func (m *RoleUserMutation) Field(name string) (ent.Value, bool)
- func (m *RoleUserMutation) FieldCleared(name string) bool
- func (m *RoleUserMutation) Fields() []string
- func (m *RoleUserMutation) Filter() *RoleUserFilter
- func (m *RoleUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *RoleUserMutation) Op() Op
- func (m *RoleUserMutation) RemovedEdges() []string
- func (m *RoleUserMutation) RemovedIDs(name string) []ent.Value
- func (m *RoleUserMutation) ResetCreatedAt()
- func (m *RoleUserMutation) ResetEdge(name string) error
- func (m *RoleUserMutation) ResetField(name string) error
- func (m *RoleUserMutation) ResetRole()
- func (m *RoleUserMutation) ResetRoleID()
- func (m *RoleUserMutation) ResetUser()
- func (m *RoleUserMutation) ResetUserID()
- func (m *RoleUserMutation) RoleCleared() bool
- func (m *RoleUserMutation) RoleID() (r int, exists bool)
- func (m *RoleUserMutation) RoleIDs() (ids []int)
- func (m *RoleUserMutation) SetCreatedAt(t time.Time)
- func (m *RoleUserMutation) SetField(name string, value ent.Value) error
- func (m *RoleUserMutation) SetOp(op Op)
- func (m *RoleUserMutation) SetRoleID(i int)
- func (m *RoleUserMutation) SetUserID(i int)
- func (m RoleUserMutation) Tx() (*Tx, error)
- func (m *RoleUserMutation) Type() string
- func (m *RoleUserMutation) UserCleared() bool
- func (m *RoleUserMutation) UserID() (r int, exists bool)
- func (m *RoleUserMutation) UserIDs() (ids []int)
- func (m *RoleUserMutation) Where(ps ...predicate.RoleUser)
- func (m *RoleUserMutation) WhereP(ps ...func(*sql.Selector))
- type RoleUserQuery
- func (ruq *RoleUserQuery) Aggregate(fns ...AggregateFunc) *RoleUserSelect
- func (ruq *RoleUserQuery) All(ctx context.Context) ([]*RoleUser, error)
- func (ruq *RoleUserQuery) AllX(ctx context.Context) []*RoleUser
- func (ruq *RoleUserQuery) Clone() *RoleUserQuery
- func (ruq *RoleUserQuery) Count(ctx context.Context) (int, error)
- func (ruq *RoleUserQuery) CountX(ctx context.Context) int
- func (ruq *RoleUserQuery) Exist(ctx context.Context) (bool, error)
- func (ruq *RoleUserQuery) ExistX(ctx context.Context) bool
- func (ruq *RoleUserQuery) Filter() *RoleUserFilter
- func (ruq *RoleUserQuery) First(ctx context.Context) (*RoleUser, error)
- func (ruq *RoleUserQuery) FirstX(ctx context.Context) *RoleUser
- func (ruq *RoleUserQuery) GroupBy(field string, fields ...string) *RoleUserGroupBy
- func (ruq *RoleUserQuery) Limit(limit int) *RoleUserQuery
- func (ruq *RoleUserQuery) Offset(offset int) *RoleUserQuery
- func (ruq *RoleUserQuery) Only(ctx context.Context) (*RoleUser, error)
- func (ruq *RoleUserQuery) OnlyX(ctx context.Context) *RoleUser
- func (ruq *RoleUserQuery) Order(o ...OrderFunc) *RoleUserQuery
- func (ruq *RoleUserQuery) QueryRole() *RoleQuery
- func (ruq *RoleUserQuery) QueryUser() *UserQuery
- func (ruq *RoleUserQuery) Select(fields ...string) *RoleUserSelect
- func (ruq *RoleUserQuery) Unique(unique bool) *RoleUserQuery
- func (ruq *RoleUserQuery) Where(ps ...predicate.RoleUser) *RoleUserQuery
- func (ruq *RoleUserQuery) WithRole(opts ...func(*RoleQuery)) *RoleUserQuery
- func (ruq *RoleUserQuery) WithUser(opts ...func(*UserQuery)) *RoleUserQuery
- type RoleUserSelect
- func (rus *RoleUserSelect) Aggregate(fns ...AggregateFunc) *RoleUserSelect
- func (s *RoleUserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *RoleUserSelect) BoolX(ctx context.Context) bool
- func (s *RoleUserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *RoleUserSelect) BoolsX(ctx context.Context) []bool
- func (s *RoleUserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *RoleUserSelect) Float64X(ctx context.Context) float64
- func (s *RoleUserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *RoleUserSelect) Float64sX(ctx context.Context) []float64
- func (s *RoleUserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *RoleUserSelect) IntX(ctx context.Context) int
- func (s *RoleUserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *RoleUserSelect) IntsX(ctx context.Context) []int
- func (rus *RoleUserSelect) Scan(ctx context.Context, v any) error
- func (s *RoleUserSelect) ScanX(ctx context.Context, v any)
- func (s *RoleUserSelect) String(ctx context.Context) (_ string, err error)
- func (s *RoleUserSelect) StringX(ctx context.Context) string
- func (s *RoleUserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *RoleUserSelect) StringsX(ctx context.Context) []string
- type RoleUserUpdate
- func (ruu *RoleUserUpdate) ClearRole() *RoleUserUpdate
- func (ruu *RoleUserUpdate) ClearUser() *RoleUserUpdate
- func (ruu *RoleUserUpdate) Exec(ctx context.Context) error
- func (ruu *RoleUserUpdate) ExecX(ctx context.Context)
- func (ruu *RoleUserUpdate) Mutation() *RoleUserMutation
- func (ruu *RoleUserUpdate) Save(ctx context.Context) (int, error)
- func (ruu *RoleUserUpdate) SaveX(ctx context.Context) int
- func (ruu *RoleUserUpdate) SetCreatedAt(t time.Time) *RoleUserUpdate
- func (ruu *RoleUserUpdate) SetNillableCreatedAt(t *time.Time) *RoleUserUpdate
- func (ruu *RoleUserUpdate) SetRole(r *Role) *RoleUserUpdate
- func (ruu *RoleUserUpdate) SetRoleID(i int) *RoleUserUpdate
- func (ruu *RoleUserUpdate) SetUser(u *User) *RoleUserUpdate
- func (ruu *RoleUserUpdate) SetUserID(i int) *RoleUserUpdate
- func (ruu *RoleUserUpdate) Where(ps ...predicate.RoleUser) *RoleUserUpdate
- type RoleUserUpdateOne
- func (ruuo *RoleUserUpdateOne) ClearRole() *RoleUserUpdateOne
- func (ruuo *RoleUserUpdateOne) ClearUser() *RoleUserUpdateOne
- func (ruuo *RoleUserUpdateOne) Exec(ctx context.Context) error
- func (ruuo *RoleUserUpdateOne) ExecX(ctx context.Context)
- func (ruuo *RoleUserUpdateOne) Mutation() *RoleUserMutation
- func (ruuo *RoleUserUpdateOne) Save(ctx context.Context) (*RoleUser, error)
- func (ruuo *RoleUserUpdateOne) SaveX(ctx context.Context) *RoleUser
- func (ruuo *RoleUserUpdateOne) Select(field string, fields ...string) *RoleUserUpdateOne
- func (ruuo *RoleUserUpdateOne) SetCreatedAt(t time.Time) *RoleUserUpdateOne
- func (ruuo *RoleUserUpdateOne) SetNillableCreatedAt(t *time.Time) *RoleUserUpdateOne
- func (ruuo *RoleUserUpdateOne) SetRole(r *Role) *RoleUserUpdateOne
- func (ruuo *RoleUserUpdateOne) SetRoleID(i int) *RoleUserUpdateOne
- func (ruuo *RoleUserUpdateOne) SetUser(u *User) *RoleUserUpdateOne
- func (ruuo *RoleUserUpdateOne) SetUserID(i int) *RoleUserUpdateOne
- func (ruuo *RoleUserUpdateOne) Where(ps ...predicate.RoleUser) *RoleUserUpdateOne
- type RoleUserUpsert
- func (u *RoleUserUpsert) SetCreatedAt(v time.Time) *RoleUserUpsert
- func (u *RoleUserUpsert) SetRoleID(v int) *RoleUserUpsert
- func (u *RoleUserUpsert) SetUserID(v int) *RoleUserUpsert
- func (u *RoleUserUpsert) UpdateCreatedAt() *RoleUserUpsert
- func (u *RoleUserUpsert) UpdateRoleID() *RoleUserUpsert
- func (u *RoleUserUpsert) UpdateUserID() *RoleUserUpsert
- type RoleUserUpsertBulk
- func (u *RoleUserUpsertBulk) DoNothing() *RoleUserUpsertBulk
- func (u *RoleUserUpsertBulk) Exec(ctx context.Context) error
- func (u *RoleUserUpsertBulk) ExecX(ctx context.Context)
- func (u *RoleUserUpsertBulk) Ignore() *RoleUserUpsertBulk
- func (u *RoleUserUpsertBulk) SetCreatedAt(v time.Time) *RoleUserUpsertBulk
- func (u *RoleUserUpsertBulk) SetRoleID(v int) *RoleUserUpsertBulk
- func (u *RoleUserUpsertBulk) SetUserID(v int) *RoleUserUpsertBulk
- func (u *RoleUserUpsertBulk) Update(set func(*RoleUserUpsert)) *RoleUserUpsertBulk
- func (u *RoleUserUpsertBulk) UpdateCreatedAt() *RoleUserUpsertBulk
- func (u *RoleUserUpsertBulk) UpdateNewValues() *RoleUserUpsertBulk
- func (u *RoleUserUpsertBulk) UpdateRoleID() *RoleUserUpsertBulk
- func (u *RoleUserUpsertBulk) UpdateUserID() *RoleUserUpsertBulk
- type RoleUserUpsertOne
- func (u *RoleUserUpsertOne) DoNothing() *RoleUserUpsertOne
- func (u *RoleUserUpsertOne) Exec(ctx context.Context) error
- func (u *RoleUserUpsertOne) ExecX(ctx context.Context)
- func (u *RoleUserUpsertOne) Ignore() *RoleUserUpsertOne
- func (u *RoleUserUpsertOne) SetCreatedAt(v time.Time) *RoleUserUpsertOne
- func (u *RoleUserUpsertOne) SetRoleID(v int) *RoleUserUpsertOne
- func (u *RoleUserUpsertOne) SetUserID(v int) *RoleUserUpsertOne
- func (u *RoleUserUpsertOne) Update(set func(*RoleUserUpsert)) *RoleUserUpsertOne
- func (u *RoleUserUpsertOne) UpdateCreatedAt() *RoleUserUpsertOne
- func (u *RoleUserUpsertOne) UpdateNewValues() *RoleUserUpsertOne
- func (u *RoleUserUpsertOne) UpdateRoleID() *RoleUserUpsertOne
- func (u *RoleUserUpsertOne) UpdateUserID() *RoleUserUpsertOne
- type RoleUsers
- type Roles
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tag
- type TagClient
- func (c *TagClient) Create() *TagCreate
- func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
- func (c *TagClient) Delete() *TagDelete
- func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
- func (c *TagClient) DeleteOneID(id int) *TagDeleteOne
- func (c *TagClient) Get(ctx context.Context, id int) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id int) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Intercept(interceptors ...Interceptor)
- func (c *TagClient) Interceptors() []Interceptor
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryGroupTags(t *Tag) *GroupTagQuery
- func (c *TagClient) QueryGroups(t *Tag) *GroupQuery
- func (c *TagClient) QueryTweetTags(t *Tag) *TweetTagQuery
- func (c *TagClient) QueryTweets(t *Tag) *TweetQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id int) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddGroupIDs(ids ...int) *TagCreate
- func (tc *TagCreate) AddGroupTagIDs(ids ...int) *TagCreate
- func (tc *TagCreate) AddGroupTags(g ...*GroupTag) *TagCreate
- func (tc *TagCreate) AddGroups(g ...*Group) *TagCreate
- func (tc *TagCreate) AddTweetIDs(ids ...int) *TagCreate
- func (tc *TagCreate) AddTweetTagIDs(ids ...uuid.UUID) *TagCreate
- func (tc *TagCreate) AddTweetTags(t ...*TweetTag) *TagCreate
- func (tc *TagCreate) AddTweets(t ...*Tweet) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (tc *TagCreate) ExecX(ctx context.Context)
- func (tc *TagCreate) Mutation() *TagMutation
- func (tc *TagCreate) OnConflict(opts ...sql.ConflictOption) *TagUpsertOne
- func (tc *TagCreate) OnConflictColumns(columns ...string) *TagUpsertOne
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (tc *TagCreate) SetValue(s string) *TagCreate
- type TagCreateBulk
- func (tcb *TagCreateBulk) Exec(ctx context.Context) error
- func (tcb *TagCreateBulk) ExecX(ctx context.Context)
- func (tcb *TagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TagUpsertBulk
- func (tcb *TagCreateBulk) OnConflictColumns(columns ...string) *TagUpsertBulk
- func (tcb *TagCreateBulk) Save(ctx context.Context) ([]*Tag, error)
- func (tcb *TagCreateBulk) SaveX(ctx context.Context) []*Tag
- type TagDelete
- type TagDeleteOne
- type TagEdges
- type TagFilter
- func (f *TagFilter) Where(p entql.P)
- func (f *TagFilter) WhereHasGroupTags()
- func (f *TagFilter) WhereHasGroupTagsWith(preds ...predicate.GroupTag)
- func (f *TagFilter) WhereHasGroups()
- func (f *TagFilter) WhereHasGroupsWith(preds ...predicate.Group)
- func (f *TagFilter) WhereHasTweetTags()
- func (f *TagFilter) WhereHasTweetTagsWith(preds ...predicate.TweetTag)
- func (f *TagFilter) WhereHasTweets()
- func (f *TagFilter) WhereHasTweetsWith(preds ...predicate.Tweet)
- func (f *TagFilter) WhereID(p entql.IntP)
- func (f *TagFilter) WhereValue(p entql.StringP)
- type TagGroupBy
- func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
- func (s *TagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagGroupBy) BoolX(ctx context.Context) bool
- func (s *TagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagGroupBy) Float64X(ctx context.Context) float64
- func (s *TagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TagGroupBy) IntX(ctx context.Context) int
- func (s *TagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TagGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
- func (s *TagGroupBy) ScanX(ctx context.Context, v any)
- func (s *TagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TagGroupBy) StringX(ctx context.Context) string
- func (s *TagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TagGroupBy) StringsX(ctx context.Context) []string
- type TagMutation
- func (m *TagMutation) AddField(name string, value ent.Value) error
- func (m *TagMutation) AddGroupIDs(ids ...int)
- func (m *TagMutation) AddGroupTagIDs(ids ...int)
- func (m *TagMutation) AddTweetIDs(ids ...int)
- func (m *TagMutation) AddTweetTagIDs(ids ...uuid.UUID)
- func (m *TagMutation) AddedEdges() []string
- func (m *TagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TagMutation) AddedFields() []string
- func (m *TagMutation) AddedIDs(name string) []ent.Value
- func (m *TagMutation) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearGroupTags()
- func (m *TagMutation) ClearGroups()
- func (m *TagMutation) ClearTweetTags()
- func (m *TagMutation) ClearTweets()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) EdgeCleared(name string) bool
- func (m *TagMutation) Field(name string) (ent.Value, bool)
- func (m *TagMutation) FieldCleared(name string) bool
- func (m *TagMutation) Fields() []string
- func (m *TagMutation) Filter() *TagFilter
- func (m *TagMutation) GroupTagsCleared() bool
- func (m *TagMutation) GroupTagsIDs() (ids []int)
- func (m *TagMutation) GroupsCleared() bool
- func (m *TagMutation) GroupsIDs() (ids []int)
- func (m *TagMutation) ID() (id int, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *TagMutation) Op() Op
- func (m *TagMutation) RemoveGroupIDs(ids ...int)
- func (m *TagMutation) RemoveGroupTagIDs(ids ...int)
- func (m *TagMutation) RemoveTweetIDs(ids ...int)
- func (m *TagMutation) RemoveTweetTagIDs(ids ...uuid.UUID)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedGroupTagsIDs() (ids []int)
- func (m *TagMutation) RemovedGroupsIDs() (ids []int)
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) RemovedTweetTagsIDs() (ids []uuid.UUID)
- func (m *TagMutation) RemovedTweetsIDs() (ids []int)
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetGroupTags()
- func (m *TagMutation) ResetGroups()
- func (m *TagMutation) ResetTweetTags()
- func (m *TagMutation) ResetTweets()
- func (m *TagMutation) ResetValue()
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetOp(op Op)
- func (m *TagMutation) SetValue(s string)
- func (m *TagMutation) TweetTagsCleared() bool
- func (m *TagMutation) TweetTagsIDs() (ids []uuid.UUID)
- func (m *TagMutation) TweetsCleared() bool
- func (m *TagMutation) TweetsIDs() (ids []int)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) Value() (r string, exists bool)
- func (m *TagMutation) Where(ps ...predicate.Tag)
- func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
- type TagQuery
- func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
- func (tq *TagQuery) All(ctx context.Context) ([]*Tag, error)
- func (tq *TagQuery) AllX(ctx context.Context) []*Tag
- func (tq *TagQuery) Clone() *TagQuery
- func (tq *TagQuery) Count(ctx context.Context) (int, error)
- func (tq *TagQuery) CountX(ctx context.Context) int
- func (tq *TagQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TagQuery) ExistX(ctx context.Context) bool
- func (tq *TagQuery) Filter() *TagFilter
- func (tq *TagQuery) First(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) int
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TagQuery) IDsX(ctx context.Context) []int
- func (tq *TagQuery) Limit(limit int) *TagQuery
- func (tq *TagQuery) Offset(offset int) *TagQuery
- func (tq *TagQuery) Only(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) int
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...OrderFunc) *TagQuery
- func (tq *TagQuery) QueryGroupTags() *GroupTagQuery
- func (tq *TagQuery) QueryGroups() *GroupQuery
- func (tq *TagQuery) QueryTweetTags() *TweetTagQuery
- func (tq *TagQuery) QueryTweets() *TweetQuery
- func (tq *TagQuery) Select(fields ...string) *TagSelect
- func (tq *TagQuery) Unique(unique bool) *TagQuery
- func (tq *TagQuery) Where(ps ...predicate.Tag) *TagQuery
- func (tq *TagQuery) WithGroupTags(opts ...func(*GroupTagQuery)) *TagQuery
- func (tq *TagQuery) WithGroups(opts ...func(*GroupQuery)) *TagQuery
- func (tq *TagQuery) WithTweetTags(opts ...func(*TweetTagQuery)) *TagQuery
- func (tq *TagQuery) WithTweets(opts ...func(*TweetQuery)) *TagQuery
- type TagSelect
- func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
- func (s *TagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagSelect) BoolX(ctx context.Context) bool
- func (s *TagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TagSelect) BoolsX(ctx context.Context) []bool
- func (s *TagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagSelect) Float64X(ctx context.Context) float64
- func (s *TagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagSelect) Float64sX(ctx context.Context) []float64
- func (s *TagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TagSelect) IntX(ctx context.Context) int
- func (s *TagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TagSelect) IntsX(ctx context.Context) []int
- func (ts *TagSelect) Scan(ctx context.Context, v any) error
- func (s *TagSelect) ScanX(ctx context.Context, v any)
- func (s *TagSelect) String(ctx context.Context) (_ string, err error)
- func (s *TagSelect) StringX(ctx context.Context) string
- func (s *TagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TagSelect) StringsX(ctx context.Context) []string
- type TagUpdate
- func (tu *TagUpdate) AddGroupIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) AddGroupTagIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) AddGroupTags(g ...*GroupTag) *TagUpdate
- func (tu *TagUpdate) AddGroups(g ...*Group) *TagUpdate
- func (tu *TagUpdate) AddTweetIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) AddTweetTagIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) AddTweetTags(t ...*TweetTag) *TagUpdate
- func (tu *TagUpdate) AddTweets(t ...*Tweet) *TagUpdate
- func (tu *TagUpdate) ClearGroupTags() *TagUpdate
- func (tu *TagUpdate) ClearGroups() *TagUpdate
- func (tu *TagUpdate) ClearTweetTags() *TagUpdate
- func (tu *TagUpdate) ClearTweets() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (tu *TagUpdate) RemoveGroupIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) RemoveGroupTagIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) RemoveGroupTags(g ...*GroupTag) *TagUpdate
- func (tu *TagUpdate) RemoveGroups(g ...*Group) *TagUpdate
- func (tu *TagUpdate) RemoveTweetIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) RemoveTweetTagIDs(ids ...uuid.UUID) *TagUpdate
- func (tu *TagUpdate) RemoveTweetTags(t ...*TweetTag) *TagUpdate
- func (tu *TagUpdate) RemoveTweets(t ...*Tweet) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) SetValue(s string) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddGroupIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) AddGroupTagIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) AddGroupTags(g ...*GroupTag) *TagUpdateOne
- func (tuo *TagUpdateOne) AddGroups(g ...*Group) *TagUpdateOne
- func (tuo *TagUpdateOne) AddTweetIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) AddTweetTagIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) AddTweetTags(t ...*TweetTag) *TagUpdateOne
- func (tuo *TagUpdateOne) AddTweets(t ...*Tweet) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearGroupTags() *TagUpdateOne
- func (tuo *TagUpdateOne) ClearGroups() *TagUpdateOne
- func (tuo *TagUpdateOne) ClearTweetTags() *TagUpdateOne
- func (tuo *TagUpdateOne) ClearTweets() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (tuo *TagUpdateOne) RemoveGroupIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveGroupTagIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveGroupTags(g ...*GroupTag) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveGroups(g ...*Group) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveTweetIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveTweetTagIDs(ids ...uuid.UUID) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveTweetTags(t ...*TweetTag) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveTweets(t ...*Tweet) *TagUpdateOne
- func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
- func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
- func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
- func (tuo *TagUpdateOne) SetValue(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
- type TagUpsert
- type TagUpsertBulk
- func (u *TagUpsertBulk) DoNothing() *TagUpsertBulk
- func (u *TagUpsertBulk) Exec(ctx context.Context) error
- func (u *TagUpsertBulk) ExecX(ctx context.Context)
- func (u *TagUpsertBulk) Ignore() *TagUpsertBulk
- func (u *TagUpsertBulk) SetValue(v string) *TagUpsertBulk
- func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateValue() *TagUpsertBulk
- type TagUpsertOne
- func (u *TagUpsertOne) DoNothing() *TagUpsertOne
- func (u *TagUpsertOne) Exec(ctx context.Context) error
- func (u *TagUpsertOne) ExecX(ctx context.Context)
- func (u *TagUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *TagUpsertOne) IDX(ctx context.Context) int
- func (u *TagUpsertOne) Ignore() *TagUpsertOne
- func (u *TagUpsertOne) SetValue(v string) *TagUpsertOne
- func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne
- func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
- func (u *TagUpsertOne) UpdateValue() *TagUpsertOne
- type Tags
- type TraverseFunc
- type Traverser
- type Tweet
- func (t *Tweet) QueryLikedUsers() *UserQuery
- func (t *Tweet) QueryLikes() *TweetLikeQuery
- func (t *Tweet) QueryTags() *TagQuery
- func (t *Tweet) QueryTweetTags() *TweetTagQuery
- func (t *Tweet) QueryTweetUser() *UserTweetQuery
- func (t *Tweet) QueryUser() *UserQuery
- func (t *Tweet) String() string
- func (t *Tweet) Unwrap() *Tweet
- func (t *Tweet) Update() *TweetUpdateOne
- type TweetClient
- func (c *TweetClient) Create() *TweetCreate
- func (c *TweetClient) CreateBulk(builders ...*TweetCreate) *TweetCreateBulk
- func (c *TweetClient) Delete() *TweetDelete
- func (c *TweetClient) DeleteOne(t *Tweet) *TweetDeleteOne
- func (c *TweetClient) DeleteOneID(id int) *TweetDeleteOne
- func (c *TweetClient) Get(ctx context.Context, id int) (*Tweet, error)
- func (c *TweetClient) GetX(ctx context.Context, id int) *Tweet
- func (c *TweetClient) Hooks() []Hook
- func (c *TweetClient) Intercept(interceptors ...Interceptor)
- func (c *TweetClient) Interceptors() []Interceptor
- func (c *TweetClient) Query() *TweetQuery
- func (c *TweetClient) QueryLikedUsers(t *Tweet) *UserQuery
- func (c *TweetClient) QueryLikes(t *Tweet) *TweetLikeQuery
- func (c *TweetClient) QueryTags(t *Tweet) *TagQuery
- func (c *TweetClient) QueryTweetTags(t *Tweet) *TweetTagQuery
- func (c *TweetClient) QueryTweetUser(t *Tweet) *UserTweetQuery
- func (c *TweetClient) QueryUser(t *Tweet) *UserQuery
- func (c *TweetClient) Update() *TweetUpdate
- func (c *TweetClient) UpdateOne(t *Tweet) *TweetUpdateOne
- func (c *TweetClient) UpdateOneID(id int) *TweetUpdateOne
- func (c *TweetClient) Use(hooks ...Hook)
- type TweetCreate
- func (tc *TweetCreate) AddLikedUserIDs(ids ...int) *TweetCreate
- func (tc *TweetCreate) AddLikedUsers(u ...*User) *TweetCreate
- func (tc *TweetCreate) AddTagIDs(ids ...int) *TweetCreate
- func (tc *TweetCreate) AddTags(t ...*Tag) *TweetCreate
- func (tc *TweetCreate) AddTweetTagIDs(ids ...uuid.UUID) *TweetCreate
- func (tc *TweetCreate) AddTweetTags(t ...*TweetTag) *TweetCreate
- func (tc *TweetCreate) AddTweetUser(u ...*UserTweet) *TweetCreate
- func (tc *TweetCreate) AddTweetUserIDs(ids ...int) *TweetCreate
- func (tc *TweetCreate) AddUser(u ...*User) *TweetCreate
- func (tc *TweetCreate) AddUserIDs(ids ...int) *TweetCreate
- func (tc *TweetCreate) Exec(ctx context.Context) error
- func (tc *TweetCreate) ExecX(ctx context.Context)
- func (tc *TweetCreate) Mutation() *TweetMutation
- func (tc *TweetCreate) OnConflict(opts ...sql.ConflictOption) *TweetUpsertOne
- func (tc *TweetCreate) OnConflictColumns(columns ...string) *TweetUpsertOne
- func (tc *TweetCreate) Save(ctx context.Context) (*Tweet, error)
- func (tc *TweetCreate) SaveX(ctx context.Context) *Tweet
- func (tc *TweetCreate) SetText(s string) *TweetCreate
- type TweetCreateBulk
- func (tcb *TweetCreateBulk) Exec(ctx context.Context) error
- func (tcb *TweetCreateBulk) ExecX(ctx context.Context)
- func (tcb *TweetCreateBulk) OnConflict(opts ...sql.ConflictOption) *TweetUpsertBulk
- func (tcb *TweetCreateBulk) OnConflictColumns(columns ...string) *TweetUpsertBulk
- func (tcb *TweetCreateBulk) Save(ctx context.Context) ([]*Tweet, error)
- func (tcb *TweetCreateBulk) SaveX(ctx context.Context) []*Tweet
- type TweetDelete
- type TweetDeleteOne
- type TweetEdges
- func (e TweetEdges) LikedUsersOrErr() ([]*User, error)
- func (e TweetEdges) LikesOrErr() ([]*TweetLike, error)
- func (e TweetEdges) TagsOrErr() ([]*Tag, error)
- func (e TweetEdges) TweetTagsOrErr() ([]*TweetTag, error)
- func (e TweetEdges) TweetUserOrErr() ([]*UserTweet, error)
- func (e TweetEdges) UserOrErr() ([]*User, error)
- type TweetFilter
- func (f *TweetFilter) Where(p entql.P)
- func (f *TweetFilter) WhereHasLikedUsers()
- func (f *TweetFilter) WhereHasLikedUsersWith(preds ...predicate.User)
- func (f *TweetFilter) WhereHasLikes()
- func (f *TweetFilter) WhereHasLikesWith(preds ...predicate.TweetLike)
- func (f *TweetFilter) WhereHasTags()
- func (f *TweetFilter) WhereHasTagsWith(preds ...predicate.Tag)
- func (f *TweetFilter) WhereHasTweetTags()
- func (f *TweetFilter) WhereHasTweetTagsWith(preds ...predicate.TweetTag)
- func (f *TweetFilter) WhereHasTweetUser()
- func (f *TweetFilter) WhereHasTweetUserWith(preds ...predicate.UserTweet)
- func (f *TweetFilter) WhereHasUser()
- func (f *TweetFilter) WhereHasUserWith(preds ...predicate.User)
- func (f *TweetFilter) WhereID(p entql.IntP)
- func (f *TweetFilter) WhereText(p entql.StringP)
- type TweetGroupBy
- func (tgb *TweetGroupBy) Aggregate(fns ...AggregateFunc) *TweetGroupBy
- func (s *TweetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TweetGroupBy) BoolX(ctx context.Context) bool
- func (s *TweetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TweetGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TweetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TweetGroupBy) Float64X(ctx context.Context) float64
- func (s *TweetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TweetGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TweetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TweetGroupBy) IntX(ctx context.Context) int
- func (s *TweetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TweetGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TweetGroupBy) Scan(ctx context.Context, v any) error
- func (s *TweetGroupBy) ScanX(ctx context.Context, v any)
- func (s *TweetGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TweetGroupBy) StringX(ctx context.Context) string
- func (s *TweetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TweetGroupBy) StringsX(ctx context.Context) []string
- type TweetLike
- type TweetLikeClient
- func (c *TweetLikeClient) Create() *TweetLikeCreate
- func (c *TweetLikeClient) CreateBulk(builders ...*TweetLikeCreate) *TweetLikeCreateBulk
- func (c *TweetLikeClient) Delete() *TweetLikeDelete
- func (c *TweetLikeClient) Hooks() []Hook
- func (c *TweetLikeClient) Intercept(interceptors ...Interceptor)
- func (c *TweetLikeClient) Interceptors() []Interceptor
- func (c *TweetLikeClient) Query() *TweetLikeQuery
- func (c *TweetLikeClient) QueryTweet(tl *TweetLike) *TweetQuery
- func (c *TweetLikeClient) QueryUser(tl *TweetLike) *UserQuery
- func (c *TweetLikeClient) Update() *TweetLikeUpdate
- func (c *TweetLikeClient) UpdateOne(tl *TweetLike) *TweetLikeUpdateOne
- func (c *TweetLikeClient) Use(hooks ...Hook)
- type TweetLikeCreate
- func (tlc *TweetLikeCreate) Exec(ctx context.Context) error
- func (tlc *TweetLikeCreate) ExecX(ctx context.Context)
- func (tlc *TweetLikeCreate) Mutation() *TweetLikeMutation
- func (tlc *TweetLikeCreate) OnConflict(opts ...sql.ConflictOption) *TweetLikeUpsertOne
- func (tlc *TweetLikeCreate) OnConflictColumns(columns ...string) *TweetLikeUpsertOne
- func (tlc *TweetLikeCreate) Save(ctx context.Context) (*TweetLike, error)
- func (tlc *TweetLikeCreate) SaveX(ctx context.Context) *TweetLike
- func (tlc *TweetLikeCreate) SetLikedAt(t time.Time) *TweetLikeCreate
- func (tlc *TweetLikeCreate) SetNillableLikedAt(t *time.Time) *TweetLikeCreate
- func (tlc *TweetLikeCreate) SetTweet(t *Tweet) *TweetLikeCreate
- func (tlc *TweetLikeCreate) SetTweetID(i int) *TweetLikeCreate
- func (tlc *TweetLikeCreate) SetUser(u *User) *TweetLikeCreate
- func (tlc *TweetLikeCreate) SetUserID(i int) *TweetLikeCreate
- type TweetLikeCreateBulk
- func (tlcb *TweetLikeCreateBulk) Exec(ctx context.Context) error
- func (tlcb *TweetLikeCreateBulk) ExecX(ctx context.Context)
- func (tlcb *TweetLikeCreateBulk) OnConflict(opts ...sql.ConflictOption) *TweetLikeUpsertBulk
- func (tlcb *TweetLikeCreateBulk) OnConflictColumns(columns ...string) *TweetLikeUpsertBulk
- func (tlcb *TweetLikeCreateBulk) Save(ctx context.Context) ([]*TweetLike, error)
- func (tlcb *TweetLikeCreateBulk) SaveX(ctx context.Context) []*TweetLike
- type TweetLikeDelete
- type TweetLikeDeleteOne
- type TweetLikeEdges
- type TweetLikeFilter
- func (f *TweetLikeFilter) Where(p entql.P)
- func (f *TweetLikeFilter) WhereHasTweet()
- func (f *TweetLikeFilter) WhereHasTweetWith(preds ...predicate.Tweet)
- func (f *TweetLikeFilter) WhereHasUser()
- func (f *TweetLikeFilter) WhereHasUserWith(preds ...predicate.User)
- func (f *TweetLikeFilter) WhereLikedAt(p entql.TimeP)
- func (f *TweetLikeFilter) WhereTweetID(p entql.IntP)
- func (f *TweetLikeFilter) WhereUserID(p entql.IntP)
- type TweetLikeGroupBy
- func (tlgb *TweetLikeGroupBy) Aggregate(fns ...AggregateFunc) *TweetLikeGroupBy
- func (s *TweetLikeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TweetLikeGroupBy) BoolX(ctx context.Context) bool
- func (s *TweetLikeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TweetLikeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TweetLikeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TweetLikeGroupBy) Float64X(ctx context.Context) float64
- func (s *TweetLikeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TweetLikeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TweetLikeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TweetLikeGroupBy) IntX(ctx context.Context) int
- func (s *TweetLikeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TweetLikeGroupBy) IntsX(ctx context.Context) []int
- func (tlgb *TweetLikeGroupBy) Scan(ctx context.Context, v any) error
- func (s *TweetLikeGroupBy) ScanX(ctx context.Context, v any)
- func (s *TweetLikeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TweetLikeGroupBy) StringX(ctx context.Context) string
- func (s *TweetLikeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TweetLikeGroupBy) StringsX(ctx context.Context) []string
- type TweetLikeMutation
- func (m *TweetLikeMutation) AddField(name string, value ent.Value) error
- func (m *TweetLikeMutation) AddedEdges() []string
- func (m *TweetLikeMutation) AddedField(name string) (ent.Value, bool)
- func (m *TweetLikeMutation) AddedFields() []string
- func (m *TweetLikeMutation) AddedIDs(name string) []ent.Value
- func (m *TweetLikeMutation) ClearEdge(name string) error
- func (m *TweetLikeMutation) ClearField(name string) error
- func (m *TweetLikeMutation) ClearTweet()
- func (m *TweetLikeMutation) ClearUser()
- func (m *TweetLikeMutation) ClearedEdges() []string
- func (m *TweetLikeMutation) ClearedFields() []string
- func (m TweetLikeMutation) Client() *Client
- func (m *TweetLikeMutation) EdgeCleared(name string) bool
- func (m *TweetLikeMutation) Field(name string) (ent.Value, bool)
- func (m *TweetLikeMutation) FieldCleared(name string) bool
- func (m *TweetLikeMutation) Fields() []string
- func (m *TweetLikeMutation) Filter() *TweetLikeFilter
- func (m *TweetLikeMutation) LikedAt() (r time.Time, exists bool)
- func (m *TweetLikeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TweetLikeMutation) Op() Op
- func (m *TweetLikeMutation) RemovedEdges() []string
- func (m *TweetLikeMutation) RemovedIDs(name string) []ent.Value
- func (m *TweetLikeMutation) ResetEdge(name string) error
- func (m *TweetLikeMutation) ResetField(name string) error
- func (m *TweetLikeMutation) ResetLikedAt()
- func (m *TweetLikeMutation) ResetTweet()
- func (m *TweetLikeMutation) ResetTweetID()
- func (m *TweetLikeMutation) ResetUser()
- func (m *TweetLikeMutation) ResetUserID()
- func (m *TweetLikeMutation) SetField(name string, value ent.Value) error
- func (m *TweetLikeMutation) SetLikedAt(t time.Time)
- func (m *TweetLikeMutation) SetOp(op Op)
- func (m *TweetLikeMutation) SetTweetID(i int)
- func (m *TweetLikeMutation) SetUserID(i int)
- func (m *TweetLikeMutation) TweetCleared() bool
- func (m *TweetLikeMutation) TweetID() (r int, exists bool)
- func (m *TweetLikeMutation) TweetIDs() (ids []int)
- func (m TweetLikeMutation) Tx() (*Tx, error)
- func (m *TweetLikeMutation) Type() string
- func (m *TweetLikeMutation) UserCleared() bool
- func (m *TweetLikeMutation) UserID() (r int, exists bool)
- func (m *TweetLikeMutation) UserIDs() (ids []int)
- func (m *TweetLikeMutation) Where(ps ...predicate.TweetLike)
- func (m *TweetLikeMutation) WhereP(ps ...func(*sql.Selector))
- type TweetLikeQuery
- func (tlq *TweetLikeQuery) Aggregate(fns ...AggregateFunc) *TweetLikeSelect
- func (tlq *TweetLikeQuery) All(ctx context.Context) ([]*TweetLike, error)
- func (tlq *TweetLikeQuery) AllX(ctx context.Context) []*TweetLike
- func (tlq *TweetLikeQuery) Clone() *TweetLikeQuery
- func (tlq *TweetLikeQuery) Count(ctx context.Context) (int, error)
- func (tlq *TweetLikeQuery) CountX(ctx context.Context) int
- func (tlq *TweetLikeQuery) Exist(ctx context.Context) (bool, error)
- func (tlq *TweetLikeQuery) ExistX(ctx context.Context) bool
- func (tlq *TweetLikeQuery) Filter() *TweetLikeFilter
- func (tlq *TweetLikeQuery) First(ctx context.Context) (*TweetLike, error)
- func (tlq *TweetLikeQuery) FirstX(ctx context.Context) *TweetLike
- func (tlq *TweetLikeQuery) GroupBy(field string, fields ...string) *TweetLikeGroupBy
- func (tlq *TweetLikeQuery) Limit(limit int) *TweetLikeQuery
- func (tlq *TweetLikeQuery) Offset(offset int) *TweetLikeQuery
- func (tlq *TweetLikeQuery) Only(ctx context.Context) (*TweetLike, error)
- func (tlq *TweetLikeQuery) OnlyX(ctx context.Context) *TweetLike
- func (tlq *TweetLikeQuery) Order(o ...OrderFunc) *TweetLikeQuery
- func (tlq *TweetLikeQuery) QueryTweet() *TweetQuery
- func (tlq *TweetLikeQuery) QueryUser() *UserQuery
- func (tlq *TweetLikeQuery) Select(fields ...string) *TweetLikeSelect
- func (tlq *TweetLikeQuery) Unique(unique bool) *TweetLikeQuery
- func (tlq *TweetLikeQuery) Where(ps ...predicate.TweetLike) *TweetLikeQuery
- func (tlq *TweetLikeQuery) WithTweet(opts ...func(*TweetQuery)) *TweetLikeQuery
- func (tlq *TweetLikeQuery) WithUser(opts ...func(*UserQuery)) *TweetLikeQuery
- type TweetLikeSelect
- func (tls *TweetLikeSelect) Aggregate(fns ...AggregateFunc) *TweetLikeSelect
- func (s *TweetLikeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TweetLikeSelect) BoolX(ctx context.Context) bool
- func (s *TweetLikeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TweetLikeSelect) BoolsX(ctx context.Context) []bool
- func (s *TweetLikeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TweetLikeSelect) Float64X(ctx context.Context) float64
- func (s *TweetLikeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TweetLikeSelect) Float64sX(ctx context.Context) []float64
- func (s *TweetLikeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TweetLikeSelect) IntX(ctx context.Context) int
- func (s *TweetLikeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TweetLikeSelect) IntsX(ctx context.Context) []int
- func (tls *TweetLikeSelect) Scan(ctx context.Context, v any) error
- func (s *TweetLikeSelect) ScanX(ctx context.Context, v any)
- func (s *TweetLikeSelect) String(ctx context.Context) (_ string, err error)
- func (s *TweetLikeSelect) StringX(ctx context.Context) string
- func (s *TweetLikeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TweetLikeSelect) StringsX(ctx context.Context) []string
- type TweetLikeUpdate
- func (tlu *TweetLikeUpdate) ClearTweet() *TweetLikeUpdate
- func (tlu *TweetLikeUpdate) ClearUser() *TweetLikeUpdate
- func (tlu *TweetLikeUpdate) Exec(ctx context.Context) error
- func (tlu *TweetLikeUpdate) ExecX(ctx context.Context)
- func (tlu *TweetLikeUpdate) Mutation() *TweetLikeMutation
- func (tlu *TweetLikeUpdate) Save(ctx context.Context) (int, error)
- func (tlu *TweetLikeUpdate) SaveX(ctx context.Context) int
- func (tlu *TweetLikeUpdate) SetLikedAt(t time.Time) *TweetLikeUpdate
- func (tlu *TweetLikeUpdate) SetNillableLikedAt(t *time.Time) *TweetLikeUpdate
- func (tlu *TweetLikeUpdate) SetTweet(t *Tweet) *TweetLikeUpdate
- func (tlu *TweetLikeUpdate) SetTweetID(i int) *TweetLikeUpdate
- func (tlu *TweetLikeUpdate) SetUser(u *User) *TweetLikeUpdate
- func (tlu *TweetLikeUpdate) SetUserID(i int) *TweetLikeUpdate
- func (tlu *TweetLikeUpdate) Where(ps ...predicate.TweetLike) *TweetLikeUpdate
- type TweetLikeUpdateOne
- func (tluo *TweetLikeUpdateOne) ClearTweet() *TweetLikeUpdateOne
- func (tluo *TweetLikeUpdateOne) ClearUser() *TweetLikeUpdateOne
- func (tluo *TweetLikeUpdateOne) Exec(ctx context.Context) error
- func (tluo *TweetLikeUpdateOne) ExecX(ctx context.Context)
- func (tluo *TweetLikeUpdateOne) Mutation() *TweetLikeMutation
- func (tluo *TweetLikeUpdateOne) Save(ctx context.Context) (*TweetLike, error)
- func (tluo *TweetLikeUpdateOne) SaveX(ctx context.Context) *TweetLike
- func (tluo *TweetLikeUpdateOne) Select(field string, fields ...string) *TweetLikeUpdateOne
- func (tluo *TweetLikeUpdateOne) SetLikedAt(t time.Time) *TweetLikeUpdateOne
- func (tluo *TweetLikeUpdateOne) SetNillableLikedAt(t *time.Time) *TweetLikeUpdateOne
- func (tluo *TweetLikeUpdateOne) SetTweet(t *Tweet) *TweetLikeUpdateOne
- func (tluo *TweetLikeUpdateOne) SetTweetID(i int) *TweetLikeUpdateOne
- func (tluo *TweetLikeUpdateOne) SetUser(u *User) *TweetLikeUpdateOne
- func (tluo *TweetLikeUpdateOne) SetUserID(i int) *TweetLikeUpdateOne
- func (tluo *TweetLikeUpdateOne) Where(ps ...predicate.TweetLike) *TweetLikeUpdateOne
- type TweetLikeUpsert
- func (u *TweetLikeUpsert) SetLikedAt(v time.Time) *TweetLikeUpsert
- func (u *TweetLikeUpsert) SetTweetID(v int) *TweetLikeUpsert
- func (u *TweetLikeUpsert) SetUserID(v int) *TweetLikeUpsert
- func (u *TweetLikeUpsert) UpdateLikedAt() *TweetLikeUpsert
- func (u *TweetLikeUpsert) UpdateTweetID() *TweetLikeUpsert
- func (u *TweetLikeUpsert) UpdateUserID() *TweetLikeUpsert
- type TweetLikeUpsertBulk
- func (u *TweetLikeUpsertBulk) DoNothing() *TweetLikeUpsertBulk
- func (u *TweetLikeUpsertBulk) Exec(ctx context.Context) error
- func (u *TweetLikeUpsertBulk) ExecX(ctx context.Context)
- func (u *TweetLikeUpsertBulk) Ignore() *TweetLikeUpsertBulk
- func (u *TweetLikeUpsertBulk) SetLikedAt(v time.Time) *TweetLikeUpsertBulk
- func (u *TweetLikeUpsertBulk) SetTweetID(v int) *TweetLikeUpsertBulk
- func (u *TweetLikeUpsertBulk) SetUserID(v int) *TweetLikeUpsertBulk
- func (u *TweetLikeUpsertBulk) Update(set func(*TweetLikeUpsert)) *TweetLikeUpsertBulk
- func (u *TweetLikeUpsertBulk) UpdateLikedAt() *TweetLikeUpsertBulk
- func (u *TweetLikeUpsertBulk) UpdateNewValues() *TweetLikeUpsertBulk
- func (u *TweetLikeUpsertBulk) UpdateTweetID() *TweetLikeUpsertBulk
- func (u *TweetLikeUpsertBulk) UpdateUserID() *TweetLikeUpsertBulk
- type TweetLikeUpsertOne
- func (u *TweetLikeUpsertOne) DoNothing() *TweetLikeUpsertOne
- func (u *TweetLikeUpsertOne) Exec(ctx context.Context) error
- func (u *TweetLikeUpsertOne) ExecX(ctx context.Context)
- func (u *TweetLikeUpsertOne) Ignore() *TweetLikeUpsertOne
- func (u *TweetLikeUpsertOne) SetLikedAt(v time.Time) *TweetLikeUpsertOne
- func (u *TweetLikeUpsertOne) SetTweetID(v int) *TweetLikeUpsertOne
- func (u *TweetLikeUpsertOne) SetUserID(v int) *TweetLikeUpsertOne
- func (u *TweetLikeUpsertOne) Update(set func(*TweetLikeUpsert)) *TweetLikeUpsertOne
- func (u *TweetLikeUpsertOne) UpdateLikedAt() *TweetLikeUpsertOne
- func (u *TweetLikeUpsertOne) UpdateNewValues() *TweetLikeUpsertOne
- func (u *TweetLikeUpsertOne) UpdateTweetID() *TweetLikeUpsertOne
- func (u *TweetLikeUpsertOne) UpdateUserID() *TweetLikeUpsertOne
- type TweetLikes
- type TweetMutation
- func (m *TweetMutation) AddField(name string, value ent.Value) error
- func (m *TweetMutation) AddLikedUserIDs(ids ...int)
- func (m *TweetMutation) AddTagIDs(ids ...int)
- func (m *TweetMutation) AddTweetTagIDs(ids ...uuid.UUID)
- func (m *TweetMutation) AddTweetUserIDs(ids ...int)
- func (m *TweetMutation) AddUserIDs(ids ...int)
- func (m *TweetMutation) AddedEdges() []string
- func (m *TweetMutation) AddedField(name string) (ent.Value, bool)
- func (m *TweetMutation) AddedFields() []string
- func (m *TweetMutation) AddedIDs(name string) []ent.Value
- func (m *TweetMutation) ClearEdge(name string) error
- func (m *TweetMutation) ClearField(name string) error
- func (m *TweetMutation) ClearLikedUsers()
- func (m *TweetMutation) ClearTags()
- func (m *TweetMutation) ClearTweetTags()
- func (m *TweetMutation) ClearTweetUser()
- func (m *TweetMutation) ClearUser()
- func (m *TweetMutation) ClearedEdges() []string
- func (m *TweetMutation) ClearedFields() []string
- func (m TweetMutation) Client() *Client
- func (m *TweetMutation) EdgeCleared(name string) bool
- func (m *TweetMutation) Field(name string) (ent.Value, bool)
- func (m *TweetMutation) FieldCleared(name string) bool
- func (m *TweetMutation) Fields() []string
- func (m *TweetMutation) Filter() *TweetFilter
- func (m *TweetMutation) ID() (id int, exists bool)
- func (m *TweetMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TweetMutation) LikedUsersCleared() bool
- func (m *TweetMutation) LikedUsersIDs() (ids []int)
- func (m *TweetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TweetMutation) OldText(ctx context.Context) (v string, err error)
- func (m *TweetMutation) Op() Op
- func (m *TweetMutation) RemoveLikedUserIDs(ids ...int)
- func (m *TweetMutation) RemoveTagIDs(ids ...int)
- func (m *TweetMutation) RemoveTweetTagIDs(ids ...uuid.UUID)
- func (m *TweetMutation) RemoveTweetUserIDs(ids ...int)
- func (m *TweetMutation) RemoveUserIDs(ids ...int)
- func (m *TweetMutation) RemovedEdges() []string
- func (m *TweetMutation) RemovedIDs(name string) []ent.Value
- func (m *TweetMutation) RemovedLikedUsersIDs() (ids []int)
- func (m *TweetMutation) RemovedTagsIDs() (ids []int)
- func (m *TweetMutation) RemovedTweetTagsIDs() (ids []uuid.UUID)
- func (m *TweetMutation) RemovedTweetUserIDs() (ids []int)
- func (m *TweetMutation) RemovedUserIDs() (ids []int)
- func (m *TweetMutation) ResetEdge(name string) error
- func (m *TweetMutation) ResetField(name string) error
- func (m *TweetMutation) ResetLikedUsers()
- func (m *TweetMutation) ResetTags()
- func (m *TweetMutation) ResetText()
- func (m *TweetMutation) ResetTweetTags()
- func (m *TweetMutation) ResetTweetUser()
- func (m *TweetMutation) ResetUser()
- func (m *TweetMutation) SetField(name string, value ent.Value) error
- func (m *TweetMutation) SetOp(op Op)
- func (m *TweetMutation) SetText(s string)
- func (m *TweetMutation) TagsCleared() bool
- func (m *TweetMutation) TagsIDs() (ids []int)
- func (m *TweetMutation) Text() (r string, exists bool)
- func (m *TweetMutation) TweetTagsCleared() bool
- func (m *TweetMutation) TweetTagsIDs() (ids []uuid.UUID)
- func (m *TweetMutation) TweetUserCleared() bool
- func (m *TweetMutation) TweetUserIDs() (ids []int)
- func (m TweetMutation) Tx() (*Tx, error)
- func (m *TweetMutation) Type() string
- func (m *TweetMutation) UserCleared() bool
- func (m *TweetMutation) UserIDs() (ids []int)
- func (m *TweetMutation) Where(ps ...predicate.Tweet)
- func (m *TweetMutation) WhereP(ps ...func(*sql.Selector))
- type TweetQuery
- func (tq *TweetQuery) Aggregate(fns ...AggregateFunc) *TweetSelect
- func (tq *TweetQuery) All(ctx context.Context) ([]*Tweet, error)
- func (tq *TweetQuery) AllX(ctx context.Context) []*Tweet
- func (tq *TweetQuery) Clone() *TweetQuery
- func (tq *TweetQuery) Count(ctx context.Context) (int, error)
- func (tq *TweetQuery) CountX(ctx context.Context) int
- func (tq *TweetQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TweetQuery) ExistX(ctx context.Context) bool
- func (tq *TweetQuery) Filter() *TweetFilter
- func (tq *TweetQuery) First(ctx context.Context) (*Tweet, error)
- func (tq *TweetQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TweetQuery) FirstIDX(ctx context.Context) int
- func (tq *TweetQuery) FirstX(ctx context.Context) *Tweet
- func (tq *TweetQuery) GroupBy(field string, fields ...string) *TweetGroupBy
- func (tq *TweetQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TweetQuery) IDsX(ctx context.Context) []int
- func (tq *TweetQuery) Limit(limit int) *TweetQuery
- func (tq *TweetQuery) Offset(offset int) *TweetQuery
- func (tq *TweetQuery) Only(ctx context.Context) (*Tweet, error)
- func (tq *TweetQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TweetQuery) OnlyIDX(ctx context.Context) int
- func (tq *TweetQuery) OnlyX(ctx context.Context) *Tweet
- func (tq *TweetQuery) Order(o ...OrderFunc) *TweetQuery
- func (tq *TweetQuery) QueryLikedUsers() *UserQuery
- func (tq *TweetQuery) QueryLikes() *TweetLikeQuery
- func (tq *TweetQuery) QueryTags() *TagQuery
- func (tq *TweetQuery) QueryTweetTags() *TweetTagQuery
- func (tq *TweetQuery) QueryTweetUser() *UserTweetQuery
- func (tq *TweetQuery) QueryUser() *UserQuery
- func (tq *TweetQuery) Select(fields ...string) *TweetSelect
- func (tq *TweetQuery) Unique(unique bool) *TweetQuery
- func (tq *TweetQuery) Where(ps ...predicate.Tweet) *TweetQuery
- func (tq *TweetQuery) WithLikedUsers(opts ...func(*UserQuery)) *TweetQuery
- func (tq *TweetQuery) WithLikes(opts ...func(*TweetLikeQuery)) *TweetQuery
- func (tq *TweetQuery) WithTags(opts ...func(*TagQuery)) *TweetQuery
- func (tq *TweetQuery) WithTweetTags(opts ...func(*TweetTagQuery)) *TweetQuery
- func (tq *TweetQuery) WithTweetUser(opts ...func(*UserTweetQuery)) *TweetQuery
- func (tq *TweetQuery) WithUser(opts ...func(*UserQuery)) *TweetQuery
- type TweetSelect
- func (ts *TweetSelect) Aggregate(fns ...AggregateFunc) *TweetSelect
- func (s *TweetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TweetSelect) BoolX(ctx context.Context) bool
- func (s *TweetSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TweetSelect) BoolsX(ctx context.Context) []bool
- func (s *TweetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TweetSelect) Float64X(ctx context.Context) float64
- func (s *TweetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TweetSelect) Float64sX(ctx context.Context) []float64
- func (s *TweetSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TweetSelect) IntX(ctx context.Context) int
- func (s *TweetSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TweetSelect) IntsX(ctx context.Context) []int
- func (ts *TweetSelect) Scan(ctx context.Context, v any) error
- func (s *TweetSelect) ScanX(ctx context.Context, v any)
- func (s *TweetSelect) String(ctx context.Context) (_ string, err error)
- func (s *TweetSelect) StringX(ctx context.Context) string
- func (s *TweetSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TweetSelect) StringsX(ctx context.Context) []string
- type TweetTag
- type TweetTagClient
- func (c *TweetTagClient) Create() *TweetTagCreate
- func (c *TweetTagClient) CreateBulk(builders ...*TweetTagCreate) *TweetTagCreateBulk
- func (c *TweetTagClient) Delete() *TweetTagDelete
- func (c *TweetTagClient) DeleteOne(tt *TweetTag) *TweetTagDeleteOne
- func (c *TweetTagClient) DeleteOneID(id uuid.UUID) *TweetTagDeleteOne
- func (c *TweetTagClient) Get(ctx context.Context, id uuid.UUID) (*TweetTag, error)
- func (c *TweetTagClient) GetX(ctx context.Context, id uuid.UUID) *TweetTag
- func (c *TweetTagClient) Hooks() []Hook
- func (c *TweetTagClient) Intercept(interceptors ...Interceptor)
- func (c *TweetTagClient) Interceptors() []Interceptor
- func (c *TweetTagClient) Query() *TweetTagQuery
- func (c *TweetTagClient) QueryTag(tt *TweetTag) *TagQuery
- func (c *TweetTagClient) QueryTweet(tt *TweetTag) *TweetQuery
- func (c *TweetTagClient) Update() *TweetTagUpdate
- func (c *TweetTagClient) UpdateOne(tt *TweetTag) *TweetTagUpdateOne
- func (c *TweetTagClient) UpdateOneID(id uuid.UUID) *TweetTagUpdateOne
- func (c *TweetTagClient) Use(hooks ...Hook)
- type TweetTagCreate
- func (ttc *TweetTagCreate) Exec(ctx context.Context) error
- func (ttc *TweetTagCreate) ExecX(ctx context.Context)
- func (ttc *TweetTagCreate) Mutation() *TweetTagMutation
- func (ttc *TweetTagCreate) OnConflict(opts ...sql.ConflictOption) *TweetTagUpsertOne
- func (ttc *TweetTagCreate) OnConflictColumns(columns ...string) *TweetTagUpsertOne
- func (ttc *TweetTagCreate) Save(ctx context.Context) (*TweetTag, error)
- func (ttc *TweetTagCreate) SaveX(ctx context.Context) *TweetTag
- func (ttc *TweetTagCreate) SetAddedAt(t time.Time) *TweetTagCreate
- func (ttc *TweetTagCreate) SetID(u uuid.UUID) *TweetTagCreate
- func (ttc *TweetTagCreate) SetNillableAddedAt(t *time.Time) *TweetTagCreate
- func (ttc *TweetTagCreate) SetNillableID(u *uuid.UUID) *TweetTagCreate
- func (ttc *TweetTagCreate) SetTag(t *Tag) *TweetTagCreate
- func (ttc *TweetTagCreate) SetTagID(i int) *TweetTagCreate
- func (ttc *TweetTagCreate) SetTweet(t *Tweet) *TweetTagCreate
- func (ttc *TweetTagCreate) SetTweetID(i int) *TweetTagCreate
- type TweetTagCreateBulk
- func (ttcb *TweetTagCreateBulk) Exec(ctx context.Context) error
- func (ttcb *TweetTagCreateBulk) ExecX(ctx context.Context)
- func (ttcb *TweetTagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TweetTagUpsertBulk
- func (ttcb *TweetTagCreateBulk) OnConflictColumns(columns ...string) *TweetTagUpsertBulk
- func (ttcb *TweetTagCreateBulk) Save(ctx context.Context) ([]*TweetTag, error)
- func (ttcb *TweetTagCreateBulk) SaveX(ctx context.Context) []*TweetTag
- type TweetTagDelete
- type TweetTagDeleteOne
- type TweetTagEdges
- type TweetTagFilter
- func (f *TweetTagFilter) Where(p entql.P)
- func (f *TweetTagFilter) WhereAddedAt(p entql.TimeP)
- func (f *TweetTagFilter) WhereHasTag()
- func (f *TweetTagFilter) WhereHasTagWith(preds ...predicate.Tag)
- func (f *TweetTagFilter) WhereHasTweet()
- func (f *TweetTagFilter) WhereHasTweetWith(preds ...predicate.Tweet)
- func (f *TweetTagFilter) WhereID(p entql.ValueP)
- func (f *TweetTagFilter) WhereTagID(p entql.IntP)
- func (f *TweetTagFilter) WhereTweetID(p entql.IntP)
- type TweetTagGroupBy
- func (ttgb *TweetTagGroupBy) Aggregate(fns ...AggregateFunc) *TweetTagGroupBy
- func (s *TweetTagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TweetTagGroupBy) BoolX(ctx context.Context) bool
- func (s *TweetTagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TweetTagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TweetTagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TweetTagGroupBy) Float64X(ctx context.Context) float64
- func (s *TweetTagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TweetTagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TweetTagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TweetTagGroupBy) IntX(ctx context.Context) int
- func (s *TweetTagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TweetTagGroupBy) IntsX(ctx context.Context) []int
- func (ttgb *TweetTagGroupBy) Scan(ctx context.Context, v any) error
- func (s *TweetTagGroupBy) ScanX(ctx context.Context, v any)
- func (s *TweetTagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TweetTagGroupBy) StringX(ctx context.Context) string
- func (s *TweetTagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TweetTagGroupBy) StringsX(ctx context.Context) []string
- type TweetTagMutation
- func (m *TweetTagMutation) AddField(name string, value ent.Value) error
- func (m *TweetTagMutation) AddedAt() (r time.Time, exists bool)
- func (m *TweetTagMutation) AddedEdges() []string
- func (m *TweetTagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TweetTagMutation) AddedFields() []string
- func (m *TweetTagMutation) AddedIDs(name string) []ent.Value
- func (m *TweetTagMutation) ClearEdge(name string) error
- func (m *TweetTagMutation) ClearField(name string) error
- func (m *TweetTagMutation) ClearTag()
- func (m *TweetTagMutation) ClearTweet()
- func (m *TweetTagMutation) ClearedEdges() []string
- func (m *TweetTagMutation) ClearedFields() []string
- func (m TweetTagMutation) Client() *Client
- func (m *TweetTagMutation) EdgeCleared(name string) bool
- func (m *TweetTagMutation) Field(name string) (ent.Value, bool)
- func (m *TweetTagMutation) FieldCleared(name string) bool
- func (m *TweetTagMutation) Fields() []string
- func (m *TweetTagMutation) Filter() *TweetTagFilter
- func (m *TweetTagMutation) ID() (id uuid.UUID, exists bool)
- func (m *TweetTagMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *TweetTagMutation) OldAddedAt(ctx context.Context) (v time.Time, err error)
- func (m *TweetTagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TweetTagMutation) OldTagID(ctx context.Context) (v int, err error)
- func (m *TweetTagMutation) OldTweetID(ctx context.Context) (v int, err error)
- func (m *TweetTagMutation) Op() Op
- func (m *TweetTagMutation) RemovedEdges() []string
- func (m *TweetTagMutation) RemovedIDs(name string) []ent.Value
- func (m *TweetTagMutation) ResetAddedAt()
- func (m *TweetTagMutation) ResetEdge(name string) error
- func (m *TweetTagMutation) ResetField(name string) error
- func (m *TweetTagMutation) ResetTag()
- func (m *TweetTagMutation) ResetTagID()
- func (m *TweetTagMutation) ResetTweet()
- func (m *TweetTagMutation) ResetTweetID()
- func (m *TweetTagMutation) SetAddedAt(t time.Time)
- func (m *TweetTagMutation) SetField(name string, value ent.Value) error
- func (m *TweetTagMutation) SetID(id uuid.UUID)
- func (m *TweetTagMutation) SetOp(op Op)
- func (m *TweetTagMutation) SetTagID(i int)
- func (m *TweetTagMutation) SetTweetID(i int)
- func (m *TweetTagMutation) TagCleared() bool
- func (m *TweetTagMutation) TagID() (r int, exists bool)
- func (m *TweetTagMutation) TagIDs() (ids []int)
- func (m *TweetTagMutation) TweetCleared() bool
- func (m *TweetTagMutation) TweetID() (r int, exists bool)
- func (m *TweetTagMutation) TweetIDs() (ids []int)
- func (m TweetTagMutation) Tx() (*Tx, error)
- func (m *TweetTagMutation) Type() string
- func (m *TweetTagMutation) Where(ps ...predicate.TweetTag)
- func (m *TweetTagMutation) WhereP(ps ...func(*sql.Selector))
- type TweetTagQuery
- func (ttq *TweetTagQuery) Aggregate(fns ...AggregateFunc) *TweetTagSelect
- func (ttq *TweetTagQuery) All(ctx context.Context) ([]*TweetTag, error)
- func (ttq *TweetTagQuery) AllX(ctx context.Context) []*TweetTag
- func (ttq *TweetTagQuery) Clone() *TweetTagQuery
- func (ttq *TweetTagQuery) Count(ctx context.Context) (int, error)
- func (ttq *TweetTagQuery) CountX(ctx context.Context) int
- func (ttq *TweetTagQuery) Exist(ctx context.Context) (bool, error)
- func (ttq *TweetTagQuery) ExistX(ctx context.Context) bool
- func (ttq *TweetTagQuery) Filter() *TweetTagFilter
- func (ttq *TweetTagQuery) First(ctx context.Context) (*TweetTag, error)
- func (ttq *TweetTagQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (ttq *TweetTagQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (ttq *TweetTagQuery) FirstX(ctx context.Context) *TweetTag
- func (ttq *TweetTagQuery) GroupBy(field string, fields ...string) *TweetTagGroupBy
- func (ttq *TweetTagQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (ttq *TweetTagQuery) IDsX(ctx context.Context) []uuid.UUID
- func (ttq *TweetTagQuery) Limit(limit int) *TweetTagQuery
- func (ttq *TweetTagQuery) Offset(offset int) *TweetTagQuery
- func (ttq *TweetTagQuery) Only(ctx context.Context) (*TweetTag, error)
- func (ttq *TweetTagQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (ttq *TweetTagQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (ttq *TweetTagQuery) OnlyX(ctx context.Context) *TweetTag
- func (ttq *TweetTagQuery) Order(o ...OrderFunc) *TweetTagQuery
- func (ttq *TweetTagQuery) QueryTag() *TagQuery
- func (ttq *TweetTagQuery) QueryTweet() *TweetQuery
- func (ttq *TweetTagQuery) Select(fields ...string) *TweetTagSelect
- func (ttq *TweetTagQuery) Unique(unique bool) *TweetTagQuery
- func (ttq *TweetTagQuery) Where(ps ...predicate.TweetTag) *TweetTagQuery
- func (ttq *TweetTagQuery) WithTag(opts ...func(*TagQuery)) *TweetTagQuery
- func (ttq *TweetTagQuery) WithTweet(opts ...func(*TweetQuery)) *TweetTagQuery
- type TweetTagSelect
- func (tts *TweetTagSelect) Aggregate(fns ...AggregateFunc) *TweetTagSelect
- func (s *TweetTagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TweetTagSelect) BoolX(ctx context.Context) bool
- func (s *TweetTagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TweetTagSelect) BoolsX(ctx context.Context) []bool
- func (s *TweetTagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TweetTagSelect) Float64X(ctx context.Context) float64
- func (s *TweetTagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TweetTagSelect) Float64sX(ctx context.Context) []float64
- func (s *TweetTagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TweetTagSelect) IntX(ctx context.Context) int
- func (s *TweetTagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TweetTagSelect) IntsX(ctx context.Context) []int
- func (tts *TweetTagSelect) Scan(ctx context.Context, v any) error
- func (s *TweetTagSelect) ScanX(ctx context.Context, v any)
- func (s *TweetTagSelect) String(ctx context.Context) (_ string, err error)
- func (s *TweetTagSelect) StringX(ctx context.Context) string
- func (s *TweetTagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TweetTagSelect) StringsX(ctx context.Context) []string
- type TweetTagUpdate
- func (ttu *TweetTagUpdate) ClearTag() *TweetTagUpdate
- func (ttu *TweetTagUpdate) ClearTweet() *TweetTagUpdate
- func (ttu *TweetTagUpdate) Exec(ctx context.Context) error
- func (ttu *TweetTagUpdate) ExecX(ctx context.Context)
- func (ttu *TweetTagUpdate) Mutation() *TweetTagMutation
- func (ttu *TweetTagUpdate) Save(ctx context.Context) (int, error)
- func (ttu *TweetTagUpdate) SaveX(ctx context.Context) int
- func (ttu *TweetTagUpdate) SetAddedAt(t time.Time) *TweetTagUpdate
- func (ttu *TweetTagUpdate) SetNillableAddedAt(t *time.Time) *TweetTagUpdate
- func (ttu *TweetTagUpdate) SetTag(t *Tag) *TweetTagUpdate
- func (ttu *TweetTagUpdate) SetTagID(i int) *TweetTagUpdate
- func (ttu *TweetTagUpdate) SetTweet(t *Tweet) *TweetTagUpdate
- func (ttu *TweetTagUpdate) SetTweetID(i int) *TweetTagUpdate
- func (ttu *TweetTagUpdate) Where(ps ...predicate.TweetTag) *TweetTagUpdate
- type TweetTagUpdateOne
- func (ttuo *TweetTagUpdateOne) ClearTag() *TweetTagUpdateOne
- func (ttuo *TweetTagUpdateOne) ClearTweet() *TweetTagUpdateOne
- func (ttuo *TweetTagUpdateOne) Exec(ctx context.Context) error
- func (ttuo *TweetTagUpdateOne) ExecX(ctx context.Context)
- func (ttuo *TweetTagUpdateOne) Mutation() *TweetTagMutation
- func (ttuo *TweetTagUpdateOne) Save(ctx context.Context) (*TweetTag, error)
- func (ttuo *TweetTagUpdateOne) SaveX(ctx context.Context) *TweetTag
- func (ttuo *TweetTagUpdateOne) Select(field string, fields ...string) *TweetTagUpdateOne
- func (ttuo *TweetTagUpdateOne) SetAddedAt(t time.Time) *TweetTagUpdateOne
- func (ttuo *TweetTagUpdateOne) SetNillableAddedAt(t *time.Time) *TweetTagUpdateOne
- func (ttuo *TweetTagUpdateOne) SetTag(t *Tag) *TweetTagUpdateOne
- func (ttuo *TweetTagUpdateOne) SetTagID(i int) *TweetTagUpdateOne
- func (ttuo *TweetTagUpdateOne) SetTweet(t *Tweet) *TweetTagUpdateOne
- func (ttuo *TweetTagUpdateOne) SetTweetID(i int) *TweetTagUpdateOne
- func (ttuo *TweetTagUpdateOne) Where(ps ...predicate.TweetTag) *TweetTagUpdateOne
- type TweetTagUpsert
- func (u *TweetTagUpsert) SetAddedAt(v time.Time) *TweetTagUpsert
- func (u *TweetTagUpsert) SetTagID(v int) *TweetTagUpsert
- func (u *TweetTagUpsert) SetTweetID(v int) *TweetTagUpsert
- func (u *TweetTagUpsert) UpdateAddedAt() *TweetTagUpsert
- func (u *TweetTagUpsert) UpdateTagID() *TweetTagUpsert
- func (u *TweetTagUpsert) UpdateTweetID() *TweetTagUpsert
- type TweetTagUpsertBulk
- func (u *TweetTagUpsertBulk) DoNothing() *TweetTagUpsertBulk
- func (u *TweetTagUpsertBulk) Exec(ctx context.Context) error
- func (u *TweetTagUpsertBulk) ExecX(ctx context.Context)
- func (u *TweetTagUpsertBulk) Ignore() *TweetTagUpsertBulk
- func (u *TweetTagUpsertBulk) SetAddedAt(v time.Time) *TweetTagUpsertBulk
- func (u *TweetTagUpsertBulk) SetTagID(v int) *TweetTagUpsertBulk
- func (u *TweetTagUpsertBulk) SetTweetID(v int) *TweetTagUpsertBulk
- func (u *TweetTagUpsertBulk) Update(set func(*TweetTagUpsert)) *TweetTagUpsertBulk
- func (u *TweetTagUpsertBulk) UpdateAddedAt() *TweetTagUpsertBulk
- func (u *TweetTagUpsertBulk) UpdateNewValues() *TweetTagUpsertBulk
- func (u *TweetTagUpsertBulk) UpdateTagID() *TweetTagUpsertBulk
- func (u *TweetTagUpsertBulk) UpdateTweetID() *TweetTagUpsertBulk
- type TweetTagUpsertOne
- func (u *TweetTagUpsertOne) DoNothing() *TweetTagUpsertOne
- func (u *TweetTagUpsertOne) Exec(ctx context.Context) error
- func (u *TweetTagUpsertOne) ExecX(ctx context.Context)
- func (u *TweetTagUpsertOne) ID(ctx context.Context) (id uuid.UUID, err error)
- func (u *TweetTagUpsertOne) IDX(ctx context.Context) uuid.UUID
- func (u *TweetTagUpsertOne) Ignore() *TweetTagUpsertOne
- func (u *TweetTagUpsertOne) SetAddedAt(v time.Time) *TweetTagUpsertOne
- func (u *TweetTagUpsertOne) SetTagID(v int) *TweetTagUpsertOne
- func (u *TweetTagUpsertOne) SetTweetID(v int) *TweetTagUpsertOne
- func (u *TweetTagUpsertOne) Update(set func(*TweetTagUpsert)) *TweetTagUpsertOne
- func (u *TweetTagUpsertOne) UpdateAddedAt() *TweetTagUpsertOne
- func (u *TweetTagUpsertOne) UpdateNewValues() *TweetTagUpsertOne
- func (u *TweetTagUpsertOne) UpdateTagID() *TweetTagUpsertOne
- func (u *TweetTagUpsertOne) UpdateTweetID() *TweetTagUpsertOne
- type TweetTags
- type TweetUpdate
- func (tu *TweetUpdate) AddLikedUserIDs(ids ...int) *TweetUpdate
- func (tu *TweetUpdate) AddLikedUsers(u ...*User) *TweetUpdate
- func (tu *TweetUpdate) AddTagIDs(ids ...int) *TweetUpdate
- func (tu *TweetUpdate) AddTags(t ...*Tag) *TweetUpdate
- func (tu *TweetUpdate) AddTweetTagIDs(ids ...uuid.UUID) *TweetUpdate
- func (tu *TweetUpdate) AddTweetTags(t ...*TweetTag) *TweetUpdate
- func (tu *TweetUpdate) AddTweetUser(u ...*UserTweet) *TweetUpdate
- func (tu *TweetUpdate) AddTweetUserIDs(ids ...int) *TweetUpdate
- func (tu *TweetUpdate) AddUser(u ...*User) *TweetUpdate
- func (tu *TweetUpdate) AddUserIDs(ids ...int) *TweetUpdate
- func (tu *TweetUpdate) ClearLikedUsers() *TweetUpdate
- func (tu *TweetUpdate) ClearTags() *TweetUpdate
- func (tu *TweetUpdate) ClearTweetTags() *TweetUpdate
- func (tu *TweetUpdate) ClearTweetUser() *TweetUpdate
- func (tu *TweetUpdate) ClearUser() *TweetUpdate
- func (tu *TweetUpdate) Exec(ctx context.Context) error
- func (tu *TweetUpdate) ExecX(ctx context.Context)
- func (tu *TweetUpdate) Mutation() *TweetMutation
- func (tu *TweetUpdate) RemoveLikedUserIDs(ids ...int) *TweetUpdate
- func (tu *TweetUpdate) RemoveLikedUsers(u ...*User) *TweetUpdate
- func (tu *TweetUpdate) RemoveTagIDs(ids ...int) *TweetUpdate
- func (tu *TweetUpdate) RemoveTags(t ...*Tag) *TweetUpdate
- func (tu *TweetUpdate) RemoveTweetTagIDs(ids ...uuid.UUID) *TweetUpdate
- func (tu *TweetUpdate) RemoveTweetTags(t ...*TweetTag) *TweetUpdate
- func (tu *TweetUpdate) RemoveTweetUser(u ...*UserTweet) *TweetUpdate
- func (tu *TweetUpdate) RemoveTweetUserIDs(ids ...int) *TweetUpdate
- func (tu *TweetUpdate) RemoveUser(u ...*User) *TweetUpdate
- func (tu *TweetUpdate) RemoveUserIDs(ids ...int) *TweetUpdate
- func (tu *TweetUpdate) Save(ctx context.Context) (int, error)
- func (tu *TweetUpdate) SaveX(ctx context.Context) int
- func (tu *TweetUpdate) SetText(s string) *TweetUpdate
- func (tu *TweetUpdate) Where(ps ...predicate.Tweet) *TweetUpdate
- type TweetUpdateOne
- func (tuo *TweetUpdateOne) AddLikedUserIDs(ids ...int) *TweetUpdateOne
- func (tuo *TweetUpdateOne) AddLikedUsers(u ...*User) *TweetUpdateOne
- func (tuo *TweetUpdateOne) AddTagIDs(ids ...int) *TweetUpdateOne
- func (tuo *TweetUpdateOne) AddTags(t ...*Tag) *TweetUpdateOne
- func (tuo *TweetUpdateOne) AddTweetTagIDs(ids ...uuid.UUID) *TweetUpdateOne
- func (tuo *TweetUpdateOne) AddTweetTags(t ...*TweetTag) *TweetUpdateOne
- func (tuo *TweetUpdateOne) AddTweetUser(u ...*UserTweet) *TweetUpdateOne
- func (tuo *TweetUpdateOne) AddTweetUserIDs(ids ...int) *TweetUpdateOne
- func (tuo *TweetUpdateOne) AddUser(u ...*User) *TweetUpdateOne
- func (tuo *TweetUpdateOne) AddUserIDs(ids ...int) *TweetUpdateOne
- func (tuo *TweetUpdateOne) ClearLikedUsers() *TweetUpdateOne
- func (tuo *TweetUpdateOne) ClearTags() *TweetUpdateOne
- func (tuo *TweetUpdateOne) ClearTweetTags() *TweetUpdateOne
- func (tuo *TweetUpdateOne) ClearTweetUser() *TweetUpdateOne
- func (tuo *TweetUpdateOne) ClearUser() *TweetUpdateOne
- func (tuo *TweetUpdateOne) Exec(ctx context.Context) error
- func (tuo *TweetUpdateOne) ExecX(ctx context.Context)
- func (tuo *TweetUpdateOne) Mutation() *TweetMutation
- func (tuo *TweetUpdateOne) RemoveLikedUserIDs(ids ...int) *TweetUpdateOne
- func (tuo *TweetUpdateOne) RemoveLikedUsers(u ...*User) *TweetUpdateOne
- func (tuo *TweetUpdateOne) RemoveTagIDs(ids ...int) *TweetUpdateOne
- func (tuo *TweetUpdateOne) RemoveTags(t ...*Tag) *TweetUpdateOne
- func (tuo *TweetUpdateOne) RemoveTweetTagIDs(ids ...uuid.UUID) *TweetUpdateOne
- func (tuo *TweetUpdateOne) RemoveTweetTags(t ...*TweetTag) *TweetUpdateOne
- func (tuo *TweetUpdateOne) RemoveTweetUser(u ...*UserTweet) *TweetUpdateOne
- func (tuo *TweetUpdateOne) RemoveTweetUserIDs(ids ...int) *TweetUpdateOne
- func (tuo *TweetUpdateOne) RemoveUser(u ...*User) *TweetUpdateOne
- func (tuo *TweetUpdateOne) RemoveUserIDs(ids ...int) *TweetUpdateOne
- func (tuo *TweetUpdateOne) Save(ctx context.Context) (*Tweet, error)
- func (tuo *TweetUpdateOne) SaveX(ctx context.Context) *Tweet
- func (tuo *TweetUpdateOne) Select(field string, fields ...string) *TweetUpdateOne
- func (tuo *TweetUpdateOne) SetText(s string) *TweetUpdateOne
- func (tuo *TweetUpdateOne) Where(ps ...predicate.Tweet) *TweetUpdateOne
- type TweetUpsert
- type TweetUpsertBulk
- func (u *TweetUpsertBulk) DoNothing() *TweetUpsertBulk
- func (u *TweetUpsertBulk) Exec(ctx context.Context) error
- func (u *TweetUpsertBulk) ExecX(ctx context.Context)
- func (u *TweetUpsertBulk) Ignore() *TweetUpsertBulk
- func (u *TweetUpsertBulk) SetText(v string) *TweetUpsertBulk
- func (u *TweetUpsertBulk) Update(set func(*TweetUpsert)) *TweetUpsertBulk
- func (u *TweetUpsertBulk) UpdateNewValues() *TweetUpsertBulk
- func (u *TweetUpsertBulk) UpdateText() *TweetUpsertBulk
- type TweetUpsertOne
- func (u *TweetUpsertOne) DoNothing() *TweetUpsertOne
- func (u *TweetUpsertOne) Exec(ctx context.Context) error
- func (u *TweetUpsertOne) ExecX(ctx context.Context)
- func (u *TweetUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *TweetUpsertOne) IDX(ctx context.Context) int
- func (u *TweetUpsertOne) Ignore() *TweetUpsertOne
- func (u *TweetUpsertOne) SetText(v string) *TweetUpsertOne
- func (u *TweetUpsertOne) Update(set func(*TweetUpsert)) *TweetUpsertOne
- func (u *TweetUpsertOne) UpdateNewValues() *TweetUpsertOne
- func (u *TweetUpsertOne) UpdateText() *TweetUpsertOne
- type Tweets
- type Tx
- type User
- func (u *User) QueryFriends() *UserQuery
- func (u *User) QueryFriendships() *FriendshipQuery
- func (u *User) QueryGroups() *GroupQuery
- func (u *User) QueryJoinedGroups() *UserGroupQuery
- func (u *User) QueryLikedTweets() *TweetQuery
- func (u *User) QueryLikes() *TweetLikeQuery
- func (u *User) QueryRelationship() *RelationshipQuery
- func (u *User) QueryRelatives() *UserQuery
- func (u *User) QueryRoles() *RoleQuery
- func (u *User) QueryRolesUsers() *RoleUserQuery
- func (u *User) QueryTweets() *TweetQuery
- func (u *User) QueryUserTweets() *UserTweetQuery
- func (u *User) String() string
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryFriends(u *User) *UserQuery
- func (c *UserClient) QueryFriendships(u *User) *FriendshipQuery
- func (c *UserClient) QueryGroups(u *User) *GroupQuery
- func (c *UserClient) QueryJoinedGroups(u *User) *UserGroupQuery
- func (c *UserClient) QueryLikedTweets(u *User) *TweetQuery
- func (c *UserClient) QueryLikes(u *User) *TweetLikeQuery
- func (c *UserClient) QueryRelationship(u *User) *RelationshipQuery
- func (c *UserClient) QueryRelatives(u *User) *UserQuery
- func (c *UserClient) QueryRoles(u *User) *RoleQuery
- func (c *UserClient) QueryRolesUsers(u *User) *RoleUserQuery
- func (c *UserClient) QueryTweets(u *User) *TweetQuery
- func (c *UserClient) QueryUserTweets(u *User) *UserTweetQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) AddFriendIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddFriends(u ...*User) *UserCreate
- func (uc *UserCreate) AddFriendshipIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddFriendships(f ...*Friendship) *UserCreate
- func (uc *UserCreate) AddGroupIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddGroups(g ...*Group) *UserCreate
- func (uc *UserCreate) AddJoinedGroupIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddJoinedGroups(u ...*UserGroup) *UserCreate
- func (uc *UserCreate) AddLikedTweetIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddLikedTweets(t ...*Tweet) *UserCreate
- func (uc *UserCreate) AddRelativeIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddRelatives(u ...*User) *UserCreate
- func (uc *UserCreate) AddRoleIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddRoles(r ...*Role) *UserCreate
- func (uc *UserCreate) AddTweetIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddTweets(t ...*Tweet) *UserCreate
- func (uc *UserCreate) AddUserTweetIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddUserTweets(u ...*UserTweet) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableName(s *string) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- type UserDeleteOne
- type UserEdges
- func (e UserEdges) FriendsOrErr() ([]*User, error)
- func (e UserEdges) FriendshipsOrErr() ([]*Friendship, error)
- func (e UserEdges) GroupsOrErr() ([]*Group, error)
- func (e UserEdges) JoinedGroupsOrErr() ([]*UserGroup, error)
- func (e UserEdges) LikedTweetsOrErr() ([]*Tweet, error)
- func (e UserEdges) LikesOrErr() ([]*TweetLike, error)
- func (e UserEdges) RelationshipOrErr() ([]*Relationship, error)
- func (e UserEdges) RelativesOrErr() ([]*User, error)
- func (e UserEdges) RolesOrErr() ([]*Role, error)
- func (e UserEdges) RolesUsersOrErr() ([]*RoleUser, error)
- func (e UserEdges) TweetsOrErr() ([]*Tweet, error)
- func (e UserEdges) UserTweetsOrErr() ([]*UserTweet, error)
- type UserFilter
- func (f *UserFilter) Where(p entql.P)
- func (f *UserFilter) WhereHasFriends()
- func (f *UserFilter) WhereHasFriendsWith(preds ...predicate.User)
- func (f *UserFilter) WhereHasFriendships()
- func (f *UserFilter) WhereHasFriendshipsWith(preds ...predicate.Friendship)
- func (f *UserFilter) WhereHasGroups()
- func (f *UserFilter) WhereHasGroupsWith(preds ...predicate.Group)
- func (f *UserFilter) WhereHasJoinedGroups()
- func (f *UserFilter) WhereHasJoinedGroupsWith(preds ...predicate.UserGroup)
- func (f *UserFilter) WhereHasLikedTweets()
- func (f *UserFilter) WhereHasLikedTweetsWith(preds ...predicate.Tweet)
- func (f *UserFilter) WhereHasLikes()
- func (f *UserFilter) WhereHasLikesWith(preds ...predicate.TweetLike)
- func (f *UserFilter) WhereHasRelationship()
- func (f *UserFilter) WhereHasRelationshipWith(preds ...predicate.Relationship)
- func (f *UserFilter) WhereHasRelatives()
- func (f *UserFilter) WhereHasRelativesWith(preds ...predicate.User)
- func (f *UserFilter) WhereHasRoles()
- func (f *UserFilter) WhereHasRolesUsers()
- func (f *UserFilter) WhereHasRolesUsersWith(preds ...predicate.RoleUser)
- func (f *UserFilter) WhereHasRolesWith(preds ...predicate.Role)
- func (f *UserFilter) WhereHasTweets()
- func (f *UserFilter) WhereHasTweetsWith(preds ...predicate.Tweet)
- func (f *UserFilter) WhereHasUserTweets()
- func (f *UserFilter) WhereHasUserTweetsWith(preds ...predicate.UserTweet)
- func (f *UserFilter) WhereID(p entql.IntP)
- func (f *UserFilter) WhereName(p entql.StringP)
- type UserGroup
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserGroupClient
- func (c *UserGroupClient) Create() *UserGroupCreate
- func (c *UserGroupClient) CreateBulk(builders ...*UserGroupCreate) *UserGroupCreateBulk
- func (c *UserGroupClient) Delete() *UserGroupDelete
- func (c *UserGroupClient) DeleteOne(ug *UserGroup) *UserGroupDeleteOne
- func (c *UserGroupClient) DeleteOneID(id int) *UserGroupDeleteOne
- func (c *UserGroupClient) Get(ctx context.Context, id int) (*UserGroup, error)
- func (c *UserGroupClient) GetX(ctx context.Context, id int) *UserGroup
- func (c *UserGroupClient) Hooks() []Hook
- func (c *UserGroupClient) Intercept(interceptors ...Interceptor)
- func (c *UserGroupClient) Interceptors() []Interceptor
- func (c *UserGroupClient) Query() *UserGroupQuery
- func (c *UserGroupClient) QueryGroup(ug *UserGroup) *GroupQuery
- func (c *UserGroupClient) QueryUser(ug *UserGroup) *UserQuery
- func (c *UserGroupClient) Update() *UserGroupUpdate
- func (c *UserGroupClient) UpdateOne(ug *UserGroup) *UserGroupUpdateOne
- func (c *UserGroupClient) UpdateOneID(id int) *UserGroupUpdateOne
- func (c *UserGroupClient) Use(hooks ...Hook)
- type UserGroupCreate
- func (ugc *UserGroupCreate) Exec(ctx context.Context) error
- func (ugc *UserGroupCreate) ExecX(ctx context.Context)
- func (ugc *UserGroupCreate) Mutation() *UserGroupMutation
- func (ugc *UserGroupCreate) OnConflict(opts ...sql.ConflictOption) *UserGroupUpsertOne
- func (ugc *UserGroupCreate) OnConflictColumns(columns ...string) *UserGroupUpsertOne
- func (ugc *UserGroupCreate) Save(ctx context.Context) (*UserGroup, error)
- func (ugc *UserGroupCreate) SaveX(ctx context.Context) *UserGroup
- func (ugc *UserGroupCreate) SetGroup(g *Group) *UserGroupCreate
- func (ugc *UserGroupCreate) SetGroupID(i int) *UserGroupCreate
- func (ugc *UserGroupCreate) SetJoinedAt(t time.Time) *UserGroupCreate
- func (ugc *UserGroupCreate) SetNillableJoinedAt(t *time.Time) *UserGroupCreate
- func (ugc *UserGroupCreate) SetUser(u *User) *UserGroupCreate
- func (ugc *UserGroupCreate) SetUserID(i int) *UserGroupCreate
- type UserGroupCreateBulk
- func (ugcb *UserGroupCreateBulk) Exec(ctx context.Context) error
- func (ugcb *UserGroupCreateBulk) ExecX(ctx context.Context)
- func (ugcb *UserGroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserGroupUpsertBulk
- func (ugcb *UserGroupCreateBulk) OnConflictColumns(columns ...string) *UserGroupUpsertBulk
- func (ugcb *UserGroupCreateBulk) Save(ctx context.Context) ([]*UserGroup, error)
- func (ugcb *UserGroupCreateBulk) SaveX(ctx context.Context) []*UserGroup
- type UserGroupDelete
- type UserGroupDeleteOne
- type UserGroupEdges
- type UserGroupFilter
- func (f *UserGroupFilter) Where(p entql.P)
- func (f *UserGroupFilter) WhereGroupID(p entql.IntP)
- func (f *UserGroupFilter) WhereHasGroup()
- func (f *UserGroupFilter) WhereHasGroupWith(preds ...predicate.Group)
- func (f *UserGroupFilter) WhereHasUser()
- func (f *UserGroupFilter) WhereHasUserWith(preds ...predicate.User)
- func (f *UserGroupFilter) WhereID(p entql.IntP)
- func (f *UserGroupFilter) WhereJoinedAt(p entql.TimeP)
- func (f *UserGroupFilter) WhereUserID(p entql.IntP)
- type UserGroupGroupBy
- func (uggb *UserGroupGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupGroupBy
- func (s *UserGroupGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupGroupBy) IntsX(ctx context.Context) []int
- func (uggb *UserGroupGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupGroupBy) StringsX(ctx context.Context) []string
- type UserGroupMutation
- func (m *UserGroupMutation) AddField(name string, value ent.Value) error
- func (m *UserGroupMutation) AddedEdges() []string
- func (m *UserGroupMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserGroupMutation) AddedFields() []string
- func (m *UserGroupMutation) AddedIDs(name string) []ent.Value
- func (m *UserGroupMutation) ClearEdge(name string) error
- func (m *UserGroupMutation) ClearField(name string) error
- func (m *UserGroupMutation) ClearGroup()
- func (m *UserGroupMutation) ClearUser()
- func (m *UserGroupMutation) ClearedEdges() []string
- func (m *UserGroupMutation) ClearedFields() []string
- func (m UserGroupMutation) Client() *Client
- func (m *UserGroupMutation) EdgeCleared(name string) bool
- func (m *UserGroupMutation) Field(name string) (ent.Value, bool)
- func (m *UserGroupMutation) FieldCleared(name string) bool
- func (m *UserGroupMutation) Fields() []string
- func (m *UserGroupMutation) Filter() *UserGroupFilter
- func (m *UserGroupMutation) GroupCleared() bool
- func (m *UserGroupMutation) GroupID() (r int, exists bool)
- func (m *UserGroupMutation) GroupIDs() (ids []int)
- func (m *UserGroupMutation) ID() (id int, exists bool)
- func (m *UserGroupMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserGroupMutation) JoinedAt() (r time.Time, exists bool)
- func (m *UserGroupMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserGroupMutation) OldGroupID(ctx context.Context) (v int, err error)
- func (m *UserGroupMutation) OldJoinedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserGroupMutation) OldUserID(ctx context.Context) (v int, err error)
- func (m *UserGroupMutation) Op() Op
- func (m *UserGroupMutation) RemovedEdges() []string
- func (m *UserGroupMutation) RemovedIDs(name string) []ent.Value
- func (m *UserGroupMutation) ResetEdge(name string) error
- func (m *UserGroupMutation) ResetField(name string) error
- func (m *UserGroupMutation) ResetGroup()
- func (m *UserGroupMutation) ResetGroupID()
- func (m *UserGroupMutation) ResetJoinedAt()
- func (m *UserGroupMutation) ResetUser()
- func (m *UserGroupMutation) ResetUserID()
- func (m *UserGroupMutation) SetField(name string, value ent.Value) error
- func (m *UserGroupMutation) SetGroupID(i int)
- func (m *UserGroupMutation) SetJoinedAt(t time.Time)
- func (m *UserGroupMutation) SetOp(op Op)
- func (m *UserGroupMutation) SetUserID(i int)
- func (m UserGroupMutation) Tx() (*Tx, error)
- func (m *UserGroupMutation) Type() string
- func (m *UserGroupMutation) UserCleared() bool
- func (m *UserGroupMutation) UserID() (r int, exists bool)
- func (m *UserGroupMutation) UserIDs() (ids []int)
- func (m *UserGroupMutation) Where(ps ...predicate.UserGroup)
- func (m *UserGroupMutation) WhereP(ps ...func(*sql.Selector))
- type UserGroupQuery
- func (ugq *UserGroupQuery) Aggregate(fns ...AggregateFunc) *UserGroupSelect
- func (ugq *UserGroupQuery) All(ctx context.Context) ([]*UserGroup, error)
- func (ugq *UserGroupQuery) AllX(ctx context.Context) []*UserGroup
- func (ugq *UserGroupQuery) Clone() *UserGroupQuery
- func (ugq *UserGroupQuery) Count(ctx context.Context) (int, error)
- func (ugq *UserGroupQuery) CountX(ctx context.Context) int
- func (ugq *UserGroupQuery) Exist(ctx context.Context) (bool, error)
- func (ugq *UserGroupQuery) ExistX(ctx context.Context) bool
- func (ugq *UserGroupQuery) Filter() *UserGroupFilter
- func (ugq *UserGroupQuery) First(ctx context.Context) (*UserGroup, error)
- func (ugq *UserGroupQuery) FirstID(ctx context.Context) (id int, err error)
- func (ugq *UserGroupQuery) FirstIDX(ctx context.Context) int
- func (ugq *UserGroupQuery) FirstX(ctx context.Context) *UserGroup
- func (ugq *UserGroupQuery) GroupBy(field string, fields ...string) *UserGroupGroupBy
- func (ugq *UserGroupQuery) IDs(ctx context.Context) (ids []int, err error)
- func (ugq *UserGroupQuery) IDsX(ctx context.Context) []int
- func (ugq *UserGroupQuery) Limit(limit int) *UserGroupQuery
- func (ugq *UserGroupQuery) Offset(offset int) *UserGroupQuery
- func (ugq *UserGroupQuery) Only(ctx context.Context) (*UserGroup, error)
- func (ugq *UserGroupQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ugq *UserGroupQuery) OnlyIDX(ctx context.Context) int
- func (ugq *UserGroupQuery) OnlyX(ctx context.Context) *UserGroup
- func (ugq *UserGroupQuery) Order(o ...OrderFunc) *UserGroupQuery
- func (ugq *UserGroupQuery) QueryGroup() *GroupQuery
- func (ugq *UserGroupQuery) QueryUser() *UserQuery
- func (ugq *UserGroupQuery) Select(fields ...string) *UserGroupSelect
- func (ugq *UserGroupQuery) Unique(unique bool) *UserGroupQuery
- func (ugq *UserGroupQuery) Where(ps ...predicate.UserGroup) *UserGroupQuery
- func (ugq *UserGroupQuery) WithGroup(opts ...func(*GroupQuery)) *UserGroupQuery
- func (ugq *UserGroupQuery) WithUser(opts ...func(*UserQuery)) *UserGroupQuery
- type UserGroupSelect
- func (ugs *UserGroupSelect) Aggregate(fns ...AggregateFunc) *UserGroupSelect
- func (s *UserGroupSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupSelect) BoolX(ctx context.Context) bool
- func (s *UserGroupSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupSelect) BoolsX(ctx context.Context) []bool
- func (s *UserGroupSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupSelect) Float64X(ctx context.Context) float64
- func (s *UserGroupSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupSelect) Float64sX(ctx context.Context) []float64
- func (s *UserGroupSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupSelect) IntX(ctx context.Context) int
- func (s *UserGroupSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupSelect) IntsX(ctx context.Context) []int
- func (ugs *UserGroupSelect) Scan(ctx context.Context, v any) error
- func (s *UserGroupSelect) ScanX(ctx context.Context, v any)
- func (s *UserGroupSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupSelect) StringX(ctx context.Context) string
- func (s *UserGroupSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupSelect) StringsX(ctx context.Context) []string
- type UserGroupUpdate
- func (ugu *UserGroupUpdate) ClearGroup() *UserGroupUpdate
- func (ugu *UserGroupUpdate) ClearUser() *UserGroupUpdate
- func (ugu *UserGroupUpdate) Exec(ctx context.Context) error
- func (ugu *UserGroupUpdate) ExecX(ctx context.Context)
- func (ugu *UserGroupUpdate) Mutation() *UserGroupMutation
- func (ugu *UserGroupUpdate) Save(ctx context.Context) (int, error)
- func (ugu *UserGroupUpdate) SaveX(ctx context.Context) int
- func (ugu *UserGroupUpdate) SetGroup(g *Group) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetGroupID(i int) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetJoinedAt(t time.Time) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetNillableJoinedAt(t *time.Time) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetUser(u *User) *UserGroupUpdate
- func (ugu *UserGroupUpdate) SetUserID(i int) *UserGroupUpdate
- func (ugu *UserGroupUpdate) Where(ps ...predicate.UserGroup) *UserGroupUpdate
- type UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) ClearGroup() *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) ClearUser() *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) Exec(ctx context.Context) error
- func (uguo *UserGroupUpdateOne) ExecX(ctx context.Context)
- func (uguo *UserGroupUpdateOne) Mutation() *UserGroupMutation
- func (uguo *UserGroupUpdateOne) Save(ctx context.Context) (*UserGroup, error)
- func (uguo *UserGroupUpdateOne) SaveX(ctx context.Context) *UserGroup
- func (uguo *UserGroupUpdateOne) Select(field string, fields ...string) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetGroup(g *Group) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetGroupID(i int) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetJoinedAt(t time.Time) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetNillableJoinedAt(t *time.Time) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetUser(u *User) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) SetUserID(i int) *UserGroupUpdateOne
- func (uguo *UserGroupUpdateOne) Where(ps ...predicate.UserGroup) *UserGroupUpdateOne
- type UserGroupUpsert
- func (u *UserGroupUpsert) SetGroupID(v int) *UserGroupUpsert
- func (u *UserGroupUpsert) SetJoinedAt(v time.Time) *UserGroupUpsert
- func (u *UserGroupUpsert) SetUserID(v int) *UserGroupUpsert
- func (u *UserGroupUpsert) UpdateGroupID() *UserGroupUpsert
- func (u *UserGroupUpsert) UpdateJoinedAt() *UserGroupUpsert
- func (u *UserGroupUpsert) UpdateUserID() *UserGroupUpsert
- type UserGroupUpsertBulk
- func (u *UserGroupUpsertBulk) DoNothing() *UserGroupUpsertBulk
- func (u *UserGroupUpsertBulk) Exec(ctx context.Context) error
- func (u *UserGroupUpsertBulk) ExecX(ctx context.Context)
- func (u *UserGroupUpsertBulk) Ignore() *UserGroupUpsertBulk
- func (u *UserGroupUpsertBulk) SetGroupID(v int) *UserGroupUpsertBulk
- func (u *UserGroupUpsertBulk) SetJoinedAt(v time.Time) *UserGroupUpsertBulk
- func (u *UserGroupUpsertBulk) SetUserID(v int) *UserGroupUpsertBulk
- func (u *UserGroupUpsertBulk) Update(set func(*UserGroupUpsert)) *UserGroupUpsertBulk
- func (u *UserGroupUpsertBulk) UpdateGroupID() *UserGroupUpsertBulk
- func (u *UserGroupUpsertBulk) UpdateJoinedAt() *UserGroupUpsertBulk
- func (u *UserGroupUpsertBulk) UpdateNewValues() *UserGroupUpsertBulk
- func (u *UserGroupUpsertBulk) UpdateUserID() *UserGroupUpsertBulk
- type UserGroupUpsertOne
- func (u *UserGroupUpsertOne) DoNothing() *UserGroupUpsertOne
- func (u *UserGroupUpsertOne) Exec(ctx context.Context) error
- func (u *UserGroupUpsertOne) ExecX(ctx context.Context)
- func (u *UserGroupUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *UserGroupUpsertOne) IDX(ctx context.Context) int
- func (u *UserGroupUpsertOne) Ignore() *UserGroupUpsertOne
- func (u *UserGroupUpsertOne) SetGroupID(v int) *UserGroupUpsertOne
- func (u *UserGroupUpsertOne) SetJoinedAt(v time.Time) *UserGroupUpsertOne
- func (u *UserGroupUpsertOne) SetUserID(v int) *UserGroupUpsertOne
- func (u *UserGroupUpsertOne) Update(set func(*UserGroupUpsert)) *UserGroupUpsertOne
- func (u *UserGroupUpsertOne) UpdateGroupID() *UserGroupUpsertOne
- func (u *UserGroupUpsertOne) UpdateJoinedAt() *UserGroupUpsertOne
- func (u *UserGroupUpsertOne) UpdateNewValues() *UserGroupUpsertOne
- func (u *UserGroupUpsertOne) UpdateUserID() *UserGroupUpsertOne
- type UserGroups
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddFriendIDs(ids ...int)
- func (m *UserMutation) AddFriendshipIDs(ids ...int)
- func (m *UserMutation) AddGroupIDs(ids ...int)
- func (m *UserMutation) AddJoinedGroupIDs(ids ...int)
- func (m *UserMutation) AddLikedTweetIDs(ids ...int)
- func (m *UserMutation) AddRelativeIDs(ids ...int)
- func (m *UserMutation) AddRoleIDs(ids ...int)
- func (m *UserMutation) AddTweetIDs(ids ...int)
- func (m *UserMutation) AddUserTweetIDs(ids ...int)
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearFriends()
- func (m *UserMutation) ClearFriendships()
- func (m *UserMutation) ClearGroups()
- func (m *UserMutation) ClearJoinedGroups()
- func (m *UserMutation) ClearLikedTweets()
- func (m *UserMutation) ClearRelatives()
- func (m *UserMutation) ClearRoles()
- func (m *UserMutation) ClearTweets()
- func (m *UserMutation) ClearUserTweets()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) Filter() *UserFilter
- func (m *UserMutation) FriendsCleared() bool
- func (m *UserMutation) FriendsIDs() (ids []int)
- func (m *UserMutation) FriendshipsCleared() bool
- func (m *UserMutation) FriendshipsIDs() (ids []int)
- func (m *UserMutation) GroupsCleared() bool
- func (m *UserMutation) GroupsIDs() (ids []int)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) JoinedGroupsCleared() bool
- func (m *UserMutation) JoinedGroupsIDs() (ids []int)
- func (m *UserMutation) LikedTweetsCleared() bool
- func (m *UserMutation) LikedTweetsIDs() (ids []int)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RelativesCleared() bool
- func (m *UserMutation) RelativesIDs() (ids []int)
- func (m *UserMutation) RemoveFriendIDs(ids ...int)
- func (m *UserMutation) RemoveFriendshipIDs(ids ...int)
- func (m *UserMutation) RemoveGroupIDs(ids ...int)
- func (m *UserMutation) RemoveJoinedGroupIDs(ids ...int)
- func (m *UserMutation) RemoveLikedTweetIDs(ids ...int)
- func (m *UserMutation) RemoveRelativeIDs(ids ...int)
- func (m *UserMutation) RemoveRoleIDs(ids ...int)
- func (m *UserMutation) RemoveTweetIDs(ids ...int)
- func (m *UserMutation) RemoveUserTweetIDs(ids ...int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedFriendsIDs() (ids []int)
- func (m *UserMutation) RemovedFriendshipsIDs() (ids []int)
- func (m *UserMutation) RemovedGroupsIDs() (ids []int)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedJoinedGroupsIDs() (ids []int)
- func (m *UserMutation) RemovedLikedTweetsIDs() (ids []int)
- func (m *UserMutation) RemovedRelativesIDs() (ids []int)
- func (m *UserMutation) RemovedRolesIDs() (ids []int)
- func (m *UserMutation) RemovedTweetsIDs() (ids []int)
- func (m *UserMutation) RemovedUserTweetsIDs() (ids []int)
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFriends()
- func (m *UserMutation) ResetFriendships()
- func (m *UserMutation) ResetGroups()
- func (m *UserMutation) ResetJoinedGroups()
- func (m *UserMutation) ResetLikedTweets()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetRelatives()
- func (m *UserMutation) ResetRoles()
- func (m *UserMutation) ResetTweets()
- func (m *UserMutation) ResetUserTweets()
- func (m *UserMutation) RolesCleared() bool
- func (m *UserMutation) RolesIDs() (ids []int)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) TweetsCleared() bool
- func (m *UserMutation) TweetsIDs() (ids []int)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UserTweetsCleared() bool
- func (m *UserMutation) UserTweetsIDs() (ids []int)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) Filter() *UserFilter
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) QueryFriends() *UserQuery
- func (uq *UserQuery) QueryFriendships() *FriendshipQuery
- func (uq *UserQuery) QueryGroups() *GroupQuery
- func (uq *UserQuery) QueryJoinedGroups() *UserGroupQuery
- func (uq *UserQuery) QueryLikedTweets() *TweetQuery
- func (uq *UserQuery) QueryLikes() *TweetLikeQuery
- func (uq *UserQuery) QueryRelationship() *RelationshipQuery
- func (uq *UserQuery) QueryRelatives() *UserQuery
- func (uq *UserQuery) QueryRoles() *RoleQuery
- func (uq *UserQuery) QueryRolesUsers() *RoleUserQuery
- func (uq *UserQuery) QueryTweets() *TweetQuery
- func (uq *UserQuery) QueryUserTweets() *UserTweetQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithFriends(opts ...func(*UserQuery)) *UserQuery
- func (uq *UserQuery) WithFriendships(opts ...func(*FriendshipQuery)) *UserQuery
- func (uq *UserQuery) WithGroups(opts ...func(*GroupQuery)) *UserQuery
- func (uq *UserQuery) WithJoinedGroups(opts ...func(*UserGroupQuery)) *UserQuery
- func (uq *UserQuery) WithLikedTweets(opts ...func(*TweetQuery)) *UserQuery
- func (uq *UserQuery) WithLikes(opts ...func(*TweetLikeQuery)) *UserQuery
- func (uq *UserQuery) WithRelationship(opts ...func(*RelationshipQuery)) *UserQuery
- func (uq *UserQuery) WithRelatives(opts ...func(*UserQuery)) *UserQuery
- func (uq *UserQuery) WithRoles(opts ...func(*RoleQuery)) *UserQuery
- func (uq *UserQuery) WithRolesUsers(opts ...func(*RoleUserQuery)) *UserQuery
- func (uq *UserQuery) WithTweets(opts ...func(*TweetQuery)) *UserQuery
- func (uq *UserQuery) WithUserTweets(opts ...func(*UserTweetQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserTweet
- type UserTweetClient
- func (c *UserTweetClient) Create() *UserTweetCreate
- func (c *UserTweetClient) CreateBulk(builders ...*UserTweetCreate) *UserTweetCreateBulk
- func (c *UserTweetClient) Delete() *UserTweetDelete
- func (c *UserTweetClient) DeleteOne(ut *UserTweet) *UserTweetDeleteOne
- func (c *UserTweetClient) DeleteOneID(id int) *UserTweetDeleteOne
- func (c *UserTweetClient) Get(ctx context.Context, id int) (*UserTweet, error)
- func (c *UserTweetClient) GetX(ctx context.Context, id int) *UserTweet
- func (c *UserTweetClient) Hooks() []Hook
- func (c *UserTweetClient) Intercept(interceptors ...Interceptor)
- func (c *UserTweetClient) Interceptors() []Interceptor
- func (c *UserTweetClient) Query() *UserTweetQuery
- func (c *UserTweetClient) QueryTweet(ut *UserTweet) *TweetQuery
- func (c *UserTweetClient) QueryUser(ut *UserTweet) *UserQuery
- func (c *UserTweetClient) Update() *UserTweetUpdate
- func (c *UserTweetClient) UpdateOne(ut *UserTweet) *UserTweetUpdateOne
- func (c *UserTweetClient) UpdateOneID(id int) *UserTweetUpdateOne
- func (c *UserTweetClient) Use(hooks ...Hook)
- type UserTweetCreate
- func (utc *UserTweetCreate) Exec(ctx context.Context) error
- func (utc *UserTweetCreate) ExecX(ctx context.Context)
- func (utc *UserTweetCreate) Mutation() *UserTweetMutation
- func (utc *UserTweetCreate) OnConflict(opts ...sql.ConflictOption) *UserTweetUpsertOne
- func (utc *UserTweetCreate) OnConflictColumns(columns ...string) *UserTweetUpsertOne
- func (utc *UserTweetCreate) Save(ctx context.Context) (*UserTweet, error)
- func (utc *UserTweetCreate) SaveX(ctx context.Context) *UserTweet
- func (utc *UserTweetCreate) SetCreatedAt(t time.Time) *UserTweetCreate
- func (utc *UserTweetCreate) SetNillableCreatedAt(t *time.Time) *UserTweetCreate
- func (utc *UserTweetCreate) SetTweet(t *Tweet) *UserTweetCreate
- func (utc *UserTweetCreate) SetTweetID(i int) *UserTweetCreate
- func (utc *UserTweetCreate) SetUser(u *User) *UserTweetCreate
- func (utc *UserTweetCreate) SetUserID(i int) *UserTweetCreate
- type UserTweetCreateBulk
- func (utcb *UserTweetCreateBulk) Exec(ctx context.Context) error
- func (utcb *UserTweetCreateBulk) ExecX(ctx context.Context)
- func (utcb *UserTweetCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserTweetUpsertBulk
- func (utcb *UserTweetCreateBulk) OnConflictColumns(columns ...string) *UserTweetUpsertBulk
- func (utcb *UserTweetCreateBulk) Save(ctx context.Context) ([]*UserTweet, error)
- func (utcb *UserTweetCreateBulk) SaveX(ctx context.Context) []*UserTweet
- type UserTweetDelete
- type UserTweetDeleteOne
- type UserTweetEdges
- type UserTweetFilter
- func (f *UserTweetFilter) Where(p entql.P)
- func (f *UserTweetFilter) WhereCreatedAt(p entql.TimeP)
- func (f *UserTweetFilter) WhereHasTweet()
- func (f *UserTweetFilter) WhereHasTweetWith(preds ...predicate.Tweet)
- func (f *UserTweetFilter) WhereHasUser()
- func (f *UserTweetFilter) WhereHasUserWith(preds ...predicate.User)
- func (f *UserTweetFilter) WhereID(p entql.IntP)
- func (f *UserTweetFilter) WhereTweetID(p entql.IntP)
- func (f *UserTweetFilter) WhereUserID(p entql.IntP)
- type UserTweetGroupBy
- func (utgb *UserTweetGroupBy) Aggregate(fns ...AggregateFunc) *UserTweetGroupBy
- func (s *UserTweetGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserTweetGroupBy) BoolX(ctx context.Context) bool
- func (s *UserTweetGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserTweetGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserTweetGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserTweetGroupBy) Float64X(ctx context.Context) float64
- func (s *UserTweetGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserTweetGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserTweetGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserTweetGroupBy) IntX(ctx context.Context) int
- func (s *UserTweetGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserTweetGroupBy) IntsX(ctx context.Context) []int
- func (utgb *UserTweetGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserTweetGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserTweetGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserTweetGroupBy) StringX(ctx context.Context) string
- func (s *UserTweetGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserTweetGroupBy) StringsX(ctx context.Context) []string
- type UserTweetMutation
- func (m *UserTweetMutation) AddField(name string, value ent.Value) error
- func (m *UserTweetMutation) AddedEdges() []string
- func (m *UserTweetMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserTweetMutation) AddedFields() []string
- func (m *UserTweetMutation) AddedIDs(name string) []ent.Value
- func (m *UserTweetMutation) ClearEdge(name string) error
- func (m *UserTweetMutation) ClearField(name string) error
- func (m *UserTweetMutation) ClearTweet()
- func (m *UserTweetMutation) ClearUser()
- func (m *UserTweetMutation) ClearedEdges() []string
- func (m *UserTweetMutation) ClearedFields() []string
- func (m UserTweetMutation) Client() *Client
- func (m *UserTweetMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserTweetMutation) EdgeCleared(name string) bool
- func (m *UserTweetMutation) Field(name string) (ent.Value, bool)
- func (m *UserTweetMutation) FieldCleared(name string) bool
- func (m *UserTweetMutation) Fields() []string
- func (m *UserTweetMutation) Filter() *UserTweetFilter
- func (m *UserTweetMutation) ID() (id int, exists bool)
- func (m *UserTweetMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserTweetMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserTweetMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserTweetMutation) OldTweetID(ctx context.Context) (v int, err error)
- func (m *UserTweetMutation) OldUserID(ctx context.Context) (v int, err error)
- func (m *UserTweetMutation) Op() Op
- func (m *UserTweetMutation) RemovedEdges() []string
- func (m *UserTweetMutation) RemovedIDs(name string) []ent.Value
- func (m *UserTweetMutation) ResetCreatedAt()
- func (m *UserTweetMutation) ResetEdge(name string) error
- func (m *UserTweetMutation) ResetField(name string) error
- func (m *UserTweetMutation) ResetTweet()
- func (m *UserTweetMutation) ResetTweetID()
- func (m *UserTweetMutation) ResetUser()
- func (m *UserTweetMutation) ResetUserID()
- func (m *UserTweetMutation) SetCreatedAt(t time.Time)
- func (m *UserTweetMutation) SetField(name string, value ent.Value) error
- func (m *UserTweetMutation) SetOp(op Op)
- func (m *UserTweetMutation) SetTweetID(i int)
- func (m *UserTweetMutation) SetUserID(i int)
- func (m *UserTweetMutation) TweetCleared() bool
- func (m *UserTweetMutation) TweetID() (r int, exists bool)
- func (m *UserTweetMutation) TweetIDs() (ids []int)
- func (m UserTweetMutation) Tx() (*Tx, error)
- func (m *UserTweetMutation) Type() string
- func (m *UserTweetMutation) UserCleared() bool
- func (m *UserTweetMutation) UserID() (r int, exists bool)
- func (m *UserTweetMutation) UserIDs() (ids []int)
- func (m *UserTweetMutation) Where(ps ...predicate.UserTweet)
- func (m *UserTweetMutation) WhereP(ps ...func(*sql.Selector))
- type UserTweetQuery
- func (utq *UserTweetQuery) Aggregate(fns ...AggregateFunc) *UserTweetSelect
- func (utq *UserTweetQuery) All(ctx context.Context) ([]*UserTweet, error)
- func (utq *UserTweetQuery) AllX(ctx context.Context) []*UserTweet
- func (utq *UserTweetQuery) Clone() *UserTweetQuery
- func (utq *UserTweetQuery) Count(ctx context.Context) (int, error)
- func (utq *UserTweetQuery) CountX(ctx context.Context) int
- func (utq *UserTweetQuery) Exist(ctx context.Context) (bool, error)
- func (utq *UserTweetQuery) ExistX(ctx context.Context) bool
- func (utq *UserTweetQuery) Filter() *UserTweetFilter
- func (utq *UserTweetQuery) First(ctx context.Context) (*UserTweet, error)
- func (utq *UserTweetQuery) FirstID(ctx context.Context) (id int, err error)
- func (utq *UserTweetQuery) FirstIDX(ctx context.Context) int
- func (utq *UserTweetQuery) FirstX(ctx context.Context) *UserTweet
- func (utq *UserTweetQuery) GroupBy(field string, fields ...string) *UserTweetGroupBy
- func (utq *UserTweetQuery) IDs(ctx context.Context) (ids []int, err error)
- func (utq *UserTweetQuery) IDsX(ctx context.Context) []int
- func (utq *UserTweetQuery) Limit(limit int) *UserTweetQuery
- func (utq *UserTweetQuery) Offset(offset int) *UserTweetQuery
- func (utq *UserTweetQuery) Only(ctx context.Context) (*UserTweet, error)
- func (utq *UserTweetQuery) OnlyID(ctx context.Context) (id int, err error)
- func (utq *UserTweetQuery) OnlyIDX(ctx context.Context) int
- func (utq *UserTweetQuery) OnlyX(ctx context.Context) *UserTweet
- func (utq *UserTweetQuery) Order(o ...OrderFunc) *UserTweetQuery
- func (utq *UserTweetQuery) QueryTweet() *TweetQuery
- func (utq *UserTweetQuery) QueryUser() *UserQuery
- func (utq *UserTweetQuery) Select(fields ...string) *UserTweetSelect
- func (utq *UserTweetQuery) Unique(unique bool) *UserTweetQuery
- func (utq *UserTweetQuery) Where(ps ...predicate.UserTweet) *UserTweetQuery
- func (utq *UserTweetQuery) WithTweet(opts ...func(*TweetQuery)) *UserTweetQuery
- func (utq *UserTweetQuery) WithUser(opts ...func(*UserQuery)) *UserTweetQuery
- type UserTweetSelect
- func (uts *UserTweetSelect) Aggregate(fns ...AggregateFunc) *UserTweetSelect
- func (s *UserTweetSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserTweetSelect) BoolX(ctx context.Context) bool
- func (s *UserTweetSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserTweetSelect) BoolsX(ctx context.Context) []bool
- func (s *UserTweetSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserTweetSelect) Float64X(ctx context.Context) float64
- func (s *UserTweetSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserTweetSelect) Float64sX(ctx context.Context) []float64
- func (s *UserTweetSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserTweetSelect) IntX(ctx context.Context) int
- func (s *UserTweetSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserTweetSelect) IntsX(ctx context.Context) []int
- func (uts *UserTweetSelect) Scan(ctx context.Context, v any) error
- func (s *UserTweetSelect) ScanX(ctx context.Context, v any)
- func (s *UserTweetSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserTweetSelect) StringX(ctx context.Context) string
- func (s *UserTweetSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserTweetSelect) StringsX(ctx context.Context) []string
- type UserTweetUpdate
- func (utu *UserTweetUpdate) ClearTweet() *UserTweetUpdate
- func (utu *UserTweetUpdate) ClearUser() *UserTweetUpdate
- func (utu *UserTweetUpdate) Exec(ctx context.Context) error
- func (utu *UserTweetUpdate) ExecX(ctx context.Context)
- func (utu *UserTweetUpdate) Mutation() *UserTweetMutation
- func (utu *UserTweetUpdate) Save(ctx context.Context) (int, error)
- func (utu *UserTweetUpdate) SaveX(ctx context.Context) int
- func (utu *UserTweetUpdate) SetCreatedAt(t time.Time) *UserTweetUpdate
- func (utu *UserTweetUpdate) SetNillableCreatedAt(t *time.Time) *UserTweetUpdate
- func (utu *UserTweetUpdate) SetTweet(t *Tweet) *UserTweetUpdate
- func (utu *UserTweetUpdate) SetTweetID(i int) *UserTweetUpdate
- func (utu *UserTweetUpdate) SetUser(u *User) *UserTweetUpdate
- func (utu *UserTweetUpdate) SetUserID(i int) *UserTweetUpdate
- func (utu *UserTweetUpdate) Where(ps ...predicate.UserTweet) *UserTweetUpdate
- type UserTweetUpdateOne
- func (utuo *UserTweetUpdateOne) ClearTweet() *UserTweetUpdateOne
- func (utuo *UserTweetUpdateOne) ClearUser() *UserTweetUpdateOne
- func (utuo *UserTweetUpdateOne) Exec(ctx context.Context) error
- func (utuo *UserTweetUpdateOne) ExecX(ctx context.Context)
- func (utuo *UserTweetUpdateOne) Mutation() *UserTweetMutation
- func (utuo *UserTweetUpdateOne) Save(ctx context.Context) (*UserTweet, error)
- func (utuo *UserTweetUpdateOne) SaveX(ctx context.Context) *UserTweet
- func (utuo *UserTweetUpdateOne) Select(field string, fields ...string) *UserTweetUpdateOne
- func (utuo *UserTweetUpdateOne) SetCreatedAt(t time.Time) *UserTweetUpdateOne
- func (utuo *UserTweetUpdateOne) SetNillableCreatedAt(t *time.Time) *UserTweetUpdateOne
- func (utuo *UserTweetUpdateOne) SetTweet(t *Tweet) *UserTweetUpdateOne
- func (utuo *UserTweetUpdateOne) SetTweetID(i int) *UserTweetUpdateOne
- func (utuo *UserTweetUpdateOne) SetUser(u *User) *UserTweetUpdateOne
- func (utuo *UserTweetUpdateOne) SetUserID(i int) *UserTweetUpdateOne
- func (utuo *UserTweetUpdateOne) Where(ps ...predicate.UserTweet) *UserTweetUpdateOne
- type UserTweetUpsert
- func (u *UserTweetUpsert) SetCreatedAt(v time.Time) *UserTweetUpsert
- func (u *UserTweetUpsert) SetTweetID(v int) *UserTweetUpsert
- func (u *UserTweetUpsert) SetUserID(v int) *UserTweetUpsert
- func (u *UserTweetUpsert) UpdateCreatedAt() *UserTweetUpsert
- func (u *UserTweetUpsert) UpdateTweetID() *UserTweetUpsert
- func (u *UserTweetUpsert) UpdateUserID() *UserTweetUpsert
- type UserTweetUpsertBulk
- func (u *UserTweetUpsertBulk) DoNothing() *UserTweetUpsertBulk
- func (u *UserTweetUpsertBulk) Exec(ctx context.Context) error
- func (u *UserTweetUpsertBulk) ExecX(ctx context.Context)
- func (u *UserTweetUpsertBulk) Ignore() *UserTweetUpsertBulk
- func (u *UserTweetUpsertBulk) SetCreatedAt(v time.Time) *UserTweetUpsertBulk
- func (u *UserTweetUpsertBulk) SetTweetID(v int) *UserTweetUpsertBulk
- func (u *UserTweetUpsertBulk) SetUserID(v int) *UserTweetUpsertBulk
- func (u *UserTweetUpsertBulk) Update(set func(*UserTweetUpsert)) *UserTweetUpsertBulk
- func (u *UserTweetUpsertBulk) UpdateCreatedAt() *UserTweetUpsertBulk
- func (u *UserTweetUpsertBulk) UpdateNewValues() *UserTweetUpsertBulk
- func (u *UserTweetUpsertBulk) UpdateTweetID() *UserTweetUpsertBulk
- func (u *UserTweetUpsertBulk) UpdateUserID() *UserTweetUpsertBulk
- type UserTweetUpsertOne
- func (u *UserTweetUpsertOne) DoNothing() *UserTweetUpsertOne
- func (u *UserTweetUpsertOne) Exec(ctx context.Context) error
- func (u *UserTweetUpsertOne) ExecX(ctx context.Context)
- func (u *UserTweetUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *UserTweetUpsertOne) IDX(ctx context.Context) int
- func (u *UserTweetUpsertOne) Ignore() *UserTweetUpsertOne
- func (u *UserTweetUpsertOne) SetCreatedAt(v time.Time) *UserTweetUpsertOne
- func (u *UserTweetUpsertOne) SetTweetID(v int) *UserTweetUpsertOne
- func (u *UserTweetUpsertOne) SetUserID(v int) *UserTweetUpsertOne
- func (u *UserTweetUpsertOne) Update(set func(*UserTweetUpsert)) *UserTweetUpsertOne
- func (u *UserTweetUpsertOne) UpdateCreatedAt() *UserTweetUpsertOne
- func (u *UserTweetUpsertOne) UpdateNewValues() *UserTweetUpsertOne
- func (u *UserTweetUpsertOne) UpdateTweetID() *UserTweetUpsertOne
- func (u *UserTweetUpsertOne) UpdateUserID() *UserTweetUpsertOne
- type UserTweets
- type UserUpdate
- func (uu *UserUpdate) AddFriendIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddFriends(u ...*User) *UserUpdate
- func (uu *UserUpdate) AddFriendshipIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddFriendships(f ...*Friendship) *UserUpdate
- func (uu *UserUpdate) AddGroupIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddGroups(g ...*Group) *UserUpdate
- func (uu *UserUpdate) AddJoinedGroupIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddJoinedGroups(u ...*UserGroup) *UserUpdate
- func (uu *UserUpdate) AddLikedTweetIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddLikedTweets(t ...*Tweet) *UserUpdate
- func (uu *UserUpdate) AddRelativeIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddRelatives(u ...*User) *UserUpdate
- func (uu *UserUpdate) AddRoleIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddRoles(r ...*Role) *UserUpdate
- func (uu *UserUpdate) AddTweetIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddTweets(t ...*Tweet) *UserUpdate
- func (uu *UserUpdate) AddUserTweetIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddUserTweets(u ...*UserTweet) *UserUpdate
- func (uu *UserUpdate) ClearFriends() *UserUpdate
- func (uu *UserUpdate) ClearFriendships() *UserUpdate
- func (uu *UserUpdate) ClearGroups() *UserUpdate
- func (uu *UserUpdate) ClearJoinedGroups() *UserUpdate
- func (uu *UserUpdate) ClearLikedTweets() *UserUpdate
- func (uu *UserUpdate) ClearRelatives() *UserUpdate
- func (uu *UserUpdate) ClearRoles() *UserUpdate
- func (uu *UserUpdate) ClearTweets() *UserUpdate
- func (uu *UserUpdate) ClearUserTweets() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveFriendIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveFriends(u ...*User) *UserUpdate
- func (uu *UserUpdate) RemoveFriendshipIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveFriendships(f ...*Friendship) *UserUpdate
- func (uu *UserUpdate) RemoveGroupIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveGroups(g ...*Group) *UserUpdate
- func (uu *UserUpdate) RemoveJoinedGroupIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveJoinedGroups(u ...*UserGroup) *UserUpdate
- func (uu *UserUpdate) RemoveLikedTweetIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveLikedTweets(t ...*Tweet) *UserUpdate
- func (uu *UserUpdate) RemoveRelativeIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveRelatives(u ...*User) *UserUpdate
- func (uu *UserUpdate) RemoveRoleIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveRoles(r ...*Role) *UserUpdate
- func (uu *UserUpdate) RemoveTweetIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveTweets(t ...*Tweet) *UserUpdate
- func (uu *UserUpdate) RemoveUserTweetIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveUserTweets(u ...*UserTweet) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddFriendIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFriends(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFriendshipIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFriendships(f ...*Friendship) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroupIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddGroups(g ...*Group) *UserUpdateOne
- func (uuo *UserUpdateOne) AddJoinedGroupIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddJoinedGroups(u ...*UserGroup) *UserUpdateOne
- func (uuo *UserUpdateOne) AddLikedTweetIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddLikedTweets(t ...*Tweet) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRelativeIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRelatives(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRoleIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddRoles(r ...*Role) *UserUpdateOne
- func (uuo *UserUpdateOne) AddTweetIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddTweets(t ...*Tweet) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserTweetIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUserTweets(u ...*UserTweet) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFriends() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFriendships() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearJoinedGroups() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLikedTweets() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRelatives() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTweets() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearUserTweets() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveFriendIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFriends(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFriendshipIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFriendships(f ...*Friendship) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveGroups(g ...*Group) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveJoinedGroupIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveJoinedGroups(u ...*UserGroup) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveLikedTweetIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveLikedTweets(t ...*Tweet) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRelativeIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRelatives(u ...*User) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRoleIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveRoles(r ...*Role) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveTweetIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveTweets(t ...*Tweet) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserTweetIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveUserTweets(u ...*UserTweet) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) int
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetName(v string) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAttachedFile = "AttachedFile" TypeFile = "File" TypeFriendship = "Friendship" TypeGroup = "Group" TypeGroupTag = "GroupTag" TypeProcess = "Process" TypeRelationship = "Relationship" TypeRelationshipInfo = "RelationshipInfo" TypeRole = "Role" TypeRoleUser = "RoleUser" TypeTag = "Tag" TypeTweet = "Tweet" TypeTweetLike = "TweetLike" TypeTweetTag = "TweetTag" TypeUser = "User" TypeUserGroup = "UserGroup" TypeUserTweet = "UserTweet" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type AttachedFile ¶ added in v0.11.8
type AttachedFile struct { // ID of the ent. ID int `json:"id,omitempty"` // AttachTime holds the value of the "attach_time" field. AttachTime time.Time `json:"attach_time,omitempty"` // FID holds the value of the "f_id" field. FID int `json:"f_id,omitempty"` // ProcID holds the value of the "proc_id" field. ProcID int `json:"proc_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AttachedFileQuery when eager-loading is set. Edges AttachedFileEdges `json:"edges"` // contains filtered or unexported fields }
AttachedFile is the model entity for the AttachedFile schema.
func (*AttachedFile) QueryFi ¶ added in v0.11.8
func (af *AttachedFile) QueryFi() *FileQuery
QueryFi queries the "fi" edge of the AttachedFile entity.
func (*AttachedFile) QueryProc ¶ added in v0.11.8
func (af *AttachedFile) QueryProc() *ProcessQuery
QueryProc queries the "proc" edge of the AttachedFile entity.
func (*AttachedFile) String ¶ added in v0.11.8
func (af *AttachedFile) String() string
String implements the fmt.Stringer.
func (*AttachedFile) Unwrap ¶ added in v0.11.8
func (af *AttachedFile) Unwrap() *AttachedFile
Unwrap unwraps the AttachedFile 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 (*AttachedFile) Update ¶ added in v0.11.8
func (af *AttachedFile) Update() *AttachedFileUpdateOne
Update returns a builder for updating this AttachedFile. Note that you need to call AttachedFile.Unwrap() before calling this method if this AttachedFile was returned from a transaction, and the transaction was committed or rolled back.
type AttachedFileClient ¶ added in v0.11.8
type AttachedFileClient struct {
// contains filtered or unexported fields
}
AttachedFileClient is a client for the AttachedFile schema.
func NewAttachedFileClient ¶ added in v0.11.8
func NewAttachedFileClient(c config) *AttachedFileClient
NewAttachedFileClient returns a client for the AttachedFile from the given config.
func (*AttachedFileClient) Create ¶ added in v0.11.8
func (c *AttachedFileClient) Create() *AttachedFileCreate
Create returns a builder for creating a AttachedFile entity.
func (*AttachedFileClient) CreateBulk ¶ added in v0.11.8
func (c *AttachedFileClient) CreateBulk(builders ...*AttachedFileCreate) *AttachedFileCreateBulk
CreateBulk returns a builder for creating a bulk of AttachedFile entities.
func (*AttachedFileClient) Delete ¶ added in v0.11.8
func (c *AttachedFileClient) Delete() *AttachedFileDelete
Delete returns a delete builder for AttachedFile.
func (*AttachedFileClient) DeleteOne ¶ added in v0.11.8
func (c *AttachedFileClient) DeleteOne(af *AttachedFile) *AttachedFileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AttachedFileClient) DeleteOneID ¶ added in v0.11.8
func (c *AttachedFileClient) DeleteOneID(id int) *AttachedFileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AttachedFileClient) Get ¶ added in v0.11.8
func (c *AttachedFileClient) Get(ctx context.Context, id int) (*AttachedFile, error)
Get returns a AttachedFile entity by its id.
func (*AttachedFileClient) GetX ¶ added in v0.11.8
func (c *AttachedFileClient) GetX(ctx context.Context, id int) *AttachedFile
GetX is like Get, but panics if an error occurs.
func (*AttachedFileClient) Hooks ¶ added in v0.11.8
func (c *AttachedFileClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AttachedFileClient) Intercept ¶ added in v0.11.8
func (c *AttachedFileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `attachedfile.Intercept(f(g(h())))`.
func (*AttachedFileClient) Interceptors ¶ added in v0.11.8
func (c *AttachedFileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AttachedFileClient) Query ¶ added in v0.11.8
func (c *AttachedFileClient) Query() *AttachedFileQuery
Query returns a query builder for AttachedFile.
func (*AttachedFileClient) QueryFi ¶ added in v0.11.8
func (c *AttachedFileClient) QueryFi(af *AttachedFile) *FileQuery
QueryFi queries the fi edge of a AttachedFile.
func (*AttachedFileClient) QueryProc ¶ added in v0.11.8
func (c *AttachedFileClient) QueryProc(af *AttachedFile) *ProcessQuery
QueryProc queries the proc edge of a AttachedFile.
func (*AttachedFileClient) Update ¶ added in v0.11.8
func (c *AttachedFileClient) Update() *AttachedFileUpdate
Update returns an update builder for AttachedFile.
func (*AttachedFileClient) UpdateOne ¶ added in v0.11.8
func (c *AttachedFileClient) UpdateOne(af *AttachedFile) *AttachedFileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AttachedFileClient) UpdateOneID ¶ added in v0.11.8
func (c *AttachedFileClient) UpdateOneID(id int) *AttachedFileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AttachedFileClient) Use ¶ added in v0.11.8
func (c *AttachedFileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `attachedfile.Hooks(f(g(h())))`.
type AttachedFileCreate ¶ added in v0.11.8
type AttachedFileCreate struct {
// contains filtered or unexported fields
}
AttachedFileCreate is the builder for creating a AttachedFile entity.
func (*AttachedFileCreate) Exec ¶ added in v0.11.8
func (afc *AttachedFileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachedFileCreate) ExecX ¶ added in v0.11.8
func (afc *AttachedFileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachedFileCreate) Mutation ¶ added in v0.11.8
func (afc *AttachedFileCreate) Mutation() *AttachedFileMutation
Mutation returns the AttachedFileMutation object of the builder.
func (*AttachedFileCreate) OnConflict ¶ added in v0.11.8
func (afc *AttachedFileCreate) OnConflict(opts ...sql.ConflictOption) *AttachedFileUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.AttachedFile.Create(). SetAttachTime(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AttachedFileUpsert) { SetAttachTime(v+v). }). Exec(ctx)
func (*AttachedFileCreate) OnConflictColumns ¶ added in v0.11.8
func (afc *AttachedFileCreate) OnConflictColumns(columns ...string) *AttachedFileUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.AttachedFile.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AttachedFileCreate) Save ¶ added in v0.11.8
func (afc *AttachedFileCreate) Save(ctx context.Context) (*AttachedFile, error)
Save creates the AttachedFile in the database.
func (*AttachedFileCreate) SaveX ¶ added in v0.11.8
func (afc *AttachedFileCreate) SaveX(ctx context.Context) *AttachedFile
SaveX calls Save and panics if Save returns an error.
func (*AttachedFileCreate) SetAttachTime ¶ added in v0.11.8
func (afc *AttachedFileCreate) SetAttachTime(t time.Time) *AttachedFileCreate
SetAttachTime sets the "attach_time" field.
func (*AttachedFileCreate) SetFID ¶ added in v0.11.8
func (afc *AttachedFileCreate) SetFID(i int) *AttachedFileCreate
SetFID sets the "f_id" field.
func (*AttachedFileCreate) SetFi ¶ added in v0.11.8
func (afc *AttachedFileCreate) SetFi(f *File) *AttachedFileCreate
SetFi sets the "fi" edge to the File entity.
func (*AttachedFileCreate) SetFiID ¶ added in v0.11.8
func (afc *AttachedFileCreate) SetFiID(id int) *AttachedFileCreate
SetFiID sets the "fi" edge to the File entity by ID.
func (*AttachedFileCreate) SetNillableAttachTime ¶ added in v0.11.8
func (afc *AttachedFileCreate) SetNillableAttachTime(t *time.Time) *AttachedFileCreate
SetNillableAttachTime sets the "attach_time" field if the given value is not nil.
func (*AttachedFileCreate) SetProc ¶ added in v0.11.8
func (afc *AttachedFileCreate) SetProc(p *Process) *AttachedFileCreate
SetProc sets the "proc" edge to the Process entity.
func (*AttachedFileCreate) SetProcID ¶ added in v0.11.8
func (afc *AttachedFileCreate) SetProcID(i int) *AttachedFileCreate
SetProcID sets the "proc_id" field.
type AttachedFileCreateBulk ¶ added in v0.11.8
type AttachedFileCreateBulk struct {
// contains filtered or unexported fields
}
AttachedFileCreateBulk is the builder for creating many AttachedFile entities in bulk.
func (*AttachedFileCreateBulk) Exec ¶ added in v0.11.8
func (afcb *AttachedFileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachedFileCreateBulk) ExecX ¶ added in v0.11.8
func (afcb *AttachedFileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachedFileCreateBulk) OnConflict ¶ added in v0.11.8
func (afcb *AttachedFileCreateBulk) OnConflict(opts ...sql.ConflictOption) *AttachedFileUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.AttachedFile.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AttachedFileUpsert) { SetAttachTime(v+v). }). Exec(ctx)
func (*AttachedFileCreateBulk) OnConflictColumns ¶ added in v0.11.8
func (afcb *AttachedFileCreateBulk) OnConflictColumns(columns ...string) *AttachedFileUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.AttachedFile.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*AttachedFileCreateBulk) Save ¶ added in v0.11.8
func (afcb *AttachedFileCreateBulk) Save(ctx context.Context) ([]*AttachedFile, error)
Save creates the AttachedFile entities in the database.
func (*AttachedFileCreateBulk) SaveX ¶ added in v0.11.8
func (afcb *AttachedFileCreateBulk) SaveX(ctx context.Context) []*AttachedFile
SaveX is like Save, but panics if an error occurs.
type AttachedFileDelete ¶ added in v0.11.8
type AttachedFileDelete struct {
// contains filtered or unexported fields
}
AttachedFileDelete is the builder for deleting a AttachedFile entity.
func (*AttachedFileDelete) Exec ¶ added in v0.11.8
func (afd *AttachedFileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AttachedFileDelete) ExecX ¶ added in v0.11.8
func (afd *AttachedFileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AttachedFileDelete) Where ¶ added in v0.11.8
func (afd *AttachedFileDelete) Where(ps ...predicate.AttachedFile) *AttachedFileDelete
Where appends a list predicates to the AttachedFileDelete builder.
type AttachedFileDeleteOne ¶ added in v0.11.8
type AttachedFileDeleteOne struct {
// contains filtered or unexported fields
}
AttachedFileDeleteOne is the builder for deleting a single AttachedFile entity.
func (*AttachedFileDeleteOne) Exec ¶ added in v0.11.8
func (afdo *AttachedFileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AttachedFileDeleteOne) ExecX ¶ added in v0.11.8
func (afdo *AttachedFileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachedFileDeleteOne) Where ¶ added in v0.11.8
func (afdo *AttachedFileDeleteOne) Where(ps ...predicate.AttachedFile) *AttachedFileDeleteOne
Where appends a list predicates to the AttachedFileDelete builder.
type AttachedFileEdges ¶ added in v0.11.8
type AttachedFileEdges struct { // Fi holds the value of the fi edge. Fi *File `json:"fi,omitempty"` // Proc holds the value of the proc edge. Proc *Process `json:"proc,omitempty"` // contains filtered or unexported fields }
AttachedFileEdges holds the relations/edges for other nodes in the graph.
func (AttachedFileEdges) FiOrErr ¶ added in v0.11.8
func (e AttachedFileEdges) FiOrErr() (*File, error)
FiOrErr returns the Fi value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (AttachedFileEdges) ProcOrErr ¶ added in v0.11.8
func (e AttachedFileEdges) ProcOrErr() (*Process, error)
ProcOrErr returns the Proc value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AttachedFileFilter ¶ added in v0.11.8
type AttachedFileFilter struct {
// contains filtered or unexported fields
}
AttachedFileFilter provides a generic filtering capability at runtime for AttachedFileQuery.
func (*AttachedFileFilter) Where ¶ added in v0.11.8
func (f *AttachedFileFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*AttachedFileFilter) WhereAttachTime ¶ added in v0.11.8
func (f *AttachedFileFilter) WhereAttachTime(p entql.TimeP)
WhereAttachTime applies the entql time.Time predicate on the attach_time field.
func (*AttachedFileFilter) WhereFID ¶ added in v0.11.8
func (f *AttachedFileFilter) WhereFID(p entql.IntP)
WhereFID applies the entql int predicate on the f_id field.
func (*AttachedFileFilter) WhereHasFi ¶ added in v0.11.8
func (f *AttachedFileFilter) WhereHasFi()
WhereHasFi applies a predicate to check if query has an edge fi.
func (*AttachedFileFilter) WhereHasFiWith ¶ added in v0.11.8
func (f *AttachedFileFilter) WhereHasFiWith(preds ...predicate.File)
WhereHasFiWith applies a predicate to check if query has an edge fi with a given conditions (other predicates).
func (*AttachedFileFilter) WhereHasProc ¶ added in v0.11.8
func (f *AttachedFileFilter) WhereHasProc()
WhereHasProc applies a predicate to check if query has an edge proc.
func (*AttachedFileFilter) WhereHasProcWith ¶ added in v0.11.8
func (f *AttachedFileFilter) WhereHasProcWith(preds ...predicate.Process)
WhereHasProcWith applies a predicate to check if query has an edge proc with a given conditions (other predicates).
func (*AttachedFileFilter) WhereID ¶ added in v0.11.8
func (f *AttachedFileFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*AttachedFileFilter) WhereProcID ¶ added in v0.11.8
func (f *AttachedFileFilter) WhereProcID(p entql.IntP)
WhereProcID applies the entql int predicate on the proc_id field.
type AttachedFileGroupBy ¶ added in v0.11.8
type AttachedFileGroupBy struct {
// contains filtered or unexported fields
}
AttachedFileGroupBy is the group-by builder for AttachedFile entities.
func (*AttachedFileGroupBy) Aggregate ¶ added in v0.11.8
func (afgb *AttachedFileGroupBy) Aggregate(fns ...AggregateFunc) *AttachedFileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AttachedFileGroupBy) Bool ¶ added in v0.11.8
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AttachedFileGroupBy) BoolX ¶ added in v0.11.8
BoolX is like Bool, but panics if an error occurs.
func (*AttachedFileGroupBy) Bools ¶ added in v0.11.8
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AttachedFileGroupBy) BoolsX ¶ added in v0.11.8
BoolsX is like Bools, but panics if an error occurs.
func (*AttachedFileGroupBy) Float64 ¶ added in v0.11.8
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AttachedFileGroupBy) Float64X ¶ added in v0.11.8
Float64X is like Float64, but panics if an error occurs.
func (*AttachedFileGroupBy) Float64s ¶ added in v0.11.8
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AttachedFileGroupBy) Float64sX ¶ added in v0.11.8
Float64sX is like Float64s, but panics if an error occurs.
func (*AttachedFileGroupBy) Int ¶ added in v0.11.8
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AttachedFileGroupBy) IntX ¶ added in v0.11.8
IntX is like Int, but panics if an error occurs.
func (*AttachedFileGroupBy) Ints ¶ added in v0.11.8
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AttachedFileGroupBy) IntsX ¶ added in v0.11.8
IntsX is like Ints, but panics if an error occurs.
func (*AttachedFileGroupBy) Scan ¶ added in v0.11.8
func (afgb *AttachedFileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AttachedFileGroupBy) ScanX ¶ added in v0.11.8
ScanX is like Scan, but panics if an error occurs.
func (*AttachedFileGroupBy) String ¶ added in v0.11.8
String returns a single string from a selector. It is only allowed when selecting one field.
func (*AttachedFileGroupBy) StringX ¶ added in v0.11.8
StringX is like String, but panics if an error occurs.
type AttachedFileMutation ¶ added in v0.11.8
type AttachedFileMutation struct {
// contains filtered or unexported fields
}
AttachedFileMutation represents an operation that mutates the AttachedFile nodes in the graph.
func (*AttachedFileMutation) AddField ¶ added in v0.11.8
func (m *AttachedFileMutation) 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 (*AttachedFileMutation) AddedEdges ¶ added in v0.11.8
func (m *AttachedFileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AttachedFileMutation) AddedField ¶ added in v0.11.8
func (m *AttachedFileMutation) 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 (*AttachedFileMutation) AddedFields ¶ added in v0.11.8
func (m *AttachedFileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AttachedFileMutation) AddedIDs ¶ added in v0.11.8
func (m *AttachedFileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AttachedFileMutation) AttachTime ¶ added in v0.11.8
func (m *AttachedFileMutation) AttachTime() (r time.Time, exists bool)
AttachTime returns the value of the "attach_time" field in the mutation.
func (*AttachedFileMutation) ClearEdge ¶ added in v0.11.8
func (m *AttachedFileMutation) 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 (*AttachedFileMutation) ClearFi ¶ added in v0.11.8
func (m *AttachedFileMutation) ClearFi()
ClearFi clears the "fi" edge to the File entity.
func (*AttachedFileMutation) ClearField ¶ added in v0.11.8
func (m *AttachedFileMutation) 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 (*AttachedFileMutation) ClearProc ¶ added in v0.11.8
func (m *AttachedFileMutation) ClearProc()
ClearProc clears the "proc" edge to the Process entity.
func (*AttachedFileMutation) ClearedEdges ¶ added in v0.11.8
func (m *AttachedFileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AttachedFileMutation) ClearedFields ¶ added in v0.11.8
func (m *AttachedFileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AttachedFileMutation) Client ¶ added in v0.11.8
func (m AttachedFileMutation) 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 (*AttachedFileMutation) EdgeCleared ¶ added in v0.11.8
func (m *AttachedFileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AttachedFileMutation) FID ¶ added in v0.11.8
func (m *AttachedFileMutation) FID() (r int, exists bool)
FID returns the value of the "f_id" field in the mutation.
func (*AttachedFileMutation) FiCleared ¶ added in v0.11.8
func (m *AttachedFileMutation) FiCleared() bool
FiCleared reports if the "fi" edge to the File entity was cleared.
func (*AttachedFileMutation) FiID ¶ added in v0.11.8
func (m *AttachedFileMutation) FiID() (id int, exists bool)
FiID returns the "fi" edge ID in the mutation.
func (*AttachedFileMutation) FiIDs ¶ added in v0.11.8
func (m *AttachedFileMutation) FiIDs() (ids []int)
FiIDs returns the "fi" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FiID instead. It exists only for internal usage by the builders.
func (*AttachedFileMutation) Field ¶ added in v0.11.8
func (m *AttachedFileMutation) 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 (*AttachedFileMutation) FieldCleared ¶ added in v0.11.8
func (m *AttachedFileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AttachedFileMutation) Fields ¶ added in v0.11.8
func (m *AttachedFileMutation) 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 (*AttachedFileMutation) Filter ¶ added in v0.11.8
func (m *AttachedFileMutation) Filter() *AttachedFileFilter
Filter returns an entql.Where implementation to apply filters on the AttachedFileMutation builder.
func (*AttachedFileMutation) ID ¶ added in v0.11.8
func (m *AttachedFileMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AttachedFileMutation) IDs ¶ added in v0.11.8
func (m *AttachedFileMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AttachedFileMutation) OldAttachTime ¶ added in v0.11.8
OldAttachTime returns the old "attach_time" field's value of the AttachedFile entity. If the AttachedFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AttachedFileMutation) OldFID ¶ added in v0.11.8
func (m *AttachedFileMutation) OldFID(ctx context.Context) (v int, err error)
OldFID returns the old "f_id" field's value of the AttachedFile entity. If the AttachedFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AttachedFileMutation) OldField ¶ added in v0.11.8
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 (*AttachedFileMutation) OldProcID ¶ added in v0.11.8
func (m *AttachedFileMutation) OldProcID(ctx context.Context) (v int, err error)
OldProcID returns the old "proc_id" field's value of the AttachedFile entity. If the AttachedFile object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AttachedFileMutation) Op ¶ added in v0.11.8
func (m *AttachedFileMutation) Op() Op
Op returns the operation name.
func (*AttachedFileMutation) ProcCleared ¶ added in v0.11.8
func (m *AttachedFileMutation) ProcCleared() bool
ProcCleared reports if the "proc" edge to the Process entity was cleared.
func (*AttachedFileMutation) ProcID ¶ added in v0.11.8
func (m *AttachedFileMutation) ProcID() (r int, exists bool)
ProcID returns the value of the "proc_id" field in the mutation.
func (*AttachedFileMutation) ProcIDs ¶ added in v0.11.8
func (m *AttachedFileMutation) ProcIDs() (ids []int)
ProcIDs returns the "proc" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProcID instead. It exists only for internal usage by the builders.
func (*AttachedFileMutation) RemovedEdges ¶ added in v0.11.8
func (m *AttachedFileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AttachedFileMutation) RemovedIDs ¶ added in v0.11.8
func (m *AttachedFileMutation) 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 (*AttachedFileMutation) ResetAttachTime ¶ added in v0.11.8
func (m *AttachedFileMutation) ResetAttachTime()
ResetAttachTime resets all changes to the "attach_time" field.
func (*AttachedFileMutation) ResetEdge ¶ added in v0.11.8
func (m *AttachedFileMutation) 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 (*AttachedFileMutation) ResetFID ¶ added in v0.11.8
func (m *AttachedFileMutation) ResetFID()
ResetFID resets all changes to the "f_id" field.
func (*AttachedFileMutation) ResetFi ¶ added in v0.11.8
func (m *AttachedFileMutation) ResetFi()
ResetFi resets all changes to the "fi" edge.
func (*AttachedFileMutation) ResetField ¶ added in v0.11.8
func (m *AttachedFileMutation) 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 (*AttachedFileMutation) ResetProc ¶ added in v0.11.8
func (m *AttachedFileMutation) ResetProc()
ResetProc resets all changes to the "proc" edge.
func (*AttachedFileMutation) ResetProcID ¶ added in v0.11.8
func (m *AttachedFileMutation) ResetProcID()
ResetProcID resets all changes to the "proc_id" field.
func (*AttachedFileMutation) SetAttachTime ¶ added in v0.11.8
func (m *AttachedFileMutation) SetAttachTime(t time.Time)
SetAttachTime sets the "attach_time" field.
func (*AttachedFileMutation) SetFID ¶ added in v0.11.8
func (m *AttachedFileMutation) SetFID(i int)
SetFID sets the "f_id" field.
func (*AttachedFileMutation) SetFiID ¶ added in v0.11.8
func (m *AttachedFileMutation) SetFiID(id int)
SetFiID sets the "fi" edge to the File entity by id.
func (*AttachedFileMutation) SetField ¶ added in v0.11.8
func (m *AttachedFileMutation) 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 (*AttachedFileMutation) SetOp ¶ added in v0.11.8
func (m *AttachedFileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AttachedFileMutation) SetProcID ¶ added in v0.11.8
func (m *AttachedFileMutation) SetProcID(i int)
SetProcID sets the "proc_id" field.
func (AttachedFileMutation) Tx ¶ added in v0.11.8
func (m AttachedFileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AttachedFileMutation) Type ¶ added in v0.11.8
func (m *AttachedFileMutation) Type() string
Type returns the node type of this mutation (AttachedFile).
func (*AttachedFileMutation) Where ¶ added in v0.11.8
func (m *AttachedFileMutation) Where(ps ...predicate.AttachedFile)
Where appends a list predicates to the AttachedFileMutation builder.
func (*AttachedFileMutation) WhereP ¶ added in v0.11.8
func (m *AttachedFileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AttachedFileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AttachedFileQuery ¶ added in v0.11.8
type AttachedFileQuery struct {
// contains filtered or unexported fields
}
AttachedFileQuery is the builder for querying AttachedFile entities.
func (*AttachedFileQuery) Aggregate ¶ added in v0.11.8
func (afq *AttachedFileQuery) Aggregate(fns ...AggregateFunc) *AttachedFileSelect
Aggregate returns a AttachedFileSelect configured with the given aggregations.
func (*AttachedFileQuery) All ¶ added in v0.11.8
func (afq *AttachedFileQuery) All(ctx context.Context) ([]*AttachedFile, error)
All executes the query and returns a list of AttachedFiles.
func (*AttachedFileQuery) AllX ¶ added in v0.11.8
func (afq *AttachedFileQuery) AllX(ctx context.Context) []*AttachedFile
AllX is like All, but panics if an error occurs.
func (*AttachedFileQuery) Clone ¶ added in v0.11.8
func (afq *AttachedFileQuery) Clone() *AttachedFileQuery
Clone returns a duplicate of the AttachedFileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AttachedFileQuery) Count ¶ added in v0.11.8
func (afq *AttachedFileQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AttachedFileQuery) CountX ¶ added in v0.11.8
func (afq *AttachedFileQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AttachedFileQuery) Exist ¶ added in v0.11.8
func (afq *AttachedFileQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AttachedFileQuery) ExistX ¶ added in v0.11.8
func (afq *AttachedFileQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AttachedFileQuery) Filter ¶ added in v0.11.8
func (afq *AttachedFileQuery) Filter() *AttachedFileFilter
Filter returns a Filter implementation to apply filters on the AttachedFileQuery builder.
func (*AttachedFileQuery) First ¶ added in v0.11.8
func (afq *AttachedFileQuery) First(ctx context.Context) (*AttachedFile, error)
First returns the first AttachedFile entity from the query. Returns a *NotFoundError when no AttachedFile was found.
func (*AttachedFileQuery) FirstID ¶ added in v0.11.8
func (afq *AttachedFileQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first AttachedFile ID from the query. Returns a *NotFoundError when no AttachedFile ID was found.
func (*AttachedFileQuery) FirstIDX ¶ added in v0.11.8
func (afq *AttachedFileQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AttachedFileQuery) FirstX ¶ added in v0.11.8
func (afq *AttachedFileQuery) FirstX(ctx context.Context) *AttachedFile
FirstX is like First, but panics if an error occurs.
func (*AttachedFileQuery) GroupBy ¶ added in v0.11.8
func (afq *AttachedFileQuery) GroupBy(field string, fields ...string) *AttachedFileGroupBy
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 { AttachTime time.Time `json:"attach_time,omitempty"` Count int `json:"count,omitempty"` } client.AttachedFile.Query(). GroupBy(attachedfile.FieldAttachTime). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AttachedFileQuery) IDs ¶ added in v0.11.8
func (afq *AttachedFileQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of AttachedFile IDs.
func (*AttachedFileQuery) IDsX ¶ added in v0.11.8
func (afq *AttachedFileQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AttachedFileQuery) Limit ¶ added in v0.11.8
func (afq *AttachedFileQuery) Limit(limit int) *AttachedFileQuery
Limit the number of records to be returned by this query.
func (*AttachedFileQuery) Offset ¶ added in v0.11.8
func (afq *AttachedFileQuery) Offset(offset int) *AttachedFileQuery
Offset to start from.
func (*AttachedFileQuery) Only ¶ added in v0.11.8
func (afq *AttachedFileQuery) Only(ctx context.Context) (*AttachedFile, error)
Only returns a single AttachedFile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AttachedFile entity is found. Returns a *NotFoundError when no AttachedFile entities are found.
func (*AttachedFileQuery) OnlyID ¶ added in v0.11.8
func (afq *AttachedFileQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only AttachedFile ID in the query. Returns a *NotSingularError when more than one AttachedFile ID is found. Returns a *NotFoundError when no entities are found.
func (*AttachedFileQuery) OnlyIDX ¶ added in v0.11.8
func (afq *AttachedFileQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AttachedFileQuery) OnlyX ¶ added in v0.11.8
func (afq *AttachedFileQuery) OnlyX(ctx context.Context) *AttachedFile
OnlyX is like Only, but panics if an error occurs.
func (*AttachedFileQuery) Order ¶ added in v0.11.8
func (afq *AttachedFileQuery) Order(o ...OrderFunc) *AttachedFileQuery
Order specifies how the records should be ordered.
func (*AttachedFileQuery) QueryFi ¶ added in v0.11.8
func (afq *AttachedFileQuery) QueryFi() *FileQuery
QueryFi chains the current query on the "fi" edge.
func (*AttachedFileQuery) QueryProc ¶ added in v0.11.8
func (afq *AttachedFileQuery) QueryProc() *ProcessQuery
QueryProc chains the current query on the "proc" edge.
func (*AttachedFileQuery) Select ¶ added in v0.11.8
func (afq *AttachedFileQuery) Select(fields ...string) *AttachedFileSelect
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 { AttachTime time.Time `json:"attach_time,omitempty"` } client.AttachedFile.Query(). Select(attachedfile.FieldAttachTime). Scan(ctx, &v)
func (*AttachedFileQuery) Unique ¶ added in v0.11.8
func (afq *AttachedFileQuery) Unique(unique bool) *AttachedFileQuery
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 (*AttachedFileQuery) Where ¶ added in v0.11.8
func (afq *AttachedFileQuery) Where(ps ...predicate.AttachedFile) *AttachedFileQuery
Where adds a new predicate for the AttachedFileQuery builder.
func (*AttachedFileQuery) WithFi ¶ added in v0.11.8
func (afq *AttachedFileQuery) WithFi(opts ...func(*FileQuery)) *AttachedFileQuery
WithFi tells the query-builder to eager-load the nodes that are connected to the "fi" edge. The optional arguments are used to configure the query builder of the edge.
func (*AttachedFileQuery) WithProc ¶ added in v0.11.8
func (afq *AttachedFileQuery) WithProc(opts ...func(*ProcessQuery)) *AttachedFileQuery
WithProc tells the query-builder to eager-load the nodes that are connected to the "proc" edge. The optional arguments are used to configure the query builder of the edge.
type AttachedFileSelect ¶ added in v0.11.8
type AttachedFileSelect struct { *AttachedFileQuery // contains filtered or unexported fields }
AttachedFileSelect is the builder for selecting fields of AttachedFile entities.
func (*AttachedFileSelect) Aggregate ¶ added in v0.11.8
func (afs *AttachedFileSelect) Aggregate(fns ...AggregateFunc) *AttachedFileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AttachedFileSelect) Bool ¶ added in v0.11.8
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AttachedFileSelect) BoolX ¶ added in v0.11.8
BoolX is like Bool, but panics if an error occurs.
func (*AttachedFileSelect) Bools ¶ added in v0.11.8
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AttachedFileSelect) BoolsX ¶ added in v0.11.8
BoolsX is like Bools, but panics if an error occurs.
func (*AttachedFileSelect) Float64 ¶ added in v0.11.8
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AttachedFileSelect) Float64X ¶ added in v0.11.8
Float64X is like Float64, but panics if an error occurs.
func (*AttachedFileSelect) Float64s ¶ added in v0.11.8
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AttachedFileSelect) Float64sX ¶ added in v0.11.8
Float64sX is like Float64s, but panics if an error occurs.
func (*AttachedFileSelect) Int ¶ added in v0.11.8
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AttachedFileSelect) Ints ¶ added in v0.11.8
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AttachedFileSelect) IntsX ¶ added in v0.11.8
IntsX is like Ints, but panics if an error occurs.
func (*AttachedFileSelect) Scan ¶ added in v0.11.8
func (afs *AttachedFileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AttachedFileSelect) ScanX ¶ added in v0.11.8
ScanX is like Scan, but panics if an error occurs.
func (*AttachedFileSelect) String ¶ added in v0.11.8
String returns a single string from a selector. It is only allowed when selecting one field.
func (*AttachedFileSelect) StringX ¶ added in v0.11.8
StringX is like String, but panics if an error occurs.
type AttachedFileUpdate ¶ added in v0.11.8
type AttachedFileUpdate struct {
// contains filtered or unexported fields
}
AttachedFileUpdate is the builder for updating AttachedFile entities.
func (*AttachedFileUpdate) ClearFi ¶ added in v0.11.8
func (afu *AttachedFileUpdate) ClearFi() *AttachedFileUpdate
ClearFi clears the "fi" edge to the File entity.
func (*AttachedFileUpdate) ClearProc ¶ added in v0.11.8
func (afu *AttachedFileUpdate) ClearProc() *AttachedFileUpdate
ClearProc clears the "proc" edge to the Process entity.
func (*AttachedFileUpdate) Exec ¶ added in v0.11.8
func (afu *AttachedFileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachedFileUpdate) ExecX ¶ added in v0.11.8
func (afu *AttachedFileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachedFileUpdate) Mutation ¶ added in v0.11.8
func (afu *AttachedFileUpdate) Mutation() *AttachedFileMutation
Mutation returns the AttachedFileMutation object of the builder.
func (*AttachedFileUpdate) Save ¶ added in v0.11.8
func (afu *AttachedFileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AttachedFileUpdate) SaveX ¶ added in v0.11.8
func (afu *AttachedFileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AttachedFileUpdate) SetAttachTime ¶ added in v0.11.8
func (afu *AttachedFileUpdate) SetAttachTime(t time.Time) *AttachedFileUpdate
SetAttachTime sets the "attach_time" field.
func (*AttachedFileUpdate) SetFID ¶ added in v0.11.8
func (afu *AttachedFileUpdate) SetFID(i int) *AttachedFileUpdate
SetFID sets the "f_id" field.
func (*AttachedFileUpdate) SetFi ¶ added in v0.11.8
func (afu *AttachedFileUpdate) SetFi(f *File) *AttachedFileUpdate
SetFi sets the "fi" edge to the File entity.
func (*AttachedFileUpdate) SetFiID ¶ added in v0.11.8
func (afu *AttachedFileUpdate) SetFiID(id int) *AttachedFileUpdate
SetFiID sets the "fi" edge to the File entity by ID.
func (*AttachedFileUpdate) SetNillableAttachTime ¶ added in v0.11.8
func (afu *AttachedFileUpdate) SetNillableAttachTime(t *time.Time) *AttachedFileUpdate
SetNillableAttachTime sets the "attach_time" field if the given value is not nil.
func (*AttachedFileUpdate) SetProc ¶ added in v0.11.8
func (afu *AttachedFileUpdate) SetProc(p *Process) *AttachedFileUpdate
SetProc sets the "proc" edge to the Process entity.
func (*AttachedFileUpdate) SetProcID ¶ added in v0.11.8
func (afu *AttachedFileUpdate) SetProcID(i int) *AttachedFileUpdate
SetProcID sets the "proc_id" field.
func (*AttachedFileUpdate) Where ¶ added in v0.11.8
func (afu *AttachedFileUpdate) Where(ps ...predicate.AttachedFile) *AttachedFileUpdate
Where appends a list predicates to the AttachedFileUpdate builder.
type AttachedFileUpdateOne ¶ added in v0.11.8
type AttachedFileUpdateOne struct {
// contains filtered or unexported fields
}
AttachedFileUpdateOne is the builder for updating a single AttachedFile entity.
func (*AttachedFileUpdateOne) ClearFi ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) ClearFi() *AttachedFileUpdateOne
ClearFi clears the "fi" edge to the File entity.
func (*AttachedFileUpdateOne) ClearProc ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) ClearProc() *AttachedFileUpdateOne
ClearProc clears the "proc" edge to the Process entity.
func (*AttachedFileUpdateOne) Exec ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AttachedFileUpdateOne) ExecX ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachedFileUpdateOne) Mutation ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) Mutation() *AttachedFileMutation
Mutation returns the AttachedFileMutation object of the builder.
func (*AttachedFileUpdateOne) Save ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) Save(ctx context.Context) (*AttachedFile, error)
Save executes the query and returns the updated AttachedFile entity.
func (*AttachedFileUpdateOne) SaveX ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) SaveX(ctx context.Context) *AttachedFile
SaveX is like Save, but panics if an error occurs.
func (*AttachedFileUpdateOne) Select ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) Select(field string, fields ...string) *AttachedFileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AttachedFileUpdateOne) SetAttachTime ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) SetAttachTime(t time.Time) *AttachedFileUpdateOne
SetAttachTime sets the "attach_time" field.
func (*AttachedFileUpdateOne) SetFID ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) SetFID(i int) *AttachedFileUpdateOne
SetFID sets the "f_id" field.
func (*AttachedFileUpdateOne) SetFi ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) SetFi(f *File) *AttachedFileUpdateOne
SetFi sets the "fi" edge to the File entity.
func (*AttachedFileUpdateOne) SetFiID ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) SetFiID(id int) *AttachedFileUpdateOne
SetFiID sets the "fi" edge to the File entity by ID.
func (*AttachedFileUpdateOne) SetNillableAttachTime ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) SetNillableAttachTime(t *time.Time) *AttachedFileUpdateOne
SetNillableAttachTime sets the "attach_time" field if the given value is not nil.
func (*AttachedFileUpdateOne) SetProc ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) SetProc(p *Process) *AttachedFileUpdateOne
SetProc sets the "proc" edge to the Process entity.
func (*AttachedFileUpdateOne) SetProcID ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) SetProcID(i int) *AttachedFileUpdateOne
SetProcID sets the "proc_id" field.
func (*AttachedFileUpdateOne) Where ¶ added in v0.11.8
func (afuo *AttachedFileUpdateOne) Where(ps ...predicate.AttachedFile) *AttachedFileUpdateOne
Where appends a list predicates to the AttachedFileUpdate builder.
type AttachedFileUpsert ¶ added in v0.11.8
AttachedFileUpsert is the "OnConflict" setter.
func (*AttachedFileUpsert) SetAttachTime ¶ added in v0.11.8
func (u *AttachedFileUpsert) SetAttachTime(v time.Time) *AttachedFileUpsert
SetAttachTime sets the "attach_time" field.
func (*AttachedFileUpsert) SetFID ¶ added in v0.11.8
func (u *AttachedFileUpsert) SetFID(v int) *AttachedFileUpsert
SetFID sets the "f_id" field.
func (*AttachedFileUpsert) SetProcID ¶ added in v0.11.8
func (u *AttachedFileUpsert) SetProcID(v int) *AttachedFileUpsert
SetProcID sets the "proc_id" field.
func (*AttachedFileUpsert) UpdateAttachTime ¶ added in v0.11.8
func (u *AttachedFileUpsert) UpdateAttachTime() *AttachedFileUpsert
UpdateAttachTime sets the "attach_time" field to the value that was provided on create.
func (*AttachedFileUpsert) UpdateFID ¶ added in v0.11.8
func (u *AttachedFileUpsert) UpdateFID() *AttachedFileUpsert
UpdateFID sets the "f_id" field to the value that was provided on create.
func (*AttachedFileUpsert) UpdateProcID ¶ added in v0.11.8
func (u *AttachedFileUpsert) UpdateProcID() *AttachedFileUpsert
UpdateProcID sets the "proc_id" field to the value that was provided on create.
type AttachedFileUpsertBulk ¶ added in v0.11.8
type AttachedFileUpsertBulk struct {
// contains filtered or unexported fields
}
AttachedFileUpsertBulk is the builder for "upsert"-ing a bulk of AttachedFile nodes.
func (*AttachedFileUpsertBulk) DoNothing ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) DoNothing() *AttachedFileUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AttachedFileUpsertBulk) Exec ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachedFileUpsertBulk) ExecX ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachedFileUpsertBulk) Ignore ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) Ignore() *AttachedFileUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.AttachedFile.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AttachedFileUpsertBulk) SetAttachTime ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) SetAttachTime(v time.Time) *AttachedFileUpsertBulk
SetAttachTime sets the "attach_time" field.
func (*AttachedFileUpsertBulk) SetFID ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) SetFID(v int) *AttachedFileUpsertBulk
SetFID sets the "f_id" field.
func (*AttachedFileUpsertBulk) SetProcID ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) SetProcID(v int) *AttachedFileUpsertBulk
SetProcID sets the "proc_id" field.
func (*AttachedFileUpsertBulk) Update ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) Update(set func(*AttachedFileUpsert)) *AttachedFileUpsertBulk
Update allows overriding fields `UPDATE` values. See the AttachedFileCreateBulk.OnConflict documentation for more info.
func (*AttachedFileUpsertBulk) UpdateAttachTime ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) UpdateAttachTime() *AttachedFileUpsertBulk
UpdateAttachTime sets the "attach_time" field to the value that was provided on create.
func (*AttachedFileUpsertBulk) UpdateFID ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) UpdateFID() *AttachedFileUpsertBulk
UpdateFID sets the "f_id" field to the value that was provided on create.
func (*AttachedFileUpsertBulk) UpdateNewValues ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) UpdateNewValues() *AttachedFileUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.AttachedFile.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AttachedFileUpsertBulk) UpdateProcID ¶ added in v0.11.8
func (u *AttachedFileUpsertBulk) UpdateProcID() *AttachedFileUpsertBulk
UpdateProcID sets the "proc_id" field to the value that was provided on create.
type AttachedFileUpsertOne ¶ added in v0.11.8
type AttachedFileUpsertOne struct {
// contains filtered or unexported fields
}
AttachedFileUpsertOne is the builder for "upsert"-ing
one AttachedFile node.
func (*AttachedFileUpsertOne) DoNothing ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) DoNothing() *AttachedFileUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AttachedFileUpsertOne) Exec ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AttachedFileUpsertOne) ExecX ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AttachedFileUpsertOne) ID ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*AttachedFileUpsertOne) IDX ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*AttachedFileUpsertOne) Ignore ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) Ignore() *AttachedFileUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.AttachedFile.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AttachedFileUpsertOne) SetAttachTime ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) SetAttachTime(v time.Time) *AttachedFileUpsertOne
SetAttachTime sets the "attach_time" field.
func (*AttachedFileUpsertOne) SetFID ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) SetFID(v int) *AttachedFileUpsertOne
SetFID sets the "f_id" field.
func (*AttachedFileUpsertOne) SetProcID ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) SetProcID(v int) *AttachedFileUpsertOne
SetProcID sets the "proc_id" field.
func (*AttachedFileUpsertOne) Update ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) Update(set func(*AttachedFileUpsert)) *AttachedFileUpsertOne
Update allows overriding fields `UPDATE` values. See the AttachedFileCreate.OnConflict documentation for more info.
func (*AttachedFileUpsertOne) UpdateAttachTime ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) UpdateAttachTime() *AttachedFileUpsertOne
UpdateAttachTime sets the "attach_time" field to the value that was provided on create.
func (*AttachedFileUpsertOne) UpdateFID ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) UpdateFID() *AttachedFileUpsertOne
UpdateFID sets the "f_id" field to the value that was provided on create.
func (*AttachedFileUpsertOne) UpdateNewValues ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) UpdateNewValues() *AttachedFileUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.AttachedFile.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AttachedFileUpsertOne) UpdateProcID ¶ added in v0.11.8
func (u *AttachedFileUpsertOne) UpdateProcID() *AttachedFileUpsertOne
UpdateProcID sets the "proc_id" field to the value that was provided on create.
type AttachedFiles ¶ added in v0.11.8
type AttachedFiles []*AttachedFile
AttachedFiles is a parsable slice of AttachedFile.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // AttachedFile is the client for interacting with the AttachedFile builders. AttachedFile *AttachedFileClient // File is the client for interacting with the File builders. File *FileClient // Friendship is the client for interacting with the Friendship builders. Friendship *FriendshipClient // Group is the client for interacting with the Group builders. Group *GroupClient // GroupTag is the client for interacting with the GroupTag builders. GroupTag *GroupTagClient // Process is the client for interacting with the Process builders. Process *ProcessClient // Relationship is the client for interacting with the Relationship builders. Relationship *RelationshipClient // RelationshipInfo is the client for interacting with the RelationshipInfo builders. RelationshipInfo *RelationshipInfoClient // Role is the client for interacting with the Role builders. Role *RoleClient // RoleUser is the client for interacting with the RoleUser builders. RoleUser *RoleUserClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // Tweet is the client for interacting with the Tweet builders. Tweet *TweetClient // TweetLike is the client for interacting with the TweetLike builders. TweetLike *TweetLikeClient // TweetTag is the client for interacting with the TweetTag builders. TweetTag *TweetTagClient // User is the client for interacting with the User builders. User *UserClient // UserGroup is the client for interacting with the UserGroup builders. UserGroup *UserGroupClient // UserTweet is the client for interacting with the UserTweet builders. UserTweet *UserTweetClient // 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(). AttachedFile. Query(). Count(ctx)
func (*Client) Intercept ¶ added in v0.11.5
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type File ¶ added in v0.11.8
type File struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FileQuery when eager-loading is set. Edges FileEdges `json:"edges"` // contains filtered or unexported fields }
File is the model entity for the File schema.
func (*File) QueryProcesses ¶ added in v0.11.8
func (f *File) QueryProcesses() *ProcessQuery
QueryProcesses queries the "processes" edge of the File entity.
func (*File) Unwrap ¶ added in v0.11.8
Unwrap unwraps the File 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 (*File) Update ¶ added in v0.11.8
func (f *File) Update() *FileUpdateOne
Update returns a builder for updating this File. Note that you need to call File.Unwrap() before calling this method if this File was returned from a transaction, and the transaction was committed or rolled back.
type FileClient ¶ added in v0.11.8
type FileClient struct {
// contains filtered or unexported fields
}
FileClient is a client for the File schema.
func NewFileClient ¶ added in v0.11.8
func NewFileClient(c config) *FileClient
NewFileClient returns a client for the File from the given config.
func (*FileClient) Create ¶ added in v0.11.8
func (c *FileClient) Create() *FileCreate
Create returns a builder for creating a File entity.
func (*FileClient) CreateBulk ¶ added in v0.11.8
func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
CreateBulk returns a builder for creating a bulk of File entities.
func (*FileClient) Delete ¶ added in v0.11.8
func (c *FileClient) Delete() *FileDelete
Delete returns a delete builder for File.
func (*FileClient) DeleteOne ¶ added in v0.11.8
func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FileClient) DeleteOneID ¶ added in v0.11.8
func (c *FileClient) DeleteOneID(id int) *FileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FileClient) GetX ¶ added in v0.11.8
func (c *FileClient) GetX(ctx context.Context, id int) *File
GetX is like Get, but panics if an error occurs.
func (*FileClient) Hooks ¶ added in v0.11.8
func (c *FileClient) Hooks() []Hook
Hooks returns the client hooks.
func (*FileClient) Intercept ¶ added in v0.11.8
func (c *FileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `file.Intercept(f(g(h())))`.
func (*FileClient) Interceptors ¶ added in v0.11.8
func (c *FileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FileClient) Query ¶ added in v0.11.8
func (c *FileClient) Query() *FileQuery
Query returns a query builder for File.
func (*FileClient) QueryProcesses ¶ added in v0.11.8
func (c *FileClient) QueryProcesses(f *File) *ProcessQuery
QueryProcesses queries the processes edge of a File.
func (*FileClient) Update ¶ added in v0.11.8
func (c *FileClient) Update() *FileUpdate
Update returns an update builder for File.
func (*FileClient) UpdateOne ¶ added in v0.11.8
func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FileClient) UpdateOneID ¶ added in v0.11.8
func (c *FileClient) UpdateOneID(id int) *FileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FileClient) Use ¶ added in v0.11.8
func (c *FileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `file.Hooks(f(g(h())))`.
type FileCreate ¶ added in v0.11.8
type FileCreate struct {
// contains filtered or unexported fields
}
FileCreate is the builder for creating a File entity.
func (*FileCreate) AddProcessIDs ¶ added in v0.11.8
func (fc *FileCreate) AddProcessIDs(ids ...int) *FileCreate
AddProcessIDs adds the "processes" edge to the Process entity by IDs.
func (*FileCreate) AddProcesses ¶ added in v0.11.8
func (fc *FileCreate) AddProcesses(p ...*Process) *FileCreate
AddProcesses adds the "processes" edges to the Process entity.
func (*FileCreate) Exec ¶ added in v0.11.8
func (fc *FileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreate) ExecX ¶ added in v0.11.8
func (fc *FileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreate) Mutation ¶ added in v0.11.8
func (fc *FileCreate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileCreate) OnConflict ¶ added in v0.11.8
func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.File.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.FileUpsert) { SetName(v+v). }). Exec(ctx)
func (*FileCreate) OnConflictColumns ¶ added in v0.11.8
func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FileCreate) Save ¶ added in v0.11.8
func (fc *FileCreate) Save(ctx context.Context) (*File, error)
Save creates the File in the database.
func (*FileCreate) SaveX ¶ added in v0.11.8
func (fc *FileCreate) SaveX(ctx context.Context) *File
SaveX calls Save and panics if Save returns an error.
func (*FileCreate) SetName ¶ added in v0.11.8
func (fc *FileCreate) SetName(s string) *FileCreate
SetName sets the "name" field.
type FileCreateBulk ¶ added in v0.11.8
type FileCreateBulk struct {
// contains filtered or unexported fields
}
FileCreateBulk is the builder for creating many File entities in bulk.
func (*FileCreateBulk) Exec ¶ added in v0.11.8
func (fcb *FileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreateBulk) ExecX ¶ added in v0.11.8
func (fcb *FileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreateBulk) OnConflict ¶ added in v0.11.8
func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.File.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.FileUpsert) { SetName(v+v). }). Exec(ctx)
func (*FileCreateBulk) OnConflictColumns ¶ added in v0.11.8
func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type FileDelete ¶ added in v0.11.8
type FileDelete struct {
// contains filtered or unexported fields
}
FileDelete is the builder for deleting a File entity.
func (*FileDelete) Exec ¶ added in v0.11.8
func (fd *FileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FileDelete) ExecX ¶ added in v0.11.8
func (fd *FileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FileDelete) Where ¶ added in v0.11.8
func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete
Where appends a list predicates to the FileDelete builder.
type FileDeleteOne ¶ added in v0.11.8
type FileDeleteOne struct {
// contains filtered or unexported fields
}
FileDeleteOne is the builder for deleting a single File entity.
func (*FileDeleteOne) Exec ¶ added in v0.11.8
func (fdo *FileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FileDeleteOne) ExecX ¶ added in v0.11.8
func (fdo *FileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileDeleteOne) Where ¶ added in v0.11.8
func (fdo *FileDeleteOne) Where(ps ...predicate.File) *FileDeleteOne
Where appends a list predicates to the FileDelete builder.
type FileEdges ¶ added in v0.11.8
type FileEdges struct { // Processes holds the value of the processes edge. Processes []*Process `json:"processes,omitempty"` // contains filtered or unexported fields }
FileEdges holds the relations/edges for other nodes in the graph.
func (FileEdges) ProcessesOrErr ¶ added in v0.11.8
ProcessesOrErr returns the Processes value or an error if the edge was not loaded in eager-loading.
type FileFilter ¶ added in v0.11.8
type FileFilter struct {
// contains filtered or unexported fields
}
FileFilter provides a generic filtering capability at runtime for FileQuery.
func (*FileFilter) Where ¶ added in v0.11.8
func (f *FileFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*FileFilter) WhereHasProcesses ¶ added in v0.11.8
func (f *FileFilter) WhereHasProcesses()
WhereHasProcesses applies a predicate to check if query has an edge processes.
func (*FileFilter) WhereHasProcessesWith ¶ added in v0.11.8
func (f *FileFilter) WhereHasProcessesWith(preds ...predicate.Process)
WhereHasProcessesWith applies a predicate to check if query has an edge processes with a given conditions (other predicates).
func (*FileFilter) WhereID ¶ added in v0.11.8
func (f *FileFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*FileFilter) WhereName ¶ added in v0.11.8
func (f *FileFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
type FileGroupBy ¶ added in v0.11.8
type FileGroupBy struct {
// contains filtered or unexported fields
}
FileGroupBy is the group-by builder for File entities.
func (*FileGroupBy) Aggregate ¶ added in v0.11.8
func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FileGroupBy) Bool ¶ added in v0.11.8
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Bools ¶ added in v0.11.8
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64 ¶ added in v0.11.8
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64X ¶ added in v0.11.8
Float64X is like Float64, but panics if an error occurs.
func (*FileGroupBy) Float64s ¶ added in v0.11.8
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64sX ¶ added in v0.11.8
Float64sX is like Float64s, but panics if an error occurs.
func (*FileGroupBy) Int ¶ added in v0.11.8
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Ints ¶ added in v0.11.8
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Scan ¶ added in v0.11.8
func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileGroupBy) String ¶ added in v0.11.8
String returns a single string from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) StringX ¶ added in v0.11.8
StringX is like String, but panics if an error occurs.
type FileMutation ¶ added in v0.11.8
type FileMutation struct {
// contains filtered or unexported fields
}
FileMutation represents an operation that mutates the File nodes in the graph.
func (*FileMutation) AddField ¶ added in v0.11.8
func (m *FileMutation) 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 (*FileMutation) AddProcessIDs ¶ added in v0.11.8
func (m *FileMutation) AddProcessIDs(ids ...int)
AddProcessIDs adds the "processes" edge to the Process entity by ids.
func (*FileMutation) AddedEdges ¶ added in v0.11.8
func (m *FileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FileMutation) AddedField ¶ added in v0.11.8
func (m *FileMutation) 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 (*FileMutation) AddedFields ¶ added in v0.11.8
func (m *FileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FileMutation) AddedIDs ¶ added in v0.11.8
func (m *FileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FileMutation) ClearEdge ¶ added in v0.11.8
func (m *FileMutation) 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 (*FileMutation) ClearField ¶ added in v0.11.8
func (m *FileMutation) 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 (*FileMutation) ClearProcesses ¶ added in v0.11.8
func (m *FileMutation) ClearProcesses()
ClearProcesses clears the "processes" edge to the Process entity.
func (*FileMutation) ClearedEdges ¶ added in v0.11.8
func (m *FileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FileMutation) ClearedFields ¶ added in v0.11.8
func (m *FileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FileMutation) Client ¶ added in v0.11.8
func (m FileMutation) 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 (*FileMutation) EdgeCleared ¶ added in v0.11.8
func (m *FileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FileMutation) Field ¶ added in v0.11.8
func (m *FileMutation) 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 (*FileMutation) FieldCleared ¶ added in v0.11.8
func (m *FileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FileMutation) Fields ¶ added in v0.11.8
func (m *FileMutation) 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 (*FileMutation) Filter ¶ added in v0.11.8
func (m *FileMutation) Filter() *FileFilter
Filter returns an entql.Where implementation to apply filters on the FileMutation builder.
func (*FileMutation) ID ¶ added in v0.11.8
func (m *FileMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*FileMutation) IDs ¶ added in v0.11.8
func (m *FileMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*FileMutation) Name ¶ added in v0.11.8
func (m *FileMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*FileMutation) OldField ¶ added in v0.11.8
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 (*FileMutation) OldName ¶ added in v0.11.8
func (m *FileMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FileMutation) Op ¶ added in v0.11.8
func (m *FileMutation) Op() Op
Op returns the operation name.
func (*FileMutation) ProcessesCleared ¶ added in v0.11.8
func (m *FileMutation) ProcessesCleared() bool
ProcessesCleared reports if the "processes" edge to the Process entity was cleared.
func (*FileMutation) ProcessesIDs ¶ added in v0.11.8
func (m *FileMutation) ProcessesIDs() (ids []int)
ProcessesIDs returns the "processes" edge IDs in the mutation.
func (*FileMutation) RemoveProcessIDs ¶ added in v0.11.8
func (m *FileMutation) RemoveProcessIDs(ids ...int)
RemoveProcessIDs removes the "processes" edge to the Process entity by IDs.
func (*FileMutation) RemovedEdges ¶ added in v0.11.8
func (m *FileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FileMutation) RemovedIDs ¶ added in v0.11.8
func (m *FileMutation) 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 (*FileMutation) RemovedProcessesIDs ¶ added in v0.11.8
func (m *FileMutation) RemovedProcessesIDs() (ids []int)
RemovedProcesses returns the removed IDs of the "processes" edge to the Process entity.
func (*FileMutation) ResetEdge ¶ added in v0.11.8
func (m *FileMutation) 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 (*FileMutation) ResetField ¶ added in v0.11.8
func (m *FileMutation) 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 (*FileMutation) ResetName ¶ added in v0.11.8
func (m *FileMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*FileMutation) ResetProcesses ¶ added in v0.11.8
func (m *FileMutation) ResetProcesses()
ResetProcesses resets all changes to the "processes" edge.
func (*FileMutation) SetField ¶ added in v0.11.8
func (m *FileMutation) 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 (*FileMutation) SetName ¶ added in v0.11.8
func (m *FileMutation) SetName(s string)
SetName sets the "name" field.
func (*FileMutation) SetOp ¶ added in v0.11.8
func (m *FileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (FileMutation) Tx ¶ added in v0.11.8
func (m FileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FileMutation) Type ¶ added in v0.11.8
func (m *FileMutation) Type() string
Type returns the node type of this mutation (File).
func (*FileMutation) Where ¶ added in v0.11.8
func (m *FileMutation) Where(ps ...predicate.File)
Where appends a list predicates to the FileMutation builder.
func (*FileMutation) WhereP ¶ added in v0.11.8
func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FileQuery ¶ added in v0.11.8
type FileQuery struct {
// contains filtered or unexported fields
}
FileQuery is the builder for querying File entities.
func (*FileQuery) Aggregate ¶ added in v0.11.8
func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate returns a FileSelect configured with the given aggregations.
func (*FileQuery) Clone ¶ added in v0.11.8
Clone returns a duplicate of the FileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FileQuery) Exist ¶ added in v0.11.8
Exist returns true if the query has elements in the graph.
func (*FileQuery) Filter ¶ added in v0.11.8
func (fq *FileQuery) Filter() *FileFilter
Filter returns a Filter implementation to apply filters on the FileQuery builder.
func (*FileQuery) First ¶ added in v0.11.8
First returns the first File entity from the query. Returns a *NotFoundError when no File was found.
func (*FileQuery) FirstID ¶ added in v0.11.8
FirstID returns the first File ID from the query. Returns a *NotFoundError when no File ID was found.
func (*FileQuery) FirstIDX ¶ added in v0.11.8
FirstIDX is like FirstID, but panics if an error occurs.
func (*FileQuery) GroupBy ¶ added in v0.11.8
func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.File.Query(). GroupBy(file.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FileQuery) Limit ¶ added in v0.11.8
Limit the number of records to be returned by this query.
func (*FileQuery) Only ¶ added in v0.11.8
Only returns a single File entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one File entity is found. Returns a *NotFoundError when no File entities are found.
func (*FileQuery) OnlyID ¶ added in v0.11.8
OnlyID is like Only, but returns the only File ID in the query. Returns a *NotSingularError when more than one File ID is found. Returns a *NotFoundError when no entities are found.
func (*FileQuery) QueryProcesses ¶ added in v0.11.8
func (fq *FileQuery) QueryProcesses() *ProcessQuery
QueryProcesses chains the current query on the "processes" edge.
func (*FileQuery) Select ¶ added in v0.11.8
func (fq *FileQuery) Select(fields ...string) *FileSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.File.Query(). Select(file.FieldName). Scan(ctx, &v)
func (*FileQuery) Unique ¶ added in v0.11.8
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 (*FileQuery) WithProcesses ¶ added in v0.11.8
func (fq *FileQuery) WithProcesses(opts ...func(*ProcessQuery)) *FileQuery
WithProcesses tells the query-builder to eager-load the nodes that are connected to the "processes" edge. The optional arguments are used to configure the query builder of the edge.
type FileSelect ¶ added in v0.11.8
type FileSelect struct { *FileQuery // contains filtered or unexported fields }
FileSelect is the builder for selecting fields of File entities.
func (*FileSelect) Aggregate ¶ added in v0.11.8
func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FileSelect) Bool ¶ added in v0.11.8
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileSelect) Bools ¶ added in v0.11.8
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64 ¶ added in v0.11.8
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64X ¶ added in v0.11.8
Float64X is like Float64, but panics if an error occurs.
func (*FileSelect) Float64s ¶ added in v0.11.8
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64sX ¶ added in v0.11.8
Float64sX is like Float64s, but panics if an error occurs.
func (*FileSelect) Int ¶ added in v0.11.8
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileSelect) Ints ¶ added in v0.11.8
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileSelect) Scan ¶ added in v0.11.8
func (fs *FileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileSelect) String ¶ added in v0.11.8
String returns a single string from a selector. It is only allowed when selecting one field.
func (*FileSelect) StringX ¶ added in v0.11.8
StringX is like String, but panics if an error occurs.
type FileUpdate ¶ added in v0.11.8
type FileUpdate struct {
// contains filtered or unexported fields
}
FileUpdate is the builder for updating File entities.
func (*FileUpdate) AddProcessIDs ¶ added in v0.11.8
func (fu *FileUpdate) AddProcessIDs(ids ...int) *FileUpdate
AddProcessIDs adds the "processes" edge to the Process entity by IDs.
func (*FileUpdate) AddProcesses ¶ added in v0.11.8
func (fu *FileUpdate) AddProcesses(p ...*Process) *FileUpdate
AddProcesses adds the "processes" edges to the Process entity.
func (*FileUpdate) ClearProcesses ¶ added in v0.11.8
func (fu *FileUpdate) ClearProcesses() *FileUpdate
ClearProcesses clears all "processes" edges to the Process entity.
func (*FileUpdate) Exec ¶ added in v0.11.8
func (fu *FileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpdate) ExecX ¶ added in v0.11.8
func (fu *FileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdate) Mutation ¶ added in v0.11.8
func (fu *FileUpdate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdate) RemoveProcessIDs ¶ added in v0.11.8
func (fu *FileUpdate) RemoveProcessIDs(ids ...int) *FileUpdate
RemoveProcessIDs removes the "processes" edge to Process entities by IDs.
func (*FileUpdate) RemoveProcesses ¶ added in v0.11.8
func (fu *FileUpdate) RemoveProcesses(p ...*Process) *FileUpdate
RemoveProcesses removes "processes" edges to Process entities.
func (*FileUpdate) Save ¶ added in v0.11.8
func (fu *FileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FileUpdate) SaveX ¶ added in v0.11.8
func (fu *FileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FileUpdate) SetName ¶ added in v0.11.8
func (fu *FileUpdate) SetName(s string) *FileUpdate
SetName sets the "name" field.
func (*FileUpdate) Where ¶ added in v0.11.8
func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
Where appends a list predicates to the FileUpdate builder.
type FileUpdateOne ¶ added in v0.11.8
type FileUpdateOne struct {
// contains filtered or unexported fields
}
FileUpdateOne is the builder for updating a single File entity.
func (*FileUpdateOne) AddProcessIDs ¶ added in v0.11.8
func (fuo *FileUpdateOne) AddProcessIDs(ids ...int) *FileUpdateOne
AddProcessIDs adds the "processes" edge to the Process entity by IDs.
func (*FileUpdateOne) AddProcesses ¶ added in v0.11.8
func (fuo *FileUpdateOne) AddProcesses(p ...*Process) *FileUpdateOne
AddProcesses adds the "processes" edges to the Process entity.
func (*FileUpdateOne) ClearProcesses ¶ added in v0.11.8
func (fuo *FileUpdateOne) ClearProcesses() *FileUpdateOne
ClearProcesses clears all "processes" edges to the Process entity.
func (*FileUpdateOne) Exec ¶ added in v0.11.8
func (fuo *FileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FileUpdateOne) ExecX ¶ added in v0.11.8
func (fuo *FileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdateOne) Mutation ¶ added in v0.11.8
func (fuo *FileUpdateOne) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdateOne) RemoveProcessIDs ¶ added in v0.11.8
func (fuo *FileUpdateOne) RemoveProcessIDs(ids ...int) *FileUpdateOne
RemoveProcessIDs removes the "processes" edge to Process entities by IDs.
func (*FileUpdateOne) RemoveProcesses ¶ added in v0.11.8
func (fuo *FileUpdateOne) RemoveProcesses(p ...*Process) *FileUpdateOne
RemoveProcesses removes "processes" edges to Process entities.
func (*FileUpdateOne) Save ¶ added in v0.11.8
func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
Save executes the query and returns the updated File entity.
func (*FileUpdateOne) SaveX ¶ added in v0.11.8
func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
SaveX is like Save, but panics if an error occurs.
func (*FileUpdateOne) Select ¶ added in v0.11.8
func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FileUpdateOne) SetName ¶ added in v0.11.8
func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
SetName sets the "name" field.
func (*FileUpdateOne) Where ¶ added in v0.11.8
func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
Where appends a list predicates to the FileUpdate builder.
type FileUpsert ¶ added in v0.11.8
FileUpsert is the "OnConflict" setter.
func (*FileUpsert) SetName ¶ added in v0.11.8
func (u *FileUpsert) SetName(v string) *FileUpsert
SetName sets the "name" field.
func (*FileUpsert) UpdateName ¶ added in v0.11.8
func (u *FileUpsert) UpdateName() *FileUpsert
UpdateName sets the "name" field to the value that was provided on create.
type FileUpsertBulk ¶ added in v0.11.8
type FileUpsertBulk struct {
// contains filtered or unexported fields
}
FileUpsertBulk is the builder for "upsert"-ing a bulk of File nodes.
func (*FileUpsertBulk) DoNothing ¶ added in v0.11.8
func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FileUpsertBulk) Exec ¶ added in v0.11.8
func (u *FileUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpsertBulk) ExecX ¶ added in v0.11.8
func (u *FileUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpsertBulk) Ignore ¶ added in v0.11.8
func (u *FileUpsertBulk) Ignore() *FileUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FileUpsertBulk) SetName ¶ added in v0.11.8
func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk
SetName sets the "name" field.
func (*FileUpsertBulk) Update ¶ added in v0.11.8
func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk
Update allows overriding fields `UPDATE` values. See the FileCreateBulk.OnConflict documentation for more info.
func (*FileUpsertBulk) UpdateName ¶ added in v0.11.8
func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateNewValues ¶ added in v0.11.8
func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.File.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type FileUpsertOne ¶ added in v0.11.8
type FileUpsertOne struct {
// contains filtered or unexported fields
}
FileUpsertOne is the builder for "upsert"-ing
one File node.
func (*FileUpsertOne) DoNothing ¶ added in v0.11.8
func (u *FileUpsertOne) DoNothing() *FileUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FileUpsertOne) Exec ¶ added in v0.11.8
func (u *FileUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpsertOne) ExecX ¶ added in v0.11.8
func (u *FileUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpsertOne) ID ¶ added in v0.11.8
func (u *FileUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*FileUpsertOne) IDX ¶ added in v0.11.8
func (u *FileUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*FileUpsertOne) Ignore ¶ added in v0.11.8
func (u *FileUpsertOne) Ignore() *FileUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FileUpsertOne) SetName ¶ added in v0.11.8
func (u *FileUpsertOne) SetName(v string) *FileUpsertOne
SetName sets the "name" field.
func (*FileUpsertOne) Update ¶ added in v0.11.8
func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne
Update allows overriding fields `UPDATE` values. See the FileCreate.OnConflict documentation for more info.
func (*FileUpsertOne) UpdateName ¶ added in v0.11.8
func (u *FileUpsertOne) UpdateName() *FileUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsertOne) UpdateNewValues ¶ added in v0.11.8
func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.File.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type Friendship ¶
type Friendship struct { // ID of the ent. ID int `json:"id,omitempty"` // Weight holds the value of the "weight" field. Weight int `json:"weight,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UserID holds the value of the "user_id" field. UserID int `json:"user_id,omitempty"` // FriendID holds the value of the "friend_id" field. FriendID int `json:"friend_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FriendshipQuery when eager-loading is set. Edges FriendshipEdges `json:"edges"` // contains filtered or unexported fields }
Friendship is the model entity for the Friendship schema.
func (*Friendship) QueryFriend ¶
func (f *Friendship) QueryFriend() *UserQuery
QueryFriend queries the "friend" edge of the Friendship entity.
func (*Friendship) QueryUser ¶
func (f *Friendship) QueryUser() *UserQuery
QueryUser queries the "user" edge of the Friendship entity.
func (*Friendship) String ¶
func (f *Friendship) String() string
String implements the fmt.Stringer.
func (*Friendship) Unwrap ¶
func (f *Friendship) Unwrap() *Friendship
Unwrap unwraps the Friendship 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 (*Friendship) Update ¶
func (f *Friendship) Update() *FriendshipUpdateOne
Update returns a builder for updating this Friendship. Note that you need to call Friendship.Unwrap() before calling this method if this Friendship was returned from a transaction, and the transaction was committed or rolled back.
type FriendshipClient ¶
type FriendshipClient struct {
// contains filtered or unexported fields
}
FriendshipClient is a client for the Friendship schema.
func NewFriendshipClient ¶
func NewFriendshipClient(c config) *FriendshipClient
NewFriendshipClient returns a client for the Friendship from the given config.
func (*FriendshipClient) Create ¶
func (c *FriendshipClient) Create() *FriendshipCreate
Create returns a builder for creating a Friendship entity.
func (*FriendshipClient) CreateBulk ¶
func (c *FriendshipClient) CreateBulk(builders ...*FriendshipCreate) *FriendshipCreateBulk
CreateBulk returns a builder for creating a bulk of Friendship entities.
func (*FriendshipClient) Delete ¶
func (c *FriendshipClient) Delete() *FriendshipDelete
Delete returns a delete builder for Friendship.
func (*FriendshipClient) DeleteOne ¶
func (c *FriendshipClient) DeleteOne(f *Friendship) *FriendshipDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FriendshipClient) DeleteOneID ¶
func (c *FriendshipClient) DeleteOneID(id int) *FriendshipDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FriendshipClient) Get ¶
func (c *FriendshipClient) Get(ctx context.Context, id int) (*Friendship, error)
Get returns a Friendship entity by its id.
func (*FriendshipClient) GetX ¶
func (c *FriendshipClient) GetX(ctx context.Context, id int) *Friendship
GetX is like Get, but panics if an error occurs.
func (*FriendshipClient) Hooks ¶
func (c *FriendshipClient) Hooks() []Hook
Hooks returns the client hooks.
func (*FriendshipClient) Intercept ¶ added in v0.11.5
func (c *FriendshipClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `friendship.Intercept(f(g(h())))`.
func (*FriendshipClient) Interceptors ¶ added in v0.11.5
func (c *FriendshipClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FriendshipClient) Query ¶
func (c *FriendshipClient) Query() *FriendshipQuery
Query returns a query builder for Friendship.
func (*FriendshipClient) QueryFriend ¶
func (c *FriendshipClient) QueryFriend(f *Friendship) *UserQuery
QueryFriend queries the friend edge of a Friendship.
func (*FriendshipClient) QueryUser ¶
func (c *FriendshipClient) QueryUser(f *Friendship) *UserQuery
QueryUser queries the user edge of a Friendship.
func (*FriendshipClient) Update ¶
func (c *FriendshipClient) Update() *FriendshipUpdate
Update returns an update builder for Friendship.
func (*FriendshipClient) UpdateOne ¶
func (c *FriendshipClient) UpdateOne(f *Friendship) *FriendshipUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FriendshipClient) UpdateOneID ¶
func (c *FriendshipClient) UpdateOneID(id int) *FriendshipUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FriendshipClient) Use ¶
func (c *FriendshipClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `friendship.Hooks(f(g(h())))`.
type FriendshipCreate ¶
type FriendshipCreate struct {
// contains filtered or unexported fields
}
FriendshipCreate is the builder for creating a Friendship entity.
func (*FriendshipCreate) Exec ¶
func (fc *FriendshipCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendshipCreate) ExecX ¶
func (fc *FriendshipCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipCreate) Mutation ¶
func (fc *FriendshipCreate) Mutation() *FriendshipMutation
Mutation returns the FriendshipMutation object of the builder.
func (*FriendshipCreate) OnConflict ¶
func (fc *FriendshipCreate) OnConflict(opts ...sql.ConflictOption) *FriendshipUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Friendship.Create(). SetWeight(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.FriendshipUpsert) { SetWeight(v+v). }). Exec(ctx)
func (*FriendshipCreate) OnConflictColumns ¶
func (fc *FriendshipCreate) OnConflictColumns(columns ...string) *FriendshipUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Friendship.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FriendshipCreate) Save ¶
func (fc *FriendshipCreate) Save(ctx context.Context) (*Friendship, error)
Save creates the Friendship in the database.
func (*FriendshipCreate) SaveX ¶
func (fc *FriendshipCreate) SaveX(ctx context.Context) *Friendship
SaveX calls Save and panics if Save returns an error.
func (*FriendshipCreate) SetCreatedAt ¶
func (fc *FriendshipCreate) SetCreatedAt(t time.Time) *FriendshipCreate
SetCreatedAt sets the "created_at" field.
func (*FriendshipCreate) SetFriend ¶
func (fc *FriendshipCreate) SetFriend(u *User) *FriendshipCreate
SetFriend sets the "friend" edge to the User entity.
func (*FriendshipCreate) SetFriendID ¶
func (fc *FriendshipCreate) SetFriendID(i int) *FriendshipCreate
SetFriendID sets the "friend_id" field.
func (*FriendshipCreate) SetNillableCreatedAt ¶
func (fc *FriendshipCreate) SetNillableCreatedAt(t *time.Time) *FriendshipCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FriendshipCreate) SetNillableWeight ¶
func (fc *FriendshipCreate) SetNillableWeight(i *int) *FriendshipCreate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*FriendshipCreate) SetUser ¶
func (fc *FriendshipCreate) SetUser(u *User) *FriendshipCreate
SetUser sets the "user" edge to the User entity.
func (*FriendshipCreate) SetUserID ¶
func (fc *FriendshipCreate) SetUserID(i int) *FriendshipCreate
SetUserID sets the "user_id" field.
func (*FriendshipCreate) SetWeight ¶
func (fc *FriendshipCreate) SetWeight(i int) *FriendshipCreate
SetWeight sets the "weight" field.
type FriendshipCreateBulk ¶
type FriendshipCreateBulk struct {
// contains filtered or unexported fields
}
FriendshipCreateBulk is the builder for creating many Friendship entities in bulk.
func (*FriendshipCreateBulk) Exec ¶
func (fcb *FriendshipCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendshipCreateBulk) ExecX ¶
func (fcb *FriendshipCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipCreateBulk) OnConflict ¶
func (fcb *FriendshipCreateBulk) OnConflict(opts ...sql.ConflictOption) *FriendshipUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Friendship.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.FriendshipUpsert) { SetWeight(v+v). }). Exec(ctx)
func (*FriendshipCreateBulk) OnConflictColumns ¶
func (fcb *FriendshipCreateBulk) OnConflictColumns(columns ...string) *FriendshipUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Friendship.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FriendshipCreateBulk) Save ¶
func (fcb *FriendshipCreateBulk) Save(ctx context.Context) ([]*Friendship, error)
Save creates the Friendship entities in the database.
func (*FriendshipCreateBulk) SaveX ¶
func (fcb *FriendshipCreateBulk) SaveX(ctx context.Context) []*Friendship
SaveX is like Save, but panics if an error occurs.
type FriendshipDelete ¶
type FriendshipDelete struct {
// contains filtered or unexported fields
}
FriendshipDelete is the builder for deleting a Friendship entity.
func (*FriendshipDelete) Exec ¶
func (fd *FriendshipDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FriendshipDelete) ExecX ¶
func (fd *FriendshipDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipDelete) Where ¶
func (fd *FriendshipDelete) Where(ps ...predicate.Friendship) *FriendshipDelete
Where appends a list predicates to the FriendshipDelete builder.
type FriendshipDeleteOne ¶
type FriendshipDeleteOne struct {
// contains filtered or unexported fields
}
FriendshipDeleteOne is the builder for deleting a single Friendship entity.
func (*FriendshipDeleteOne) Exec ¶
func (fdo *FriendshipDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FriendshipDeleteOne) ExecX ¶
func (fdo *FriendshipDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipDeleteOne) Where ¶ added in v0.11.7
func (fdo *FriendshipDeleteOne) Where(ps ...predicate.Friendship) *FriendshipDeleteOne
Where appends a list predicates to the FriendshipDelete builder.
type FriendshipEdges ¶
type FriendshipEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Friend holds the value of the friend edge. Friend *User `json:"friend,omitempty"` // contains filtered or unexported fields }
FriendshipEdges holds the relations/edges for other nodes in the graph.
func (FriendshipEdges) FriendOrErr ¶
func (e FriendshipEdges) FriendOrErr() (*User, error)
FriendOrErr returns the Friend value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (FriendshipEdges) UserOrErr ¶
func (e FriendshipEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type FriendshipFilter ¶ added in v0.11.2
type FriendshipFilter struct {
// contains filtered or unexported fields
}
FriendshipFilter provides a generic filtering capability at runtime for FriendshipQuery.
func (*FriendshipFilter) Where ¶ added in v0.11.2
func (f *FriendshipFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*FriendshipFilter) WhereCreatedAt ¶ added in v0.11.2
func (f *FriendshipFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*FriendshipFilter) WhereFriendID ¶ added in v0.11.2
func (f *FriendshipFilter) WhereFriendID(p entql.IntP)
WhereFriendID applies the entql int predicate on the friend_id field.
func (*FriendshipFilter) WhereHasFriend ¶ added in v0.11.2
func (f *FriendshipFilter) WhereHasFriend()
WhereHasFriend applies a predicate to check if query has an edge friend.
func (*FriendshipFilter) WhereHasFriendWith ¶ added in v0.11.2
func (f *FriendshipFilter) WhereHasFriendWith(preds ...predicate.User)
WhereHasFriendWith applies a predicate to check if query has an edge friend with a given conditions (other predicates).
func (*FriendshipFilter) WhereHasUser ¶ added in v0.11.2
func (f *FriendshipFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (*FriendshipFilter) WhereHasUserWith ¶ added in v0.11.2
func (f *FriendshipFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (*FriendshipFilter) WhereID ¶ added in v0.11.2
func (f *FriendshipFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*FriendshipFilter) WhereUserID ¶ added in v0.11.2
func (f *FriendshipFilter) WhereUserID(p entql.IntP)
WhereUserID applies the entql int predicate on the user_id field.
func (*FriendshipFilter) WhereWeight ¶ added in v0.11.2
func (f *FriendshipFilter) WhereWeight(p entql.IntP)
WhereWeight applies the entql int predicate on the weight field.
type FriendshipGroupBy ¶
type FriendshipGroupBy struct {
// contains filtered or unexported fields
}
FriendshipGroupBy is the group-by builder for Friendship entities.
func (*FriendshipGroupBy) Aggregate ¶
func (fgb *FriendshipGroupBy) Aggregate(fns ...AggregateFunc) *FriendshipGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FriendshipGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FriendshipGroupBy) Scan ¶
func (fgb *FriendshipGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FriendshipGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FriendshipMutation ¶
type FriendshipMutation struct {
// contains filtered or unexported fields
}
FriendshipMutation represents an operation that mutates the Friendship nodes in the graph.
func (*FriendshipMutation) AddField ¶
func (m *FriendshipMutation) 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 (*FriendshipMutation) AddWeight ¶
func (m *FriendshipMutation) AddWeight(i int)
AddWeight adds i to the "weight" field.
func (*FriendshipMutation) AddedEdges ¶
func (m *FriendshipMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FriendshipMutation) AddedField ¶
func (m *FriendshipMutation) 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 (*FriendshipMutation) AddedFields ¶
func (m *FriendshipMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FriendshipMutation) AddedIDs ¶
func (m *FriendshipMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FriendshipMutation) AddedWeight ¶
func (m *FriendshipMutation) AddedWeight() (r int, exists bool)
AddedWeight returns the value that was added to the "weight" field in this mutation.
func (*FriendshipMutation) ClearEdge ¶
func (m *FriendshipMutation) 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 (*FriendshipMutation) ClearField ¶
func (m *FriendshipMutation) 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 (*FriendshipMutation) ClearFriend ¶
func (m *FriendshipMutation) ClearFriend()
ClearFriend clears the "friend" edge to the User entity.
func (*FriendshipMutation) ClearUser ¶
func (m *FriendshipMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*FriendshipMutation) ClearedEdges ¶
func (m *FriendshipMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FriendshipMutation) ClearedFields ¶
func (m *FriendshipMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FriendshipMutation) Client ¶
func (m FriendshipMutation) 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 (*FriendshipMutation) CreatedAt ¶
func (m *FriendshipMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FriendshipMutation) EdgeCleared ¶
func (m *FriendshipMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FriendshipMutation) Field ¶
func (m *FriendshipMutation) 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 (*FriendshipMutation) FieldCleared ¶
func (m *FriendshipMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FriendshipMutation) Fields ¶
func (m *FriendshipMutation) 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 (*FriendshipMutation) Filter ¶ added in v0.11.2
func (m *FriendshipMutation) Filter() *FriendshipFilter
Filter returns an entql.Where implementation to apply filters on the FriendshipMutation builder.
func (*FriendshipMutation) FriendCleared ¶
func (m *FriendshipMutation) FriendCleared() bool
FriendCleared reports if the "friend" edge to the User entity was cleared.
func (*FriendshipMutation) FriendID ¶
func (m *FriendshipMutation) FriendID() (r int, exists bool)
FriendID returns the value of the "friend_id" field in the mutation.
func (*FriendshipMutation) FriendIDs ¶
func (m *FriendshipMutation) FriendIDs() (ids []int)
FriendIDs returns the "friend" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FriendID instead. It exists only for internal usage by the builders.
func (*FriendshipMutation) ID ¶
func (m *FriendshipMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*FriendshipMutation) IDs ¶
func (m *FriendshipMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*FriendshipMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Friendship entity. If the Friendship object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FriendshipMutation) 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 (*FriendshipMutation) OldFriendID ¶
func (m *FriendshipMutation) OldFriendID(ctx context.Context) (v int, err error)
OldFriendID returns the old "friend_id" field's value of the Friendship entity. If the Friendship object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FriendshipMutation) OldUserID ¶
func (m *FriendshipMutation) OldUserID(ctx context.Context) (v int, err error)
OldUserID returns the old "user_id" field's value of the Friendship entity. If the Friendship object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FriendshipMutation) OldWeight ¶
func (m *FriendshipMutation) OldWeight(ctx context.Context) (v int, err error)
OldWeight returns the old "weight" field's value of the Friendship entity. If the Friendship object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FriendshipMutation) RemovedEdges ¶
func (m *FriendshipMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FriendshipMutation) RemovedIDs ¶
func (m *FriendshipMutation) 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 (*FriendshipMutation) ResetCreatedAt ¶
func (m *FriendshipMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FriendshipMutation) ResetEdge ¶
func (m *FriendshipMutation) 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 (*FriendshipMutation) ResetField ¶
func (m *FriendshipMutation) 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 (*FriendshipMutation) ResetFriend ¶
func (m *FriendshipMutation) ResetFriend()
ResetFriend resets all changes to the "friend" edge.
func (*FriendshipMutation) ResetFriendID ¶
func (m *FriendshipMutation) ResetFriendID()
ResetFriendID resets all changes to the "friend_id" field.
func (*FriendshipMutation) ResetUser ¶
func (m *FriendshipMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*FriendshipMutation) ResetUserID ¶
func (m *FriendshipMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*FriendshipMutation) ResetWeight ¶
func (m *FriendshipMutation) ResetWeight()
ResetWeight resets all changes to the "weight" field.
func (*FriendshipMutation) SetCreatedAt ¶
func (m *FriendshipMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FriendshipMutation) SetField ¶
func (m *FriendshipMutation) 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 (*FriendshipMutation) SetFriendID ¶
func (m *FriendshipMutation) SetFriendID(i int)
SetFriendID sets the "friend_id" field.
func (*FriendshipMutation) SetOp ¶ added in v0.11.5
func (m *FriendshipMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FriendshipMutation) SetUserID ¶
func (m *FriendshipMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (*FriendshipMutation) SetWeight ¶
func (m *FriendshipMutation) SetWeight(i int)
SetWeight sets the "weight" field.
func (FriendshipMutation) Tx ¶
func (m FriendshipMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FriendshipMutation) Type ¶
func (m *FriendshipMutation) Type() string
Type returns the node type of this mutation (Friendship).
func (*FriendshipMutation) UserCleared ¶
func (m *FriendshipMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*FriendshipMutation) UserID ¶
func (m *FriendshipMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*FriendshipMutation) UserIDs ¶
func (m *FriendshipMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*FriendshipMutation) Weight ¶
func (m *FriendshipMutation) Weight() (r int, exists bool)
Weight returns the value of the "weight" field in the mutation.
func (*FriendshipMutation) Where ¶
func (m *FriendshipMutation) Where(ps ...predicate.Friendship)
Where appends a list predicates to the FriendshipMutation builder.
func (*FriendshipMutation) WhereP ¶ added in v0.11.5
func (m *FriendshipMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FriendshipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FriendshipQuery ¶
type FriendshipQuery struct {
// contains filtered or unexported fields
}
FriendshipQuery is the builder for querying Friendship entities.
func (*FriendshipQuery) Aggregate ¶ added in v0.11.4
func (fq *FriendshipQuery) Aggregate(fns ...AggregateFunc) *FriendshipSelect
Aggregate returns a FriendshipSelect configured with the given aggregations.
func (*FriendshipQuery) All ¶
func (fq *FriendshipQuery) All(ctx context.Context) ([]*Friendship, error)
All executes the query and returns a list of Friendships.
func (*FriendshipQuery) AllX ¶
func (fq *FriendshipQuery) AllX(ctx context.Context) []*Friendship
AllX is like All, but panics if an error occurs.
func (*FriendshipQuery) Clone ¶
func (fq *FriendshipQuery) Clone() *FriendshipQuery
Clone returns a duplicate of the FriendshipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FriendshipQuery) Count ¶
func (fq *FriendshipQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FriendshipQuery) CountX ¶
func (fq *FriendshipQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FriendshipQuery) Exist ¶
func (fq *FriendshipQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FriendshipQuery) ExistX ¶
func (fq *FriendshipQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FriendshipQuery) Filter ¶ added in v0.11.2
func (fq *FriendshipQuery) Filter() *FriendshipFilter
Filter returns a Filter implementation to apply filters on the FriendshipQuery builder.
func (*FriendshipQuery) First ¶
func (fq *FriendshipQuery) First(ctx context.Context) (*Friendship, error)
First returns the first Friendship entity from the query. Returns a *NotFoundError when no Friendship was found.
func (*FriendshipQuery) FirstID ¶
func (fq *FriendshipQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Friendship ID from the query. Returns a *NotFoundError when no Friendship ID was found.
func (*FriendshipQuery) FirstIDX ¶
func (fq *FriendshipQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*FriendshipQuery) FirstX ¶
func (fq *FriendshipQuery) FirstX(ctx context.Context) *Friendship
FirstX is like First, but panics if an error occurs.
func (*FriendshipQuery) GroupBy ¶
func (fq *FriendshipQuery) GroupBy(field string, fields ...string) *FriendshipGroupBy
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 { Weight int `json:"weight,omitempty"` Count int `json:"count,omitempty"` } client.Friendship.Query(). GroupBy(friendship.FieldWeight). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FriendshipQuery) IDs ¶
func (fq *FriendshipQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Friendship IDs.
func (*FriendshipQuery) IDsX ¶
func (fq *FriendshipQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*FriendshipQuery) Limit ¶
func (fq *FriendshipQuery) Limit(limit int) *FriendshipQuery
Limit the number of records to be returned by this query.
func (*FriendshipQuery) Offset ¶
func (fq *FriendshipQuery) Offset(offset int) *FriendshipQuery
Offset to start from.
func (*FriendshipQuery) Only ¶
func (fq *FriendshipQuery) Only(ctx context.Context) (*Friendship, error)
Only returns a single Friendship entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Friendship entity is found. Returns a *NotFoundError when no Friendship entities are found.
func (*FriendshipQuery) OnlyID ¶
func (fq *FriendshipQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Friendship ID in the query. Returns a *NotSingularError when more than one Friendship ID is found. Returns a *NotFoundError when no entities are found.
func (*FriendshipQuery) OnlyIDX ¶
func (fq *FriendshipQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FriendshipQuery) OnlyX ¶
func (fq *FriendshipQuery) OnlyX(ctx context.Context) *Friendship
OnlyX is like Only, but panics if an error occurs.
func (*FriendshipQuery) Order ¶
func (fq *FriendshipQuery) Order(o ...OrderFunc) *FriendshipQuery
Order specifies how the records should be ordered.
func (*FriendshipQuery) QueryFriend ¶
func (fq *FriendshipQuery) QueryFriend() *UserQuery
QueryFriend chains the current query on the "friend" edge.
func (*FriendshipQuery) QueryUser ¶
func (fq *FriendshipQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*FriendshipQuery) Select ¶
func (fq *FriendshipQuery) Select(fields ...string) *FriendshipSelect
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 { Weight int `json:"weight,omitempty"` } client.Friendship.Query(). Select(friendship.FieldWeight). Scan(ctx, &v)
func (*FriendshipQuery) Unique ¶
func (fq *FriendshipQuery) Unique(unique bool) *FriendshipQuery
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 (*FriendshipQuery) Where ¶
func (fq *FriendshipQuery) Where(ps ...predicate.Friendship) *FriendshipQuery
Where adds a new predicate for the FriendshipQuery builder.
func (*FriendshipQuery) WithFriend ¶
func (fq *FriendshipQuery) WithFriend(opts ...func(*UserQuery)) *FriendshipQuery
WithFriend tells the query-builder to eager-load the nodes that are connected to the "friend" edge. The optional arguments are used to configure the query builder of the edge.
func (*FriendshipQuery) WithUser ¶
func (fq *FriendshipQuery) WithUser(opts ...func(*UserQuery)) *FriendshipQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type FriendshipSelect ¶
type FriendshipSelect struct { *FriendshipQuery // contains filtered or unexported fields }
FriendshipSelect is the builder for selecting fields of Friendship entities.
func (*FriendshipSelect) Aggregate ¶ added in v0.11.4
func (fs *FriendshipSelect) Aggregate(fns ...AggregateFunc) *FriendshipSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FriendshipSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FriendshipSelect) Scan ¶
func (fs *FriendshipSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FriendshipSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FriendshipUpdate ¶
type FriendshipUpdate struct {
// contains filtered or unexported fields
}
FriendshipUpdate is the builder for updating Friendship entities.
func (*FriendshipUpdate) AddWeight ¶
func (fu *FriendshipUpdate) AddWeight(i int) *FriendshipUpdate
AddWeight adds i to the "weight" field.
func (*FriendshipUpdate) Exec ¶
func (fu *FriendshipUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendshipUpdate) ExecX ¶
func (fu *FriendshipUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipUpdate) Mutation ¶
func (fu *FriendshipUpdate) Mutation() *FriendshipMutation
Mutation returns the FriendshipMutation object of the builder.
func (*FriendshipUpdate) Save ¶
func (fu *FriendshipUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FriendshipUpdate) SaveX ¶
func (fu *FriendshipUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FriendshipUpdate) SetCreatedAt ¶
func (fu *FriendshipUpdate) SetCreatedAt(t time.Time) *FriendshipUpdate
SetCreatedAt sets the "created_at" field.
func (*FriendshipUpdate) SetNillableCreatedAt ¶
func (fu *FriendshipUpdate) SetNillableCreatedAt(t *time.Time) *FriendshipUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FriendshipUpdate) SetNillableWeight ¶
func (fu *FriendshipUpdate) SetNillableWeight(i *int) *FriendshipUpdate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*FriendshipUpdate) SetWeight ¶
func (fu *FriendshipUpdate) SetWeight(i int) *FriendshipUpdate
SetWeight sets the "weight" field.
func (*FriendshipUpdate) Where ¶
func (fu *FriendshipUpdate) Where(ps ...predicate.Friendship) *FriendshipUpdate
Where appends a list predicates to the FriendshipUpdate builder.
type FriendshipUpdateOne ¶
type FriendshipUpdateOne struct {
// contains filtered or unexported fields
}
FriendshipUpdateOne is the builder for updating a single Friendship entity.
func (*FriendshipUpdateOne) AddWeight ¶
func (fuo *FriendshipUpdateOne) AddWeight(i int) *FriendshipUpdateOne
AddWeight adds i to the "weight" field.
func (*FriendshipUpdateOne) Exec ¶
func (fuo *FriendshipUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FriendshipUpdateOne) ExecX ¶
func (fuo *FriendshipUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipUpdateOne) Mutation ¶
func (fuo *FriendshipUpdateOne) Mutation() *FriendshipMutation
Mutation returns the FriendshipMutation object of the builder.
func (*FriendshipUpdateOne) Save ¶
func (fuo *FriendshipUpdateOne) Save(ctx context.Context) (*Friendship, error)
Save executes the query and returns the updated Friendship entity.
func (*FriendshipUpdateOne) SaveX ¶
func (fuo *FriendshipUpdateOne) SaveX(ctx context.Context) *Friendship
SaveX is like Save, but panics if an error occurs.
func (*FriendshipUpdateOne) Select ¶
func (fuo *FriendshipUpdateOne) Select(field string, fields ...string) *FriendshipUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FriendshipUpdateOne) SetCreatedAt ¶
func (fuo *FriendshipUpdateOne) SetCreatedAt(t time.Time) *FriendshipUpdateOne
SetCreatedAt sets the "created_at" field.
func (*FriendshipUpdateOne) SetNillableCreatedAt ¶
func (fuo *FriendshipUpdateOne) SetNillableCreatedAt(t *time.Time) *FriendshipUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FriendshipUpdateOne) SetNillableWeight ¶
func (fuo *FriendshipUpdateOne) SetNillableWeight(i *int) *FriendshipUpdateOne
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*FriendshipUpdateOne) SetWeight ¶
func (fuo *FriendshipUpdateOne) SetWeight(i int) *FriendshipUpdateOne
SetWeight sets the "weight" field.
func (*FriendshipUpdateOne) Where ¶ added in v0.11.8
func (fuo *FriendshipUpdateOne) Where(ps ...predicate.Friendship) *FriendshipUpdateOne
Where appends a list predicates to the FriendshipUpdate builder.
type FriendshipUpsert ¶
FriendshipUpsert is the "OnConflict" setter.
func (*FriendshipUpsert) AddWeight ¶
func (u *FriendshipUpsert) AddWeight(v int) *FriendshipUpsert
AddWeight adds v to the "weight" field.
func (*FriendshipUpsert) SetCreatedAt ¶
func (u *FriendshipUpsert) SetCreatedAt(v time.Time) *FriendshipUpsert
SetCreatedAt sets the "created_at" field.
func (*FriendshipUpsert) SetWeight ¶
func (u *FriendshipUpsert) SetWeight(v int) *FriendshipUpsert
SetWeight sets the "weight" field.
func (*FriendshipUpsert) UpdateCreatedAt ¶
func (u *FriendshipUpsert) UpdateCreatedAt() *FriendshipUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FriendshipUpsert) UpdateWeight ¶
func (u *FriendshipUpsert) UpdateWeight() *FriendshipUpsert
UpdateWeight sets the "weight" field to the value that was provided on create.
type FriendshipUpsertBulk ¶
type FriendshipUpsertBulk struct {
// contains filtered or unexported fields
}
FriendshipUpsertBulk is the builder for "upsert"-ing a bulk of Friendship nodes.
func (*FriendshipUpsertBulk) AddWeight ¶
func (u *FriendshipUpsertBulk) AddWeight(v int) *FriendshipUpsertBulk
AddWeight adds v to the "weight" field.
func (*FriendshipUpsertBulk) DoNothing ¶
func (u *FriendshipUpsertBulk) DoNothing() *FriendshipUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FriendshipUpsertBulk) Exec ¶
func (u *FriendshipUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendshipUpsertBulk) ExecX ¶
func (u *FriendshipUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipUpsertBulk) Ignore ¶
func (u *FriendshipUpsertBulk) Ignore() *FriendshipUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Friendship.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FriendshipUpsertBulk) SetCreatedAt ¶
func (u *FriendshipUpsertBulk) SetCreatedAt(v time.Time) *FriendshipUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*FriendshipUpsertBulk) SetWeight ¶
func (u *FriendshipUpsertBulk) SetWeight(v int) *FriendshipUpsertBulk
SetWeight sets the "weight" field.
func (*FriendshipUpsertBulk) Update ¶
func (u *FriendshipUpsertBulk) Update(set func(*FriendshipUpsert)) *FriendshipUpsertBulk
Update allows overriding fields `UPDATE` values. See the FriendshipCreateBulk.OnConflict documentation for more info.
func (*FriendshipUpsertBulk) UpdateCreatedAt ¶
func (u *FriendshipUpsertBulk) UpdateCreatedAt() *FriendshipUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FriendshipUpsertBulk) UpdateNewValues ¶
func (u *FriendshipUpsertBulk) UpdateNewValues() *FriendshipUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Friendship.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*FriendshipUpsertBulk) UpdateWeight ¶
func (u *FriendshipUpsertBulk) UpdateWeight() *FriendshipUpsertBulk
UpdateWeight sets the "weight" field to the value that was provided on create.
type FriendshipUpsertOne ¶
type FriendshipUpsertOne struct {
// contains filtered or unexported fields
}
FriendshipUpsertOne is the builder for "upsert"-ing
one Friendship node.
func (*FriendshipUpsertOne) AddWeight ¶
func (u *FriendshipUpsertOne) AddWeight(v int) *FriendshipUpsertOne
AddWeight adds v to the "weight" field.
func (*FriendshipUpsertOne) DoNothing ¶
func (u *FriendshipUpsertOne) DoNothing() *FriendshipUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FriendshipUpsertOne) Exec ¶
func (u *FriendshipUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FriendshipUpsertOne) ExecX ¶
func (u *FriendshipUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FriendshipUpsertOne) ID ¶
func (u *FriendshipUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*FriendshipUpsertOne) IDX ¶
func (u *FriendshipUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*FriendshipUpsertOne) Ignore ¶
func (u *FriendshipUpsertOne) Ignore() *FriendshipUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Friendship.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FriendshipUpsertOne) SetCreatedAt ¶
func (u *FriendshipUpsertOne) SetCreatedAt(v time.Time) *FriendshipUpsertOne
SetCreatedAt sets the "created_at" field.
func (*FriendshipUpsertOne) SetWeight ¶
func (u *FriendshipUpsertOne) SetWeight(v int) *FriendshipUpsertOne
SetWeight sets the "weight" field.
func (*FriendshipUpsertOne) Update ¶
func (u *FriendshipUpsertOne) Update(set func(*FriendshipUpsert)) *FriendshipUpsertOne
Update allows overriding fields `UPDATE` values. See the FriendshipCreate.OnConflict documentation for more info.
func (*FriendshipUpsertOne) UpdateCreatedAt ¶
func (u *FriendshipUpsertOne) UpdateCreatedAt() *FriendshipUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FriendshipUpsertOne) UpdateNewValues ¶
func (u *FriendshipUpsertOne) UpdateNewValues() *FriendshipUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Friendship.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*FriendshipUpsertOne) UpdateWeight ¶
func (u *FriendshipUpsertOne) UpdateWeight() *FriendshipUpsertOne
UpdateWeight sets the "weight" field to the value that was provided on create.
type Group ¶
type Group struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupQuery when eager-loading is set. Edges GroupEdges `json:"edges"` // contains filtered or unexported fields }
Group is the model entity for the Group schema.
func (*Group) QueryGroupTags ¶ added in v0.11.5
func (gr *Group) QueryGroupTags() *GroupTagQuery
QueryGroupTags queries the "group_tags" edge of the Group entity.
func (*Group) QueryJoinedUsers ¶
func (gr *Group) QueryJoinedUsers() *UserGroupQuery
QueryJoinedUsers queries the "joined_users" edge of the Group entity.
func (*Group) QueryUsers ¶
QueryUsers queries the "users" edge of the Group entity.
func (*Group) Unwrap ¶
Unwrap unwraps the Group entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Group) Update ¶
func (gr *Group) Update() *GroupUpdateOne
Update returns a builder for updating this Group. Note that you need to call Group.Unwrap() before calling this method if this Group was returned from a transaction, and the transaction was committed or rolled back.
type GroupClient ¶
type GroupClient struct {
// contains filtered or unexported fields
}
GroupClient is a client for the Group schema.
func NewGroupClient ¶
func NewGroupClient(c config) *GroupClient
NewGroupClient returns a client for the Group from the given config.
func (*GroupClient) Create ¶
func (c *GroupClient) Create() *GroupCreate
Create returns a builder for creating a Group entity.
func (*GroupClient) CreateBulk ¶
func (c *GroupClient) CreateBulk(builders ...*GroupCreate) *GroupCreateBulk
CreateBulk returns a builder for creating a bulk of Group entities.
func (*GroupClient) Delete ¶
func (c *GroupClient) Delete() *GroupDelete
Delete returns a delete builder for Group.
func (*GroupClient) DeleteOne ¶
func (c *GroupClient) DeleteOne(gr *Group) *GroupDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroupClient) DeleteOneID ¶
func (c *GroupClient) DeleteOneID(id int) *GroupDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroupClient) GetX ¶
func (c *GroupClient) GetX(ctx context.Context, id int) *Group
GetX is like Get, but panics if an error occurs.
func (*GroupClient) Intercept ¶ added in v0.11.5
func (c *GroupClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `group.Intercept(f(g(h())))`.
func (*GroupClient) Interceptors ¶ added in v0.11.5
func (c *GroupClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroupClient) Query ¶
func (c *GroupClient) Query() *GroupQuery
Query returns a query builder for Group.
func (*GroupClient) QueryGroupTags ¶ added in v0.11.5
func (c *GroupClient) QueryGroupTags(gr *Group) *GroupTagQuery
QueryGroupTags queries the group_tags edge of a Group.
func (*GroupClient) QueryJoinedUsers ¶
func (c *GroupClient) QueryJoinedUsers(gr *Group) *UserGroupQuery
QueryJoinedUsers queries the joined_users edge of a Group.
func (*GroupClient) QueryTags ¶ added in v0.11.5
func (c *GroupClient) QueryTags(gr *Group) *TagQuery
QueryTags queries the tags edge of a Group.
func (*GroupClient) QueryUsers ¶
func (c *GroupClient) QueryUsers(gr *Group) *UserQuery
QueryUsers queries the users edge of a Group.
func (*GroupClient) Update ¶
func (c *GroupClient) Update() *GroupUpdate
Update returns an update builder for Group.
func (*GroupClient) UpdateOne ¶
func (c *GroupClient) UpdateOne(gr *Group) *GroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupClient) UpdateOneID ¶
func (c *GroupClient) UpdateOneID(id int) *GroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupClient) Use ¶
func (c *GroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `group.Hooks(f(g(h())))`.
type GroupCreate ¶
type GroupCreate struct {
// contains filtered or unexported fields
}
GroupCreate is the builder for creating a Group entity.
func (*GroupCreate) AddGroupTagIDs ¶ added in v0.11.5
func (gc *GroupCreate) AddGroupTagIDs(ids ...int) *GroupCreate
AddGroupTagIDs adds the "group_tags" edge to the GroupTag entity by IDs.
func (*GroupCreate) AddGroupTags ¶ added in v0.11.5
func (gc *GroupCreate) AddGroupTags(g ...*GroupTag) *GroupCreate
AddGroupTags adds the "group_tags" edges to the GroupTag entity.
func (*GroupCreate) AddJoinedUserIDs ¶
func (gc *GroupCreate) AddJoinedUserIDs(ids ...int) *GroupCreate
AddJoinedUserIDs adds the "joined_users" edge to the UserGroup entity by IDs.
func (*GroupCreate) AddJoinedUsers ¶
func (gc *GroupCreate) AddJoinedUsers(u ...*UserGroup) *GroupCreate
AddJoinedUsers adds the "joined_users" edges to the UserGroup entity.
func (*GroupCreate) AddTagIDs ¶ added in v0.11.5
func (gc *GroupCreate) AddTagIDs(ids ...int) *GroupCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*GroupCreate) AddTags ¶ added in v0.11.5
func (gc *GroupCreate) AddTags(t ...*Tag) *GroupCreate
AddTags adds the "tags" edges to the Tag entity.
func (*GroupCreate) AddUserIDs ¶
func (gc *GroupCreate) AddUserIDs(ids ...int) *GroupCreate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupCreate) AddUsers ¶
func (gc *GroupCreate) AddUsers(u ...*User) *GroupCreate
AddUsers adds the "users" edges to the User entity.
func (*GroupCreate) Exec ¶
func (gc *GroupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreate) ExecX ¶
func (gc *GroupCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupCreate) Mutation ¶
func (gc *GroupCreate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupCreate) OnConflict ¶
func (gc *GroupCreate) OnConflict(opts ...sql.ConflictOption) *GroupUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Group.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GroupUpsert) { SetName(v+v). }). Exec(ctx)
func (*GroupCreate) OnConflictColumns ¶
func (gc *GroupCreate) OnConflictColumns(columns ...string) *GroupUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GroupCreate) Save ¶
func (gc *GroupCreate) Save(ctx context.Context) (*Group, error)
Save creates the Group in the database.
func (*GroupCreate) SaveX ¶
func (gc *GroupCreate) SaveX(ctx context.Context) *Group
SaveX calls Save and panics if Save returns an error.
func (*GroupCreate) SetName ¶
func (gc *GroupCreate) SetName(s string) *GroupCreate
SetName sets the "name" field.
func (*GroupCreate) SetNillableName ¶
func (gc *GroupCreate) SetNillableName(s *string) *GroupCreate
SetNillableName sets the "name" field if the given value is not nil.
type GroupCreateBulk ¶
type GroupCreateBulk struct {
// contains filtered or unexported fields
}
GroupCreateBulk is the builder for creating many Group entities in bulk.
func (*GroupCreateBulk) Exec ¶
func (gcb *GroupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupCreateBulk) ExecX ¶
func (gcb *GroupCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupCreateBulk) OnConflict ¶
func (gcb *GroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Group.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GroupUpsert) { SetName(v+v). }). Exec(ctx)
func (*GroupCreateBulk) OnConflictColumns ¶
func (gcb *GroupCreateBulk) OnConflictColumns(columns ...string) *GroupUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type GroupDelete ¶
type GroupDelete struct {
// contains filtered or unexported fields
}
GroupDelete is the builder for deleting a Group entity.
func (*GroupDelete) Exec ¶
func (gd *GroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupDelete) ExecX ¶
func (gd *GroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupDelete) Where ¶
func (gd *GroupDelete) Where(ps ...predicate.Group) *GroupDelete
Where appends a list predicates to the GroupDelete builder.
type GroupDeleteOne ¶
type GroupDeleteOne struct {
// contains filtered or unexported fields
}
GroupDeleteOne is the builder for deleting a single Group entity.
func (*GroupDeleteOne) Exec ¶
func (gdo *GroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupDeleteOne) ExecX ¶
func (gdo *GroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupDeleteOne) Where ¶ added in v0.11.7
func (gdo *GroupDeleteOne) Where(ps ...predicate.Group) *GroupDeleteOne
Where appends a list predicates to the GroupDelete builder.
type GroupEdges ¶
type GroupEdges struct { // Users holds the value of the users edge. Users []*User `json:"users,omitempty"` // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // JoinedUsers holds the value of the joined_users edge. JoinedUsers []*UserGroup `json:"joined_users,omitempty"` // GroupTags holds the value of the group_tags edge. GroupTags []*GroupTag `json:"group_tags,omitempty"` // contains filtered or unexported fields }
GroupEdges holds the relations/edges for other nodes in the graph.
func (GroupEdges) GroupTagsOrErr ¶ added in v0.11.5
func (e GroupEdges) GroupTagsOrErr() ([]*GroupTag, error)
GroupTagsOrErr returns the GroupTags value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) JoinedUsersOrErr ¶
func (e GroupEdges) JoinedUsersOrErr() ([]*UserGroup, error)
JoinedUsersOrErr returns the JoinedUsers value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) TagsOrErr ¶ added in v0.11.5
func (e GroupEdges) TagsOrErr() ([]*Tag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
func (GroupEdges) UsersOrErr ¶
func (e GroupEdges) UsersOrErr() ([]*User, error)
UsersOrErr returns the Users value or an error if the edge was not loaded in eager-loading.
type GroupFilter ¶ added in v0.11.2
type GroupFilter struct {
// contains filtered or unexported fields
}
GroupFilter provides a generic filtering capability at runtime for GroupQuery.
func (*GroupFilter) Where ¶ added in v0.11.2
func (f *GroupFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*GroupFilter) WhereHasGroupTags ¶ added in v0.11.5
func (f *GroupFilter) WhereHasGroupTags()
WhereHasGroupTags applies a predicate to check if query has an edge group_tags.
func (*GroupFilter) WhereHasGroupTagsWith ¶ added in v0.11.5
func (f *GroupFilter) WhereHasGroupTagsWith(preds ...predicate.GroupTag)
WhereHasGroupTagsWith applies a predicate to check if query has an edge group_tags with a given conditions (other predicates).
func (*GroupFilter) WhereHasJoinedUsers ¶ added in v0.11.2
func (f *GroupFilter) WhereHasJoinedUsers()
WhereHasJoinedUsers applies a predicate to check if query has an edge joined_users.
func (*GroupFilter) WhereHasJoinedUsersWith ¶ added in v0.11.2
func (f *GroupFilter) WhereHasJoinedUsersWith(preds ...predicate.UserGroup)
WhereHasJoinedUsersWith applies a predicate to check if query has an edge joined_users with a given conditions (other predicates).
func (*GroupFilter) WhereHasTags ¶ added in v0.11.5
func (f *GroupFilter) WhereHasTags()
WhereHasTags applies a predicate to check if query has an edge tags.
func (*GroupFilter) WhereHasTagsWith ¶ added in v0.11.5
func (f *GroupFilter) WhereHasTagsWith(preds ...predicate.Tag)
WhereHasTagsWith applies a predicate to check if query has an edge tags with a given conditions (other predicates).
func (*GroupFilter) WhereHasUsers ¶ added in v0.11.2
func (f *GroupFilter) WhereHasUsers()
WhereHasUsers applies a predicate to check if query has an edge users.
func (*GroupFilter) WhereHasUsersWith ¶ added in v0.11.2
func (f *GroupFilter) WhereHasUsersWith(preds ...predicate.User)
WhereHasUsersWith applies a predicate to check if query has an edge users with a given conditions (other predicates).
func (*GroupFilter) WhereID ¶ added in v0.11.2
func (f *GroupFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*GroupFilter) WhereName ¶ added in v0.11.2
func (f *GroupFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
type GroupGroupBy ¶
type GroupGroupBy struct {
// contains filtered or unexported fields
}
GroupGroupBy is the group-by builder for Group entities.
func (*GroupGroupBy) Aggregate ¶
func (ggb *GroupGroupBy) Aggregate(fns ...AggregateFunc) *GroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupGroupBy) Scan ¶
func (ggb *GroupGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupMutation ¶
type GroupMutation struct {
// contains filtered or unexported fields
}
GroupMutation represents an operation that mutates the Group nodes in the graph.
func (*GroupMutation) AddField ¶
func (m *GroupMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*GroupMutation) AddGroupTagIDs ¶ added in v0.11.5
func (m *GroupMutation) AddGroupTagIDs(ids ...int)
AddGroupTagIDs adds the "group_tags" edge to the GroupTag entity by ids.
func (*GroupMutation) AddJoinedUserIDs ¶
func (m *GroupMutation) AddJoinedUserIDs(ids ...int)
AddJoinedUserIDs adds the "joined_users" edge to the UserGroup entity by ids.
func (*GroupMutation) AddTagIDs ¶ added in v0.11.5
func (m *GroupMutation) AddTagIDs(ids ...int)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*GroupMutation) AddUserIDs ¶
func (m *GroupMutation) AddUserIDs(ids ...int)
AddUserIDs adds the "users" edge to the User entity by ids.
func (*GroupMutation) AddedEdges ¶
func (m *GroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupMutation) AddedField ¶
func (m *GroupMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*GroupMutation) AddedFields ¶
func (m *GroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupMutation) AddedIDs ¶
func (m *GroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupMutation) ClearEdge ¶
func (m *GroupMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*GroupMutation) ClearField ¶
func (m *GroupMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*GroupMutation) ClearGroupTags ¶ added in v0.11.5
func (m *GroupMutation) ClearGroupTags()
ClearGroupTags clears the "group_tags" edge to the GroupTag entity.
func (*GroupMutation) ClearJoinedUsers ¶
func (m *GroupMutation) ClearJoinedUsers()
ClearJoinedUsers clears the "joined_users" edge to the UserGroup entity.
func (*GroupMutation) ClearTags ¶ added in v0.11.5
func (m *GroupMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*GroupMutation) ClearUsers ¶
func (m *GroupMutation) ClearUsers()
ClearUsers clears the "users" edge to the User entity.
func (*GroupMutation) ClearedEdges ¶
func (m *GroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupMutation) ClearedFields ¶
func (m *GroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupMutation) Client ¶
func (m GroupMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*GroupMutation) EdgeCleared ¶
func (m *GroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupMutation) Field ¶
func (m *GroupMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*GroupMutation) FieldCleared ¶
func (m *GroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupMutation) Fields ¶
func (m *GroupMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*GroupMutation) Filter ¶ added in v0.11.2
func (m *GroupMutation) Filter() *GroupFilter
Filter returns an entql.Where implementation to apply filters on the GroupMutation builder.
func (*GroupMutation) GroupTagsCleared ¶ added in v0.11.5
func (m *GroupMutation) GroupTagsCleared() bool
GroupTagsCleared reports if the "group_tags" edge to the GroupTag entity was cleared.
func (*GroupMutation) GroupTagsIDs ¶ added in v0.11.5
func (m *GroupMutation) GroupTagsIDs() (ids []int)
GroupTagsIDs returns the "group_tags" edge IDs in the mutation.
func (*GroupMutation) ID ¶
func (m *GroupMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*GroupMutation) IDs ¶
func (m *GroupMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GroupMutation) JoinedUsersCleared ¶
func (m *GroupMutation) JoinedUsersCleared() bool
JoinedUsersCleared reports if the "joined_users" edge to the UserGroup entity was cleared.
func (*GroupMutation) JoinedUsersIDs ¶
func (m *GroupMutation) JoinedUsersIDs() (ids []int)
JoinedUsersIDs returns the "joined_users" edge IDs in the mutation.
func (*GroupMutation) Name ¶
func (m *GroupMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*GroupMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*GroupMutation) OldName ¶
func (m *GroupMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Group entity. If the Group object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupMutation) RemoveGroupTagIDs ¶ added in v0.11.5
func (m *GroupMutation) RemoveGroupTagIDs(ids ...int)
RemoveGroupTagIDs removes the "group_tags" edge to the GroupTag entity by IDs.
func (*GroupMutation) RemoveJoinedUserIDs ¶
func (m *GroupMutation) RemoveJoinedUserIDs(ids ...int)
RemoveJoinedUserIDs removes the "joined_users" edge to the UserGroup entity by IDs.
func (*GroupMutation) RemoveTagIDs ¶ added in v0.11.5
func (m *GroupMutation) RemoveTagIDs(ids ...int)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*GroupMutation) RemoveUserIDs ¶
func (m *GroupMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the "users" edge to the User entity by IDs.
func (*GroupMutation) RemovedEdges ¶
func (m *GroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupMutation) RemovedGroupTagsIDs ¶ added in v0.11.5
func (m *GroupMutation) RemovedGroupTagsIDs() (ids []int)
RemovedGroupTags returns the removed IDs of the "group_tags" edge to the GroupTag entity.
func (*GroupMutation) RemovedIDs ¶
func (m *GroupMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*GroupMutation) RemovedJoinedUsersIDs ¶
func (m *GroupMutation) RemovedJoinedUsersIDs() (ids []int)
RemovedJoinedUsers returns the removed IDs of the "joined_users" edge to the UserGroup entity.
func (*GroupMutation) RemovedTagsIDs ¶ added in v0.11.5
func (m *GroupMutation) RemovedTagsIDs() (ids []int)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*GroupMutation) RemovedUsersIDs ¶
func (m *GroupMutation) RemovedUsersIDs() (ids []int)
RemovedUsers returns the removed IDs of the "users" edge to the User entity.
func (*GroupMutation) ResetEdge ¶
func (m *GroupMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*GroupMutation) ResetField ¶
func (m *GroupMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*GroupMutation) ResetGroupTags ¶ added in v0.11.5
func (m *GroupMutation) ResetGroupTags()
ResetGroupTags resets all changes to the "group_tags" edge.
func (*GroupMutation) ResetJoinedUsers ¶
func (m *GroupMutation) ResetJoinedUsers()
ResetJoinedUsers resets all changes to the "joined_users" edge.
func (*GroupMutation) ResetName ¶
func (m *GroupMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*GroupMutation) ResetTags ¶ added in v0.11.5
func (m *GroupMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*GroupMutation) ResetUsers ¶
func (m *GroupMutation) ResetUsers()
ResetUsers resets all changes to the "users" edge.
func (*GroupMutation) SetField ¶
func (m *GroupMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*GroupMutation) SetName ¶
func (m *GroupMutation) SetName(s string)
SetName sets the "name" field.
func (*GroupMutation) SetOp ¶ added in v0.11.5
func (m *GroupMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroupMutation) TagsCleared ¶ added in v0.11.5
func (m *GroupMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*GroupMutation) TagsIDs ¶ added in v0.11.5
func (m *GroupMutation) TagsIDs() (ids []int)
TagsIDs returns the "tags" edge IDs in the mutation.
func (GroupMutation) Tx ¶
func (m GroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupMutation) Type ¶
func (m *GroupMutation) Type() string
Type returns the node type of this mutation (Group).
func (*GroupMutation) UsersCleared ¶
func (m *GroupMutation) UsersCleared() bool
UsersCleared reports if the "users" edge to the User entity was cleared.
func (*GroupMutation) UsersIDs ¶
func (m *GroupMutation) UsersIDs() (ids []int)
UsersIDs returns the "users" edge IDs in the mutation.
func (*GroupMutation) Where ¶
func (m *GroupMutation) Where(ps ...predicate.Group)
Where appends a list predicates to the GroupMutation builder.
func (*GroupMutation) WhereP ¶ added in v0.11.5
func (m *GroupMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroupQuery ¶
type GroupQuery struct {
// contains filtered or unexported fields
}
GroupQuery is the builder for querying Group entities.
func (*GroupQuery) Aggregate ¶ added in v0.11.4
func (gq *GroupQuery) Aggregate(fns ...AggregateFunc) *GroupSelect
Aggregate returns a GroupSelect configured with the given aggregations.
func (*GroupQuery) All ¶
func (gq *GroupQuery) All(ctx context.Context) ([]*Group, error)
All executes the query and returns a list of Groups.
func (*GroupQuery) AllX ¶
func (gq *GroupQuery) AllX(ctx context.Context) []*Group
AllX is like All, but panics if an error occurs.
func (*GroupQuery) Clone ¶
func (gq *GroupQuery) Clone() *GroupQuery
Clone returns a duplicate of the GroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupQuery) Count ¶
func (gq *GroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupQuery) CountX ¶
func (gq *GroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupQuery) Exist ¶
func (gq *GroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupQuery) ExistX ¶
func (gq *GroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupQuery) Filter ¶ added in v0.11.2
func (gq *GroupQuery) Filter() *GroupFilter
Filter returns a Filter implementation to apply filters on the GroupQuery builder.
func (*GroupQuery) First ¶
func (gq *GroupQuery) First(ctx context.Context) (*Group, error)
First returns the first Group entity from the query. Returns a *NotFoundError when no Group was found.
func (*GroupQuery) FirstID ¶
func (gq *GroupQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Group ID from the query. Returns a *NotFoundError when no Group ID was found.
func (*GroupQuery) FirstIDX ¶
func (gq *GroupQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupQuery) FirstX ¶
func (gq *GroupQuery) FirstX(ctx context.Context) *Group
FirstX is like First, but panics if an error occurs.
func (*GroupQuery) GroupBy ¶
func (gq *GroupQuery) GroupBy(field string, fields ...string) *GroupGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Group.Query(). GroupBy(group.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupQuery) IDs ¶
func (gq *GroupQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Group IDs.
func (*GroupQuery) IDsX ¶
func (gq *GroupQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroupQuery) Limit ¶
func (gq *GroupQuery) Limit(limit int) *GroupQuery
Limit the number of records to be returned by this query.
func (*GroupQuery) Offset ¶
func (gq *GroupQuery) Offset(offset int) *GroupQuery
Offset to start from.
func (*GroupQuery) Only ¶
func (gq *GroupQuery) Only(ctx context.Context) (*Group, error)
Only returns a single Group entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Group entity is found. Returns a *NotFoundError when no Group entities are found.
func (*GroupQuery) OnlyID ¶
func (gq *GroupQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Group ID in the query. Returns a *NotSingularError when more than one Group ID is found. Returns a *NotFoundError when no entities are found.
func (*GroupQuery) OnlyIDX ¶
func (gq *GroupQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupQuery) OnlyX ¶
func (gq *GroupQuery) OnlyX(ctx context.Context) *Group
OnlyX is like Only, but panics if an error occurs.
func (*GroupQuery) Order ¶
func (gq *GroupQuery) Order(o ...OrderFunc) *GroupQuery
Order specifies how the records should be ordered.
func (*GroupQuery) QueryGroupTags ¶ added in v0.11.5
func (gq *GroupQuery) QueryGroupTags() *GroupTagQuery
QueryGroupTags chains the current query on the "group_tags" edge.
func (*GroupQuery) QueryJoinedUsers ¶
func (gq *GroupQuery) QueryJoinedUsers() *UserGroupQuery
QueryJoinedUsers chains the current query on the "joined_users" edge.
func (*GroupQuery) QueryTags ¶ added in v0.11.5
func (gq *GroupQuery) QueryTags() *TagQuery
QueryTags chains the current query on the "tags" edge.
func (*GroupQuery) QueryUsers ¶
func (gq *GroupQuery) QueryUsers() *UserQuery
QueryUsers chains the current query on the "users" edge.
func (*GroupQuery) Select ¶
func (gq *GroupQuery) Select(fields ...string) *GroupSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Group.Query(). Select(group.FieldName). Scan(ctx, &v)
func (*GroupQuery) Unique ¶
func (gq *GroupQuery) Unique(unique bool) *GroupQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*GroupQuery) Where ¶
func (gq *GroupQuery) Where(ps ...predicate.Group) *GroupQuery
Where adds a new predicate for the GroupQuery builder.
func (*GroupQuery) WithGroupTags ¶ added in v0.11.5
func (gq *GroupQuery) WithGroupTags(opts ...func(*GroupTagQuery)) *GroupQuery
WithGroupTags tells the query-builder to eager-load the nodes that are connected to the "group_tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithJoinedUsers ¶
func (gq *GroupQuery) WithJoinedUsers(opts ...func(*UserGroupQuery)) *GroupQuery
WithJoinedUsers tells the query-builder to eager-load the nodes that are connected to the "joined_users" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithTags ¶ added in v0.11.5
func (gq *GroupQuery) WithTags(opts ...func(*TagQuery)) *GroupQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupQuery) WithUsers ¶
func (gq *GroupQuery) WithUsers(opts ...func(*UserQuery)) *GroupQuery
WithUsers tells the query-builder to eager-load the nodes that are connected to the "users" edge. The optional arguments are used to configure the query builder of the edge.
type GroupSelect ¶
type GroupSelect struct { *GroupQuery // contains filtered or unexported fields }
GroupSelect is the builder for selecting fields of Group entities.
func (*GroupSelect) Aggregate ¶ added in v0.11.4
func (gs *GroupSelect) Aggregate(fns ...AggregateFunc) *GroupSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroupSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupSelect) Scan ¶
func (gs *GroupSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GroupTag ¶ added in v0.11.5
type GroupTag struct { // ID of the ent. ID int `json:"id,omitempty"` // TagID holds the value of the "tag_id" field. TagID int `json:"tag_id,omitempty"` // GroupID holds the value of the "group_id" field. GroupID int `json:"group_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the GroupTagQuery when eager-loading is set. Edges GroupTagEdges `json:"edges"` // contains filtered or unexported fields }
GroupTag is the model entity for the GroupTag schema.
func (*GroupTag) QueryGroup ¶ added in v0.11.5
func (gt *GroupTag) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the GroupTag entity.
func (*GroupTag) QueryTag ¶ added in v0.11.5
QueryTag queries the "tag" edge of the GroupTag entity.
func (*GroupTag) Unwrap ¶ added in v0.11.5
Unwrap unwraps the GroupTag 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 (*GroupTag) Update ¶ added in v0.11.5
func (gt *GroupTag) Update() *GroupTagUpdateOne
Update returns a builder for updating this GroupTag. Note that you need to call GroupTag.Unwrap() before calling this method if this GroupTag was returned from a transaction, and the transaction was committed or rolled back.
type GroupTagClient ¶ added in v0.11.5
type GroupTagClient struct {
// contains filtered or unexported fields
}
GroupTagClient is a client for the GroupTag schema.
func NewGroupTagClient ¶ added in v0.11.5
func NewGroupTagClient(c config) *GroupTagClient
NewGroupTagClient returns a client for the GroupTag from the given config.
func (*GroupTagClient) Create ¶ added in v0.11.5
func (c *GroupTagClient) Create() *GroupTagCreate
Create returns a builder for creating a GroupTag entity.
func (*GroupTagClient) CreateBulk ¶ added in v0.11.5
func (c *GroupTagClient) CreateBulk(builders ...*GroupTagCreate) *GroupTagCreateBulk
CreateBulk returns a builder for creating a bulk of GroupTag entities.
func (*GroupTagClient) Delete ¶ added in v0.11.5
func (c *GroupTagClient) Delete() *GroupTagDelete
Delete returns a delete builder for GroupTag.
func (*GroupTagClient) DeleteOne ¶ added in v0.11.5
func (c *GroupTagClient) DeleteOne(gt *GroupTag) *GroupTagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GroupTagClient) DeleteOneID ¶ added in v0.11.5
func (c *GroupTagClient) DeleteOneID(id int) *GroupTagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GroupTagClient) GetX ¶ added in v0.11.5
func (c *GroupTagClient) GetX(ctx context.Context, id int) *GroupTag
GetX is like Get, but panics if an error occurs.
func (*GroupTagClient) Hooks ¶ added in v0.11.5
func (c *GroupTagClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GroupTagClient) Intercept ¶ added in v0.11.5
func (c *GroupTagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `grouptag.Intercept(f(g(h())))`.
func (*GroupTagClient) Interceptors ¶ added in v0.11.5
func (c *GroupTagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GroupTagClient) Query ¶ added in v0.11.5
func (c *GroupTagClient) Query() *GroupTagQuery
Query returns a query builder for GroupTag.
func (*GroupTagClient) QueryGroup ¶ added in v0.11.5
func (c *GroupTagClient) QueryGroup(gt *GroupTag) *GroupQuery
QueryGroup queries the group edge of a GroupTag.
func (*GroupTagClient) QueryTag ¶ added in v0.11.5
func (c *GroupTagClient) QueryTag(gt *GroupTag) *TagQuery
QueryTag queries the tag edge of a GroupTag.
func (*GroupTagClient) Update ¶ added in v0.11.5
func (c *GroupTagClient) Update() *GroupTagUpdate
Update returns an update builder for GroupTag.
func (*GroupTagClient) UpdateOne ¶ added in v0.11.5
func (c *GroupTagClient) UpdateOne(gt *GroupTag) *GroupTagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GroupTagClient) UpdateOneID ¶ added in v0.11.5
func (c *GroupTagClient) UpdateOneID(id int) *GroupTagUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GroupTagClient) Use ¶ added in v0.11.5
func (c *GroupTagClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `grouptag.Hooks(f(g(h())))`.
type GroupTagCreate ¶ added in v0.11.5
type GroupTagCreate struct {
// contains filtered or unexported fields
}
GroupTagCreate is the builder for creating a GroupTag entity.
func (*GroupTagCreate) Exec ¶ added in v0.11.5
func (gtc *GroupTagCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupTagCreate) ExecX ¶ added in v0.11.5
func (gtc *GroupTagCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupTagCreate) Mutation ¶ added in v0.11.5
func (gtc *GroupTagCreate) Mutation() *GroupTagMutation
Mutation returns the GroupTagMutation object of the builder.
func (*GroupTagCreate) OnConflict ¶ added in v0.11.5
func (gtc *GroupTagCreate) OnConflict(opts ...sql.ConflictOption) *GroupTagUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GroupTag.Create(). SetTagID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GroupTagUpsert) { SetTagID(v+v). }). Exec(ctx)
func (*GroupTagCreate) OnConflictColumns ¶ added in v0.11.5
func (gtc *GroupTagCreate) OnConflictColumns(columns ...string) *GroupTagUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GroupTag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*GroupTagCreate) Save ¶ added in v0.11.5
func (gtc *GroupTagCreate) Save(ctx context.Context) (*GroupTag, error)
Save creates the GroupTag in the database.
func (*GroupTagCreate) SaveX ¶ added in v0.11.5
func (gtc *GroupTagCreate) SaveX(ctx context.Context) *GroupTag
SaveX calls Save and panics if Save returns an error.
func (*GroupTagCreate) SetGroup ¶ added in v0.11.5
func (gtc *GroupTagCreate) SetGroup(g *Group) *GroupTagCreate
SetGroup sets the "group" edge to the Group entity.
func (*GroupTagCreate) SetGroupID ¶ added in v0.11.5
func (gtc *GroupTagCreate) SetGroupID(i int) *GroupTagCreate
SetGroupID sets the "group_id" field.
func (*GroupTagCreate) SetTag ¶ added in v0.11.5
func (gtc *GroupTagCreate) SetTag(t *Tag) *GroupTagCreate
SetTag sets the "tag" edge to the Tag entity.
func (*GroupTagCreate) SetTagID ¶ added in v0.11.5
func (gtc *GroupTagCreate) SetTagID(i int) *GroupTagCreate
SetTagID sets the "tag_id" field.
type GroupTagCreateBulk ¶ added in v0.11.5
type GroupTagCreateBulk struct {
// contains filtered or unexported fields
}
GroupTagCreateBulk is the builder for creating many GroupTag entities in bulk.
func (*GroupTagCreateBulk) Exec ¶ added in v0.11.5
func (gtcb *GroupTagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupTagCreateBulk) ExecX ¶ added in v0.11.5
func (gtcb *GroupTagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupTagCreateBulk) OnConflict ¶ added in v0.11.5
func (gtcb *GroupTagCreateBulk) OnConflict(opts ...sql.ConflictOption) *GroupTagUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.GroupTag.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.GroupTagUpsert) { SetTagID(v+v). }). Exec(ctx)
func (*GroupTagCreateBulk) OnConflictColumns ¶ added in v0.11.5
func (gtcb *GroupTagCreateBulk) OnConflictColumns(columns ...string) *GroupTagUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.GroupTag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type GroupTagDelete ¶ added in v0.11.5
type GroupTagDelete struct {
// contains filtered or unexported fields
}
GroupTagDelete is the builder for deleting a GroupTag entity.
func (*GroupTagDelete) Exec ¶ added in v0.11.5
func (gtd *GroupTagDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GroupTagDelete) ExecX ¶ added in v0.11.5
func (gtd *GroupTagDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GroupTagDelete) Where ¶ added in v0.11.5
func (gtd *GroupTagDelete) Where(ps ...predicate.GroupTag) *GroupTagDelete
Where appends a list predicates to the GroupTagDelete builder.
type GroupTagDeleteOne ¶ added in v0.11.5
type GroupTagDeleteOne struct {
// contains filtered or unexported fields
}
GroupTagDeleteOne is the builder for deleting a single GroupTag entity.
func (*GroupTagDeleteOne) Exec ¶ added in v0.11.5
func (gtdo *GroupTagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GroupTagDeleteOne) ExecX ¶ added in v0.11.5
func (gtdo *GroupTagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupTagDeleteOne) Where ¶ added in v0.11.7
func (gtdo *GroupTagDeleteOne) Where(ps ...predicate.GroupTag) *GroupTagDeleteOne
Where appends a list predicates to the GroupTagDelete builder.
type GroupTagEdges ¶ added in v0.11.5
type GroupTagEdges struct { // Tag holds the value of the tag edge. Tag *Tag `json:"tag,omitempty"` // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // contains filtered or unexported fields }
GroupTagEdges holds the relations/edges for other nodes in the graph.
func (GroupTagEdges) GroupOrErr ¶ added in v0.11.5
func (e GroupTagEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GroupTagEdges) TagOrErr ¶ added in v0.11.5
func (e GroupTagEdges) TagOrErr() (*Tag, error)
TagOrErr returns the Tag value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GroupTagFilter ¶ added in v0.11.5
type GroupTagFilter struct {
// contains filtered or unexported fields
}
GroupTagFilter provides a generic filtering capability at runtime for GroupTagQuery.
func (*GroupTagFilter) Where ¶ added in v0.11.5
func (f *GroupTagFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*GroupTagFilter) WhereGroupID ¶ added in v0.11.5
func (f *GroupTagFilter) WhereGroupID(p entql.IntP)
WhereGroupID applies the entql int predicate on the group_id field.
func (*GroupTagFilter) WhereHasGroup ¶ added in v0.11.5
func (f *GroupTagFilter) WhereHasGroup()
WhereHasGroup applies a predicate to check if query has an edge group.
func (*GroupTagFilter) WhereHasGroupWith ¶ added in v0.11.5
func (f *GroupTagFilter) WhereHasGroupWith(preds ...predicate.Group)
WhereHasGroupWith applies a predicate to check if query has an edge group with a given conditions (other predicates).
func (*GroupTagFilter) WhereHasTag ¶ added in v0.11.5
func (f *GroupTagFilter) WhereHasTag()
WhereHasTag applies a predicate to check if query has an edge tag.
func (*GroupTagFilter) WhereHasTagWith ¶ added in v0.11.5
func (f *GroupTagFilter) WhereHasTagWith(preds ...predicate.Tag)
WhereHasTagWith applies a predicate to check if query has an edge tag with a given conditions (other predicates).
func (*GroupTagFilter) WhereID ¶ added in v0.11.5
func (f *GroupTagFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*GroupTagFilter) WhereTagID ¶ added in v0.11.5
func (f *GroupTagFilter) WhereTagID(p entql.IntP)
WhereTagID applies the entql int predicate on the tag_id field.
type GroupTagGroupBy ¶ added in v0.11.5
type GroupTagGroupBy struct {
// contains filtered or unexported fields
}
GroupTagGroupBy is the group-by builder for GroupTag entities.
func (*GroupTagGroupBy) Aggregate ¶ added in v0.11.5
func (gtgb *GroupTagGroupBy) Aggregate(fns ...AggregateFunc) *GroupTagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GroupTagGroupBy) Bool ¶ added in v0.11.5
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupTagGroupBy) Bools ¶ added in v0.11.5
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupTagGroupBy) BoolsX ¶ added in v0.11.5
BoolsX is like Bools, but panics if an error occurs.
func (*GroupTagGroupBy) Float64 ¶ added in v0.11.5
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupTagGroupBy) Float64X ¶ added in v0.11.5
Float64X is like Float64, but panics if an error occurs.
func (*GroupTagGroupBy) Float64s ¶ added in v0.11.5
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupTagGroupBy) Float64sX ¶ added in v0.11.5
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupTagGroupBy) Int ¶ added in v0.11.5
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupTagGroupBy) Ints ¶ added in v0.11.5
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupTagGroupBy) Scan ¶ added in v0.11.5
func (gtgb *GroupTagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupTagGroupBy) String ¶ added in v0.11.5
String returns a single string from a selector. It is only allowed when selecting one field.
func (*GroupTagGroupBy) StringX ¶ added in v0.11.5
StringX is like String, but panics if an error occurs.
type GroupTagMutation ¶ added in v0.11.5
type GroupTagMutation struct {
// contains filtered or unexported fields
}
GroupTagMutation represents an operation that mutates the GroupTag nodes in the graph.
func (*GroupTagMutation) AddField ¶ added in v0.11.5
func (m *GroupTagMutation) 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 (*GroupTagMutation) AddedEdges ¶ added in v0.11.5
func (m *GroupTagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GroupTagMutation) AddedField ¶ added in v0.11.5
func (m *GroupTagMutation) 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 (*GroupTagMutation) AddedFields ¶ added in v0.11.5
func (m *GroupTagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GroupTagMutation) AddedIDs ¶ added in v0.11.5
func (m *GroupTagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GroupTagMutation) ClearEdge ¶ added in v0.11.5
func (m *GroupTagMutation) 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 (*GroupTagMutation) ClearField ¶ added in v0.11.5
func (m *GroupTagMutation) 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 (*GroupTagMutation) ClearGroup ¶ added in v0.11.5
func (m *GroupTagMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*GroupTagMutation) ClearTag ¶ added in v0.11.5
func (m *GroupTagMutation) ClearTag()
ClearTag clears the "tag" edge to the Tag entity.
func (*GroupTagMutation) ClearedEdges ¶ added in v0.11.5
func (m *GroupTagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GroupTagMutation) ClearedFields ¶ added in v0.11.5
func (m *GroupTagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GroupTagMutation) Client ¶ added in v0.11.5
func (m GroupTagMutation) 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 (*GroupTagMutation) EdgeCleared ¶ added in v0.11.5
func (m *GroupTagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GroupTagMutation) Field ¶ added in v0.11.5
func (m *GroupTagMutation) 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 (*GroupTagMutation) FieldCleared ¶ added in v0.11.5
func (m *GroupTagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GroupTagMutation) Fields ¶ added in v0.11.5
func (m *GroupTagMutation) 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 (*GroupTagMutation) Filter ¶ added in v0.11.5
func (m *GroupTagMutation) Filter() *GroupTagFilter
Filter returns an entql.Where implementation to apply filters on the GroupTagMutation builder.
func (*GroupTagMutation) GroupCleared ¶ added in v0.11.5
func (m *GroupTagMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*GroupTagMutation) GroupID ¶ added in v0.11.5
func (m *GroupTagMutation) GroupID() (r int, exists bool)
GroupID returns the value of the "group_id" field in the mutation.
func (*GroupTagMutation) GroupIDs ¶ added in v0.11.5
func (m *GroupTagMutation) GroupIDs() (ids []int)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*GroupTagMutation) ID ¶ added in v0.11.5
func (m *GroupTagMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*GroupTagMutation) IDs ¶ added in v0.11.5
func (m *GroupTagMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*GroupTagMutation) OldField ¶ added in v0.11.5
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 (*GroupTagMutation) OldGroupID ¶ added in v0.11.5
func (m *GroupTagMutation) OldGroupID(ctx context.Context) (v int, err error)
OldGroupID returns the old "group_id" field's value of the GroupTag entity. If the GroupTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupTagMutation) OldTagID ¶ added in v0.11.5
func (m *GroupTagMutation) OldTagID(ctx context.Context) (v int, err error)
OldTagID returns the old "tag_id" field's value of the GroupTag entity. If the GroupTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*GroupTagMutation) Op ¶ added in v0.11.5
func (m *GroupTagMutation) Op() Op
Op returns the operation name.
func (*GroupTagMutation) RemovedEdges ¶ added in v0.11.5
func (m *GroupTagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GroupTagMutation) RemovedIDs ¶ added in v0.11.5
func (m *GroupTagMutation) 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 (*GroupTagMutation) ResetEdge ¶ added in v0.11.5
func (m *GroupTagMutation) 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 (*GroupTagMutation) ResetField ¶ added in v0.11.5
func (m *GroupTagMutation) 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 (*GroupTagMutation) ResetGroup ¶ added in v0.11.5
func (m *GroupTagMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*GroupTagMutation) ResetGroupID ¶ added in v0.11.5
func (m *GroupTagMutation) ResetGroupID()
ResetGroupID resets all changes to the "group_id" field.
func (*GroupTagMutation) ResetTag ¶ added in v0.11.5
func (m *GroupTagMutation) ResetTag()
ResetTag resets all changes to the "tag" edge.
func (*GroupTagMutation) ResetTagID ¶ added in v0.11.5
func (m *GroupTagMutation) ResetTagID()
ResetTagID resets all changes to the "tag_id" field.
func (*GroupTagMutation) SetField ¶ added in v0.11.5
func (m *GroupTagMutation) 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 (*GroupTagMutation) SetGroupID ¶ added in v0.11.5
func (m *GroupTagMutation) SetGroupID(i int)
SetGroupID sets the "group_id" field.
func (*GroupTagMutation) SetOp ¶ added in v0.11.5
func (m *GroupTagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GroupTagMutation) SetTagID ¶ added in v0.11.5
func (m *GroupTagMutation) SetTagID(i int)
SetTagID sets the "tag_id" field.
func (*GroupTagMutation) TagCleared ¶ added in v0.11.5
func (m *GroupTagMutation) TagCleared() bool
TagCleared reports if the "tag" edge to the Tag entity was cleared.
func (*GroupTagMutation) TagID ¶ added in v0.11.5
func (m *GroupTagMutation) TagID() (r int, exists bool)
TagID returns the value of the "tag_id" field in the mutation.
func (*GroupTagMutation) TagIDs ¶ added in v0.11.5
func (m *GroupTagMutation) TagIDs() (ids []int)
TagIDs returns the "tag" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TagID instead. It exists only for internal usage by the builders.
func (GroupTagMutation) Tx ¶ added in v0.11.5
func (m GroupTagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GroupTagMutation) Type ¶ added in v0.11.5
func (m *GroupTagMutation) Type() string
Type returns the node type of this mutation (GroupTag).
func (*GroupTagMutation) Where ¶ added in v0.11.5
func (m *GroupTagMutation) Where(ps ...predicate.GroupTag)
Where appends a list predicates to the GroupTagMutation builder.
func (*GroupTagMutation) WhereP ¶ added in v0.11.5
func (m *GroupTagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GroupTagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GroupTagQuery ¶ added in v0.11.5
type GroupTagQuery struct {
// contains filtered or unexported fields
}
GroupTagQuery is the builder for querying GroupTag entities.
func (*GroupTagQuery) Aggregate ¶ added in v0.11.5
func (gtq *GroupTagQuery) Aggregate(fns ...AggregateFunc) *GroupTagSelect
Aggregate returns a GroupTagSelect configured with the given aggregations.
func (*GroupTagQuery) All ¶ added in v0.11.5
func (gtq *GroupTagQuery) All(ctx context.Context) ([]*GroupTag, error)
All executes the query and returns a list of GroupTags.
func (*GroupTagQuery) AllX ¶ added in v0.11.5
func (gtq *GroupTagQuery) AllX(ctx context.Context) []*GroupTag
AllX is like All, but panics if an error occurs.
func (*GroupTagQuery) Clone ¶ added in v0.11.5
func (gtq *GroupTagQuery) Clone() *GroupTagQuery
Clone returns a duplicate of the GroupTagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GroupTagQuery) Count ¶ added in v0.11.5
func (gtq *GroupTagQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GroupTagQuery) CountX ¶ added in v0.11.5
func (gtq *GroupTagQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GroupTagQuery) Exist ¶ added in v0.11.5
func (gtq *GroupTagQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GroupTagQuery) ExistX ¶ added in v0.11.5
func (gtq *GroupTagQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GroupTagQuery) Filter ¶ added in v0.11.5
func (gtq *GroupTagQuery) Filter() *GroupTagFilter
Filter returns a Filter implementation to apply filters on the GroupTagQuery builder.
func (*GroupTagQuery) First ¶ added in v0.11.5
func (gtq *GroupTagQuery) First(ctx context.Context) (*GroupTag, error)
First returns the first GroupTag entity from the query. Returns a *NotFoundError when no GroupTag was found.
func (*GroupTagQuery) FirstID ¶ added in v0.11.5
func (gtq *GroupTagQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first GroupTag ID from the query. Returns a *NotFoundError when no GroupTag ID was found.
func (*GroupTagQuery) FirstIDX ¶ added in v0.11.5
func (gtq *GroupTagQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GroupTagQuery) FirstX ¶ added in v0.11.5
func (gtq *GroupTagQuery) FirstX(ctx context.Context) *GroupTag
FirstX is like First, but panics if an error occurs.
func (*GroupTagQuery) GroupBy ¶ added in v0.11.5
func (gtq *GroupTagQuery) GroupBy(field string, fields ...string) *GroupTagGroupBy
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 { TagID int `json:"tag_id,omitempty"` Count int `json:"count,omitempty"` } client.GroupTag.Query(). GroupBy(grouptag.FieldTagID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*GroupTagQuery) IDs ¶ added in v0.11.5
func (gtq *GroupTagQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of GroupTag IDs.
func (*GroupTagQuery) IDsX ¶ added in v0.11.5
func (gtq *GroupTagQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GroupTagQuery) Limit ¶ added in v0.11.5
func (gtq *GroupTagQuery) Limit(limit int) *GroupTagQuery
Limit the number of records to be returned by this query.
func (*GroupTagQuery) Offset ¶ added in v0.11.5
func (gtq *GroupTagQuery) Offset(offset int) *GroupTagQuery
Offset to start from.
func (*GroupTagQuery) Only ¶ added in v0.11.5
func (gtq *GroupTagQuery) Only(ctx context.Context) (*GroupTag, error)
Only returns a single GroupTag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GroupTag entity is found. Returns a *NotFoundError when no GroupTag entities are found.
func (*GroupTagQuery) OnlyID ¶ added in v0.11.5
func (gtq *GroupTagQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only GroupTag ID in the query. Returns a *NotSingularError when more than one GroupTag ID is found. Returns a *NotFoundError when no entities are found.
func (*GroupTagQuery) OnlyIDX ¶ added in v0.11.5
func (gtq *GroupTagQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GroupTagQuery) OnlyX ¶ added in v0.11.5
func (gtq *GroupTagQuery) OnlyX(ctx context.Context) *GroupTag
OnlyX is like Only, but panics if an error occurs.
func (*GroupTagQuery) Order ¶ added in v0.11.5
func (gtq *GroupTagQuery) Order(o ...OrderFunc) *GroupTagQuery
Order specifies how the records should be ordered.
func (*GroupTagQuery) QueryGroup ¶ added in v0.11.5
func (gtq *GroupTagQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*GroupTagQuery) QueryTag ¶ added in v0.11.5
func (gtq *GroupTagQuery) QueryTag() *TagQuery
QueryTag chains the current query on the "tag" edge.
func (*GroupTagQuery) Select ¶ added in v0.11.5
func (gtq *GroupTagQuery) Select(fields ...string) *GroupTagSelect
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 { TagID int `json:"tag_id,omitempty"` } client.GroupTag.Query(). Select(grouptag.FieldTagID). Scan(ctx, &v)
func (*GroupTagQuery) Unique ¶ added in v0.11.5
func (gtq *GroupTagQuery) Unique(unique bool) *GroupTagQuery
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 (*GroupTagQuery) Where ¶ added in v0.11.5
func (gtq *GroupTagQuery) Where(ps ...predicate.GroupTag) *GroupTagQuery
Where adds a new predicate for the GroupTagQuery builder.
func (*GroupTagQuery) WithGroup ¶ added in v0.11.5
func (gtq *GroupTagQuery) WithGroup(opts ...func(*GroupQuery)) *GroupTagQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*GroupTagQuery) WithTag ¶ added in v0.11.5
func (gtq *GroupTagQuery) WithTag(opts ...func(*TagQuery)) *GroupTagQuery
WithTag tells the query-builder to eager-load the nodes that are connected to the "tag" edge. The optional arguments are used to configure the query builder of the edge.
type GroupTagSelect ¶ added in v0.11.5
type GroupTagSelect struct { *GroupTagQuery // contains filtered or unexported fields }
GroupTagSelect is the builder for selecting fields of GroupTag entities.
func (*GroupTagSelect) Aggregate ¶ added in v0.11.5
func (gts *GroupTagSelect) Aggregate(fns ...AggregateFunc) *GroupTagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GroupTagSelect) Bool ¶ added in v0.11.5
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GroupTagSelect) Bools ¶ added in v0.11.5
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GroupTagSelect) BoolsX ¶ added in v0.11.5
BoolsX is like Bools, but panics if an error occurs.
func (*GroupTagSelect) Float64 ¶ added in v0.11.5
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GroupTagSelect) Float64X ¶ added in v0.11.5
Float64X is like Float64, but panics if an error occurs.
func (*GroupTagSelect) Float64s ¶ added in v0.11.5
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GroupTagSelect) Float64sX ¶ added in v0.11.5
Float64sX is like Float64s, but panics if an error occurs.
func (*GroupTagSelect) Int ¶ added in v0.11.5
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GroupTagSelect) Ints ¶ added in v0.11.5
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GroupTagSelect) Scan ¶ added in v0.11.5
func (gts *GroupTagSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GroupTagSelect) String ¶ added in v0.11.5
String returns a single string from a selector. It is only allowed when selecting one field.
func (*GroupTagSelect) StringX ¶ added in v0.11.5
StringX is like String, but panics if an error occurs.
type GroupTagUpdate ¶ added in v0.11.5
type GroupTagUpdate struct {
// contains filtered or unexported fields
}
GroupTagUpdate is the builder for updating GroupTag entities.
func (*GroupTagUpdate) ClearGroup ¶ added in v0.11.5
func (gtu *GroupTagUpdate) ClearGroup() *GroupTagUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*GroupTagUpdate) ClearTag ¶ added in v0.11.5
func (gtu *GroupTagUpdate) ClearTag() *GroupTagUpdate
ClearTag clears the "tag" edge to the Tag entity.
func (*GroupTagUpdate) Exec ¶ added in v0.11.5
func (gtu *GroupTagUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupTagUpdate) ExecX ¶ added in v0.11.5
func (gtu *GroupTagUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupTagUpdate) Mutation ¶ added in v0.11.5
func (gtu *GroupTagUpdate) Mutation() *GroupTagMutation
Mutation returns the GroupTagMutation object of the builder.
func (*GroupTagUpdate) Save ¶ added in v0.11.5
func (gtu *GroupTagUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupTagUpdate) SaveX ¶ added in v0.11.5
func (gtu *GroupTagUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupTagUpdate) SetGroup ¶ added in v0.11.5
func (gtu *GroupTagUpdate) SetGroup(g *Group) *GroupTagUpdate
SetGroup sets the "group" edge to the Group entity.
func (*GroupTagUpdate) SetGroupID ¶ added in v0.11.5
func (gtu *GroupTagUpdate) SetGroupID(i int) *GroupTagUpdate
SetGroupID sets the "group_id" field.
func (*GroupTagUpdate) SetTag ¶ added in v0.11.5
func (gtu *GroupTagUpdate) SetTag(t *Tag) *GroupTagUpdate
SetTag sets the "tag" edge to the Tag entity.
func (*GroupTagUpdate) SetTagID ¶ added in v0.11.5
func (gtu *GroupTagUpdate) SetTagID(i int) *GroupTagUpdate
SetTagID sets the "tag_id" field.
func (*GroupTagUpdate) Where ¶ added in v0.11.5
func (gtu *GroupTagUpdate) Where(ps ...predicate.GroupTag) *GroupTagUpdate
Where appends a list predicates to the GroupTagUpdate builder.
type GroupTagUpdateOne ¶ added in v0.11.5
type GroupTagUpdateOne struct {
// contains filtered or unexported fields
}
GroupTagUpdateOne is the builder for updating a single GroupTag entity.
func (*GroupTagUpdateOne) ClearGroup ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) ClearGroup() *GroupTagUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*GroupTagUpdateOne) ClearTag ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) ClearTag() *GroupTagUpdateOne
ClearTag clears the "tag" edge to the Tag entity.
func (*GroupTagUpdateOne) Exec ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupTagUpdateOne) ExecX ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupTagUpdateOne) Mutation ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) Mutation() *GroupTagMutation
Mutation returns the GroupTagMutation object of the builder.
func (*GroupTagUpdateOne) Save ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) Save(ctx context.Context) (*GroupTag, error)
Save executes the query and returns the updated GroupTag entity.
func (*GroupTagUpdateOne) SaveX ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) SaveX(ctx context.Context) *GroupTag
SaveX is like Save, but panics if an error occurs.
func (*GroupTagUpdateOne) Select ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) Select(field string, fields ...string) *GroupTagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupTagUpdateOne) SetGroup ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) SetGroup(g *Group) *GroupTagUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*GroupTagUpdateOne) SetGroupID ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) SetGroupID(i int) *GroupTagUpdateOne
SetGroupID sets the "group_id" field.
func (*GroupTagUpdateOne) SetTag ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) SetTag(t *Tag) *GroupTagUpdateOne
SetTag sets the "tag" edge to the Tag entity.
func (*GroupTagUpdateOne) SetTagID ¶ added in v0.11.5
func (gtuo *GroupTagUpdateOne) SetTagID(i int) *GroupTagUpdateOne
SetTagID sets the "tag_id" field.
func (*GroupTagUpdateOne) Where ¶ added in v0.11.8
func (gtuo *GroupTagUpdateOne) Where(ps ...predicate.GroupTag) *GroupTagUpdateOne
Where appends a list predicates to the GroupTagUpdate builder.
type GroupTagUpsert ¶ added in v0.11.5
GroupTagUpsert is the "OnConflict" setter.
func (*GroupTagUpsert) SetGroupID ¶ added in v0.11.5
func (u *GroupTagUpsert) SetGroupID(v int) *GroupTagUpsert
SetGroupID sets the "group_id" field.
func (*GroupTagUpsert) SetTagID ¶ added in v0.11.5
func (u *GroupTagUpsert) SetTagID(v int) *GroupTagUpsert
SetTagID sets the "tag_id" field.
func (*GroupTagUpsert) UpdateGroupID ¶ added in v0.11.5
func (u *GroupTagUpsert) UpdateGroupID() *GroupTagUpsert
UpdateGroupID sets the "group_id" field to the value that was provided on create.
func (*GroupTagUpsert) UpdateTagID ¶ added in v0.11.5
func (u *GroupTagUpsert) UpdateTagID() *GroupTagUpsert
UpdateTagID sets the "tag_id" field to the value that was provided on create.
type GroupTagUpsertBulk ¶ added in v0.11.5
type GroupTagUpsertBulk struct {
// contains filtered or unexported fields
}
GroupTagUpsertBulk is the builder for "upsert"-ing a bulk of GroupTag nodes.
func (*GroupTagUpsertBulk) DoNothing ¶ added in v0.11.5
func (u *GroupTagUpsertBulk) DoNothing() *GroupTagUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupTagUpsertBulk) Exec ¶ added in v0.11.5
func (u *GroupTagUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupTagUpsertBulk) ExecX ¶ added in v0.11.5
func (u *GroupTagUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupTagUpsertBulk) Ignore ¶ added in v0.11.5
func (u *GroupTagUpsertBulk) Ignore() *GroupTagUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GroupTag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupTagUpsertBulk) SetGroupID ¶ added in v0.11.5
func (u *GroupTagUpsertBulk) SetGroupID(v int) *GroupTagUpsertBulk
SetGroupID sets the "group_id" field.
func (*GroupTagUpsertBulk) SetTagID ¶ added in v0.11.5
func (u *GroupTagUpsertBulk) SetTagID(v int) *GroupTagUpsertBulk
SetTagID sets the "tag_id" field.
func (*GroupTagUpsertBulk) Update ¶ added in v0.11.5
func (u *GroupTagUpsertBulk) Update(set func(*GroupTagUpsert)) *GroupTagUpsertBulk
Update allows overriding fields `UPDATE` values. See the GroupTagCreateBulk.OnConflict documentation for more info.
func (*GroupTagUpsertBulk) UpdateGroupID ¶ added in v0.11.5
func (u *GroupTagUpsertBulk) UpdateGroupID() *GroupTagUpsertBulk
UpdateGroupID sets the "group_id" field to the value that was provided on create.
func (*GroupTagUpsertBulk) UpdateNewValues ¶ added in v0.11.5
func (u *GroupTagUpsertBulk) UpdateNewValues() *GroupTagUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GroupTag.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*GroupTagUpsertBulk) UpdateTagID ¶ added in v0.11.5
func (u *GroupTagUpsertBulk) UpdateTagID() *GroupTagUpsertBulk
UpdateTagID sets the "tag_id" field to the value that was provided on create.
type GroupTagUpsertOne ¶ added in v0.11.5
type GroupTagUpsertOne struct {
// contains filtered or unexported fields
}
GroupTagUpsertOne is the builder for "upsert"-ing
one GroupTag node.
func (*GroupTagUpsertOne) DoNothing ¶ added in v0.11.5
func (u *GroupTagUpsertOne) DoNothing() *GroupTagUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupTagUpsertOne) Exec ¶ added in v0.11.5
func (u *GroupTagUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupTagUpsertOne) ExecX ¶ added in v0.11.5
func (u *GroupTagUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupTagUpsertOne) ID ¶ added in v0.11.5
func (u *GroupTagUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GroupTagUpsertOne) IDX ¶ added in v0.11.5
func (u *GroupTagUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*GroupTagUpsertOne) Ignore ¶ added in v0.11.5
func (u *GroupTagUpsertOne) Ignore() *GroupTagUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.GroupTag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupTagUpsertOne) SetGroupID ¶ added in v0.11.5
func (u *GroupTagUpsertOne) SetGroupID(v int) *GroupTagUpsertOne
SetGroupID sets the "group_id" field.
func (*GroupTagUpsertOne) SetTagID ¶ added in v0.11.5
func (u *GroupTagUpsertOne) SetTagID(v int) *GroupTagUpsertOne
SetTagID sets the "tag_id" field.
func (*GroupTagUpsertOne) Update ¶ added in v0.11.5
func (u *GroupTagUpsertOne) Update(set func(*GroupTagUpsert)) *GroupTagUpsertOne
Update allows overriding fields `UPDATE` values. See the GroupTagCreate.OnConflict documentation for more info.
func (*GroupTagUpsertOne) UpdateGroupID ¶ added in v0.11.5
func (u *GroupTagUpsertOne) UpdateGroupID() *GroupTagUpsertOne
UpdateGroupID sets the "group_id" field to the value that was provided on create.
func (*GroupTagUpsertOne) UpdateNewValues ¶ added in v0.11.5
func (u *GroupTagUpsertOne) UpdateNewValues() *GroupTagUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.GroupTag.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*GroupTagUpsertOne) UpdateTagID ¶ added in v0.11.5
func (u *GroupTagUpsertOne) UpdateTagID() *GroupTagUpsertOne
UpdateTagID sets the "tag_id" field to the value that was provided on create.
type GroupTags ¶ added in v0.11.5
type GroupTags []*GroupTag
GroupTags is a parsable slice of GroupTag.
type GroupUpdate ¶
type GroupUpdate struct {
// contains filtered or unexported fields
}
GroupUpdate is the builder for updating Group entities.
func (*GroupUpdate) AddGroupTagIDs ¶ added in v0.11.5
func (gu *GroupUpdate) AddGroupTagIDs(ids ...int) *GroupUpdate
AddGroupTagIDs adds the "group_tags" edge to the GroupTag entity by IDs.
func (*GroupUpdate) AddGroupTags ¶ added in v0.11.5
func (gu *GroupUpdate) AddGroupTags(g ...*GroupTag) *GroupUpdate
AddGroupTags adds the "group_tags" edges to the GroupTag entity.
func (*GroupUpdate) AddJoinedUserIDs ¶
func (gu *GroupUpdate) AddJoinedUserIDs(ids ...int) *GroupUpdate
AddJoinedUserIDs adds the "joined_users" edge to the UserGroup entity by IDs.
func (*GroupUpdate) AddJoinedUsers ¶
func (gu *GroupUpdate) AddJoinedUsers(u ...*UserGroup) *GroupUpdate
AddJoinedUsers adds the "joined_users" edges to the UserGroup entity.
func (*GroupUpdate) AddTagIDs ¶ added in v0.11.5
func (gu *GroupUpdate) AddTagIDs(ids ...int) *GroupUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*GroupUpdate) AddTags ¶ added in v0.11.5
func (gu *GroupUpdate) AddTags(t ...*Tag) *GroupUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*GroupUpdate) AddUserIDs ¶
func (gu *GroupUpdate) AddUserIDs(ids ...int) *GroupUpdate
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdate) AddUsers ¶
func (gu *GroupUpdate) AddUsers(u ...*User) *GroupUpdate
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdate) ClearGroupTags ¶ added in v0.11.5
func (gu *GroupUpdate) ClearGroupTags() *GroupUpdate
ClearGroupTags clears all "group_tags" edges to the GroupTag entity.
func (*GroupUpdate) ClearJoinedUsers ¶
func (gu *GroupUpdate) ClearJoinedUsers() *GroupUpdate
ClearJoinedUsers clears all "joined_users" edges to the UserGroup entity.
func (*GroupUpdate) ClearTags ¶ added in v0.11.5
func (gu *GroupUpdate) ClearTags() *GroupUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*GroupUpdate) ClearUsers ¶
func (gu *GroupUpdate) ClearUsers() *GroupUpdate
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdate) Exec ¶
func (gu *GroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpdate) ExecX ¶
func (gu *GroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdate) Mutation ¶
func (gu *GroupUpdate) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdate) RemoveGroupTagIDs ¶ added in v0.11.5
func (gu *GroupUpdate) RemoveGroupTagIDs(ids ...int) *GroupUpdate
RemoveGroupTagIDs removes the "group_tags" edge to GroupTag entities by IDs.
func (*GroupUpdate) RemoveGroupTags ¶ added in v0.11.5
func (gu *GroupUpdate) RemoveGroupTags(g ...*GroupTag) *GroupUpdate
RemoveGroupTags removes "group_tags" edges to GroupTag entities.
func (*GroupUpdate) RemoveJoinedUserIDs ¶
func (gu *GroupUpdate) RemoveJoinedUserIDs(ids ...int) *GroupUpdate
RemoveJoinedUserIDs removes the "joined_users" edge to UserGroup entities by IDs.
func (*GroupUpdate) RemoveJoinedUsers ¶
func (gu *GroupUpdate) RemoveJoinedUsers(u ...*UserGroup) *GroupUpdate
RemoveJoinedUsers removes "joined_users" edges to UserGroup entities.
func (*GroupUpdate) RemoveTagIDs ¶ added in v0.11.5
func (gu *GroupUpdate) RemoveTagIDs(ids ...int) *GroupUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*GroupUpdate) RemoveTags ¶ added in v0.11.5
func (gu *GroupUpdate) RemoveTags(t ...*Tag) *GroupUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*GroupUpdate) RemoveUserIDs ¶
func (gu *GroupUpdate) RemoveUserIDs(ids ...int) *GroupUpdate
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdate) RemoveUsers ¶
func (gu *GroupUpdate) RemoveUsers(u ...*User) *GroupUpdate
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdate) Save ¶
func (gu *GroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GroupUpdate) SaveX ¶
func (gu *GroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdate) SetName ¶
func (gu *GroupUpdate) SetName(s string) *GroupUpdate
SetName sets the "name" field.
func (*GroupUpdate) SetNillableName ¶
func (gu *GroupUpdate) SetNillableName(s *string) *GroupUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*GroupUpdate) Where ¶
func (gu *GroupUpdate) Where(ps ...predicate.Group) *GroupUpdate
Where appends a list predicates to the GroupUpdate builder.
type GroupUpdateOne ¶
type GroupUpdateOne struct {
// contains filtered or unexported fields
}
GroupUpdateOne is the builder for updating a single Group entity.
func (*GroupUpdateOne) AddGroupTagIDs ¶ added in v0.11.5
func (guo *GroupUpdateOne) AddGroupTagIDs(ids ...int) *GroupUpdateOne
AddGroupTagIDs adds the "group_tags" edge to the GroupTag entity by IDs.
func (*GroupUpdateOne) AddGroupTags ¶ added in v0.11.5
func (guo *GroupUpdateOne) AddGroupTags(g ...*GroupTag) *GroupUpdateOne
AddGroupTags adds the "group_tags" edges to the GroupTag entity.
func (*GroupUpdateOne) AddJoinedUserIDs ¶
func (guo *GroupUpdateOne) AddJoinedUserIDs(ids ...int) *GroupUpdateOne
AddJoinedUserIDs adds the "joined_users" edge to the UserGroup entity by IDs.
func (*GroupUpdateOne) AddJoinedUsers ¶
func (guo *GroupUpdateOne) AddJoinedUsers(u ...*UserGroup) *GroupUpdateOne
AddJoinedUsers adds the "joined_users" edges to the UserGroup entity.
func (*GroupUpdateOne) AddTagIDs ¶ added in v0.11.5
func (guo *GroupUpdateOne) AddTagIDs(ids ...int) *GroupUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*GroupUpdateOne) AddTags ¶ added in v0.11.5
func (guo *GroupUpdateOne) AddTags(t ...*Tag) *GroupUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*GroupUpdateOne) AddUserIDs ¶
func (guo *GroupUpdateOne) AddUserIDs(ids ...int) *GroupUpdateOne
AddUserIDs adds the "users" edge to the User entity by IDs.
func (*GroupUpdateOne) AddUsers ¶
func (guo *GroupUpdateOne) AddUsers(u ...*User) *GroupUpdateOne
AddUsers adds the "users" edges to the User entity.
func (*GroupUpdateOne) ClearGroupTags ¶ added in v0.11.5
func (guo *GroupUpdateOne) ClearGroupTags() *GroupUpdateOne
ClearGroupTags clears all "group_tags" edges to the GroupTag entity.
func (*GroupUpdateOne) ClearJoinedUsers ¶
func (guo *GroupUpdateOne) ClearJoinedUsers() *GroupUpdateOne
ClearJoinedUsers clears all "joined_users" edges to the UserGroup entity.
func (*GroupUpdateOne) ClearTags ¶ added in v0.11.5
func (guo *GroupUpdateOne) ClearTags() *GroupUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*GroupUpdateOne) ClearUsers ¶
func (guo *GroupUpdateOne) ClearUsers() *GroupUpdateOne
ClearUsers clears all "users" edges to the User entity.
func (*GroupUpdateOne) Exec ¶
func (guo *GroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GroupUpdateOne) ExecX ¶
func (guo *GroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpdateOne) Mutation ¶
func (guo *GroupUpdateOne) Mutation() *GroupMutation
Mutation returns the GroupMutation object of the builder.
func (*GroupUpdateOne) RemoveGroupTagIDs ¶ added in v0.11.5
func (guo *GroupUpdateOne) RemoveGroupTagIDs(ids ...int) *GroupUpdateOne
RemoveGroupTagIDs removes the "group_tags" edge to GroupTag entities by IDs.
func (*GroupUpdateOne) RemoveGroupTags ¶ added in v0.11.5
func (guo *GroupUpdateOne) RemoveGroupTags(g ...*GroupTag) *GroupUpdateOne
RemoveGroupTags removes "group_tags" edges to GroupTag entities.
func (*GroupUpdateOne) RemoveJoinedUserIDs ¶
func (guo *GroupUpdateOne) RemoveJoinedUserIDs(ids ...int) *GroupUpdateOne
RemoveJoinedUserIDs removes the "joined_users" edge to UserGroup entities by IDs.
func (*GroupUpdateOne) RemoveJoinedUsers ¶
func (guo *GroupUpdateOne) RemoveJoinedUsers(u ...*UserGroup) *GroupUpdateOne
RemoveJoinedUsers removes "joined_users" edges to UserGroup entities.
func (*GroupUpdateOne) RemoveTagIDs ¶ added in v0.11.5
func (guo *GroupUpdateOne) RemoveTagIDs(ids ...int) *GroupUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*GroupUpdateOne) RemoveTags ¶ added in v0.11.5
func (guo *GroupUpdateOne) RemoveTags(t ...*Tag) *GroupUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*GroupUpdateOne) RemoveUserIDs ¶
func (guo *GroupUpdateOne) RemoveUserIDs(ids ...int) *GroupUpdateOne
RemoveUserIDs removes the "users" edge to User entities by IDs.
func (*GroupUpdateOne) RemoveUsers ¶
func (guo *GroupUpdateOne) RemoveUsers(u ...*User) *GroupUpdateOne
RemoveUsers removes "users" edges to User entities.
func (*GroupUpdateOne) Save ¶
func (guo *GroupUpdateOne) Save(ctx context.Context) (*Group, error)
Save executes the query and returns the updated Group entity.
func (*GroupUpdateOne) SaveX ¶
func (guo *GroupUpdateOne) SaveX(ctx context.Context) *Group
SaveX is like Save, but panics if an error occurs.
func (*GroupUpdateOne) Select ¶
func (guo *GroupUpdateOne) Select(field string, fields ...string) *GroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GroupUpdateOne) SetName ¶
func (guo *GroupUpdateOne) SetName(s string) *GroupUpdateOne
SetName sets the "name" field.
func (*GroupUpdateOne) SetNillableName ¶
func (guo *GroupUpdateOne) SetNillableName(s *string) *GroupUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*GroupUpdateOne) Where ¶ added in v0.11.8
func (guo *GroupUpdateOne) Where(ps ...predicate.Group) *GroupUpdateOne
Where appends a list predicates to the GroupUpdate builder.
type GroupUpsert ¶
GroupUpsert is the "OnConflict" setter.
func (*GroupUpsert) SetName ¶
func (u *GroupUpsert) SetName(v string) *GroupUpsert
SetName sets the "name" field.
func (*GroupUpsert) UpdateName ¶
func (u *GroupUpsert) UpdateName() *GroupUpsert
UpdateName sets the "name" field to the value that was provided on create.
type GroupUpsertBulk ¶
type GroupUpsertBulk struct {
// contains filtered or unexported fields
}
GroupUpsertBulk is the builder for "upsert"-ing a bulk of Group nodes.
func (*GroupUpsertBulk) DoNothing ¶
func (u *GroupUpsertBulk) DoNothing() *GroupUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupUpsertBulk) Exec ¶
func (u *GroupUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpsertBulk) ExecX ¶
func (u *GroupUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpsertBulk) Ignore ¶
func (u *GroupUpsertBulk) Ignore() *GroupUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupUpsertBulk) SetName ¶
func (u *GroupUpsertBulk) SetName(v string) *GroupUpsertBulk
SetName sets the "name" field.
func (*GroupUpsertBulk) Update ¶
func (u *GroupUpsertBulk) Update(set func(*GroupUpsert)) *GroupUpsertBulk
Update allows overriding fields `UPDATE` values. See the GroupCreateBulk.OnConflict documentation for more info.
func (*GroupUpsertBulk) UpdateName ¶
func (u *GroupUpsertBulk) UpdateName() *GroupUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*GroupUpsertBulk) UpdateNewValues ¶
func (u *GroupUpsertBulk) UpdateNewValues() *GroupUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Group.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type GroupUpsertOne ¶
type GroupUpsertOne struct {
// contains filtered or unexported fields
}
GroupUpsertOne is the builder for "upsert"-ing
one Group node.
func (*GroupUpsertOne) DoNothing ¶
func (u *GroupUpsertOne) DoNothing() *GroupUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*GroupUpsertOne) Exec ¶
func (u *GroupUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*GroupUpsertOne) ExecX ¶
func (u *GroupUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GroupUpsertOne) ID ¶
func (u *GroupUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*GroupUpsertOne) IDX ¶
func (u *GroupUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*GroupUpsertOne) Ignore ¶
func (u *GroupUpsertOne) Ignore() *GroupUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Group.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*GroupUpsertOne) SetName ¶
func (u *GroupUpsertOne) SetName(v string) *GroupUpsertOne
SetName sets the "name" field.
func (*GroupUpsertOne) Update ¶
func (u *GroupUpsertOne) Update(set func(*GroupUpsert)) *GroupUpsertOne
Update allows overriding fields `UPDATE` values. See the GroupCreate.OnConflict documentation for more info.
func (*GroupUpsertOne) UpdateName ¶
func (u *GroupUpsertOne) UpdateName() *GroupUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*GroupUpsertOne) UpdateNewValues ¶
func (u *GroupUpsertOne) UpdateNewValues() *GroupUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Group.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type InterceptFunc ¶ added in v0.11.5
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶ added in v0.11.5
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
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 Process ¶ added in v0.11.8
type Process struct { // ID of the ent. ID int `json:"id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProcessQuery when eager-loading is set. Edges ProcessEdges `json:"edges"` // contains filtered or unexported fields }
Process is the model entity for the Process schema.
func (*Process) QueryAttachedFiles ¶ added in v0.11.8
func (pr *Process) QueryAttachedFiles() *AttachedFileQuery
QueryAttachedFiles queries the "attached_files" edge of the Process entity.
func (*Process) QueryFiles ¶ added in v0.11.8
QueryFiles queries the "files" edge of the Process entity.
func (*Process) Unwrap ¶ added in v0.11.8
Unwrap unwraps the Process 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 (*Process) Update ¶ added in v0.11.8
func (pr *Process) Update() *ProcessUpdateOne
Update returns a builder for updating this Process. Note that you need to call Process.Unwrap() before calling this method if this Process was returned from a transaction, and the transaction was committed or rolled back.
type ProcessClient ¶ added in v0.11.8
type ProcessClient struct {
// contains filtered or unexported fields
}
ProcessClient is a client for the Process schema.
func NewProcessClient ¶ added in v0.11.8
func NewProcessClient(c config) *ProcessClient
NewProcessClient returns a client for the Process from the given config.
func (*ProcessClient) Create ¶ added in v0.11.8
func (c *ProcessClient) Create() *ProcessCreate
Create returns a builder for creating a Process entity.
func (*ProcessClient) CreateBulk ¶ added in v0.11.8
func (c *ProcessClient) CreateBulk(builders ...*ProcessCreate) *ProcessCreateBulk
CreateBulk returns a builder for creating a bulk of Process entities.
func (*ProcessClient) Delete ¶ added in v0.11.8
func (c *ProcessClient) Delete() *ProcessDelete
Delete returns a delete builder for Process.
func (*ProcessClient) DeleteOne ¶ added in v0.11.8
func (c *ProcessClient) DeleteOne(pr *Process) *ProcessDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProcessClient) DeleteOneID ¶ added in v0.11.8
func (c *ProcessClient) DeleteOneID(id int) *ProcessDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProcessClient) GetX ¶ added in v0.11.8
func (c *ProcessClient) GetX(ctx context.Context, id int) *Process
GetX is like Get, but panics if an error occurs.
func (*ProcessClient) Hooks ¶ added in v0.11.8
func (c *ProcessClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProcessClient) Intercept ¶ added in v0.11.8
func (c *ProcessClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `process.Intercept(f(g(h())))`.
func (*ProcessClient) Interceptors ¶ added in v0.11.8
func (c *ProcessClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProcessClient) Query ¶ added in v0.11.8
func (c *ProcessClient) Query() *ProcessQuery
Query returns a query builder for Process.
func (*ProcessClient) QueryAttachedFiles ¶ added in v0.11.8
func (c *ProcessClient) QueryAttachedFiles(pr *Process) *AttachedFileQuery
QueryAttachedFiles queries the attached_files edge of a Process.
func (*ProcessClient) QueryFiles ¶ added in v0.11.8
func (c *ProcessClient) QueryFiles(pr *Process) *FileQuery
QueryFiles queries the files edge of a Process.
func (*ProcessClient) Update ¶ added in v0.11.8
func (c *ProcessClient) Update() *ProcessUpdate
Update returns an update builder for Process.
func (*ProcessClient) UpdateOne ¶ added in v0.11.8
func (c *ProcessClient) UpdateOne(pr *Process) *ProcessUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProcessClient) UpdateOneID ¶ added in v0.11.8
func (c *ProcessClient) UpdateOneID(id int) *ProcessUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProcessClient) Use ¶ added in v0.11.8
func (c *ProcessClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `process.Hooks(f(g(h())))`.
type ProcessCreate ¶ added in v0.11.8
type ProcessCreate struct {
// contains filtered or unexported fields
}
ProcessCreate is the builder for creating a Process entity.
func (*ProcessCreate) AddAttachedFileIDs ¶ added in v0.11.8
func (pc *ProcessCreate) AddAttachedFileIDs(ids ...int) *ProcessCreate
AddAttachedFileIDs adds the "attached_files" edge to the AttachedFile entity by IDs.
func (*ProcessCreate) AddAttachedFiles ¶ added in v0.11.8
func (pc *ProcessCreate) AddAttachedFiles(a ...*AttachedFile) *ProcessCreate
AddAttachedFiles adds the "attached_files" edges to the AttachedFile entity.
func (*ProcessCreate) AddFileIDs ¶ added in v0.11.8
func (pc *ProcessCreate) AddFileIDs(ids ...int) *ProcessCreate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*ProcessCreate) AddFiles ¶ added in v0.11.8
func (pc *ProcessCreate) AddFiles(f ...*File) *ProcessCreate
AddFiles adds the "files" edges to the File entity.
func (*ProcessCreate) Exec ¶ added in v0.11.8
func (pc *ProcessCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProcessCreate) ExecX ¶ added in v0.11.8
func (pc *ProcessCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessCreate) Mutation ¶ added in v0.11.8
func (pc *ProcessCreate) Mutation() *ProcessMutation
Mutation returns the ProcessMutation object of the builder.
func (*ProcessCreate) OnConflict ¶ added in v0.11.8
func (pc *ProcessCreate) OnConflict(opts ...sql.ConflictOption) *ProcessUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Process.Create(). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ProcessCreate) OnConflictColumns ¶ added in v0.11.8
func (pc *ProcessCreate) OnConflictColumns(columns ...string) *ProcessUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Process.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ProcessCreateBulk ¶ added in v0.11.8
type ProcessCreateBulk struct {
// contains filtered or unexported fields
}
ProcessCreateBulk is the builder for creating many Process entities in bulk.
func (*ProcessCreateBulk) Exec ¶ added in v0.11.8
func (pcb *ProcessCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProcessCreateBulk) ExecX ¶ added in v0.11.8
func (pcb *ProcessCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessCreateBulk) OnConflict ¶ added in v0.11.8
func (pcb *ProcessCreateBulk) OnConflict(opts ...sql.ConflictOption) *ProcessUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Process.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). Exec(ctx)
func (*ProcessCreateBulk) OnConflictColumns ¶ added in v0.11.8
func (pcb *ProcessCreateBulk) OnConflictColumns(columns ...string) *ProcessUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Process.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type ProcessDelete ¶ added in v0.11.8
type ProcessDelete struct {
// contains filtered or unexported fields
}
ProcessDelete is the builder for deleting a Process entity.
func (*ProcessDelete) Exec ¶ added in v0.11.8
func (pd *ProcessDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProcessDelete) ExecX ¶ added in v0.11.8
func (pd *ProcessDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProcessDelete) Where ¶ added in v0.11.8
func (pd *ProcessDelete) Where(ps ...predicate.Process) *ProcessDelete
Where appends a list predicates to the ProcessDelete builder.
type ProcessDeleteOne ¶ added in v0.11.8
type ProcessDeleteOne struct {
// contains filtered or unexported fields
}
ProcessDeleteOne is the builder for deleting a single Process entity.
func (*ProcessDeleteOne) Exec ¶ added in v0.11.8
func (pdo *ProcessDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProcessDeleteOne) ExecX ¶ added in v0.11.8
func (pdo *ProcessDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessDeleteOne) Where ¶ added in v0.11.8
func (pdo *ProcessDeleteOne) Where(ps ...predicate.Process) *ProcessDeleteOne
Where appends a list predicates to the ProcessDelete builder.
type ProcessEdges ¶ added in v0.11.8
type ProcessEdges struct { // Files that were attached by this process Files []*File `json:"files,omitempty"` // AttachedFiles holds the value of the attached_files edge. AttachedFiles []*AttachedFile `json:"attached_files,omitempty"` // contains filtered or unexported fields }
ProcessEdges holds the relations/edges for other nodes in the graph.
func (ProcessEdges) AttachedFilesOrErr ¶ added in v0.11.8
func (e ProcessEdges) AttachedFilesOrErr() ([]*AttachedFile, error)
AttachedFilesOrErr returns the AttachedFiles value or an error if the edge was not loaded in eager-loading.
func (ProcessEdges) FilesOrErr ¶ added in v0.11.8
func (e ProcessEdges) FilesOrErr() ([]*File, error)
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
type ProcessFilter ¶ added in v0.11.8
type ProcessFilter struct {
// contains filtered or unexported fields
}
ProcessFilter provides a generic filtering capability at runtime for ProcessQuery.
func (*ProcessFilter) Where ¶ added in v0.11.8
func (f *ProcessFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*ProcessFilter) WhereHasAttachedFiles ¶ added in v0.11.8
func (f *ProcessFilter) WhereHasAttachedFiles()
WhereHasAttachedFiles applies a predicate to check if query has an edge attached_files.
func (*ProcessFilter) WhereHasAttachedFilesWith ¶ added in v0.11.8
func (f *ProcessFilter) WhereHasAttachedFilesWith(preds ...predicate.AttachedFile)
WhereHasAttachedFilesWith applies a predicate to check if query has an edge attached_files with a given conditions (other predicates).
func (*ProcessFilter) WhereHasFiles ¶ added in v0.11.8
func (f *ProcessFilter) WhereHasFiles()
WhereHasFiles applies a predicate to check if query has an edge files.
func (*ProcessFilter) WhereHasFilesWith ¶ added in v0.11.8
func (f *ProcessFilter) WhereHasFilesWith(preds ...predicate.File)
WhereHasFilesWith applies a predicate to check if query has an edge files with a given conditions (other predicates).
func (*ProcessFilter) WhereID ¶ added in v0.11.8
func (f *ProcessFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
type ProcessGroupBy ¶ added in v0.11.8
type ProcessGroupBy struct {
// contains filtered or unexported fields
}
ProcessGroupBy is the group-by builder for Process entities.
func (*ProcessGroupBy) Aggregate ¶ added in v0.11.8
func (pgb *ProcessGroupBy) Aggregate(fns ...AggregateFunc) *ProcessGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProcessGroupBy) Bool ¶ added in v0.11.8
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) Bools ¶ added in v0.11.8
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) BoolsX ¶ added in v0.11.8
BoolsX is like Bools, but panics if an error occurs.
func (*ProcessGroupBy) Float64 ¶ added in v0.11.8
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) Float64X ¶ added in v0.11.8
Float64X is like Float64, but panics if an error occurs.
func (*ProcessGroupBy) Float64s ¶ added in v0.11.8
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) Float64sX ¶ added in v0.11.8
Float64sX is like Float64s, but panics if an error occurs.
func (*ProcessGroupBy) Int ¶ added in v0.11.8
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) Ints ¶ added in v0.11.8
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) Scan ¶ added in v0.11.8
func (pgb *ProcessGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProcessGroupBy) String ¶ added in v0.11.8
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ProcessGroupBy) StringX ¶ added in v0.11.8
StringX is like String, but panics if an error occurs.
type ProcessMutation ¶ added in v0.11.8
type ProcessMutation struct {
// contains filtered or unexported fields
}
ProcessMutation represents an operation that mutates the Process nodes in the graph.
func (*ProcessMutation) AddAttachedFileIDs ¶ added in v0.11.8
func (m *ProcessMutation) AddAttachedFileIDs(ids ...int)
AddAttachedFileIDs adds the "attached_files" edge to the AttachedFile entity by ids.
func (*ProcessMutation) AddField ¶ added in v0.11.8
func (m *ProcessMutation) 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 (*ProcessMutation) AddFileIDs ¶ added in v0.11.8
func (m *ProcessMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "files" edge to the File entity by ids.
func (*ProcessMutation) AddedEdges ¶ added in v0.11.8
func (m *ProcessMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProcessMutation) AddedField ¶ added in v0.11.8
func (m *ProcessMutation) 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 (*ProcessMutation) AddedFields ¶ added in v0.11.8
func (m *ProcessMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProcessMutation) AddedIDs ¶ added in v0.11.8
func (m *ProcessMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProcessMutation) AttachedFilesCleared ¶ added in v0.11.8
func (m *ProcessMutation) AttachedFilesCleared() bool
AttachedFilesCleared reports if the "attached_files" edge to the AttachedFile entity was cleared.
func (*ProcessMutation) AttachedFilesIDs ¶ added in v0.11.8
func (m *ProcessMutation) AttachedFilesIDs() (ids []int)
AttachedFilesIDs returns the "attached_files" edge IDs in the mutation.
func (*ProcessMutation) ClearAttachedFiles ¶ added in v0.11.8
func (m *ProcessMutation) ClearAttachedFiles()
ClearAttachedFiles clears the "attached_files" edge to the AttachedFile entity.
func (*ProcessMutation) ClearEdge ¶ added in v0.11.8
func (m *ProcessMutation) 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 (*ProcessMutation) ClearField ¶ added in v0.11.8
func (m *ProcessMutation) 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 (*ProcessMutation) ClearFiles ¶ added in v0.11.8
func (m *ProcessMutation) ClearFiles()
ClearFiles clears the "files" edge to the File entity.
func (*ProcessMutation) ClearedEdges ¶ added in v0.11.8
func (m *ProcessMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProcessMutation) ClearedFields ¶ added in v0.11.8
func (m *ProcessMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProcessMutation) Client ¶ added in v0.11.8
func (m ProcessMutation) 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 (*ProcessMutation) EdgeCleared ¶ added in v0.11.8
func (m *ProcessMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProcessMutation) Field ¶ added in v0.11.8
func (m *ProcessMutation) 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 (*ProcessMutation) FieldCleared ¶ added in v0.11.8
func (m *ProcessMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProcessMutation) Fields ¶ added in v0.11.8
func (m *ProcessMutation) 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 (*ProcessMutation) FilesCleared ¶ added in v0.11.8
func (m *ProcessMutation) FilesCleared() bool
FilesCleared reports if the "files" edge to the File entity was cleared.
func (*ProcessMutation) FilesIDs ¶ added in v0.11.8
func (m *ProcessMutation) FilesIDs() (ids []int)
FilesIDs returns the "files" edge IDs in the mutation.
func (*ProcessMutation) Filter ¶ added in v0.11.8
func (m *ProcessMutation) Filter() *ProcessFilter
Filter returns an entql.Where implementation to apply filters on the ProcessMutation builder.
func (*ProcessMutation) ID ¶ added in v0.11.8
func (m *ProcessMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ProcessMutation) IDs ¶ added in v0.11.8
func (m *ProcessMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ProcessMutation) OldField ¶ added in v0.11.8
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 (*ProcessMutation) Op ¶ added in v0.11.8
func (m *ProcessMutation) Op() Op
Op returns the operation name.
func (*ProcessMutation) RemoveAttachedFileIDs ¶ added in v0.11.8
func (m *ProcessMutation) RemoveAttachedFileIDs(ids ...int)
RemoveAttachedFileIDs removes the "attached_files" edge to the AttachedFile entity by IDs.
func (*ProcessMutation) RemoveFileIDs ¶ added in v0.11.8
func (m *ProcessMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "files" edge to the File entity by IDs.
func (*ProcessMutation) RemovedAttachedFilesIDs ¶ added in v0.11.8
func (m *ProcessMutation) RemovedAttachedFilesIDs() (ids []int)
RemovedAttachedFiles returns the removed IDs of the "attached_files" edge to the AttachedFile entity.
func (*ProcessMutation) RemovedEdges ¶ added in v0.11.8
func (m *ProcessMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProcessMutation) RemovedFilesIDs ¶ added in v0.11.8
func (m *ProcessMutation) RemovedFilesIDs() (ids []int)
RemovedFiles returns the removed IDs of the "files" edge to the File entity.
func (*ProcessMutation) RemovedIDs ¶ added in v0.11.8
func (m *ProcessMutation) 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 (*ProcessMutation) ResetAttachedFiles ¶ added in v0.11.8
func (m *ProcessMutation) ResetAttachedFiles()
ResetAttachedFiles resets all changes to the "attached_files" edge.
func (*ProcessMutation) ResetEdge ¶ added in v0.11.8
func (m *ProcessMutation) 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 (*ProcessMutation) ResetField ¶ added in v0.11.8
func (m *ProcessMutation) 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 (*ProcessMutation) ResetFiles ¶ added in v0.11.8
func (m *ProcessMutation) ResetFiles()
ResetFiles resets all changes to the "files" edge.
func (*ProcessMutation) SetField ¶ added in v0.11.8
func (m *ProcessMutation) 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 (*ProcessMutation) SetOp ¶ added in v0.11.8
func (m *ProcessMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ProcessMutation) Tx ¶ added in v0.11.8
func (m ProcessMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProcessMutation) Type ¶ added in v0.11.8
func (m *ProcessMutation) Type() string
Type returns the node type of this mutation (Process).
func (*ProcessMutation) Where ¶ added in v0.11.8
func (m *ProcessMutation) Where(ps ...predicate.Process)
Where appends a list predicates to the ProcessMutation builder.
func (*ProcessMutation) WhereP ¶ added in v0.11.8
func (m *ProcessMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProcessMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProcessQuery ¶ added in v0.11.8
type ProcessQuery struct {
// contains filtered or unexported fields
}
ProcessQuery is the builder for querying Process entities.
func (*ProcessQuery) Aggregate ¶ added in v0.11.8
func (pq *ProcessQuery) Aggregate(fns ...AggregateFunc) *ProcessSelect
Aggregate returns a ProcessSelect configured with the given aggregations.
func (*ProcessQuery) All ¶ added in v0.11.8
func (pq *ProcessQuery) All(ctx context.Context) ([]*Process, error)
All executes the query and returns a list of Processes.
func (*ProcessQuery) AllX ¶ added in v0.11.8
func (pq *ProcessQuery) AllX(ctx context.Context) []*Process
AllX is like All, but panics if an error occurs.
func (*ProcessQuery) Clone ¶ added in v0.11.8
func (pq *ProcessQuery) Clone() *ProcessQuery
Clone returns a duplicate of the ProcessQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProcessQuery) Count ¶ added in v0.11.8
func (pq *ProcessQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProcessQuery) CountX ¶ added in v0.11.8
func (pq *ProcessQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProcessQuery) Exist ¶ added in v0.11.8
func (pq *ProcessQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProcessQuery) ExistX ¶ added in v0.11.8
func (pq *ProcessQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProcessQuery) Filter ¶ added in v0.11.8
func (pq *ProcessQuery) Filter() *ProcessFilter
Filter returns a Filter implementation to apply filters on the ProcessQuery builder.
func (*ProcessQuery) First ¶ added in v0.11.8
func (pq *ProcessQuery) First(ctx context.Context) (*Process, error)
First returns the first Process entity from the query. Returns a *NotFoundError when no Process was found.
func (*ProcessQuery) FirstID ¶ added in v0.11.8
func (pq *ProcessQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Process ID from the query. Returns a *NotFoundError when no Process ID was found.
func (*ProcessQuery) FirstIDX ¶ added in v0.11.8
func (pq *ProcessQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProcessQuery) FirstX ¶ added in v0.11.8
func (pq *ProcessQuery) FirstX(ctx context.Context) *Process
FirstX is like First, but panics if an error occurs.
func (*ProcessQuery) GroupBy ¶ added in v0.11.8
func (pq *ProcessQuery) GroupBy(field string, fields ...string) *ProcessGroupBy
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.
func (*ProcessQuery) IDs ¶ added in v0.11.8
func (pq *ProcessQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Process IDs.
func (*ProcessQuery) IDsX ¶ added in v0.11.8
func (pq *ProcessQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ProcessQuery) Limit ¶ added in v0.11.8
func (pq *ProcessQuery) Limit(limit int) *ProcessQuery
Limit the number of records to be returned by this query.
func (*ProcessQuery) Offset ¶ added in v0.11.8
func (pq *ProcessQuery) Offset(offset int) *ProcessQuery
Offset to start from.
func (*ProcessQuery) Only ¶ added in v0.11.8
func (pq *ProcessQuery) Only(ctx context.Context) (*Process, error)
Only returns a single Process entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Process entity is found. Returns a *NotFoundError when no Process entities are found.
func (*ProcessQuery) OnlyID ¶ added in v0.11.8
func (pq *ProcessQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Process ID in the query. Returns a *NotSingularError when more than one Process ID is found. Returns a *NotFoundError when no entities are found.
func (*ProcessQuery) OnlyIDX ¶ added in v0.11.8
func (pq *ProcessQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProcessQuery) OnlyX ¶ added in v0.11.8
func (pq *ProcessQuery) OnlyX(ctx context.Context) *Process
OnlyX is like Only, but panics if an error occurs.
func (*ProcessQuery) Order ¶ added in v0.11.8
func (pq *ProcessQuery) Order(o ...OrderFunc) *ProcessQuery
Order specifies how the records should be ordered.
func (*ProcessQuery) QueryAttachedFiles ¶ added in v0.11.8
func (pq *ProcessQuery) QueryAttachedFiles() *AttachedFileQuery
QueryAttachedFiles chains the current query on the "attached_files" edge.
func (*ProcessQuery) QueryFiles ¶ added in v0.11.8
func (pq *ProcessQuery) QueryFiles() *FileQuery
QueryFiles chains the current query on the "files" edge.
func (*ProcessQuery) Select ¶ added in v0.11.8
func (pq *ProcessQuery) Select(fields ...string) *ProcessSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*ProcessQuery) Unique ¶ added in v0.11.8
func (pq *ProcessQuery) Unique(unique bool) *ProcessQuery
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 (*ProcessQuery) Where ¶ added in v0.11.8
func (pq *ProcessQuery) Where(ps ...predicate.Process) *ProcessQuery
Where adds a new predicate for the ProcessQuery builder.
func (*ProcessQuery) WithAttachedFiles ¶ added in v0.11.8
func (pq *ProcessQuery) WithAttachedFiles(opts ...func(*AttachedFileQuery)) *ProcessQuery
WithAttachedFiles tells the query-builder to eager-load the nodes that are connected to the "attached_files" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProcessQuery) WithFiles ¶ added in v0.11.8
func (pq *ProcessQuery) WithFiles(opts ...func(*FileQuery)) *ProcessQuery
WithFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge. The optional arguments are used to configure the query builder of the edge.
type ProcessSelect ¶ added in v0.11.8
type ProcessSelect struct { *ProcessQuery // contains filtered or unexported fields }
ProcessSelect is the builder for selecting fields of Process entities.
func (*ProcessSelect) Aggregate ¶ added in v0.11.8
func (ps *ProcessSelect) Aggregate(fns ...AggregateFunc) *ProcessSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProcessSelect) Bool ¶ added in v0.11.8
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Bools ¶ added in v0.11.8
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) BoolsX ¶ added in v0.11.8
BoolsX is like Bools, but panics if an error occurs.
func (*ProcessSelect) Float64 ¶ added in v0.11.8
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Float64X ¶ added in v0.11.8
Float64X is like Float64, but panics if an error occurs.
func (*ProcessSelect) Float64s ¶ added in v0.11.8
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Float64sX ¶ added in v0.11.8
Float64sX is like Float64s, but panics if an error occurs.
func (*ProcessSelect) Int ¶ added in v0.11.8
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Ints ¶ added in v0.11.8
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) Scan ¶ added in v0.11.8
func (ps *ProcessSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProcessSelect) String ¶ added in v0.11.8
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ProcessSelect) StringX ¶ added in v0.11.8
StringX is like String, but panics if an error occurs.
type ProcessUpdate ¶ added in v0.11.8
type ProcessUpdate struct {
// contains filtered or unexported fields
}
ProcessUpdate is the builder for updating Process entities.
func (*ProcessUpdate) AddAttachedFileIDs ¶ added in v0.11.8
func (pu *ProcessUpdate) AddAttachedFileIDs(ids ...int) *ProcessUpdate
AddAttachedFileIDs adds the "attached_files" edge to the AttachedFile entity by IDs.
func (*ProcessUpdate) AddAttachedFiles ¶ added in v0.11.8
func (pu *ProcessUpdate) AddAttachedFiles(a ...*AttachedFile) *ProcessUpdate
AddAttachedFiles adds the "attached_files" edges to the AttachedFile entity.
func (*ProcessUpdate) AddFileIDs ¶ added in v0.11.8
func (pu *ProcessUpdate) AddFileIDs(ids ...int) *ProcessUpdate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*ProcessUpdate) AddFiles ¶ added in v0.11.8
func (pu *ProcessUpdate) AddFiles(f ...*File) *ProcessUpdate
AddFiles adds the "files" edges to the File entity.
func (*ProcessUpdate) ClearAttachedFiles ¶ added in v0.11.8
func (pu *ProcessUpdate) ClearAttachedFiles() *ProcessUpdate
ClearAttachedFiles clears all "attached_files" edges to the AttachedFile entity.
func (*ProcessUpdate) ClearFiles ¶ added in v0.11.8
func (pu *ProcessUpdate) ClearFiles() *ProcessUpdate
ClearFiles clears all "files" edges to the File entity.
func (*ProcessUpdate) Exec ¶ added in v0.11.8
func (pu *ProcessUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProcessUpdate) ExecX ¶ added in v0.11.8
func (pu *ProcessUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessUpdate) Mutation ¶ added in v0.11.8
func (pu *ProcessUpdate) Mutation() *ProcessMutation
Mutation returns the ProcessMutation object of the builder.
func (*ProcessUpdate) RemoveAttachedFileIDs ¶ added in v0.11.8
func (pu *ProcessUpdate) RemoveAttachedFileIDs(ids ...int) *ProcessUpdate
RemoveAttachedFileIDs removes the "attached_files" edge to AttachedFile entities by IDs.
func (*ProcessUpdate) RemoveAttachedFiles ¶ added in v0.11.8
func (pu *ProcessUpdate) RemoveAttachedFiles(a ...*AttachedFile) *ProcessUpdate
RemoveAttachedFiles removes "attached_files" edges to AttachedFile entities.
func (*ProcessUpdate) RemoveFileIDs ¶ added in v0.11.8
func (pu *ProcessUpdate) RemoveFileIDs(ids ...int) *ProcessUpdate
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*ProcessUpdate) RemoveFiles ¶ added in v0.11.8
func (pu *ProcessUpdate) RemoveFiles(f ...*File) *ProcessUpdate
RemoveFiles removes "files" edges to File entities.
func (*ProcessUpdate) Save ¶ added in v0.11.8
func (pu *ProcessUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProcessUpdate) SaveX ¶ added in v0.11.8
func (pu *ProcessUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProcessUpdate) Where ¶ added in v0.11.8
func (pu *ProcessUpdate) Where(ps ...predicate.Process) *ProcessUpdate
Where appends a list predicates to the ProcessUpdate builder.
type ProcessUpdateOne ¶ added in v0.11.8
type ProcessUpdateOne struct {
// contains filtered or unexported fields
}
ProcessUpdateOne is the builder for updating a single Process entity.
func (*ProcessUpdateOne) AddAttachedFileIDs ¶ added in v0.11.8
func (puo *ProcessUpdateOne) AddAttachedFileIDs(ids ...int) *ProcessUpdateOne
AddAttachedFileIDs adds the "attached_files" edge to the AttachedFile entity by IDs.
func (*ProcessUpdateOne) AddAttachedFiles ¶ added in v0.11.8
func (puo *ProcessUpdateOne) AddAttachedFiles(a ...*AttachedFile) *ProcessUpdateOne
AddAttachedFiles adds the "attached_files" edges to the AttachedFile entity.
func (*ProcessUpdateOne) AddFileIDs ¶ added in v0.11.8
func (puo *ProcessUpdateOne) AddFileIDs(ids ...int) *ProcessUpdateOne
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*ProcessUpdateOne) AddFiles ¶ added in v0.11.8
func (puo *ProcessUpdateOne) AddFiles(f ...*File) *ProcessUpdateOne
AddFiles adds the "files" edges to the File entity.
func (*ProcessUpdateOne) ClearAttachedFiles ¶ added in v0.11.8
func (puo *ProcessUpdateOne) ClearAttachedFiles() *ProcessUpdateOne
ClearAttachedFiles clears all "attached_files" edges to the AttachedFile entity.
func (*ProcessUpdateOne) ClearFiles ¶ added in v0.11.8
func (puo *ProcessUpdateOne) ClearFiles() *ProcessUpdateOne
ClearFiles clears all "files" edges to the File entity.
func (*ProcessUpdateOne) Exec ¶ added in v0.11.8
func (puo *ProcessUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProcessUpdateOne) ExecX ¶ added in v0.11.8
func (puo *ProcessUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessUpdateOne) Mutation ¶ added in v0.11.8
func (puo *ProcessUpdateOne) Mutation() *ProcessMutation
Mutation returns the ProcessMutation object of the builder.
func (*ProcessUpdateOne) RemoveAttachedFileIDs ¶ added in v0.11.8
func (puo *ProcessUpdateOne) RemoveAttachedFileIDs(ids ...int) *ProcessUpdateOne
RemoveAttachedFileIDs removes the "attached_files" edge to AttachedFile entities by IDs.
func (*ProcessUpdateOne) RemoveAttachedFiles ¶ added in v0.11.8
func (puo *ProcessUpdateOne) RemoveAttachedFiles(a ...*AttachedFile) *ProcessUpdateOne
RemoveAttachedFiles removes "attached_files" edges to AttachedFile entities.
func (*ProcessUpdateOne) RemoveFileIDs ¶ added in v0.11.8
func (puo *ProcessUpdateOne) RemoveFileIDs(ids ...int) *ProcessUpdateOne
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*ProcessUpdateOne) RemoveFiles ¶ added in v0.11.8
func (puo *ProcessUpdateOne) RemoveFiles(f ...*File) *ProcessUpdateOne
RemoveFiles removes "files" edges to File entities.
func (*ProcessUpdateOne) Save ¶ added in v0.11.8
func (puo *ProcessUpdateOne) Save(ctx context.Context) (*Process, error)
Save executes the query and returns the updated Process entity.
func (*ProcessUpdateOne) SaveX ¶ added in v0.11.8
func (puo *ProcessUpdateOne) SaveX(ctx context.Context) *Process
SaveX is like Save, but panics if an error occurs.
func (*ProcessUpdateOne) Select ¶ added in v0.11.8
func (puo *ProcessUpdateOne) Select(field string, fields ...string) *ProcessUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProcessUpdateOne) Where ¶ added in v0.11.8
func (puo *ProcessUpdateOne) Where(ps ...predicate.Process) *ProcessUpdateOne
Where appends a list predicates to the ProcessUpdate builder.
type ProcessUpsert ¶ added in v0.11.8
ProcessUpsert is the "OnConflict" setter.
type ProcessUpsertBulk ¶ added in v0.11.8
type ProcessUpsertBulk struct {
// contains filtered or unexported fields
}
ProcessUpsertBulk is the builder for "upsert"-ing a bulk of Process nodes.
func (*ProcessUpsertBulk) DoNothing ¶ added in v0.11.8
func (u *ProcessUpsertBulk) DoNothing() *ProcessUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ProcessUpsertBulk) Exec ¶ added in v0.11.8
func (u *ProcessUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProcessUpsertBulk) ExecX ¶ added in v0.11.8
func (u *ProcessUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessUpsertBulk) Ignore ¶ added in v0.11.8
func (u *ProcessUpsertBulk) Ignore() *ProcessUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Process.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ProcessUpsertBulk) Update ¶ added in v0.11.8
func (u *ProcessUpsertBulk) Update(set func(*ProcessUpsert)) *ProcessUpsertBulk
Update allows overriding fields `UPDATE` values. See the ProcessCreateBulk.OnConflict documentation for more info.
func (*ProcessUpsertBulk) UpdateNewValues ¶ added in v0.11.8
func (u *ProcessUpsertBulk) UpdateNewValues() *ProcessUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Process.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type ProcessUpsertOne ¶ added in v0.11.8
type ProcessUpsertOne struct {
// contains filtered or unexported fields
}
ProcessUpsertOne is the builder for "upsert"-ing
one Process node.
func (*ProcessUpsertOne) DoNothing ¶ added in v0.11.8
func (u *ProcessUpsertOne) DoNothing() *ProcessUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*ProcessUpsertOne) Exec ¶ added in v0.11.8
func (u *ProcessUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*ProcessUpsertOne) ExecX ¶ added in v0.11.8
func (u *ProcessUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProcessUpsertOne) ID ¶ added in v0.11.8
func (u *ProcessUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*ProcessUpsertOne) IDX ¶ added in v0.11.8
func (u *ProcessUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*ProcessUpsertOne) Ignore ¶ added in v0.11.8
func (u *ProcessUpsertOne) Ignore() *ProcessUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Process.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*ProcessUpsertOne) Update ¶ added in v0.11.8
func (u *ProcessUpsertOne) Update(set func(*ProcessUpsert)) *ProcessUpsertOne
Update allows overriding fields `UPDATE` values. See the ProcessCreate.OnConflict documentation for more info.
func (*ProcessUpsertOne) UpdateNewValues ¶ added in v0.11.8
func (u *ProcessUpsertOne) UpdateNewValues() *ProcessUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Process.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type Processes ¶ added in v0.11.8
type Processes []*Process
Processes is a parsable slice of Process.
type QuerierFunc ¶ added in v0.11.5
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶ added in v0.11.6
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type Relationship ¶
type Relationship struct { // Weight holds the value of the "weight" field. Weight int `json:"weight,omitempty"` // UserID holds the value of the "user_id" field. UserID int `json:"user_id,omitempty"` // RelativeID holds the value of the "relative_id" field. RelativeID int `json:"relative_id,omitempty"` // InfoID holds the value of the "info_id" field. InfoID int `json:"info_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RelationshipQuery when eager-loading is set. Edges RelationshipEdges `json:"edges"` // contains filtered or unexported fields }
Relationship is the model entity for the Relationship schema.
func (*Relationship) QueryInfo ¶
func (r *Relationship) QueryInfo() *RelationshipInfoQuery
QueryInfo queries the "info" edge of the Relationship entity.
func (*Relationship) QueryRelative ¶
func (r *Relationship) QueryRelative() *UserQuery
QueryRelative queries the "relative" edge of the Relationship entity.
func (*Relationship) QueryUser ¶
func (r *Relationship) QueryUser() *UserQuery
QueryUser queries the "user" edge of the Relationship entity.
func (*Relationship) String ¶
func (r *Relationship) String() string
String implements the fmt.Stringer.
func (*Relationship) Unwrap ¶
func (r *Relationship) Unwrap() *Relationship
Unwrap unwraps the Relationship 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 (*Relationship) Update ¶
func (r *Relationship) Update() *RelationshipUpdateOne
Update returns a builder for updating this Relationship. Note that you need to call Relationship.Unwrap() before calling this method if this Relationship was returned from a transaction, and the transaction was committed or rolled back.
type RelationshipClient ¶
type RelationshipClient struct {
// contains filtered or unexported fields
}
RelationshipClient is a client for the Relationship schema.
func NewRelationshipClient ¶
func NewRelationshipClient(c config) *RelationshipClient
NewRelationshipClient returns a client for the Relationship from the given config.
func (*RelationshipClient) Create ¶
func (c *RelationshipClient) Create() *RelationshipCreate
Create returns a builder for creating a Relationship entity.
func (*RelationshipClient) CreateBulk ¶
func (c *RelationshipClient) CreateBulk(builders ...*RelationshipCreate) *RelationshipCreateBulk
CreateBulk returns a builder for creating a bulk of Relationship entities.
func (*RelationshipClient) Delete ¶
func (c *RelationshipClient) Delete() *RelationshipDelete
Delete returns a delete builder for Relationship.
func (*RelationshipClient) Hooks ¶
func (c *RelationshipClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RelationshipClient) Intercept ¶ added in v0.11.5
func (c *RelationshipClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `relationship.Intercept(f(g(h())))`.
func (*RelationshipClient) Interceptors ¶ added in v0.11.5
func (c *RelationshipClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RelationshipClient) Query ¶
func (c *RelationshipClient) Query() *RelationshipQuery
Query returns a query builder for Relationship.
func (*RelationshipClient) QueryInfo ¶
func (c *RelationshipClient) QueryInfo(r *Relationship) *RelationshipInfoQuery
QueryInfo queries the info edge of a Relationship.
func (*RelationshipClient) QueryRelative ¶
func (c *RelationshipClient) QueryRelative(r *Relationship) *UserQuery
QueryRelative queries the relative edge of a Relationship.
func (*RelationshipClient) QueryUser ¶
func (c *RelationshipClient) QueryUser(r *Relationship) *UserQuery
QueryUser queries the user edge of a Relationship.
func (*RelationshipClient) Update ¶
func (c *RelationshipClient) Update() *RelationshipUpdate
Update returns an update builder for Relationship.
func (*RelationshipClient) UpdateOne ¶
func (c *RelationshipClient) UpdateOne(r *Relationship) *RelationshipUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RelationshipClient) Use ¶
func (c *RelationshipClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `relationship.Hooks(f(g(h())))`.
type RelationshipCreate ¶
type RelationshipCreate struct {
// contains filtered or unexported fields
}
RelationshipCreate is the builder for creating a Relationship entity.
func (*RelationshipCreate) Exec ¶
func (rc *RelationshipCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RelationshipCreate) ExecX ¶
func (rc *RelationshipCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipCreate) Mutation ¶
func (rc *RelationshipCreate) Mutation() *RelationshipMutation
Mutation returns the RelationshipMutation object of the builder.
func (*RelationshipCreate) OnConflict ¶
func (rc *RelationshipCreate) OnConflict(opts ...sql.ConflictOption) *RelationshipUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Relationship.Create(). SetWeight(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RelationshipUpsert) { SetWeight(v+v). }). Exec(ctx)
func (*RelationshipCreate) OnConflictColumns ¶
func (rc *RelationshipCreate) OnConflictColumns(columns ...string) *RelationshipUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Relationship.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RelationshipCreate) Save ¶
func (rc *RelationshipCreate) Save(ctx context.Context) (*Relationship, error)
Save creates the Relationship in the database.
func (*RelationshipCreate) SaveX ¶
func (rc *RelationshipCreate) SaveX(ctx context.Context) *Relationship
SaveX calls Save and panics if Save returns an error.
func (*RelationshipCreate) SetInfo ¶
func (rc *RelationshipCreate) SetInfo(r *RelationshipInfo) *RelationshipCreate
SetInfo sets the "info" edge to the RelationshipInfo entity.
func (*RelationshipCreate) SetInfoID ¶
func (rc *RelationshipCreate) SetInfoID(i int) *RelationshipCreate
SetInfoID sets the "info_id" field.
func (*RelationshipCreate) SetNillableInfoID ¶
func (rc *RelationshipCreate) SetNillableInfoID(i *int) *RelationshipCreate
SetNillableInfoID sets the "info_id" field if the given value is not nil.
func (*RelationshipCreate) SetNillableWeight ¶
func (rc *RelationshipCreate) SetNillableWeight(i *int) *RelationshipCreate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*RelationshipCreate) SetRelative ¶
func (rc *RelationshipCreate) SetRelative(u *User) *RelationshipCreate
SetRelative sets the "relative" edge to the User entity.
func (*RelationshipCreate) SetRelativeID ¶
func (rc *RelationshipCreate) SetRelativeID(i int) *RelationshipCreate
SetRelativeID sets the "relative_id" field.
func (*RelationshipCreate) SetUser ¶
func (rc *RelationshipCreate) SetUser(u *User) *RelationshipCreate
SetUser sets the "user" edge to the User entity.
func (*RelationshipCreate) SetUserID ¶
func (rc *RelationshipCreate) SetUserID(i int) *RelationshipCreate
SetUserID sets the "user_id" field.
func (*RelationshipCreate) SetWeight ¶
func (rc *RelationshipCreate) SetWeight(i int) *RelationshipCreate
SetWeight sets the "weight" field.
type RelationshipCreateBulk ¶
type RelationshipCreateBulk struct {
// contains filtered or unexported fields
}
RelationshipCreateBulk is the builder for creating many Relationship entities in bulk.
func (*RelationshipCreateBulk) Exec ¶
func (rcb *RelationshipCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RelationshipCreateBulk) ExecX ¶
func (rcb *RelationshipCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipCreateBulk) OnConflict ¶
func (rcb *RelationshipCreateBulk) OnConflict(opts ...sql.ConflictOption) *RelationshipUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Relationship.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RelationshipUpsert) { SetWeight(v+v). }). Exec(ctx)
func (*RelationshipCreateBulk) OnConflictColumns ¶
func (rcb *RelationshipCreateBulk) OnConflictColumns(columns ...string) *RelationshipUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Relationship.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RelationshipCreateBulk) Save ¶
func (rcb *RelationshipCreateBulk) Save(ctx context.Context) ([]*Relationship, error)
Save creates the Relationship entities in the database.
func (*RelationshipCreateBulk) SaveX ¶
func (rcb *RelationshipCreateBulk) SaveX(ctx context.Context) []*Relationship
SaveX is like Save, but panics if an error occurs.
type RelationshipDelete ¶
type RelationshipDelete struct {
// contains filtered or unexported fields
}
RelationshipDelete is the builder for deleting a Relationship entity.
func (*RelationshipDelete) Exec ¶
func (rd *RelationshipDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RelationshipDelete) ExecX ¶
func (rd *RelationshipDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipDelete) Where ¶
func (rd *RelationshipDelete) Where(ps ...predicate.Relationship) *RelationshipDelete
Where appends a list predicates to the RelationshipDelete builder.
type RelationshipDeleteOne ¶
type RelationshipDeleteOne struct {
// contains filtered or unexported fields
}
RelationshipDeleteOne is the builder for deleting a single Relationship entity.
func (*RelationshipDeleteOne) Exec ¶
func (rdo *RelationshipDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RelationshipDeleteOne) ExecX ¶
func (rdo *RelationshipDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipDeleteOne) Where ¶ added in v0.11.7
func (rdo *RelationshipDeleteOne) Where(ps ...predicate.Relationship) *RelationshipDeleteOne
Where appends a list predicates to the RelationshipDelete builder.
type RelationshipEdges ¶
type RelationshipEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Relative holds the value of the relative edge. Relative *User `json:"relative,omitempty"` // Info holds the value of the info edge. Info *RelationshipInfo `json:"info,omitempty"` // contains filtered or unexported fields }
RelationshipEdges holds the relations/edges for other nodes in the graph.
func (RelationshipEdges) InfoOrErr ¶
func (e RelationshipEdges) InfoOrErr() (*RelationshipInfo, error)
InfoOrErr returns the Info value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RelationshipEdges) RelativeOrErr ¶
func (e RelationshipEdges) RelativeOrErr() (*User, error)
RelativeOrErr returns the Relative value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RelationshipEdges) UserOrErr ¶
func (e RelationshipEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RelationshipFilter ¶ added in v0.11.2
type RelationshipFilter struct {
// contains filtered or unexported fields
}
RelationshipFilter provides a generic filtering capability at runtime for RelationshipQuery.
func (*RelationshipFilter) Where ¶ added in v0.11.2
func (f *RelationshipFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*RelationshipFilter) WhereHasInfo ¶ added in v0.11.2
func (f *RelationshipFilter) WhereHasInfo()
WhereHasInfo applies a predicate to check if query has an edge info.
func (*RelationshipFilter) WhereHasInfoWith ¶ added in v0.11.2
func (f *RelationshipFilter) WhereHasInfoWith(preds ...predicate.RelationshipInfo)
WhereHasInfoWith applies a predicate to check if query has an edge info with a given conditions (other predicates).
func (*RelationshipFilter) WhereHasRelative ¶ added in v0.11.2
func (f *RelationshipFilter) WhereHasRelative()
WhereHasRelative applies a predicate to check if query has an edge relative.
func (*RelationshipFilter) WhereHasRelativeWith ¶ added in v0.11.2
func (f *RelationshipFilter) WhereHasRelativeWith(preds ...predicate.User)
WhereHasRelativeWith applies a predicate to check if query has an edge relative with a given conditions (other predicates).
func (*RelationshipFilter) WhereHasUser ¶ added in v0.11.2
func (f *RelationshipFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (*RelationshipFilter) WhereHasUserWith ¶ added in v0.11.2
func (f *RelationshipFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (*RelationshipFilter) WhereInfoID ¶ added in v0.11.2
func (f *RelationshipFilter) WhereInfoID(p entql.IntP)
WhereInfoID applies the entql int predicate on the info_id field.
func (*RelationshipFilter) WhereRelativeID ¶ added in v0.11.2
func (f *RelationshipFilter) WhereRelativeID(p entql.IntP)
WhereRelativeID applies the entql int predicate on the relative_id field.
func (*RelationshipFilter) WhereUserID ¶ added in v0.11.2
func (f *RelationshipFilter) WhereUserID(p entql.IntP)
WhereUserID applies the entql int predicate on the user_id field.
func (*RelationshipFilter) WhereWeight ¶ added in v0.11.2
func (f *RelationshipFilter) WhereWeight(p entql.IntP)
WhereWeight applies the entql int predicate on the weight field.
type RelationshipGroupBy ¶
type RelationshipGroupBy struct {
// contains filtered or unexported fields
}
RelationshipGroupBy is the group-by builder for Relationship entities.
func (*RelationshipGroupBy) Aggregate ¶
func (rgb *RelationshipGroupBy) Aggregate(fns ...AggregateFunc) *RelationshipGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RelationshipGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RelationshipGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RelationshipGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RelationshipGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RelationshipGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RelationshipGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RelationshipGroupBy) Scan ¶
func (rgb *RelationshipGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RelationshipGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RelationshipInfo ¶
type RelationshipInfo struct { // ID of the ent. ID int `json:"id,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // contains filtered or unexported fields }
RelationshipInfo is the model entity for the RelationshipInfo schema.
func (*RelationshipInfo) String ¶
func (ri *RelationshipInfo) String() string
String implements the fmt.Stringer.
func (*RelationshipInfo) Unwrap ¶
func (ri *RelationshipInfo) Unwrap() *RelationshipInfo
Unwrap unwraps the RelationshipInfo 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 (*RelationshipInfo) Update ¶
func (ri *RelationshipInfo) Update() *RelationshipInfoUpdateOne
Update returns a builder for updating this RelationshipInfo. Note that you need to call RelationshipInfo.Unwrap() before calling this method if this RelationshipInfo was returned from a transaction, and the transaction was committed or rolled back.
type RelationshipInfoClient ¶
type RelationshipInfoClient struct {
// contains filtered or unexported fields
}
RelationshipInfoClient is a client for the RelationshipInfo schema.
func NewRelationshipInfoClient ¶
func NewRelationshipInfoClient(c config) *RelationshipInfoClient
NewRelationshipInfoClient returns a client for the RelationshipInfo from the given config.
func (*RelationshipInfoClient) Create ¶
func (c *RelationshipInfoClient) Create() *RelationshipInfoCreate
Create returns a builder for creating a RelationshipInfo entity.
func (*RelationshipInfoClient) CreateBulk ¶
func (c *RelationshipInfoClient) CreateBulk(builders ...*RelationshipInfoCreate) *RelationshipInfoCreateBulk
CreateBulk returns a builder for creating a bulk of RelationshipInfo entities.
func (*RelationshipInfoClient) Delete ¶
func (c *RelationshipInfoClient) Delete() *RelationshipInfoDelete
Delete returns a delete builder for RelationshipInfo.
func (*RelationshipInfoClient) DeleteOne ¶
func (c *RelationshipInfoClient) DeleteOne(ri *RelationshipInfo) *RelationshipInfoDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RelationshipInfoClient) DeleteOneID ¶
func (c *RelationshipInfoClient) DeleteOneID(id int) *RelationshipInfoDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RelationshipInfoClient) Get ¶
func (c *RelationshipInfoClient) Get(ctx context.Context, id int) (*RelationshipInfo, error)
Get returns a RelationshipInfo entity by its id.
func (*RelationshipInfoClient) GetX ¶
func (c *RelationshipInfoClient) GetX(ctx context.Context, id int) *RelationshipInfo
GetX is like Get, but panics if an error occurs.
func (*RelationshipInfoClient) Hooks ¶
func (c *RelationshipInfoClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RelationshipInfoClient) Intercept ¶ added in v0.11.5
func (c *RelationshipInfoClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `relationshipinfo.Intercept(f(g(h())))`.
func (*RelationshipInfoClient) Interceptors ¶ added in v0.11.5
func (c *RelationshipInfoClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RelationshipInfoClient) Query ¶
func (c *RelationshipInfoClient) Query() *RelationshipInfoQuery
Query returns a query builder for RelationshipInfo.
func (*RelationshipInfoClient) Update ¶
func (c *RelationshipInfoClient) Update() *RelationshipInfoUpdate
Update returns an update builder for RelationshipInfo.
func (*RelationshipInfoClient) UpdateOne ¶
func (c *RelationshipInfoClient) UpdateOne(ri *RelationshipInfo) *RelationshipInfoUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RelationshipInfoClient) UpdateOneID ¶
func (c *RelationshipInfoClient) UpdateOneID(id int) *RelationshipInfoUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RelationshipInfoClient) Use ¶
func (c *RelationshipInfoClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `relationshipinfo.Hooks(f(g(h())))`.
type RelationshipInfoCreate ¶
type RelationshipInfoCreate struct {
// contains filtered or unexported fields
}
RelationshipInfoCreate is the builder for creating a RelationshipInfo entity.
func (*RelationshipInfoCreate) Exec ¶
func (ric *RelationshipInfoCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RelationshipInfoCreate) ExecX ¶
func (ric *RelationshipInfoCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipInfoCreate) Mutation ¶
func (ric *RelationshipInfoCreate) Mutation() *RelationshipInfoMutation
Mutation returns the RelationshipInfoMutation object of the builder.
func (*RelationshipInfoCreate) OnConflict ¶
func (ric *RelationshipInfoCreate) OnConflict(opts ...sql.ConflictOption) *RelationshipInfoUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.RelationshipInfo.Create(). SetText(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RelationshipInfoUpsert) { SetText(v+v). }). Exec(ctx)
func (*RelationshipInfoCreate) OnConflictColumns ¶
func (ric *RelationshipInfoCreate) OnConflictColumns(columns ...string) *RelationshipInfoUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.RelationshipInfo.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RelationshipInfoCreate) Save ¶
func (ric *RelationshipInfoCreate) Save(ctx context.Context) (*RelationshipInfo, error)
Save creates the RelationshipInfo in the database.
func (*RelationshipInfoCreate) SaveX ¶
func (ric *RelationshipInfoCreate) SaveX(ctx context.Context) *RelationshipInfo
SaveX calls Save and panics if Save returns an error.
func (*RelationshipInfoCreate) SetText ¶
func (ric *RelationshipInfoCreate) SetText(s string) *RelationshipInfoCreate
SetText sets the "text" field.
type RelationshipInfoCreateBulk ¶
type RelationshipInfoCreateBulk struct {
// contains filtered or unexported fields
}
RelationshipInfoCreateBulk is the builder for creating many RelationshipInfo entities in bulk.
func (*RelationshipInfoCreateBulk) Exec ¶
func (ricb *RelationshipInfoCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RelationshipInfoCreateBulk) ExecX ¶
func (ricb *RelationshipInfoCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipInfoCreateBulk) OnConflict ¶
func (ricb *RelationshipInfoCreateBulk) OnConflict(opts ...sql.ConflictOption) *RelationshipInfoUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.RelationshipInfo.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RelationshipInfoUpsert) { SetText(v+v). }). Exec(ctx)
func (*RelationshipInfoCreateBulk) OnConflictColumns ¶
func (ricb *RelationshipInfoCreateBulk) OnConflictColumns(columns ...string) *RelationshipInfoUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.RelationshipInfo.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RelationshipInfoCreateBulk) Save ¶
func (ricb *RelationshipInfoCreateBulk) Save(ctx context.Context) ([]*RelationshipInfo, error)
Save creates the RelationshipInfo entities in the database.
func (*RelationshipInfoCreateBulk) SaveX ¶
func (ricb *RelationshipInfoCreateBulk) SaveX(ctx context.Context) []*RelationshipInfo
SaveX is like Save, but panics if an error occurs.
type RelationshipInfoDelete ¶
type RelationshipInfoDelete struct {
// contains filtered or unexported fields
}
RelationshipInfoDelete is the builder for deleting a RelationshipInfo entity.
func (*RelationshipInfoDelete) Exec ¶
func (rid *RelationshipInfoDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RelationshipInfoDelete) ExecX ¶
func (rid *RelationshipInfoDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipInfoDelete) Where ¶
func (rid *RelationshipInfoDelete) Where(ps ...predicate.RelationshipInfo) *RelationshipInfoDelete
Where appends a list predicates to the RelationshipInfoDelete builder.
type RelationshipInfoDeleteOne ¶
type RelationshipInfoDeleteOne struct {
// contains filtered or unexported fields
}
RelationshipInfoDeleteOne is the builder for deleting a single RelationshipInfo entity.
func (*RelationshipInfoDeleteOne) Exec ¶
func (rido *RelationshipInfoDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RelationshipInfoDeleteOne) ExecX ¶
func (rido *RelationshipInfoDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipInfoDeleteOne) Where ¶ added in v0.11.7
func (rido *RelationshipInfoDeleteOne) Where(ps ...predicate.RelationshipInfo) *RelationshipInfoDeleteOne
Where appends a list predicates to the RelationshipInfoDelete builder.
type RelationshipInfoFilter ¶ added in v0.11.2
type RelationshipInfoFilter struct {
// contains filtered or unexported fields
}
RelationshipInfoFilter provides a generic filtering capability at runtime for RelationshipInfoQuery.
func (*RelationshipInfoFilter) Where ¶ added in v0.11.2
func (f *RelationshipInfoFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*RelationshipInfoFilter) WhereID ¶ added in v0.11.2
func (f *RelationshipInfoFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*RelationshipInfoFilter) WhereText ¶ added in v0.11.2
func (f *RelationshipInfoFilter) WhereText(p entql.StringP)
WhereText applies the entql string predicate on the text field.
type RelationshipInfoGroupBy ¶
type RelationshipInfoGroupBy struct {
// contains filtered or unexported fields
}
RelationshipInfoGroupBy is the group-by builder for RelationshipInfo entities.
func (*RelationshipInfoGroupBy) Aggregate ¶
func (rigb *RelationshipInfoGroupBy) Aggregate(fns ...AggregateFunc) *RelationshipInfoGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RelationshipInfoGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*RelationshipInfoGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoGroupBy) Scan ¶
func (rigb *RelationshipInfoGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RelationshipInfoGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RelationshipInfoMutation ¶
type RelationshipInfoMutation struct {
// contains filtered or unexported fields
}
RelationshipInfoMutation represents an operation that mutates the RelationshipInfo nodes in the graph.
func (*RelationshipInfoMutation) AddField ¶
func (m *RelationshipInfoMutation) 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 (*RelationshipInfoMutation) AddedEdges ¶
func (m *RelationshipInfoMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RelationshipInfoMutation) AddedField ¶
func (m *RelationshipInfoMutation) 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 (*RelationshipInfoMutation) AddedFields ¶
func (m *RelationshipInfoMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RelationshipInfoMutation) AddedIDs ¶
func (m *RelationshipInfoMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RelationshipInfoMutation) ClearEdge ¶
func (m *RelationshipInfoMutation) 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 (*RelationshipInfoMutation) ClearField ¶
func (m *RelationshipInfoMutation) 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 (*RelationshipInfoMutation) ClearedEdges ¶
func (m *RelationshipInfoMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RelationshipInfoMutation) ClearedFields ¶
func (m *RelationshipInfoMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RelationshipInfoMutation) Client ¶
func (m RelationshipInfoMutation) 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 (*RelationshipInfoMutation) EdgeCleared ¶
func (m *RelationshipInfoMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RelationshipInfoMutation) Field ¶
func (m *RelationshipInfoMutation) 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 (*RelationshipInfoMutation) FieldCleared ¶
func (m *RelationshipInfoMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RelationshipInfoMutation) Fields ¶
func (m *RelationshipInfoMutation) 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 (*RelationshipInfoMutation) Filter ¶ added in v0.11.2
func (m *RelationshipInfoMutation) Filter() *RelationshipInfoFilter
Filter returns an entql.Where implementation to apply filters on the RelationshipInfoMutation builder.
func (*RelationshipInfoMutation) ID ¶
func (m *RelationshipInfoMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RelationshipInfoMutation) IDs ¶
func (m *RelationshipInfoMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RelationshipInfoMutation) 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 (*RelationshipInfoMutation) OldText ¶
func (m *RelationshipInfoMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" field's value of the RelationshipInfo entity. If the RelationshipInfo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RelationshipInfoMutation) Op ¶
func (m *RelationshipInfoMutation) Op() Op
Op returns the operation name.
func (*RelationshipInfoMutation) RemovedEdges ¶
func (m *RelationshipInfoMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RelationshipInfoMutation) RemovedIDs ¶
func (m *RelationshipInfoMutation) 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 (*RelationshipInfoMutation) ResetEdge ¶
func (m *RelationshipInfoMutation) 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 (*RelationshipInfoMutation) ResetField ¶
func (m *RelationshipInfoMutation) 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 (*RelationshipInfoMutation) ResetText ¶
func (m *RelationshipInfoMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*RelationshipInfoMutation) SetField ¶
func (m *RelationshipInfoMutation) 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 (*RelationshipInfoMutation) SetOp ¶ added in v0.11.5
func (m *RelationshipInfoMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RelationshipInfoMutation) SetText ¶
func (m *RelationshipInfoMutation) SetText(s string)
SetText sets the "text" field.
func (*RelationshipInfoMutation) Text ¶
func (m *RelationshipInfoMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (RelationshipInfoMutation) Tx ¶
func (m RelationshipInfoMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RelationshipInfoMutation) Type ¶
func (m *RelationshipInfoMutation) Type() string
Type returns the node type of this mutation (RelationshipInfo).
func (*RelationshipInfoMutation) Where ¶
func (m *RelationshipInfoMutation) Where(ps ...predicate.RelationshipInfo)
Where appends a list predicates to the RelationshipInfoMutation builder.
func (*RelationshipInfoMutation) WhereP ¶ added in v0.11.5
func (m *RelationshipInfoMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RelationshipInfoMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RelationshipInfoQuery ¶
type RelationshipInfoQuery struct {
// contains filtered or unexported fields
}
RelationshipInfoQuery is the builder for querying RelationshipInfo entities.
func (*RelationshipInfoQuery) Aggregate ¶ added in v0.11.4
func (riq *RelationshipInfoQuery) Aggregate(fns ...AggregateFunc) *RelationshipInfoSelect
Aggregate returns a RelationshipInfoSelect configured with the given aggregations.
func (*RelationshipInfoQuery) All ¶
func (riq *RelationshipInfoQuery) All(ctx context.Context) ([]*RelationshipInfo, error)
All executes the query and returns a list of RelationshipInfos.
func (*RelationshipInfoQuery) AllX ¶
func (riq *RelationshipInfoQuery) AllX(ctx context.Context) []*RelationshipInfo
AllX is like All, but panics if an error occurs.
func (*RelationshipInfoQuery) Clone ¶
func (riq *RelationshipInfoQuery) Clone() *RelationshipInfoQuery
Clone returns a duplicate of the RelationshipInfoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RelationshipInfoQuery) Count ¶
func (riq *RelationshipInfoQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RelationshipInfoQuery) CountX ¶
func (riq *RelationshipInfoQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RelationshipInfoQuery) Exist ¶
func (riq *RelationshipInfoQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RelationshipInfoQuery) ExistX ¶
func (riq *RelationshipInfoQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RelationshipInfoQuery) Filter ¶ added in v0.11.2
func (riq *RelationshipInfoQuery) Filter() *RelationshipInfoFilter
Filter returns a Filter implementation to apply filters on the RelationshipInfoQuery builder.
func (*RelationshipInfoQuery) First ¶
func (riq *RelationshipInfoQuery) First(ctx context.Context) (*RelationshipInfo, error)
First returns the first RelationshipInfo entity from the query. Returns a *NotFoundError when no RelationshipInfo was found.
func (*RelationshipInfoQuery) FirstID ¶
func (riq *RelationshipInfoQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first RelationshipInfo ID from the query. Returns a *NotFoundError when no RelationshipInfo ID was found.
func (*RelationshipInfoQuery) FirstIDX ¶
func (riq *RelationshipInfoQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*RelationshipInfoQuery) FirstX ¶
func (riq *RelationshipInfoQuery) FirstX(ctx context.Context) *RelationshipInfo
FirstX is like First, but panics if an error occurs.
func (*RelationshipInfoQuery) GroupBy ¶
func (riq *RelationshipInfoQuery) GroupBy(field string, fields ...string) *RelationshipInfoGroupBy
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 { Text string `json:"text,omitempty"` Count int `json:"count,omitempty"` } client.RelationshipInfo.Query(). GroupBy(relationshipinfo.FieldText). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RelationshipInfoQuery) IDs ¶
func (riq *RelationshipInfoQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of RelationshipInfo IDs.
func (*RelationshipInfoQuery) IDsX ¶
func (riq *RelationshipInfoQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*RelationshipInfoQuery) Limit ¶
func (riq *RelationshipInfoQuery) Limit(limit int) *RelationshipInfoQuery
Limit the number of records to be returned by this query.
func (*RelationshipInfoQuery) Offset ¶
func (riq *RelationshipInfoQuery) Offset(offset int) *RelationshipInfoQuery
Offset to start from.
func (*RelationshipInfoQuery) Only ¶
func (riq *RelationshipInfoQuery) Only(ctx context.Context) (*RelationshipInfo, error)
Only returns a single RelationshipInfo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RelationshipInfo entity is found. Returns a *NotFoundError when no RelationshipInfo entities are found.
func (*RelationshipInfoQuery) OnlyID ¶
func (riq *RelationshipInfoQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only RelationshipInfo ID in the query. Returns a *NotSingularError when more than one RelationshipInfo ID is found. Returns a *NotFoundError when no entities are found.
func (*RelationshipInfoQuery) OnlyIDX ¶
func (riq *RelationshipInfoQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*RelationshipInfoQuery) OnlyX ¶
func (riq *RelationshipInfoQuery) OnlyX(ctx context.Context) *RelationshipInfo
OnlyX is like Only, but panics if an error occurs.
func (*RelationshipInfoQuery) Order ¶
func (riq *RelationshipInfoQuery) Order(o ...OrderFunc) *RelationshipInfoQuery
Order specifies how the records should be ordered.
func (*RelationshipInfoQuery) Select ¶
func (riq *RelationshipInfoQuery) Select(fields ...string) *RelationshipInfoSelect
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 { Text string `json:"text,omitempty"` } client.RelationshipInfo.Query(). Select(relationshipinfo.FieldText). Scan(ctx, &v)
func (*RelationshipInfoQuery) Unique ¶
func (riq *RelationshipInfoQuery) Unique(unique bool) *RelationshipInfoQuery
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 (*RelationshipInfoQuery) Where ¶
func (riq *RelationshipInfoQuery) Where(ps ...predicate.RelationshipInfo) *RelationshipInfoQuery
Where adds a new predicate for the RelationshipInfoQuery builder.
type RelationshipInfoSelect ¶
type RelationshipInfoSelect struct { *RelationshipInfoQuery // contains filtered or unexported fields }
RelationshipInfoSelect is the builder for selecting fields of RelationshipInfo entities.
func (*RelationshipInfoSelect) Aggregate ¶ added in v0.11.4
func (ris *RelationshipInfoSelect) Aggregate(fns ...AggregateFunc) *RelationshipInfoSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RelationshipInfoSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*RelationshipInfoSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RelationshipInfoSelect) Scan ¶
func (ris *RelationshipInfoSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RelationshipInfoSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RelationshipInfoUpdate ¶
type RelationshipInfoUpdate struct {
// contains filtered or unexported fields
}
RelationshipInfoUpdate is the builder for updating RelationshipInfo entities.
func (*RelationshipInfoUpdate) Exec ¶
func (riu *RelationshipInfoUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RelationshipInfoUpdate) ExecX ¶
func (riu *RelationshipInfoUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipInfoUpdate) Mutation ¶
func (riu *RelationshipInfoUpdate) Mutation() *RelationshipInfoMutation
Mutation returns the RelationshipInfoMutation object of the builder.
func (*RelationshipInfoUpdate) Save ¶
func (riu *RelationshipInfoUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RelationshipInfoUpdate) SaveX ¶
func (riu *RelationshipInfoUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RelationshipInfoUpdate) SetText ¶
func (riu *RelationshipInfoUpdate) SetText(s string) *RelationshipInfoUpdate
SetText sets the "text" field.
func (*RelationshipInfoUpdate) Where ¶
func (riu *RelationshipInfoUpdate) Where(ps ...predicate.RelationshipInfo) *RelationshipInfoUpdate
Where appends a list predicates to the RelationshipInfoUpdate builder.
type RelationshipInfoUpdateOne ¶
type RelationshipInfoUpdateOne struct {
// contains filtered or unexported fields
}
RelationshipInfoUpdateOne is the builder for updating a single RelationshipInfo entity.
func (*RelationshipInfoUpdateOne) Exec ¶
func (riuo *RelationshipInfoUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RelationshipInfoUpdateOne) ExecX ¶
func (riuo *RelationshipInfoUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipInfoUpdateOne) Mutation ¶
func (riuo *RelationshipInfoUpdateOne) Mutation() *RelationshipInfoMutation
Mutation returns the RelationshipInfoMutation object of the builder.
func (*RelationshipInfoUpdateOne) Save ¶
func (riuo *RelationshipInfoUpdateOne) Save(ctx context.Context) (*RelationshipInfo, error)
Save executes the query and returns the updated RelationshipInfo entity.
func (*RelationshipInfoUpdateOne) SaveX ¶
func (riuo *RelationshipInfoUpdateOne) SaveX(ctx context.Context) *RelationshipInfo
SaveX is like Save, but panics if an error occurs.
func (*RelationshipInfoUpdateOne) Select ¶
func (riuo *RelationshipInfoUpdateOne) Select(field string, fields ...string) *RelationshipInfoUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RelationshipInfoUpdateOne) SetText ¶
func (riuo *RelationshipInfoUpdateOne) SetText(s string) *RelationshipInfoUpdateOne
SetText sets the "text" field.
func (*RelationshipInfoUpdateOne) Where ¶ added in v0.11.8
func (riuo *RelationshipInfoUpdateOne) Where(ps ...predicate.RelationshipInfo) *RelationshipInfoUpdateOne
Where appends a list predicates to the RelationshipInfoUpdate builder.
type RelationshipInfoUpsert ¶
RelationshipInfoUpsert is the "OnConflict" setter.
func (*RelationshipInfoUpsert) SetText ¶
func (u *RelationshipInfoUpsert) SetText(v string) *RelationshipInfoUpsert
SetText sets the "text" field.
func (*RelationshipInfoUpsert) UpdateText ¶
func (u *RelationshipInfoUpsert) UpdateText() *RelationshipInfoUpsert
UpdateText sets the "text" field to the value that was provided on create.
type RelationshipInfoUpsertBulk ¶
type RelationshipInfoUpsertBulk struct {
// contains filtered or unexported fields
}
RelationshipInfoUpsertBulk is the builder for "upsert"-ing a bulk of RelationshipInfo nodes.
func (*RelationshipInfoUpsertBulk) DoNothing ¶
func (u *RelationshipInfoUpsertBulk) DoNothing() *RelationshipInfoUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RelationshipInfoUpsertBulk) Exec ¶
func (u *RelationshipInfoUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RelationshipInfoUpsertBulk) ExecX ¶
func (u *RelationshipInfoUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipInfoUpsertBulk) Ignore ¶
func (u *RelationshipInfoUpsertBulk) Ignore() *RelationshipInfoUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.RelationshipInfo.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RelationshipInfoUpsertBulk) SetText ¶
func (u *RelationshipInfoUpsertBulk) SetText(v string) *RelationshipInfoUpsertBulk
SetText sets the "text" field.
func (*RelationshipInfoUpsertBulk) Update ¶
func (u *RelationshipInfoUpsertBulk) Update(set func(*RelationshipInfoUpsert)) *RelationshipInfoUpsertBulk
Update allows overriding fields `UPDATE` values. See the RelationshipInfoCreateBulk.OnConflict documentation for more info.
func (*RelationshipInfoUpsertBulk) UpdateNewValues ¶
func (u *RelationshipInfoUpsertBulk) UpdateNewValues() *RelationshipInfoUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.RelationshipInfo.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*RelationshipInfoUpsertBulk) UpdateText ¶
func (u *RelationshipInfoUpsertBulk) UpdateText() *RelationshipInfoUpsertBulk
UpdateText sets the "text" field to the value that was provided on create.
type RelationshipInfoUpsertOne ¶
type RelationshipInfoUpsertOne struct {
// contains filtered or unexported fields
}
RelationshipInfoUpsertOne is the builder for "upsert"-ing
one RelationshipInfo node.
func (*RelationshipInfoUpsertOne) DoNothing ¶
func (u *RelationshipInfoUpsertOne) DoNothing() *RelationshipInfoUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RelationshipInfoUpsertOne) Exec ¶
func (u *RelationshipInfoUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*RelationshipInfoUpsertOne) ExecX ¶
func (u *RelationshipInfoUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipInfoUpsertOne) ID ¶
func (u *RelationshipInfoUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*RelationshipInfoUpsertOne) IDX ¶
func (u *RelationshipInfoUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*RelationshipInfoUpsertOne) Ignore ¶
func (u *RelationshipInfoUpsertOne) Ignore() *RelationshipInfoUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.RelationshipInfo.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RelationshipInfoUpsertOne) SetText ¶
func (u *RelationshipInfoUpsertOne) SetText(v string) *RelationshipInfoUpsertOne
SetText sets the "text" field.
func (*RelationshipInfoUpsertOne) Update ¶
func (u *RelationshipInfoUpsertOne) Update(set func(*RelationshipInfoUpsert)) *RelationshipInfoUpsertOne
Update allows overriding fields `UPDATE` values. See the RelationshipInfoCreate.OnConflict documentation for more info.
func (*RelationshipInfoUpsertOne) UpdateNewValues ¶
func (u *RelationshipInfoUpsertOne) UpdateNewValues() *RelationshipInfoUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.RelationshipInfo.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*RelationshipInfoUpsertOne) UpdateText ¶
func (u *RelationshipInfoUpsertOne) UpdateText() *RelationshipInfoUpsertOne
UpdateText sets the "text" field to the value that was provided on create.
type RelationshipInfos ¶
type RelationshipInfos []*RelationshipInfo
RelationshipInfos is a parsable slice of RelationshipInfo.
type RelationshipMutation ¶
type RelationshipMutation struct {
// contains filtered or unexported fields
}
RelationshipMutation represents an operation that mutates the Relationship nodes in the graph.
func (*RelationshipMutation) AddField ¶
func (m *RelationshipMutation) 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 (*RelationshipMutation) AddWeight ¶
func (m *RelationshipMutation) AddWeight(i int)
AddWeight adds i to the "weight" field.
func (*RelationshipMutation) AddedEdges ¶
func (m *RelationshipMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RelationshipMutation) AddedField ¶
func (m *RelationshipMutation) 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 (*RelationshipMutation) AddedFields ¶
func (m *RelationshipMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RelationshipMutation) AddedIDs ¶
func (m *RelationshipMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RelationshipMutation) AddedWeight ¶
func (m *RelationshipMutation) AddedWeight() (r int, exists bool)
AddedWeight returns the value that was added to the "weight" field in this mutation.
func (*RelationshipMutation) ClearEdge ¶
func (m *RelationshipMutation) 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 (*RelationshipMutation) ClearField ¶
func (m *RelationshipMutation) 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 (*RelationshipMutation) ClearInfo ¶
func (m *RelationshipMutation) ClearInfo()
ClearInfo clears the "info" edge to the RelationshipInfo entity.
func (*RelationshipMutation) ClearInfoID ¶
func (m *RelationshipMutation) ClearInfoID()
ClearInfoID clears the value of the "info_id" field.
func (*RelationshipMutation) ClearRelative ¶
func (m *RelationshipMutation) ClearRelative()
ClearRelative clears the "relative" edge to the User entity.
func (*RelationshipMutation) ClearUser ¶
func (m *RelationshipMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*RelationshipMutation) ClearedEdges ¶
func (m *RelationshipMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RelationshipMutation) ClearedFields ¶
func (m *RelationshipMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RelationshipMutation) Client ¶
func (m RelationshipMutation) 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 (*RelationshipMutation) EdgeCleared ¶
func (m *RelationshipMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RelationshipMutation) Field ¶
func (m *RelationshipMutation) 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 (*RelationshipMutation) FieldCleared ¶
func (m *RelationshipMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RelationshipMutation) Fields ¶
func (m *RelationshipMutation) 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 (*RelationshipMutation) Filter ¶ added in v0.11.2
func (m *RelationshipMutation) Filter() *RelationshipFilter
Filter returns an entql.Where implementation to apply filters on the RelationshipMutation builder.
func (*RelationshipMutation) InfoCleared ¶
func (m *RelationshipMutation) InfoCleared() bool
InfoCleared reports if the "info" edge to the RelationshipInfo entity was cleared.
func (*RelationshipMutation) InfoID ¶
func (m *RelationshipMutation) InfoID() (r int, exists bool)
InfoID returns the value of the "info_id" field in the mutation.
func (*RelationshipMutation) InfoIDCleared ¶
func (m *RelationshipMutation) InfoIDCleared() bool
InfoIDCleared returns if the "info_id" field was cleared in this mutation.
func (*RelationshipMutation) InfoIDs ¶
func (m *RelationshipMutation) InfoIDs() (ids []int)
InfoIDs returns the "info" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use InfoID instead. It exists only for internal usage by the builders.
func (*RelationshipMutation) 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 (*RelationshipMutation) Op ¶
func (m *RelationshipMutation) Op() Op
Op returns the operation name.
func (*RelationshipMutation) RelativeCleared ¶
func (m *RelationshipMutation) RelativeCleared() bool
RelativeCleared reports if the "relative" edge to the User entity was cleared.
func (*RelationshipMutation) RelativeID ¶
func (m *RelationshipMutation) RelativeID() (r int, exists bool)
RelativeID returns the value of the "relative_id" field in the mutation.
func (*RelationshipMutation) RelativeIDs ¶
func (m *RelationshipMutation) RelativeIDs() (ids []int)
RelativeIDs returns the "relative" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RelativeID instead. It exists only for internal usage by the builders.
func (*RelationshipMutation) RemovedEdges ¶
func (m *RelationshipMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RelationshipMutation) RemovedIDs ¶
func (m *RelationshipMutation) 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 (*RelationshipMutation) ResetEdge ¶
func (m *RelationshipMutation) 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 (*RelationshipMutation) ResetField ¶
func (m *RelationshipMutation) 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 (*RelationshipMutation) ResetInfo ¶
func (m *RelationshipMutation) ResetInfo()
ResetInfo resets all changes to the "info" edge.
func (*RelationshipMutation) ResetInfoID ¶
func (m *RelationshipMutation) ResetInfoID()
ResetInfoID resets all changes to the "info_id" field.
func (*RelationshipMutation) ResetRelative ¶
func (m *RelationshipMutation) ResetRelative()
ResetRelative resets all changes to the "relative" edge.
func (*RelationshipMutation) ResetRelativeID ¶
func (m *RelationshipMutation) ResetRelativeID()
ResetRelativeID resets all changes to the "relative_id" field.
func (*RelationshipMutation) ResetUser ¶
func (m *RelationshipMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*RelationshipMutation) ResetUserID ¶
func (m *RelationshipMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*RelationshipMutation) ResetWeight ¶
func (m *RelationshipMutation) ResetWeight()
ResetWeight resets all changes to the "weight" field.
func (*RelationshipMutation) SetField ¶
func (m *RelationshipMutation) 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 (*RelationshipMutation) SetInfoID ¶
func (m *RelationshipMutation) SetInfoID(i int)
SetInfoID sets the "info_id" field.
func (*RelationshipMutation) SetOp ¶ added in v0.11.5
func (m *RelationshipMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RelationshipMutation) SetRelativeID ¶
func (m *RelationshipMutation) SetRelativeID(i int)
SetRelativeID sets the "relative_id" field.
func (*RelationshipMutation) SetUserID ¶
func (m *RelationshipMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (*RelationshipMutation) SetWeight ¶
func (m *RelationshipMutation) SetWeight(i int)
SetWeight sets the "weight" field.
func (RelationshipMutation) Tx ¶
func (m RelationshipMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RelationshipMutation) Type ¶
func (m *RelationshipMutation) Type() string
Type returns the node type of this mutation (Relationship).
func (*RelationshipMutation) UserCleared ¶
func (m *RelationshipMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*RelationshipMutation) UserID ¶
func (m *RelationshipMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*RelationshipMutation) UserIDs ¶
func (m *RelationshipMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*RelationshipMutation) Weight ¶
func (m *RelationshipMutation) Weight() (r int, exists bool)
Weight returns the value of the "weight" field in the mutation.
func (*RelationshipMutation) Where ¶
func (m *RelationshipMutation) Where(ps ...predicate.Relationship)
Where appends a list predicates to the RelationshipMutation builder.
func (*RelationshipMutation) WhereP ¶ added in v0.11.5
func (m *RelationshipMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RelationshipMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RelationshipQuery ¶
type RelationshipQuery struct {
// contains filtered or unexported fields
}
RelationshipQuery is the builder for querying Relationship entities.
func (*RelationshipQuery) Aggregate ¶ added in v0.11.4
func (rq *RelationshipQuery) Aggregate(fns ...AggregateFunc) *RelationshipSelect
Aggregate returns a RelationshipSelect configured with the given aggregations.
func (*RelationshipQuery) All ¶
func (rq *RelationshipQuery) All(ctx context.Context) ([]*Relationship, error)
All executes the query and returns a list of Relationships.
func (*RelationshipQuery) AllX ¶
func (rq *RelationshipQuery) AllX(ctx context.Context) []*Relationship
AllX is like All, but panics if an error occurs.
func (*RelationshipQuery) Clone ¶
func (rq *RelationshipQuery) Clone() *RelationshipQuery
Clone returns a duplicate of the RelationshipQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RelationshipQuery) Count ¶
func (rq *RelationshipQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RelationshipQuery) CountX ¶
func (rq *RelationshipQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RelationshipQuery) Exist ¶
func (rq *RelationshipQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RelationshipQuery) ExistX ¶
func (rq *RelationshipQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RelationshipQuery) Filter ¶ added in v0.11.2
func (rq *RelationshipQuery) Filter() *RelationshipFilter
Filter returns a Filter implementation to apply filters on the RelationshipQuery builder.
func (*RelationshipQuery) First ¶
func (rq *RelationshipQuery) First(ctx context.Context) (*Relationship, error)
First returns the first Relationship entity from the query. Returns a *NotFoundError when no Relationship was found.
func (*RelationshipQuery) FirstX ¶
func (rq *RelationshipQuery) FirstX(ctx context.Context) *Relationship
FirstX is like First, but panics if an error occurs.
func (*RelationshipQuery) GroupBy ¶
func (rq *RelationshipQuery) GroupBy(field string, fields ...string) *RelationshipGroupBy
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 { Weight int `json:"weight,omitempty"` Count int `json:"count,omitempty"` } client.Relationship.Query(). GroupBy(relationship.FieldWeight). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RelationshipQuery) Limit ¶
func (rq *RelationshipQuery) Limit(limit int) *RelationshipQuery
Limit the number of records to be returned by this query.
func (*RelationshipQuery) Offset ¶
func (rq *RelationshipQuery) Offset(offset int) *RelationshipQuery
Offset to start from.
func (*RelationshipQuery) Only ¶
func (rq *RelationshipQuery) Only(ctx context.Context) (*Relationship, error)
Only returns a single Relationship entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Relationship entity is found. Returns a *NotFoundError when no Relationship entities are found.
func (*RelationshipQuery) OnlyX ¶
func (rq *RelationshipQuery) OnlyX(ctx context.Context) *Relationship
OnlyX is like Only, but panics if an error occurs.
func (*RelationshipQuery) Order ¶
func (rq *RelationshipQuery) Order(o ...OrderFunc) *RelationshipQuery
Order specifies how the records should be ordered.
func (*RelationshipQuery) QueryInfo ¶
func (rq *RelationshipQuery) QueryInfo() *RelationshipInfoQuery
QueryInfo chains the current query on the "info" edge.
func (*RelationshipQuery) QueryRelative ¶
func (rq *RelationshipQuery) QueryRelative() *UserQuery
QueryRelative chains the current query on the "relative" edge.
func (*RelationshipQuery) QueryUser ¶
func (rq *RelationshipQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*RelationshipQuery) Select ¶
func (rq *RelationshipQuery) Select(fields ...string) *RelationshipSelect
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 { Weight int `json:"weight,omitempty"` } client.Relationship.Query(). Select(relationship.FieldWeight). Scan(ctx, &v)
func (*RelationshipQuery) Unique ¶
func (rq *RelationshipQuery) Unique(unique bool) *RelationshipQuery
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 (*RelationshipQuery) Where ¶
func (rq *RelationshipQuery) Where(ps ...predicate.Relationship) *RelationshipQuery
Where adds a new predicate for the RelationshipQuery builder.
func (*RelationshipQuery) WithInfo ¶
func (rq *RelationshipQuery) WithInfo(opts ...func(*RelationshipInfoQuery)) *RelationshipQuery
WithInfo tells the query-builder to eager-load the nodes that are connected to the "info" edge. The optional arguments are used to configure the query builder of the edge.
func (*RelationshipQuery) WithRelative ¶
func (rq *RelationshipQuery) WithRelative(opts ...func(*UserQuery)) *RelationshipQuery
WithRelative tells the query-builder to eager-load the nodes that are connected to the "relative" edge. The optional arguments are used to configure the query builder of the edge.
func (*RelationshipQuery) WithUser ¶
func (rq *RelationshipQuery) WithUser(opts ...func(*UserQuery)) *RelationshipQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type RelationshipSelect ¶
type RelationshipSelect struct { *RelationshipQuery // contains filtered or unexported fields }
RelationshipSelect is the builder for selecting fields of Relationship entities.
func (*RelationshipSelect) Aggregate ¶ added in v0.11.4
func (rs *RelationshipSelect) Aggregate(fns ...AggregateFunc) *RelationshipSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RelationshipSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RelationshipSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RelationshipSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RelationshipSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RelationshipSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RelationshipSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RelationshipSelect) Scan ¶
func (rs *RelationshipSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RelationshipSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type RelationshipUpdate ¶
type RelationshipUpdate struct {
// contains filtered or unexported fields
}
RelationshipUpdate is the builder for updating Relationship entities.
func (*RelationshipUpdate) AddWeight ¶
func (ru *RelationshipUpdate) AddWeight(i int) *RelationshipUpdate
AddWeight adds i to the "weight" field.
func (*RelationshipUpdate) ClearInfo ¶
func (ru *RelationshipUpdate) ClearInfo() *RelationshipUpdate
ClearInfo clears the "info" edge to the RelationshipInfo entity.
func (*RelationshipUpdate) ClearInfoID ¶
func (ru *RelationshipUpdate) ClearInfoID() *RelationshipUpdate
ClearInfoID clears the value of the "info_id" field.
func (*RelationshipUpdate) ClearRelative ¶
func (ru *RelationshipUpdate) ClearRelative() *RelationshipUpdate
ClearRelative clears the "relative" edge to the User entity.
func (*RelationshipUpdate) ClearUser ¶
func (ru *RelationshipUpdate) ClearUser() *RelationshipUpdate
ClearUser clears the "user" edge to the User entity.
func (*RelationshipUpdate) Exec ¶
func (ru *RelationshipUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RelationshipUpdate) ExecX ¶
func (ru *RelationshipUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipUpdate) Mutation ¶
func (ru *RelationshipUpdate) Mutation() *RelationshipMutation
Mutation returns the RelationshipMutation object of the builder.
func (*RelationshipUpdate) Save ¶
func (ru *RelationshipUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RelationshipUpdate) SaveX ¶
func (ru *RelationshipUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RelationshipUpdate) SetInfo ¶
func (ru *RelationshipUpdate) SetInfo(r *RelationshipInfo) *RelationshipUpdate
SetInfo sets the "info" edge to the RelationshipInfo entity.
func (*RelationshipUpdate) SetInfoID ¶
func (ru *RelationshipUpdate) SetInfoID(i int) *RelationshipUpdate
SetInfoID sets the "info_id" field.
func (*RelationshipUpdate) SetNillableInfoID ¶
func (ru *RelationshipUpdate) SetNillableInfoID(i *int) *RelationshipUpdate
SetNillableInfoID sets the "info_id" field if the given value is not nil.
func (*RelationshipUpdate) SetNillableWeight ¶
func (ru *RelationshipUpdate) SetNillableWeight(i *int) *RelationshipUpdate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*RelationshipUpdate) SetRelative ¶
func (ru *RelationshipUpdate) SetRelative(u *User) *RelationshipUpdate
SetRelative sets the "relative" edge to the User entity.
func (*RelationshipUpdate) SetRelativeID ¶
func (ru *RelationshipUpdate) SetRelativeID(i int) *RelationshipUpdate
SetRelativeID sets the "relative_id" field.
func (*RelationshipUpdate) SetUser ¶
func (ru *RelationshipUpdate) SetUser(u *User) *RelationshipUpdate
SetUser sets the "user" edge to the User entity.
func (*RelationshipUpdate) SetUserID ¶
func (ru *RelationshipUpdate) SetUserID(i int) *RelationshipUpdate
SetUserID sets the "user_id" field.
func (*RelationshipUpdate) SetWeight ¶
func (ru *RelationshipUpdate) SetWeight(i int) *RelationshipUpdate
SetWeight sets the "weight" field.
func (*RelationshipUpdate) Where ¶
func (ru *RelationshipUpdate) Where(ps ...predicate.Relationship) *RelationshipUpdate
Where appends a list predicates to the RelationshipUpdate builder.
type RelationshipUpdateOne ¶
type RelationshipUpdateOne struct {
// contains filtered or unexported fields
}
RelationshipUpdateOne is the builder for updating a single Relationship entity.
func (*RelationshipUpdateOne) AddWeight ¶
func (ruo *RelationshipUpdateOne) AddWeight(i int) *RelationshipUpdateOne
AddWeight adds i to the "weight" field.
func (*RelationshipUpdateOne) ClearInfo ¶
func (ruo *RelationshipUpdateOne) ClearInfo() *RelationshipUpdateOne
ClearInfo clears the "info" edge to the RelationshipInfo entity.
func (*RelationshipUpdateOne) ClearInfoID ¶
func (ruo *RelationshipUpdateOne) ClearInfoID() *RelationshipUpdateOne
ClearInfoID clears the value of the "info_id" field.
func (*RelationshipUpdateOne) ClearRelative ¶
func (ruo *RelationshipUpdateOne) ClearRelative() *RelationshipUpdateOne
ClearRelative clears the "relative" edge to the User entity.
func (*RelationshipUpdateOne) ClearUser ¶
func (ruo *RelationshipUpdateOne) ClearUser() *RelationshipUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*RelationshipUpdateOne) Exec ¶
func (ruo *RelationshipUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RelationshipUpdateOne) ExecX ¶
func (ruo *RelationshipUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipUpdateOne) Mutation ¶
func (ruo *RelationshipUpdateOne) Mutation() *RelationshipMutation
Mutation returns the RelationshipMutation object of the builder.
func (*RelationshipUpdateOne) Save ¶
func (ruo *RelationshipUpdateOne) Save(ctx context.Context) (*Relationship, error)
Save executes the query and returns the updated Relationship entity.
func (*RelationshipUpdateOne) SaveX ¶
func (ruo *RelationshipUpdateOne) SaveX(ctx context.Context) *Relationship
SaveX is like Save, but panics if an error occurs.
func (*RelationshipUpdateOne) Select ¶
func (ruo *RelationshipUpdateOne) Select(field string, fields ...string) *RelationshipUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RelationshipUpdateOne) SetInfo ¶
func (ruo *RelationshipUpdateOne) SetInfo(r *RelationshipInfo) *RelationshipUpdateOne
SetInfo sets the "info" edge to the RelationshipInfo entity.
func (*RelationshipUpdateOne) SetInfoID ¶
func (ruo *RelationshipUpdateOne) SetInfoID(i int) *RelationshipUpdateOne
SetInfoID sets the "info_id" field.
func (*RelationshipUpdateOne) SetNillableInfoID ¶
func (ruo *RelationshipUpdateOne) SetNillableInfoID(i *int) *RelationshipUpdateOne
SetNillableInfoID sets the "info_id" field if the given value is not nil.
func (*RelationshipUpdateOne) SetNillableWeight ¶
func (ruo *RelationshipUpdateOne) SetNillableWeight(i *int) *RelationshipUpdateOne
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*RelationshipUpdateOne) SetRelative ¶
func (ruo *RelationshipUpdateOne) SetRelative(u *User) *RelationshipUpdateOne
SetRelative sets the "relative" edge to the User entity.
func (*RelationshipUpdateOne) SetRelativeID ¶
func (ruo *RelationshipUpdateOne) SetRelativeID(i int) *RelationshipUpdateOne
SetRelativeID sets the "relative_id" field.
func (*RelationshipUpdateOne) SetUser ¶
func (ruo *RelationshipUpdateOne) SetUser(u *User) *RelationshipUpdateOne
SetUser sets the "user" edge to the User entity.
func (*RelationshipUpdateOne) SetUserID ¶
func (ruo *RelationshipUpdateOne) SetUserID(i int) *RelationshipUpdateOne
SetUserID sets the "user_id" field.
func (*RelationshipUpdateOne) SetWeight ¶
func (ruo *RelationshipUpdateOne) SetWeight(i int) *RelationshipUpdateOne
SetWeight sets the "weight" field.
func (*RelationshipUpdateOne) Where ¶ added in v0.11.8
func (ruo *RelationshipUpdateOne) Where(ps ...predicate.Relationship) *RelationshipUpdateOne
Where appends a list predicates to the RelationshipUpdate builder.
type RelationshipUpsert ¶
RelationshipUpsert is the "OnConflict" setter.
func (*RelationshipUpsert) AddWeight ¶
func (u *RelationshipUpsert) AddWeight(v int) *RelationshipUpsert
AddWeight adds v to the "weight" field.
func (*RelationshipUpsert) ClearInfoID ¶
func (u *RelationshipUpsert) ClearInfoID() *RelationshipUpsert
ClearInfoID clears the value of the "info_id" field.
func (*RelationshipUpsert) SetInfoID ¶
func (u *RelationshipUpsert) SetInfoID(v int) *RelationshipUpsert
SetInfoID sets the "info_id" field.
func (*RelationshipUpsert) SetRelativeID ¶
func (u *RelationshipUpsert) SetRelativeID(v int) *RelationshipUpsert
SetRelativeID sets the "relative_id" field.
func (*RelationshipUpsert) SetUserID ¶
func (u *RelationshipUpsert) SetUserID(v int) *RelationshipUpsert
SetUserID sets the "user_id" field.
func (*RelationshipUpsert) SetWeight ¶
func (u *RelationshipUpsert) SetWeight(v int) *RelationshipUpsert
SetWeight sets the "weight" field.
func (*RelationshipUpsert) UpdateInfoID ¶
func (u *RelationshipUpsert) UpdateInfoID() *RelationshipUpsert
UpdateInfoID sets the "info_id" field to the value that was provided on create.
func (*RelationshipUpsert) UpdateRelativeID ¶
func (u *RelationshipUpsert) UpdateRelativeID() *RelationshipUpsert
UpdateRelativeID sets the "relative_id" field to the value that was provided on create.
func (*RelationshipUpsert) UpdateUserID ¶
func (u *RelationshipUpsert) UpdateUserID() *RelationshipUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
func (*RelationshipUpsert) UpdateWeight ¶
func (u *RelationshipUpsert) UpdateWeight() *RelationshipUpsert
UpdateWeight sets the "weight" field to the value that was provided on create.
type RelationshipUpsertBulk ¶
type RelationshipUpsertBulk struct {
// contains filtered or unexported fields
}
RelationshipUpsertBulk is the builder for "upsert"-ing a bulk of Relationship nodes.
func (*RelationshipUpsertBulk) AddWeight ¶
func (u *RelationshipUpsertBulk) AddWeight(v int) *RelationshipUpsertBulk
AddWeight adds v to the "weight" field.
func (*RelationshipUpsertBulk) ClearInfoID ¶
func (u *RelationshipUpsertBulk) ClearInfoID() *RelationshipUpsertBulk
ClearInfoID clears the value of the "info_id" field.
func (*RelationshipUpsertBulk) DoNothing ¶
func (u *RelationshipUpsertBulk) DoNothing() *RelationshipUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RelationshipUpsertBulk) Exec ¶
func (u *RelationshipUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RelationshipUpsertBulk) ExecX ¶
func (u *RelationshipUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipUpsertBulk) Ignore ¶
func (u *RelationshipUpsertBulk) Ignore() *RelationshipUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Relationship.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RelationshipUpsertBulk) SetInfoID ¶
func (u *RelationshipUpsertBulk) SetInfoID(v int) *RelationshipUpsertBulk
SetInfoID sets the "info_id" field.
func (*RelationshipUpsertBulk) SetRelativeID ¶
func (u *RelationshipUpsertBulk) SetRelativeID(v int) *RelationshipUpsertBulk
SetRelativeID sets the "relative_id" field.
func (*RelationshipUpsertBulk) SetUserID ¶
func (u *RelationshipUpsertBulk) SetUserID(v int) *RelationshipUpsertBulk
SetUserID sets the "user_id" field.
func (*RelationshipUpsertBulk) SetWeight ¶
func (u *RelationshipUpsertBulk) SetWeight(v int) *RelationshipUpsertBulk
SetWeight sets the "weight" field.
func (*RelationshipUpsertBulk) Update ¶
func (u *RelationshipUpsertBulk) Update(set func(*RelationshipUpsert)) *RelationshipUpsertBulk
Update allows overriding fields `UPDATE` values. See the RelationshipCreateBulk.OnConflict documentation for more info.
func (*RelationshipUpsertBulk) UpdateInfoID ¶
func (u *RelationshipUpsertBulk) UpdateInfoID() *RelationshipUpsertBulk
UpdateInfoID sets the "info_id" field to the value that was provided on create.
func (*RelationshipUpsertBulk) UpdateNewValues ¶
func (u *RelationshipUpsertBulk) UpdateNewValues() *RelationshipUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Relationship.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*RelationshipUpsertBulk) UpdateRelativeID ¶
func (u *RelationshipUpsertBulk) UpdateRelativeID() *RelationshipUpsertBulk
UpdateRelativeID sets the "relative_id" field to the value that was provided on create.
func (*RelationshipUpsertBulk) UpdateUserID ¶
func (u *RelationshipUpsertBulk) UpdateUserID() *RelationshipUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
func (*RelationshipUpsertBulk) UpdateWeight ¶
func (u *RelationshipUpsertBulk) UpdateWeight() *RelationshipUpsertBulk
UpdateWeight sets the "weight" field to the value that was provided on create.
type RelationshipUpsertOne ¶
type RelationshipUpsertOne struct {
// contains filtered or unexported fields
}
RelationshipUpsertOne is the builder for "upsert"-ing
one Relationship node.
func (*RelationshipUpsertOne) AddWeight ¶
func (u *RelationshipUpsertOne) AddWeight(v int) *RelationshipUpsertOne
AddWeight adds v to the "weight" field.
func (*RelationshipUpsertOne) ClearInfoID ¶
func (u *RelationshipUpsertOne) ClearInfoID() *RelationshipUpsertOne
ClearInfoID clears the value of the "info_id" field.
func (*RelationshipUpsertOne) DoNothing ¶
func (u *RelationshipUpsertOne) DoNothing() *RelationshipUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RelationshipUpsertOne) Exec ¶
func (u *RelationshipUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*RelationshipUpsertOne) ExecX ¶
func (u *RelationshipUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RelationshipUpsertOne) Ignore ¶
func (u *RelationshipUpsertOne) Ignore() *RelationshipUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Relationship.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RelationshipUpsertOne) SetInfoID ¶
func (u *RelationshipUpsertOne) SetInfoID(v int) *RelationshipUpsertOne
SetInfoID sets the "info_id" field.
func (*RelationshipUpsertOne) SetRelativeID ¶
func (u *RelationshipUpsertOne) SetRelativeID(v int) *RelationshipUpsertOne
SetRelativeID sets the "relative_id" field.
func (*RelationshipUpsertOne) SetUserID ¶
func (u *RelationshipUpsertOne) SetUserID(v int) *RelationshipUpsertOne
SetUserID sets the "user_id" field.
func (*RelationshipUpsertOne) SetWeight ¶
func (u *RelationshipUpsertOne) SetWeight(v int) *RelationshipUpsertOne
SetWeight sets the "weight" field.
func (*RelationshipUpsertOne) Update ¶
func (u *RelationshipUpsertOne) Update(set func(*RelationshipUpsert)) *RelationshipUpsertOne
Update allows overriding fields `UPDATE` values. See the RelationshipCreate.OnConflict documentation for more info.
func (*RelationshipUpsertOne) UpdateInfoID ¶
func (u *RelationshipUpsertOne) UpdateInfoID() *RelationshipUpsertOne
UpdateInfoID sets the "info_id" field to the value that was provided on create.
func (*RelationshipUpsertOne) UpdateNewValues ¶
func (u *RelationshipUpsertOne) UpdateNewValues() *RelationshipUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Relationship.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*RelationshipUpsertOne) UpdateRelativeID ¶
func (u *RelationshipUpsertOne) UpdateRelativeID() *RelationshipUpsertOne
UpdateRelativeID sets the "relative_id" field to the value that was provided on create.
func (*RelationshipUpsertOne) UpdateUserID ¶
func (u *RelationshipUpsertOne) UpdateUserID() *RelationshipUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
func (*RelationshipUpsertOne) UpdateWeight ¶
func (u *RelationshipUpsertOne) UpdateWeight() *RelationshipUpsertOne
UpdateWeight sets the "weight" field to the value that was provided on create.
type Relationships ¶
type Relationships []*Relationship
Relationships is a parsable slice of Relationship.
type Role ¶ added in v0.11.1
type Role struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,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 RoleQuery when eager-loading is set. Edges RoleEdges `json:"edges"` // contains filtered or unexported fields }
Role is the model entity for the Role schema.
func (*Role) QueryRolesUsers ¶ added in v0.11.1
func (r *Role) QueryRolesUsers() *RoleUserQuery
QueryRolesUsers queries the "roles_users" edge of the Role entity.
func (*Role) Unwrap ¶ added in v0.11.1
Unwrap unwraps the Role entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Role) Update ¶ added in v0.11.1
func (r *Role) Update() *RoleUpdateOne
Update returns a builder for updating this Role. Note that you need to call Role.Unwrap() before calling this method if this Role was returned from a transaction, and the transaction was committed or rolled back.
type RoleClient ¶ added in v0.11.1
type RoleClient struct {
// contains filtered or unexported fields
}
RoleClient is a client for the Role schema.
func NewRoleClient ¶ added in v0.11.1
func NewRoleClient(c config) *RoleClient
NewRoleClient returns a client for the Role from the given config.
func (*RoleClient) Create ¶ added in v0.11.1
func (c *RoleClient) Create() *RoleCreate
Create returns a builder for creating a Role entity.
func (*RoleClient) CreateBulk ¶ added in v0.11.1
func (c *RoleClient) CreateBulk(builders ...*RoleCreate) *RoleCreateBulk
CreateBulk returns a builder for creating a bulk of Role entities.
func (*RoleClient) Delete ¶ added in v0.11.1
func (c *RoleClient) Delete() *RoleDelete
Delete returns a delete builder for Role.
func (*RoleClient) DeleteOne ¶ added in v0.11.1
func (c *RoleClient) DeleteOne(r *Role) *RoleDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*RoleClient) DeleteOneID ¶ added in v0.11.1
func (c *RoleClient) DeleteOneID(id int) *RoleDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*RoleClient) GetX ¶ added in v0.11.1
func (c *RoleClient) GetX(ctx context.Context, id int) *Role
GetX is like Get, but panics if an error occurs.
func (*RoleClient) Hooks ¶ added in v0.11.1
func (c *RoleClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RoleClient) Intercept ¶ added in v0.11.5
func (c *RoleClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `role.Intercept(f(g(h())))`.
func (*RoleClient) Interceptors ¶ added in v0.11.5
func (c *RoleClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RoleClient) Query ¶ added in v0.11.1
func (c *RoleClient) Query() *RoleQuery
Query returns a query builder for Role.
func (*RoleClient) QueryRolesUsers ¶ added in v0.11.1
func (c *RoleClient) QueryRolesUsers(r *Role) *RoleUserQuery
QueryRolesUsers queries the roles_users edge of a Role.
func (*RoleClient) QueryUser ¶ added in v0.11.1
func (c *RoleClient) QueryUser(r *Role) *UserQuery
QueryUser queries the user edge of a Role.
func (*RoleClient) Update ¶ added in v0.11.1
func (c *RoleClient) Update() *RoleUpdate
Update returns an update builder for Role.
func (*RoleClient) UpdateOne ¶ added in v0.11.1
func (c *RoleClient) UpdateOne(r *Role) *RoleUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RoleClient) UpdateOneID ¶ added in v0.11.1
func (c *RoleClient) UpdateOneID(id int) *RoleUpdateOne
UpdateOneID returns an update builder for the given id.
func (*RoleClient) Use ¶ added in v0.11.1
func (c *RoleClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `role.Hooks(f(g(h())))`.
type RoleCreate ¶ added in v0.11.1
type RoleCreate struct {
// contains filtered or unexported fields
}
RoleCreate is the builder for creating a Role entity.
func (*RoleCreate) AddUser ¶ added in v0.11.1
func (rc *RoleCreate) AddUser(u ...*User) *RoleCreate
AddUser adds the "user" edges to the User entity.
func (*RoleCreate) AddUserIDs ¶ added in v0.11.1
func (rc *RoleCreate) AddUserIDs(ids ...int) *RoleCreate
AddUserIDs adds the "user" edge to the User entity by IDs.
func (*RoleCreate) Exec ¶ added in v0.11.1
func (rc *RoleCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleCreate) ExecX ¶ added in v0.11.1
func (rc *RoleCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleCreate) Mutation ¶ added in v0.11.1
func (rc *RoleCreate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleCreate) OnConflict ¶ added in v0.11.1
func (rc *RoleCreate) OnConflict(opts ...sql.ConflictOption) *RoleUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Role.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RoleUpsert) { SetName(v+v). }). Exec(ctx)
func (*RoleCreate) OnConflictColumns ¶ added in v0.11.1
func (rc *RoleCreate) OnConflictColumns(columns ...string) *RoleUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RoleCreate) Save ¶ added in v0.11.1
func (rc *RoleCreate) Save(ctx context.Context) (*Role, error)
Save creates the Role in the database.
func (*RoleCreate) SaveX ¶ added in v0.11.1
func (rc *RoleCreate) SaveX(ctx context.Context) *Role
SaveX calls Save and panics if Save returns an error.
func (*RoleCreate) SetCreatedAt ¶ added in v0.11.1
func (rc *RoleCreate) SetCreatedAt(t time.Time) *RoleCreate
SetCreatedAt sets the "created_at" field.
func (*RoleCreate) SetName ¶ added in v0.11.1
func (rc *RoleCreate) SetName(s string) *RoleCreate
SetName sets the "name" field.
func (*RoleCreate) SetNillableCreatedAt ¶ added in v0.11.1
func (rc *RoleCreate) SetNillableCreatedAt(t *time.Time) *RoleCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
type RoleCreateBulk ¶ added in v0.11.1
type RoleCreateBulk struct {
// contains filtered or unexported fields
}
RoleCreateBulk is the builder for creating many Role entities in bulk.
func (*RoleCreateBulk) Exec ¶ added in v0.11.1
func (rcb *RoleCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleCreateBulk) ExecX ¶ added in v0.11.1
func (rcb *RoleCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleCreateBulk) OnConflict ¶ added in v0.11.1
func (rcb *RoleCreateBulk) OnConflict(opts ...sql.ConflictOption) *RoleUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Role.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RoleUpsert) { SetName(v+v). }). Exec(ctx)
func (*RoleCreateBulk) OnConflictColumns ¶ added in v0.11.1
func (rcb *RoleCreateBulk) OnConflictColumns(columns ...string) *RoleUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type RoleDelete ¶ added in v0.11.1
type RoleDelete struct {
// contains filtered or unexported fields
}
RoleDelete is the builder for deleting a Role entity.
func (*RoleDelete) Exec ¶ added in v0.11.1
func (rd *RoleDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RoleDelete) ExecX ¶ added in v0.11.1
func (rd *RoleDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoleDelete) Where ¶ added in v0.11.1
func (rd *RoleDelete) Where(ps ...predicate.Role) *RoleDelete
Where appends a list predicates to the RoleDelete builder.
type RoleDeleteOne ¶ added in v0.11.1
type RoleDeleteOne struct {
// contains filtered or unexported fields
}
RoleDeleteOne is the builder for deleting a single Role entity.
func (*RoleDeleteOne) Exec ¶ added in v0.11.1
func (rdo *RoleDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RoleDeleteOne) ExecX ¶ added in v0.11.1
func (rdo *RoleDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleDeleteOne) Where ¶ added in v0.11.7
func (rdo *RoleDeleteOne) Where(ps ...predicate.Role) *RoleDeleteOne
Where appends a list predicates to the RoleDelete builder.
type RoleEdges ¶ added in v0.11.1
type RoleEdges struct { // User holds the value of the user edge. User []*User `json:"user,omitempty"` // RolesUsers holds the value of the roles_users edge. RolesUsers []*RoleUser `json:"roles_users,omitempty"` // contains filtered or unexported fields }
RoleEdges holds the relations/edges for other nodes in the graph.
func (RoleEdges) RolesUsersOrErr ¶ added in v0.11.1
RolesUsersOrErr returns the RolesUsers value or an error if the edge was not loaded in eager-loading.
type RoleFilter ¶ added in v0.11.2
type RoleFilter struct {
// contains filtered or unexported fields
}
RoleFilter provides a generic filtering capability at runtime for RoleQuery.
func (*RoleFilter) Where ¶ added in v0.11.2
func (f *RoleFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*RoleFilter) WhereCreatedAt ¶ added in v0.11.2
func (f *RoleFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*RoleFilter) WhereHasRolesUsers ¶ added in v0.11.2
func (f *RoleFilter) WhereHasRolesUsers()
WhereHasRolesUsers applies a predicate to check if query has an edge roles_users.
func (*RoleFilter) WhereHasRolesUsersWith ¶ added in v0.11.2
func (f *RoleFilter) WhereHasRolesUsersWith(preds ...predicate.RoleUser)
WhereHasRolesUsersWith applies a predicate to check if query has an edge roles_users with a given conditions (other predicates).
func (*RoleFilter) WhereHasUser ¶ added in v0.11.2
func (f *RoleFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (*RoleFilter) WhereHasUserWith ¶ added in v0.11.2
func (f *RoleFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (*RoleFilter) WhereID ¶ added in v0.11.2
func (f *RoleFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*RoleFilter) WhereName ¶ added in v0.11.2
func (f *RoleFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
type RoleGroupBy ¶ added in v0.11.1
type RoleGroupBy struct {
// contains filtered or unexported fields
}
RoleGroupBy is the group-by builder for Role entities.
func (*RoleGroupBy) Aggregate ¶ added in v0.11.1
func (rgb *RoleGroupBy) Aggregate(fns ...AggregateFunc) *RoleGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RoleGroupBy) Bool ¶ added in v0.11.1
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Bools ¶ added in v0.11.1
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64 ¶ added in v0.11.1
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64X ¶ added in v0.11.1
Float64X is like Float64, but panics if an error occurs.
func (*RoleGroupBy) Float64s ¶ added in v0.11.1
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Float64sX ¶ added in v0.11.1
Float64sX is like Float64s, but panics if an error occurs.
func (*RoleGroupBy) Int ¶ added in v0.11.1
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Ints ¶ added in v0.11.1
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) Scan ¶ added in v0.11.1
func (rgb *RoleGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoleGroupBy) String ¶ added in v0.11.1
String returns a single string from a selector. It is only allowed when selecting one field.
func (*RoleGroupBy) StringX ¶ added in v0.11.1
StringX is like String, but panics if an error occurs.
type RoleMutation ¶ added in v0.11.1
type RoleMutation struct {
// contains filtered or unexported fields
}
RoleMutation represents an operation that mutates the Role nodes in the graph.
func (*RoleMutation) AddField ¶ added in v0.11.1
func (m *RoleMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*RoleMutation) AddUserIDs ¶ added in v0.11.1
func (m *RoleMutation) AddUserIDs(ids ...int)
AddUserIDs adds the "user" edge to the User entity by ids.
func (*RoleMutation) AddedEdges ¶ added in v0.11.1
func (m *RoleMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RoleMutation) AddedField ¶ added in v0.11.1
func (m *RoleMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*RoleMutation) AddedFields ¶ added in v0.11.1
func (m *RoleMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RoleMutation) AddedIDs ¶ added in v0.11.1
func (m *RoleMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RoleMutation) ClearEdge ¶ added in v0.11.1
func (m *RoleMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*RoleMutation) ClearField ¶ added in v0.11.1
func (m *RoleMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*RoleMutation) ClearUser ¶ added in v0.11.1
func (m *RoleMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*RoleMutation) ClearedEdges ¶ added in v0.11.1
func (m *RoleMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RoleMutation) ClearedFields ¶ added in v0.11.1
func (m *RoleMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RoleMutation) Client ¶ added in v0.11.1
func (m RoleMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*RoleMutation) CreatedAt ¶ added in v0.11.1
func (m *RoleMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RoleMutation) EdgeCleared ¶ added in v0.11.1
func (m *RoleMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RoleMutation) Field ¶ added in v0.11.1
func (m *RoleMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*RoleMutation) FieldCleared ¶ added in v0.11.1
func (m *RoleMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RoleMutation) Fields ¶ added in v0.11.1
func (m *RoleMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*RoleMutation) Filter ¶ added in v0.11.2
func (m *RoleMutation) Filter() *RoleFilter
Filter returns an entql.Where implementation to apply filters on the RoleMutation builder.
func (*RoleMutation) ID ¶ added in v0.11.1
func (m *RoleMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*RoleMutation) IDs ¶ added in v0.11.1
func (m *RoleMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*RoleMutation) Name ¶ added in v0.11.1
func (m *RoleMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*RoleMutation) OldCreatedAt ¶ added in v0.11.1
OldCreatedAt returns the old "created_at" field's value of the Role entity. If the Role object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RoleMutation) OldField ¶ added in v0.11.1
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*RoleMutation) OldName ¶ added in v0.11.1
func (m *RoleMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Role entity. If the Role object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*RoleMutation) Op ¶ added in v0.11.1
func (m *RoleMutation) Op() Op
Op returns the operation name.
func (*RoleMutation) RemoveUserIDs ¶ added in v0.11.1
func (m *RoleMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the "user" edge to the User entity by IDs.
func (*RoleMutation) RemovedEdges ¶ added in v0.11.1
func (m *RoleMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RoleMutation) RemovedIDs ¶ added in v0.11.1
func (m *RoleMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*RoleMutation) RemovedUserIDs ¶ added in v0.11.1
func (m *RoleMutation) RemovedUserIDs() (ids []int)
RemovedUser returns the removed IDs of the "user" edge to the User entity.
func (*RoleMutation) ResetCreatedAt ¶ added in v0.11.1
func (m *RoleMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RoleMutation) ResetEdge ¶ added in v0.11.1
func (m *RoleMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*RoleMutation) ResetField ¶ added in v0.11.1
func (m *RoleMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*RoleMutation) ResetName ¶ added in v0.11.1
func (m *RoleMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*RoleMutation) ResetUser ¶ added in v0.11.1
func (m *RoleMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*RoleMutation) SetCreatedAt ¶ added in v0.11.1
func (m *RoleMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RoleMutation) SetField ¶ added in v0.11.1
func (m *RoleMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*RoleMutation) SetName ¶ added in v0.11.1
func (m *RoleMutation) SetName(s string)
SetName sets the "name" field.
func (*RoleMutation) SetOp ¶ added in v0.11.5
func (m *RoleMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (RoleMutation) Tx ¶ added in v0.11.1
func (m RoleMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RoleMutation) Type ¶ added in v0.11.1
func (m *RoleMutation) Type() string
Type returns the node type of this mutation (Role).
func (*RoleMutation) UserCleared ¶ added in v0.11.1
func (m *RoleMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*RoleMutation) UserIDs ¶ added in v0.11.1
func (m *RoleMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation.
func (*RoleMutation) Where ¶ added in v0.11.1
func (m *RoleMutation) Where(ps ...predicate.Role)
Where appends a list predicates to the RoleMutation builder.
func (*RoleMutation) WhereP ¶ added in v0.11.5
func (m *RoleMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RoleMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RoleQuery ¶ added in v0.11.1
type RoleQuery struct {
// contains filtered or unexported fields
}
RoleQuery is the builder for querying Role entities.
func (*RoleQuery) Aggregate ¶ added in v0.11.4
func (rq *RoleQuery) Aggregate(fns ...AggregateFunc) *RoleSelect
Aggregate returns a RoleSelect configured with the given aggregations.
func (*RoleQuery) Clone ¶ added in v0.11.1
Clone returns a duplicate of the RoleQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RoleQuery) Exist ¶ added in v0.11.1
Exist returns true if the query has elements in the graph.
func (*RoleQuery) Filter ¶ added in v0.11.2
func (rq *RoleQuery) Filter() *RoleFilter
Filter returns a Filter implementation to apply filters on the RoleQuery builder.
func (*RoleQuery) First ¶ added in v0.11.1
First returns the first Role entity from the query. Returns a *NotFoundError when no Role was found.
func (*RoleQuery) FirstID ¶ added in v0.11.1
FirstID returns the first Role ID from the query. Returns a *NotFoundError when no Role ID was found.
func (*RoleQuery) FirstIDX ¶ added in v0.11.1
FirstIDX is like FirstID, but panics if an error occurs.
func (*RoleQuery) GroupBy ¶ added in v0.11.1
func (rq *RoleQuery) GroupBy(field string, fields ...string) *RoleGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Role.Query(). GroupBy(role.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RoleQuery) Limit ¶ added in v0.11.1
Limit the number of records to be returned by this query.
func (*RoleQuery) Only ¶ added in v0.11.1
Only returns a single Role entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Role entity is found. Returns a *NotFoundError when no Role entities are found.
func (*RoleQuery) OnlyID ¶ added in v0.11.1
OnlyID is like Only, but returns the only Role ID in the query. Returns a *NotSingularError when more than one Role ID is found. Returns a *NotFoundError when no entities are found.
func (*RoleQuery) QueryRolesUsers ¶ added in v0.11.1
func (rq *RoleQuery) QueryRolesUsers() *RoleUserQuery
QueryRolesUsers chains the current query on the "roles_users" edge.
func (*RoleQuery) QueryUser ¶ added in v0.11.1
QueryUser chains the current query on the "user" edge.
func (*RoleQuery) Select ¶ added in v0.11.1
func (rq *RoleQuery) Select(fields ...string) *RoleSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Role.Query(). Select(role.FieldName). Scan(ctx, &v)
func (*RoleQuery) Unique ¶ added in v0.11.1
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 (*RoleQuery) WithRolesUsers ¶ added in v0.11.1
func (rq *RoleQuery) WithRolesUsers(opts ...func(*RoleUserQuery)) *RoleQuery
WithRolesUsers tells the query-builder to eager-load the nodes that are connected to the "roles_users" edge. The optional arguments are used to configure the query builder of the edge.
type RoleSelect ¶ added in v0.11.1
type RoleSelect struct { *RoleQuery // contains filtered or unexported fields }
RoleSelect is the builder for selecting fields of Role entities.
func (*RoleSelect) Aggregate ¶ added in v0.11.4
func (rs *RoleSelect) Aggregate(fns ...AggregateFunc) *RoleSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RoleSelect) Bool ¶ added in v0.11.1
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Bools ¶ added in v0.11.1
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64 ¶ added in v0.11.1
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64X ¶ added in v0.11.1
Float64X is like Float64, but panics if an error occurs.
func (*RoleSelect) Float64s ¶ added in v0.11.1
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Float64sX ¶ added in v0.11.1
Float64sX is like Float64s, but panics if an error occurs.
func (*RoleSelect) Int ¶ added in v0.11.1
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Ints ¶ added in v0.11.1
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleSelect) Scan ¶ added in v0.11.1
func (rs *RoleSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoleSelect) String ¶ added in v0.11.1
String returns a single string from a selector. It is only allowed when selecting one field.
func (*RoleSelect) StringX ¶ added in v0.11.1
StringX is like String, but panics if an error occurs.
type RoleUpdate ¶ added in v0.11.1
type RoleUpdate struct {
// contains filtered or unexported fields
}
RoleUpdate is the builder for updating Role entities.
func (*RoleUpdate) AddUser ¶ added in v0.11.1
func (ru *RoleUpdate) AddUser(u ...*User) *RoleUpdate
AddUser adds the "user" edges to the User entity.
func (*RoleUpdate) AddUserIDs ¶ added in v0.11.1
func (ru *RoleUpdate) AddUserIDs(ids ...int) *RoleUpdate
AddUserIDs adds the "user" edge to the User entity by IDs.
func (*RoleUpdate) ClearUser ¶ added in v0.11.1
func (ru *RoleUpdate) ClearUser() *RoleUpdate
ClearUser clears all "user" edges to the User entity.
func (*RoleUpdate) Exec ¶ added in v0.11.1
func (ru *RoleUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpdate) ExecX ¶ added in v0.11.1
func (ru *RoleUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdate) Mutation ¶ added in v0.11.1
func (ru *RoleUpdate) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdate) RemoveUser ¶ added in v0.11.1
func (ru *RoleUpdate) RemoveUser(u ...*User) *RoleUpdate
RemoveUser removes "user" edges to User entities.
func (*RoleUpdate) RemoveUserIDs ¶ added in v0.11.1
func (ru *RoleUpdate) RemoveUserIDs(ids ...int) *RoleUpdate
RemoveUserIDs removes the "user" edge to User entities by IDs.
func (*RoleUpdate) Save ¶ added in v0.11.1
func (ru *RoleUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RoleUpdate) SaveX ¶ added in v0.11.1
func (ru *RoleUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RoleUpdate) SetCreatedAt ¶ added in v0.11.1
func (ru *RoleUpdate) SetCreatedAt(t time.Time) *RoleUpdate
SetCreatedAt sets the "created_at" field.
func (*RoleUpdate) SetName ¶ added in v0.11.1
func (ru *RoleUpdate) SetName(s string) *RoleUpdate
SetName sets the "name" field.
func (*RoleUpdate) SetNillableCreatedAt ¶ added in v0.11.1
func (ru *RoleUpdate) SetNillableCreatedAt(t *time.Time) *RoleUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RoleUpdate) Where ¶ added in v0.11.1
func (ru *RoleUpdate) Where(ps ...predicate.Role) *RoleUpdate
Where appends a list predicates to the RoleUpdate builder.
type RoleUpdateOne ¶ added in v0.11.1
type RoleUpdateOne struct {
// contains filtered or unexported fields
}
RoleUpdateOne is the builder for updating a single Role entity.
func (*RoleUpdateOne) AddUser ¶ added in v0.11.1
func (ruo *RoleUpdateOne) AddUser(u ...*User) *RoleUpdateOne
AddUser adds the "user" edges to the User entity.
func (*RoleUpdateOne) AddUserIDs ¶ added in v0.11.1
func (ruo *RoleUpdateOne) AddUserIDs(ids ...int) *RoleUpdateOne
AddUserIDs adds the "user" edge to the User entity by IDs.
func (*RoleUpdateOne) ClearUser ¶ added in v0.11.1
func (ruo *RoleUpdateOne) ClearUser() *RoleUpdateOne
ClearUser clears all "user" edges to the User entity.
func (*RoleUpdateOne) Exec ¶ added in v0.11.1
func (ruo *RoleUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RoleUpdateOne) ExecX ¶ added in v0.11.1
func (ruo *RoleUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpdateOne) Mutation ¶ added in v0.11.1
func (ruo *RoleUpdateOne) Mutation() *RoleMutation
Mutation returns the RoleMutation object of the builder.
func (*RoleUpdateOne) RemoveUser ¶ added in v0.11.1
func (ruo *RoleUpdateOne) RemoveUser(u ...*User) *RoleUpdateOne
RemoveUser removes "user" edges to User entities.
func (*RoleUpdateOne) RemoveUserIDs ¶ added in v0.11.1
func (ruo *RoleUpdateOne) RemoveUserIDs(ids ...int) *RoleUpdateOne
RemoveUserIDs removes the "user" edge to User entities by IDs.
func (*RoleUpdateOne) Save ¶ added in v0.11.1
func (ruo *RoleUpdateOne) Save(ctx context.Context) (*Role, error)
Save executes the query and returns the updated Role entity.
func (*RoleUpdateOne) SaveX ¶ added in v0.11.1
func (ruo *RoleUpdateOne) SaveX(ctx context.Context) *Role
SaveX is like Save, but panics if an error occurs.
func (*RoleUpdateOne) Select ¶ added in v0.11.1
func (ruo *RoleUpdateOne) Select(field string, fields ...string) *RoleUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RoleUpdateOne) SetCreatedAt ¶ added in v0.11.1
func (ruo *RoleUpdateOne) SetCreatedAt(t time.Time) *RoleUpdateOne
SetCreatedAt sets the "created_at" field.
func (*RoleUpdateOne) SetName ¶ added in v0.11.1
func (ruo *RoleUpdateOne) SetName(s string) *RoleUpdateOne
SetName sets the "name" field.
func (*RoleUpdateOne) SetNillableCreatedAt ¶ added in v0.11.1
func (ruo *RoleUpdateOne) SetNillableCreatedAt(t *time.Time) *RoleUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RoleUpdateOne) Where ¶ added in v0.11.8
func (ruo *RoleUpdateOne) Where(ps ...predicate.Role) *RoleUpdateOne
Where appends a list predicates to the RoleUpdate builder.
type RoleUpsert ¶ added in v0.11.1
RoleUpsert is the "OnConflict" setter.
func (*RoleUpsert) SetCreatedAt ¶ added in v0.11.1
func (u *RoleUpsert) SetCreatedAt(v time.Time) *RoleUpsert
SetCreatedAt sets the "created_at" field.
func (*RoleUpsert) SetName ¶ added in v0.11.1
func (u *RoleUpsert) SetName(v string) *RoleUpsert
SetName sets the "name" field.
func (*RoleUpsert) UpdateCreatedAt ¶ added in v0.11.1
func (u *RoleUpsert) UpdateCreatedAt() *RoleUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*RoleUpsert) UpdateName ¶ added in v0.11.1
func (u *RoleUpsert) UpdateName() *RoleUpsert
UpdateName sets the "name" field to the value that was provided on create.
type RoleUpsertBulk ¶ added in v0.11.1
type RoleUpsertBulk struct {
// contains filtered or unexported fields
}
RoleUpsertBulk is the builder for "upsert"-ing a bulk of Role nodes.
func (*RoleUpsertBulk) DoNothing ¶ added in v0.11.1
func (u *RoleUpsertBulk) DoNothing() *RoleUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RoleUpsertBulk) Exec ¶ added in v0.11.1
func (u *RoleUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpsertBulk) ExecX ¶ added in v0.11.1
func (u *RoleUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpsertBulk) Ignore ¶ added in v0.11.1
func (u *RoleUpsertBulk) Ignore() *RoleUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RoleUpsertBulk) SetCreatedAt ¶ added in v0.11.1
func (u *RoleUpsertBulk) SetCreatedAt(v time.Time) *RoleUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*RoleUpsertBulk) SetName ¶ added in v0.11.1
func (u *RoleUpsertBulk) SetName(v string) *RoleUpsertBulk
SetName sets the "name" field.
func (*RoleUpsertBulk) Update ¶ added in v0.11.1
func (u *RoleUpsertBulk) Update(set func(*RoleUpsert)) *RoleUpsertBulk
Update allows overriding fields `UPDATE` values. See the RoleCreateBulk.OnConflict documentation for more info.
func (*RoleUpsertBulk) UpdateCreatedAt ¶ added in v0.11.1
func (u *RoleUpsertBulk) UpdateCreatedAt() *RoleUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateName ¶ added in v0.11.1
func (u *RoleUpsertBulk) UpdateName() *RoleUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*RoleUpsertBulk) UpdateNewValues ¶ added in v0.11.1
func (u *RoleUpsertBulk) UpdateNewValues() *RoleUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Role.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type RoleUpsertOne ¶ added in v0.11.1
type RoleUpsertOne struct {
// contains filtered or unexported fields
}
RoleUpsertOne is the builder for "upsert"-ing
one Role node.
func (*RoleUpsertOne) DoNothing ¶ added in v0.11.1
func (u *RoleUpsertOne) DoNothing() *RoleUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RoleUpsertOne) Exec ¶ added in v0.11.1
func (u *RoleUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUpsertOne) ExecX ¶ added in v0.11.1
func (u *RoleUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUpsertOne) ID ¶ added in v0.11.1
func (u *RoleUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*RoleUpsertOne) IDX ¶ added in v0.11.1
func (u *RoleUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*RoleUpsertOne) Ignore ¶ added in v0.11.1
func (u *RoleUpsertOne) Ignore() *RoleUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Role.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RoleUpsertOne) SetCreatedAt ¶ added in v0.11.1
func (u *RoleUpsertOne) SetCreatedAt(v time.Time) *RoleUpsertOne
SetCreatedAt sets the "created_at" field.
func (*RoleUpsertOne) SetName ¶ added in v0.11.1
func (u *RoleUpsertOne) SetName(v string) *RoleUpsertOne
SetName sets the "name" field.
func (*RoleUpsertOne) Update ¶ added in v0.11.1
func (u *RoleUpsertOne) Update(set func(*RoleUpsert)) *RoleUpsertOne
Update allows overriding fields `UPDATE` values. See the RoleCreate.OnConflict documentation for more info.
func (*RoleUpsertOne) UpdateCreatedAt ¶ added in v0.11.1
func (u *RoleUpsertOne) UpdateCreatedAt() *RoleUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateName ¶ added in v0.11.1
func (u *RoleUpsertOne) UpdateName() *RoleUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*RoleUpsertOne) UpdateNewValues ¶ added in v0.11.1
func (u *RoleUpsertOne) UpdateNewValues() *RoleUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Role.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type RoleUser ¶ added in v0.11.1
type RoleUser struct { // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // RoleID holds the value of the "role_id" field. RoleID int `json:"role_id,omitempty"` // UserID holds the value of the "user_id" field. UserID int `json:"user_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the RoleUserQuery when eager-loading is set. Edges RoleUserEdges `json:"edges"` // contains filtered or unexported fields }
RoleUser is the model entity for the RoleUser schema.
func (*RoleUser) QueryRole ¶ added in v0.11.1
QueryRole queries the "role" edge of the RoleUser entity.
func (*RoleUser) QueryUser ¶ added in v0.11.1
QueryUser queries the "user" edge of the RoleUser entity.
func (*RoleUser) Unwrap ¶ added in v0.11.1
Unwrap unwraps the RoleUser 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 (*RoleUser) Update ¶ added in v0.11.1
func (ru *RoleUser) Update() *RoleUserUpdateOne
Update returns a builder for updating this RoleUser. Note that you need to call RoleUser.Unwrap() before calling this method if this RoleUser was returned from a transaction, and the transaction was committed or rolled back.
type RoleUserClient ¶ added in v0.11.1
type RoleUserClient struct {
// contains filtered or unexported fields
}
RoleUserClient is a client for the RoleUser schema.
func NewRoleUserClient ¶ added in v0.11.1
func NewRoleUserClient(c config) *RoleUserClient
NewRoleUserClient returns a client for the RoleUser from the given config.
func (*RoleUserClient) Create ¶ added in v0.11.1
func (c *RoleUserClient) Create() *RoleUserCreate
Create returns a builder for creating a RoleUser entity.
func (*RoleUserClient) CreateBulk ¶ added in v0.11.1
func (c *RoleUserClient) CreateBulk(builders ...*RoleUserCreate) *RoleUserCreateBulk
CreateBulk returns a builder for creating a bulk of RoleUser entities.
func (*RoleUserClient) Delete ¶ added in v0.11.1
func (c *RoleUserClient) Delete() *RoleUserDelete
Delete returns a delete builder for RoleUser.
func (*RoleUserClient) Hooks ¶ added in v0.11.1
func (c *RoleUserClient) Hooks() []Hook
Hooks returns the client hooks.
func (*RoleUserClient) Intercept ¶ added in v0.11.5
func (c *RoleUserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `roleuser.Intercept(f(g(h())))`.
func (*RoleUserClient) Interceptors ¶ added in v0.11.5
func (c *RoleUserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*RoleUserClient) Query ¶ added in v0.11.1
func (c *RoleUserClient) Query() *RoleUserQuery
Query returns a query builder for RoleUser.
func (*RoleUserClient) QueryRole ¶ added in v0.11.1
func (c *RoleUserClient) QueryRole(ru *RoleUser) *RoleQuery
QueryRole queries the role edge of a RoleUser.
func (*RoleUserClient) QueryUser ¶ added in v0.11.1
func (c *RoleUserClient) QueryUser(ru *RoleUser) *UserQuery
QueryUser queries the user edge of a RoleUser.
func (*RoleUserClient) Update ¶ added in v0.11.1
func (c *RoleUserClient) Update() *RoleUserUpdate
Update returns an update builder for RoleUser.
func (*RoleUserClient) UpdateOne ¶ added in v0.11.1
func (c *RoleUserClient) UpdateOne(ru *RoleUser) *RoleUserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*RoleUserClient) Use ¶ added in v0.11.1
func (c *RoleUserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `roleuser.Hooks(f(g(h())))`.
type RoleUserCreate ¶ added in v0.11.1
type RoleUserCreate struct {
// contains filtered or unexported fields
}
RoleUserCreate is the builder for creating a RoleUser entity.
func (*RoleUserCreate) Exec ¶ added in v0.11.1
func (ruc *RoleUserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUserCreate) ExecX ¶ added in v0.11.1
func (ruc *RoleUserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUserCreate) Mutation ¶ added in v0.11.1
func (ruc *RoleUserCreate) Mutation() *RoleUserMutation
Mutation returns the RoleUserMutation object of the builder.
func (*RoleUserCreate) OnConflict ¶ added in v0.11.1
func (ruc *RoleUserCreate) OnConflict(opts ...sql.ConflictOption) *RoleUserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.RoleUser.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RoleUserUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*RoleUserCreate) OnConflictColumns ¶ added in v0.11.1
func (ruc *RoleUserCreate) OnConflictColumns(columns ...string) *RoleUserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.RoleUser.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*RoleUserCreate) Save ¶ added in v0.11.1
func (ruc *RoleUserCreate) Save(ctx context.Context) (*RoleUser, error)
Save creates the RoleUser in the database.
func (*RoleUserCreate) SaveX ¶ added in v0.11.1
func (ruc *RoleUserCreate) SaveX(ctx context.Context) *RoleUser
SaveX calls Save and panics if Save returns an error.
func (*RoleUserCreate) SetCreatedAt ¶ added in v0.11.1
func (ruc *RoleUserCreate) SetCreatedAt(t time.Time) *RoleUserCreate
SetCreatedAt sets the "created_at" field.
func (*RoleUserCreate) SetNillableCreatedAt ¶ added in v0.11.1
func (ruc *RoleUserCreate) SetNillableCreatedAt(t *time.Time) *RoleUserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RoleUserCreate) SetRole ¶ added in v0.11.1
func (ruc *RoleUserCreate) SetRole(r *Role) *RoleUserCreate
SetRole sets the "role" edge to the Role entity.
func (*RoleUserCreate) SetRoleID ¶ added in v0.11.1
func (ruc *RoleUserCreate) SetRoleID(i int) *RoleUserCreate
SetRoleID sets the "role_id" field.
func (*RoleUserCreate) SetUser ¶ added in v0.11.1
func (ruc *RoleUserCreate) SetUser(u *User) *RoleUserCreate
SetUser sets the "user" edge to the User entity.
func (*RoleUserCreate) SetUserID ¶ added in v0.11.1
func (ruc *RoleUserCreate) SetUserID(i int) *RoleUserCreate
SetUserID sets the "user_id" field.
type RoleUserCreateBulk ¶ added in v0.11.1
type RoleUserCreateBulk struct {
// contains filtered or unexported fields
}
RoleUserCreateBulk is the builder for creating many RoleUser entities in bulk.
func (*RoleUserCreateBulk) Exec ¶ added in v0.11.1
func (rucb *RoleUserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUserCreateBulk) ExecX ¶ added in v0.11.1
func (rucb *RoleUserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUserCreateBulk) OnConflict ¶ added in v0.11.1
func (rucb *RoleUserCreateBulk) OnConflict(opts ...sql.ConflictOption) *RoleUserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.RoleUser.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.RoleUserUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*RoleUserCreateBulk) OnConflictColumns ¶ added in v0.11.1
func (rucb *RoleUserCreateBulk) OnConflictColumns(columns ...string) *RoleUserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.RoleUser.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type RoleUserDelete ¶ added in v0.11.1
type RoleUserDelete struct {
// contains filtered or unexported fields
}
RoleUserDelete is the builder for deleting a RoleUser entity.
func (*RoleUserDelete) Exec ¶ added in v0.11.1
func (rud *RoleUserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*RoleUserDelete) ExecX ¶ added in v0.11.1
func (rud *RoleUserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*RoleUserDelete) Where ¶ added in v0.11.1
func (rud *RoleUserDelete) Where(ps ...predicate.RoleUser) *RoleUserDelete
Where appends a list predicates to the RoleUserDelete builder.
type RoleUserDeleteOne ¶ added in v0.11.1
type RoleUserDeleteOne struct {
// contains filtered or unexported fields
}
RoleUserDeleteOne is the builder for deleting a single RoleUser entity.
func (*RoleUserDeleteOne) Exec ¶ added in v0.11.1
func (rudo *RoleUserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*RoleUserDeleteOne) ExecX ¶ added in v0.11.1
func (rudo *RoleUserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUserDeleteOne) Where ¶ added in v0.11.7
func (rudo *RoleUserDeleteOne) Where(ps ...predicate.RoleUser) *RoleUserDeleteOne
Where appends a list predicates to the RoleUserDelete builder.
type RoleUserEdges ¶ added in v0.11.1
type RoleUserEdges struct { // Role holds the value of the role edge. Role *Role `json:"role,omitempty"` // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
RoleUserEdges holds the relations/edges for other nodes in the graph.
func (RoleUserEdges) RoleOrErr ¶ added in v0.11.1
func (e RoleUserEdges) RoleOrErr() (*Role, error)
RoleOrErr returns the Role value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (RoleUserEdges) UserOrErr ¶ added in v0.11.1
func (e RoleUserEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type RoleUserFilter ¶ added in v0.11.2
type RoleUserFilter struct {
// contains filtered or unexported fields
}
RoleUserFilter provides a generic filtering capability at runtime for RoleUserQuery.
func (*RoleUserFilter) Where ¶ added in v0.11.2
func (f *RoleUserFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*RoleUserFilter) WhereCreatedAt ¶ added in v0.11.2
func (f *RoleUserFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*RoleUserFilter) WhereHasRole ¶ added in v0.11.2
func (f *RoleUserFilter) WhereHasRole()
WhereHasRole applies a predicate to check if query has an edge role.
func (*RoleUserFilter) WhereHasRoleWith ¶ added in v0.11.2
func (f *RoleUserFilter) WhereHasRoleWith(preds ...predicate.Role)
WhereHasRoleWith applies a predicate to check if query has an edge role with a given conditions (other predicates).
func (*RoleUserFilter) WhereHasUser ¶ added in v0.11.2
func (f *RoleUserFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (*RoleUserFilter) WhereHasUserWith ¶ added in v0.11.2
func (f *RoleUserFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (*RoleUserFilter) WhereRoleID ¶ added in v0.11.2
func (f *RoleUserFilter) WhereRoleID(p entql.IntP)
WhereRoleID applies the entql int predicate on the role_id field.
func (*RoleUserFilter) WhereUserID ¶ added in v0.11.2
func (f *RoleUserFilter) WhereUserID(p entql.IntP)
WhereUserID applies the entql int predicate on the user_id field.
type RoleUserGroupBy ¶ added in v0.11.1
type RoleUserGroupBy struct {
// contains filtered or unexported fields
}
RoleUserGroupBy is the group-by builder for RoleUser entities.
func (*RoleUserGroupBy) Aggregate ¶ added in v0.11.1
func (rugb *RoleUserGroupBy) Aggregate(fns ...AggregateFunc) *RoleUserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*RoleUserGroupBy) Bool ¶ added in v0.11.1
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleUserGroupBy) Bools ¶ added in v0.11.1
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleUserGroupBy) BoolsX ¶ added in v0.11.1
BoolsX is like Bools, but panics if an error occurs.
func (*RoleUserGroupBy) Float64 ¶ added in v0.11.1
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleUserGroupBy) Float64X ¶ added in v0.11.1
Float64X is like Float64, but panics if an error occurs.
func (*RoleUserGroupBy) Float64s ¶ added in v0.11.1
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleUserGroupBy) Float64sX ¶ added in v0.11.1
Float64sX is like Float64s, but panics if an error occurs.
func (*RoleUserGroupBy) Int ¶ added in v0.11.1
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleUserGroupBy) Ints ¶ added in v0.11.1
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleUserGroupBy) Scan ¶ added in v0.11.1
func (rugb *RoleUserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoleUserGroupBy) String ¶ added in v0.11.1
String returns a single string from a selector. It is only allowed when selecting one field.
func (*RoleUserGroupBy) StringX ¶ added in v0.11.1
StringX is like String, but panics if an error occurs.
type RoleUserMutation ¶ added in v0.11.1
type RoleUserMutation struct {
// contains filtered or unexported fields
}
RoleUserMutation represents an operation that mutates the RoleUser nodes in the graph.
func (*RoleUserMutation) AddField ¶ added in v0.11.1
func (m *RoleUserMutation) 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 (*RoleUserMutation) AddedEdges ¶ added in v0.11.1
func (m *RoleUserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*RoleUserMutation) AddedField ¶ added in v0.11.1
func (m *RoleUserMutation) 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 (*RoleUserMutation) AddedFields ¶ added in v0.11.1
func (m *RoleUserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*RoleUserMutation) AddedIDs ¶ added in v0.11.1
func (m *RoleUserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*RoleUserMutation) ClearEdge ¶ added in v0.11.1
func (m *RoleUserMutation) 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 (*RoleUserMutation) ClearField ¶ added in v0.11.1
func (m *RoleUserMutation) 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 (*RoleUserMutation) ClearRole ¶ added in v0.11.1
func (m *RoleUserMutation) ClearRole()
ClearRole clears the "role" edge to the Role entity.
func (*RoleUserMutation) ClearUser ¶ added in v0.11.1
func (m *RoleUserMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*RoleUserMutation) ClearedEdges ¶ added in v0.11.1
func (m *RoleUserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*RoleUserMutation) ClearedFields ¶ added in v0.11.1
func (m *RoleUserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (RoleUserMutation) Client ¶ added in v0.11.1
func (m RoleUserMutation) 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 (*RoleUserMutation) CreatedAt ¶ added in v0.11.1
func (m *RoleUserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*RoleUserMutation) EdgeCleared ¶ added in v0.11.1
func (m *RoleUserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*RoleUserMutation) Field ¶ added in v0.11.1
func (m *RoleUserMutation) 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 (*RoleUserMutation) FieldCleared ¶ added in v0.11.1
func (m *RoleUserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*RoleUserMutation) Fields ¶ added in v0.11.1
func (m *RoleUserMutation) 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 (*RoleUserMutation) Filter ¶ added in v0.11.2
func (m *RoleUserMutation) Filter() *RoleUserFilter
Filter returns an entql.Where implementation to apply filters on the RoleUserMutation builder.
func (*RoleUserMutation) OldField ¶ added in v0.11.1
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 (*RoleUserMutation) Op ¶ added in v0.11.1
func (m *RoleUserMutation) Op() Op
Op returns the operation name.
func (*RoleUserMutation) RemovedEdges ¶ added in v0.11.1
func (m *RoleUserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*RoleUserMutation) RemovedIDs ¶ added in v0.11.1
func (m *RoleUserMutation) 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 (*RoleUserMutation) ResetCreatedAt ¶ added in v0.11.1
func (m *RoleUserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*RoleUserMutation) ResetEdge ¶ added in v0.11.1
func (m *RoleUserMutation) 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 (*RoleUserMutation) ResetField ¶ added in v0.11.1
func (m *RoleUserMutation) 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 (*RoleUserMutation) ResetRole ¶ added in v0.11.1
func (m *RoleUserMutation) ResetRole()
ResetRole resets all changes to the "role" edge.
func (*RoleUserMutation) ResetRoleID ¶ added in v0.11.1
func (m *RoleUserMutation) ResetRoleID()
ResetRoleID resets all changes to the "role_id" field.
func (*RoleUserMutation) ResetUser ¶ added in v0.11.1
func (m *RoleUserMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*RoleUserMutation) ResetUserID ¶ added in v0.11.1
func (m *RoleUserMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*RoleUserMutation) RoleCleared ¶ added in v0.11.1
func (m *RoleUserMutation) RoleCleared() bool
RoleCleared reports if the "role" edge to the Role entity was cleared.
func (*RoleUserMutation) RoleID ¶ added in v0.11.1
func (m *RoleUserMutation) RoleID() (r int, exists bool)
RoleID returns the value of the "role_id" field in the mutation.
func (*RoleUserMutation) RoleIDs ¶ added in v0.11.1
func (m *RoleUserMutation) RoleIDs() (ids []int)
RoleIDs returns the "role" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RoleID instead. It exists only for internal usage by the builders.
func (*RoleUserMutation) SetCreatedAt ¶ added in v0.11.1
func (m *RoleUserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*RoleUserMutation) SetField ¶ added in v0.11.1
func (m *RoleUserMutation) 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 (*RoleUserMutation) SetOp ¶ added in v0.11.5
func (m *RoleUserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*RoleUserMutation) SetRoleID ¶ added in v0.11.1
func (m *RoleUserMutation) SetRoleID(i int)
SetRoleID sets the "role_id" field.
func (*RoleUserMutation) SetUserID ¶ added in v0.11.1
func (m *RoleUserMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (RoleUserMutation) Tx ¶ added in v0.11.1
func (m RoleUserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*RoleUserMutation) Type ¶ added in v0.11.1
func (m *RoleUserMutation) Type() string
Type returns the node type of this mutation (RoleUser).
func (*RoleUserMutation) UserCleared ¶ added in v0.11.1
func (m *RoleUserMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*RoleUserMutation) UserID ¶ added in v0.11.1
func (m *RoleUserMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*RoleUserMutation) UserIDs ¶ added in v0.11.1
func (m *RoleUserMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*RoleUserMutation) Where ¶ added in v0.11.1
func (m *RoleUserMutation) Where(ps ...predicate.RoleUser)
Where appends a list predicates to the RoleUserMutation builder.
func (*RoleUserMutation) WhereP ¶ added in v0.11.5
func (m *RoleUserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the RoleUserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type RoleUserQuery ¶ added in v0.11.1
type RoleUserQuery struct {
// contains filtered or unexported fields
}
RoleUserQuery is the builder for querying RoleUser entities.
func (*RoleUserQuery) Aggregate ¶ added in v0.11.4
func (ruq *RoleUserQuery) Aggregate(fns ...AggregateFunc) *RoleUserSelect
Aggregate returns a RoleUserSelect configured with the given aggregations.
func (*RoleUserQuery) All ¶ added in v0.11.1
func (ruq *RoleUserQuery) All(ctx context.Context) ([]*RoleUser, error)
All executes the query and returns a list of RoleUsers.
func (*RoleUserQuery) AllX ¶ added in v0.11.1
func (ruq *RoleUserQuery) AllX(ctx context.Context) []*RoleUser
AllX is like All, but panics if an error occurs.
func (*RoleUserQuery) Clone ¶ added in v0.11.1
func (ruq *RoleUserQuery) Clone() *RoleUserQuery
Clone returns a duplicate of the RoleUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*RoleUserQuery) Count ¶ added in v0.11.1
func (ruq *RoleUserQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*RoleUserQuery) CountX ¶ added in v0.11.1
func (ruq *RoleUserQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*RoleUserQuery) Exist ¶ added in v0.11.1
func (ruq *RoleUserQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*RoleUserQuery) ExistX ¶ added in v0.11.1
func (ruq *RoleUserQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*RoleUserQuery) Filter ¶ added in v0.11.2
func (ruq *RoleUserQuery) Filter() *RoleUserFilter
Filter returns a Filter implementation to apply filters on the RoleUserQuery builder.
func (*RoleUserQuery) First ¶ added in v0.11.1
func (ruq *RoleUserQuery) First(ctx context.Context) (*RoleUser, error)
First returns the first RoleUser entity from the query. Returns a *NotFoundError when no RoleUser was found.
func (*RoleUserQuery) FirstX ¶ added in v0.11.1
func (ruq *RoleUserQuery) FirstX(ctx context.Context) *RoleUser
FirstX is like First, but panics if an error occurs.
func (*RoleUserQuery) GroupBy ¶ added in v0.11.1
func (ruq *RoleUserQuery) GroupBy(field string, fields ...string) *RoleUserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.RoleUser.Query(). GroupBy(roleuser.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*RoleUserQuery) Limit ¶ added in v0.11.1
func (ruq *RoleUserQuery) Limit(limit int) *RoleUserQuery
Limit the number of records to be returned by this query.
func (*RoleUserQuery) Offset ¶ added in v0.11.1
func (ruq *RoleUserQuery) Offset(offset int) *RoleUserQuery
Offset to start from.
func (*RoleUserQuery) Only ¶ added in v0.11.1
func (ruq *RoleUserQuery) Only(ctx context.Context) (*RoleUser, error)
Only returns a single RoleUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one RoleUser entity is found. Returns a *NotFoundError when no RoleUser entities are found.
func (*RoleUserQuery) OnlyX ¶ added in v0.11.1
func (ruq *RoleUserQuery) OnlyX(ctx context.Context) *RoleUser
OnlyX is like Only, but panics if an error occurs.
func (*RoleUserQuery) Order ¶ added in v0.11.1
func (ruq *RoleUserQuery) Order(o ...OrderFunc) *RoleUserQuery
Order specifies how the records should be ordered.
func (*RoleUserQuery) QueryRole ¶ added in v0.11.1
func (ruq *RoleUserQuery) QueryRole() *RoleQuery
QueryRole chains the current query on the "role" edge.
func (*RoleUserQuery) QueryUser ¶ added in v0.11.1
func (ruq *RoleUserQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*RoleUserQuery) Select ¶ added in v0.11.1
func (ruq *RoleUserQuery) Select(fields ...string) *RoleUserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.RoleUser.Query(). Select(roleuser.FieldCreatedAt). Scan(ctx, &v)
func (*RoleUserQuery) Unique ¶ added in v0.11.1
func (ruq *RoleUserQuery) Unique(unique bool) *RoleUserQuery
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 (*RoleUserQuery) Where ¶ added in v0.11.1
func (ruq *RoleUserQuery) Where(ps ...predicate.RoleUser) *RoleUserQuery
Where adds a new predicate for the RoleUserQuery builder.
func (*RoleUserQuery) WithRole ¶ added in v0.11.1
func (ruq *RoleUserQuery) WithRole(opts ...func(*RoleQuery)) *RoleUserQuery
WithRole tells the query-builder to eager-load the nodes that are connected to the "role" edge. The optional arguments are used to configure the query builder of the edge.
func (*RoleUserQuery) WithUser ¶ added in v0.11.1
func (ruq *RoleUserQuery) WithUser(opts ...func(*UserQuery)) *RoleUserQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type RoleUserSelect ¶ added in v0.11.1
type RoleUserSelect struct { *RoleUserQuery // contains filtered or unexported fields }
RoleUserSelect is the builder for selecting fields of RoleUser entities.
func (*RoleUserSelect) Aggregate ¶ added in v0.11.4
func (rus *RoleUserSelect) Aggregate(fns ...AggregateFunc) *RoleUserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*RoleUserSelect) Bool ¶ added in v0.11.1
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*RoleUserSelect) Bools ¶ added in v0.11.1
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*RoleUserSelect) BoolsX ¶ added in v0.11.1
BoolsX is like Bools, but panics if an error occurs.
func (*RoleUserSelect) Float64 ¶ added in v0.11.1
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*RoleUserSelect) Float64X ¶ added in v0.11.1
Float64X is like Float64, but panics if an error occurs.
func (*RoleUserSelect) Float64s ¶ added in v0.11.1
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*RoleUserSelect) Float64sX ¶ added in v0.11.1
Float64sX is like Float64s, but panics if an error occurs.
func (*RoleUserSelect) Int ¶ added in v0.11.1
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*RoleUserSelect) Ints ¶ added in v0.11.1
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*RoleUserSelect) Scan ¶ added in v0.11.1
func (rus *RoleUserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*RoleUserSelect) String ¶ added in v0.11.1
String returns a single string from a selector. It is only allowed when selecting one field.
func (*RoleUserSelect) StringX ¶ added in v0.11.1
StringX is like String, but panics if an error occurs.
type RoleUserUpdate ¶ added in v0.11.1
type RoleUserUpdate struct {
// contains filtered or unexported fields
}
RoleUserUpdate is the builder for updating RoleUser entities.
func (*RoleUserUpdate) ClearRole ¶ added in v0.11.1
func (ruu *RoleUserUpdate) ClearRole() *RoleUserUpdate
ClearRole clears the "role" edge to the Role entity.
func (*RoleUserUpdate) ClearUser ¶ added in v0.11.1
func (ruu *RoleUserUpdate) ClearUser() *RoleUserUpdate
ClearUser clears the "user" edge to the User entity.
func (*RoleUserUpdate) Exec ¶ added in v0.11.1
func (ruu *RoleUserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUserUpdate) ExecX ¶ added in v0.11.1
func (ruu *RoleUserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUserUpdate) Mutation ¶ added in v0.11.1
func (ruu *RoleUserUpdate) Mutation() *RoleUserMutation
Mutation returns the RoleUserMutation object of the builder.
func (*RoleUserUpdate) Save ¶ added in v0.11.1
func (ruu *RoleUserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*RoleUserUpdate) SaveX ¶ added in v0.11.1
func (ruu *RoleUserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*RoleUserUpdate) SetCreatedAt ¶ added in v0.11.1
func (ruu *RoleUserUpdate) SetCreatedAt(t time.Time) *RoleUserUpdate
SetCreatedAt sets the "created_at" field.
func (*RoleUserUpdate) SetNillableCreatedAt ¶ added in v0.11.1
func (ruu *RoleUserUpdate) SetNillableCreatedAt(t *time.Time) *RoleUserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RoleUserUpdate) SetRole ¶ added in v0.11.1
func (ruu *RoleUserUpdate) SetRole(r *Role) *RoleUserUpdate
SetRole sets the "role" edge to the Role entity.
func (*RoleUserUpdate) SetRoleID ¶ added in v0.11.1
func (ruu *RoleUserUpdate) SetRoleID(i int) *RoleUserUpdate
SetRoleID sets the "role_id" field.
func (*RoleUserUpdate) SetUser ¶ added in v0.11.1
func (ruu *RoleUserUpdate) SetUser(u *User) *RoleUserUpdate
SetUser sets the "user" edge to the User entity.
func (*RoleUserUpdate) SetUserID ¶ added in v0.11.1
func (ruu *RoleUserUpdate) SetUserID(i int) *RoleUserUpdate
SetUserID sets the "user_id" field.
func (*RoleUserUpdate) Where ¶ added in v0.11.1
func (ruu *RoleUserUpdate) Where(ps ...predicate.RoleUser) *RoleUserUpdate
Where appends a list predicates to the RoleUserUpdate builder.
type RoleUserUpdateOne ¶ added in v0.11.1
type RoleUserUpdateOne struct {
// contains filtered or unexported fields
}
RoleUserUpdateOne is the builder for updating a single RoleUser entity.
func (*RoleUserUpdateOne) ClearRole ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) ClearRole() *RoleUserUpdateOne
ClearRole clears the "role" edge to the Role entity.
func (*RoleUserUpdateOne) ClearUser ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) ClearUser() *RoleUserUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*RoleUserUpdateOne) Exec ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*RoleUserUpdateOne) ExecX ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUserUpdateOne) Mutation ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) Mutation() *RoleUserMutation
Mutation returns the RoleUserMutation object of the builder.
func (*RoleUserUpdateOne) Save ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) Save(ctx context.Context) (*RoleUser, error)
Save executes the query and returns the updated RoleUser entity.
func (*RoleUserUpdateOne) SaveX ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) SaveX(ctx context.Context) *RoleUser
SaveX is like Save, but panics if an error occurs.
func (*RoleUserUpdateOne) Select ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) Select(field string, fields ...string) *RoleUserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*RoleUserUpdateOne) SetCreatedAt ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) SetCreatedAt(t time.Time) *RoleUserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*RoleUserUpdateOne) SetNillableCreatedAt ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) SetNillableCreatedAt(t *time.Time) *RoleUserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*RoleUserUpdateOne) SetRole ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) SetRole(r *Role) *RoleUserUpdateOne
SetRole sets the "role" edge to the Role entity.
func (*RoleUserUpdateOne) SetRoleID ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) SetRoleID(i int) *RoleUserUpdateOne
SetRoleID sets the "role_id" field.
func (*RoleUserUpdateOne) SetUser ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) SetUser(u *User) *RoleUserUpdateOne
SetUser sets the "user" edge to the User entity.
func (*RoleUserUpdateOne) SetUserID ¶ added in v0.11.1
func (ruuo *RoleUserUpdateOne) SetUserID(i int) *RoleUserUpdateOne
SetUserID sets the "user_id" field.
func (*RoleUserUpdateOne) Where ¶ added in v0.11.8
func (ruuo *RoleUserUpdateOne) Where(ps ...predicate.RoleUser) *RoleUserUpdateOne
Where appends a list predicates to the RoleUserUpdate builder.
type RoleUserUpsert ¶ added in v0.11.1
RoleUserUpsert is the "OnConflict" setter.
func (*RoleUserUpsert) SetCreatedAt ¶ added in v0.11.1
func (u *RoleUserUpsert) SetCreatedAt(v time.Time) *RoleUserUpsert
SetCreatedAt sets the "created_at" field.
func (*RoleUserUpsert) SetRoleID ¶ added in v0.11.1
func (u *RoleUserUpsert) SetRoleID(v int) *RoleUserUpsert
SetRoleID sets the "role_id" field.
func (*RoleUserUpsert) SetUserID ¶ added in v0.11.1
func (u *RoleUserUpsert) SetUserID(v int) *RoleUserUpsert
SetUserID sets the "user_id" field.
func (*RoleUserUpsert) UpdateCreatedAt ¶ added in v0.11.1
func (u *RoleUserUpsert) UpdateCreatedAt() *RoleUserUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*RoleUserUpsert) UpdateRoleID ¶ added in v0.11.1
func (u *RoleUserUpsert) UpdateRoleID() *RoleUserUpsert
UpdateRoleID sets the "role_id" field to the value that was provided on create.
func (*RoleUserUpsert) UpdateUserID ¶ added in v0.11.1
func (u *RoleUserUpsert) UpdateUserID() *RoleUserUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type RoleUserUpsertBulk ¶ added in v0.11.1
type RoleUserUpsertBulk struct {
// contains filtered or unexported fields
}
RoleUserUpsertBulk is the builder for "upsert"-ing a bulk of RoleUser nodes.
func (*RoleUserUpsertBulk) DoNothing ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) DoNothing() *RoleUserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RoleUserUpsertBulk) Exec ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUserUpsertBulk) ExecX ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUserUpsertBulk) Ignore ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) Ignore() *RoleUserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.RoleUser.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RoleUserUpsertBulk) SetCreatedAt ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) SetCreatedAt(v time.Time) *RoleUserUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*RoleUserUpsertBulk) SetRoleID ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) SetRoleID(v int) *RoleUserUpsertBulk
SetRoleID sets the "role_id" field.
func (*RoleUserUpsertBulk) SetUserID ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) SetUserID(v int) *RoleUserUpsertBulk
SetUserID sets the "user_id" field.
func (*RoleUserUpsertBulk) Update ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) Update(set func(*RoleUserUpsert)) *RoleUserUpsertBulk
Update allows overriding fields `UPDATE` values. See the RoleUserCreateBulk.OnConflict documentation for more info.
func (*RoleUserUpsertBulk) UpdateCreatedAt ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) UpdateCreatedAt() *RoleUserUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*RoleUserUpsertBulk) UpdateNewValues ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) UpdateNewValues() *RoleUserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.RoleUser.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*RoleUserUpsertBulk) UpdateRoleID ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) UpdateRoleID() *RoleUserUpsertBulk
UpdateRoleID sets the "role_id" field to the value that was provided on create.
func (*RoleUserUpsertBulk) UpdateUserID ¶ added in v0.11.1
func (u *RoleUserUpsertBulk) UpdateUserID() *RoleUserUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type RoleUserUpsertOne ¶ added in v0.11.1
type RoleUserUpsertOne struct {
// contains filtered or unexported fields
}
RoleUserUpsertOne is the builder for "upsert"-ing
one RoleUser node.
func (*RoleUserUpsertOne) DoNothing ¶ added in v0.11.1
func (u *RoleUserUpsertOne) DoNothing() *RoleUserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*RoleUserUpsertOne) Exec ¶ added in v0.11.1
func (u *RoleUserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*RoleUserUpsertOne) ExecX ¶ added in v0.11.1
func (u *RoleUserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*RoleUserUpsertOne) Ignore ¶ added in v0.11.1
func (u *RoleUserUpsertOne) Ignore() *RoleUserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.RoleUser.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*RoleUserUpsertOne) SetCreatedAt ¶ added in v0.11.1
func (u *RoleUserUpsertOne) SetCreatedAt(v time.Time) *RoleUserUpsertOne
SetCreatedAt sets the "created_at" field.
func (*RoleUserUpsertOne) SetRoleID ¶ added in v0.11.1
func (u *RoleUserUpsertOne) SetRoleID(v int) *RoleUserUpsertOne
SetRoleID sets the "role_id" field.
func (*RoleUserUpsertOne) SetUserID ¶ added in v0.11.1
func (u *RoleUserUpsertOne) SetUserID(v int) *RoleUserUpsertOne
SetUserID sets the "user_id" field.
func (*RoleUserUpsertOne) Update ¶ added in v0.11.1
func (u *RoleUserUpsertOne) Update(set func(*RoleUserUpsert)) *RoleUserUpsertOne
Update allows overriding fields `UPDATE` values. See the RoleUserCreate.OnConflict documentation for more info.
func (*RoleUserUpsertOne) UpdateCreatedAt ¶ added in v0.11.1
func (u *RoleUserUpsertOne) UpdateCreatedAt() *RoleUserUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*RoleUserUpsertOne) UpdateNewValues ¶ added in v0.11.1
func (u *RoleUserUpsertOne) UpdateNewValues() *RoleUserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.RoleUser.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*RoleUserUpsertOne) UpdateRoleID ¶ added in v0.11.1
func (u *RoleUserUpsertOne) UpdateRoleID() *RoleUserUpsertOne
UpdateRoleID sets the "role_id" field to the value that was provided on create.
func (*RoleUserUpsertOne) UpdateUserID ¶ added in v0.11.1
func (u *RoleUserUpsertOne) UpdateUserID() *RoleUserUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type RoleUsers ¶ added in v0.11.1
type RoleUsers []*RoleUser
RoleUsers is a parsable slice of RoleUser.
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 Tag ¶
type Tag struct { // ID of the ent. ID int `json:"id,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TagQuery when eager-loading is set. Edges TagEdges `json:"edges"` // contains filtered or unexported fields }
Tag is the model entity for the Tag schema.
func (*Tag) QueryGroupTags ¶ added in v0.11.5
func (t *Tag) QueryGroupTags() *GroupTagQuery
QueryGroupTags queries the "group_tags" edge of the Tag entity.
func (*Tag) QueryGroups ¶ added in v0.11.5
func (t *Tag) QueryGroups() *GroupQuery
QueryGroups queries the "groups" edge of the Tag entity.
func (*Tag) QueryTweetTags ¶
func (t *Tag) QueryTweetTags() *TweetTagQuery
QueryTweetTags queries the "tweet_tags" edge of the Tag entity.
func (*Tag) QueryTweets ¶
func (t *Tag) QueryTweets() *TweetQuery
QueryTweets queries the "tweets" edge of the Tag entity.
func (*Tag) Unwrap ¶
Unwrap unwraps the Tag 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 (*Tag) Update ¶
func (t *Tag) Update() *TagUpdateOne
Update returns a builder for updating this Tag. Note that you need to call Tag.Unwrap() before calling this method if this Tag was returned from a transaction, and the transaction was committed or rolled back.
type TagClient ¶
type TagClient struct {
// contains filtered or unexported fields
}
TagClient is a client for the Tag schema.
func NewTagClient ¶
func NewTagClient(c config) *TagClient
NewTagClient returns a client for the Tag from the given config.
func (*TagClient) CreateBulk ¶
func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
CreateBulk returns a builder for creating a bulk of Tag entities.
func (*TagClient) DeleteOne ¶
func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TagClient) DeleteOneID ¶
func (c *TagClient) DeleteOneID(id int) *TagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TagClient) Intercept ¶ added in v0.11.5
func (c *TagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tag.Intercept(f(g(h())))`.
func (*TagClient) Interceptors ¶ added in v0.11.5
func (c *TagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TagClient) QueryGroupTags ¶ added in v0.11.5
func (c *TagClient) QueryGroupTags(t *Tag) *GroupTagQuery
QueryGroupTags queries the group_tags edge of a Tag.
func (*TagClient) QueryGroups ¶ added in v0.11.5
func (c *TagClient) QueryGroups(t *Tag) *GroupQuery
QueryGroups queries the groups edge of a Tag.
func (*TagClient) QueryTweetTags ¶
func (c *TagClient) QueryTweetTags(t *Tag) *TweetTagQuery
QueryTweetTags queries the tweet_tags edge of a Tag.
func (*TagClient) QueryTweets ¶
func (c *TagClient) QueryTweets(t *Tag) *TweetQuery
QueryTweets queries the tweets edge of a Tag.
func (*TagClient) UpdateOne ¶
func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TagClient) UpdateOneID ¶
func (c *TagClient) UpdateOneID(id int) *TagUpdateOne
UpdateOneID returns an update builder for the given id.
type TagCreate ¶
type TagCreate struct {
// contains filtered or unexported fields
}
TagCreate is the builder for creating a Tag entity.
func (*TagCreate) AddGroupIDs ¶ added in v0.11.5
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*TagCreate) AddGroupTagIDs ¶ added in v0.11.5
AddGroupTagIDs adds the "group_tags" edge to the GroupTag entity by IDs.
func (*TagCreate) AddGroupTags ¶ added in v0.11.5
AddGroupTags adds the "group_tags" edges to the GroupTag entity.
func (*TagCreate) AddGroups ¶ added in v0.11.5
AddGroups adds the "groups" edges to the Group entity.
func (*TagCreate) AddTweetIDs ¶
AddTweetIDs adds the "tweets" edge to the Tweet entity by IDs.
func (*TagCreate) AddTweetTagIDs ¶
AddTweetTagIDs adds the "tweet_tags" edge to the TweetTag entity by IDs.
func (*TagCreate) AddTweetTags ¶
AddTweetTags adds the "tweet_tags" edges to the TweetTag entity.
func (*TagCreate) Mutation ¶
func (tc *TagCreate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagCreate) OnConflict ¶
func (tc *TagCreate) OnConflict(opts ...sql.ConflictOption) *TagUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tag.Create(). SetValue(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TagUpsert) { SetValue(v+v). }). Exec(ctx)
func (*TagCreate) OnConflictColumns ¶
func (tc *TagCreate) OnConflictColumns(columns ...string) *TagUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TagCreateBulk ¶
type TagCreateBulk struct {
// contains filtered or unexported fields
}
TagCreateBulk is the builder for creating many Tag entities in bulk.
func (*TagCreateBulk) Exec ¶
func (tcb *TagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagCreateBulk) ExecX ¶
func (tcb *TagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagCreateBulk) OnConflict ¶
func (tcb *TagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TagUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tag.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TagUpsert) { SetValue(v+v). }). Exec(ctx)
func (*TagCreateBulk) OnConflictColumns ¶
func (tcb *TagCreateBulk) OnConflictColumns(columns ...string) *TagUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TagDelete ¶
type TagDelete struct {
// contains filtered or unexported fields
}
TagDelete is the builder for deleting a Tag entity.
func (*TagDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type TagDeleteOne ¶
type TagDeleteOne struct {
// contains filtered or unexported fields
}
TagDeleteOne is the builder for deleting a single Tag entity.
func (*TagDeleteOne) Exec ¶
func (tdo *TagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TagDeleteOne) ExecX ¶
func (tdo *TagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagDeleteOne) Where ¶ added in v0.11.7
func (tdo *TagDeleteOne) Where(ps ...predicate.Tag) *TagDeleteOne
Where appends a list predicates to the TagDelete builder.
type TagEdges ¶
type TagEdges struct { // Tweets holds the value of the tweets edge. Tweets []*Tweet `json:"tweets,omitempty"` // Groups holds the value of the groups edge. Groups []*Group `json:"groups,omitempty"` // TweetTags holds the value of the tweet_tags edge. TweetTags []*TweetTag `json:"tweet_tags,omitempty"` // GroupTags holds the value of the group_tags edge. GroupTags []*GroupTag `json:"group_tags,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) GroupTagsOrErr ¶ added in v0.11.5
GroupTagsOrErr returns the GroupTags value or an error if the edge was not loaded in eager-loading.
func (TagEdges) GroupsOrErr ¶ added in v0.11.5
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.
func (TagEdges) TweetTagsOrErr ¶
TweetTagsOrErr returns the TweetTags value or an error if the edge was not loaded in eager-loading.
func (TagEdges) TweetsOrErr ¶
TweetsOrErr returns the Tweets value or an error if the edge was not loaded in eager-loading.
type TagFilter ¶ added in v0.11.2
type TagFilter struct {
// contains filtered or unexported fields
}
TagFilter provides a generic filtering capability at runtime for TagQuery.
func (*TagFilter) WhereHasGroupTags ¶ added in v0.11.5
func (f *TagFilter) WhereHasGroupTags()
WhereHasGroupTags applies a predicate to check if query has an edge group_tags.
func (*TagFilter) WhereHasGroupTagsWith ¶ added in v0.11.5
WhereHasGroupTagsWith applies a predicate to check if query has an edge group_tags with a given conditions (other predicates).
func (*TagFilter) WhereHasGroups ¶ added in v0.11.5
func (f *TagFilter) WhereHasGroups()
WhereHasGroups applies a predicate to check if query has an edge groups.
func (*TagFilter) WhereHasGroupsWith ¶ added in v0.11.5
WhereHasGroupsWith applies a predicate to check if query has an edge groups with a given conditions (other predicates).
func (*TagFilter) WhereHasTweetTags ¶ added in v0.11.2
func (f *TagFilter) WhereHasTweetTags()
WhereHasTweetTags applies a predicate to check if query has an edge tweet_tags.
func (*TagFilter) WhereHasTweetTagsWith ¶ added in v0.11.2
WhereHasTweetTagsWith applies a predicate to check if query has an edge tweet_tags with a given conditions (other predicates).
func (*TagFilter) WhereHasTweets ¶ added in v0.11.2
func (f *TagFilter) WhereHasTweets()
WhereHasTweets applies a predicate to check if query has an edge tweets.
func (*TagFilter) WhereHasTweetsWith ¶ added in v0.11.2
WhereHasTweetsWith applies a predicate to check if query has an edge tweets with a given conditions (other predicates).
func (*TagFilter) WhereID ¶ added in v0.11.2
WhereID applies the entql int predicate on the id field.
func (*TagFilter) WhereValue ¶ added in v0.11.2
WhereValue applies the entql string predicate on the value field.
type TagGroupBy ¶
type TagGroupBy struct {
// contains filtered or unexported fields
}
TagGroupBy is the group-by builder for Tag entities.
func (*TagGroupBy) Aggregate ¶
func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Scan ¶
func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagMutation ¶
type TagMutation struct {
// contains filtered or unexported fields
}
TagMutation represents an operation that mutates the Tag nodes in the graph.
func (*TagMutation) AddField ¶
func (m *TagMutation) 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 (*TagMutation) AddGroupIDs ¶ added in v0.11.5
func (m *TagMutation) AddGroupIDs(ids ...int)
AddGroupIDs adds the "groups" edge to the Group entity by ids.
func (*TagMutation) AddGroupTagIDs ¶ added in v0.11.5
func (m *TagMutation) AddGroupTagIDs(ids ...int)
AddGroupTagIDs adds the "group_tags" edge to the GroupTag entity by ids.
func (*TagMutation) AddTweetIDs ¶
func (m *TagMutation) AddTweetIDs(ids ...int)
AddTweetIDs adds the "tweets" edge to the Tweet entity by ids.
func (*TagMutation) AddTweetTagIDs ¶
func (m *TagMutation) AddTweetTagIDs(ids ...uuid.UUID)
AddTweetTagIDs adds the "tweet_tags" edge to the TweetTag entity by ids.
func (*TagMutation) AddedEdges ¶
func (m *TagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TagMutation) AddedField ¶
func (m *TagMutation) 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 (*TagMutation) AddedFields ¶
func (m *TagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TagMutation) AddedIDs ¶
func (m *TagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TagMutation) ClearEdge ¶
func (m *TagMutation) 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 (*TagMutation) ClearField ¶
func (m *TagMutation) 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 (*TagMutation) ClearGroupTags ¶ added in v0.11.5
func (m *TagMutation) ClearGroupTags()
ClearGroupTags clears the "group_tags" edge to the GroupTag entity.
func (*TagMutation) ClearGroups ¶ added in v0.11.5
func (m *TagMutation) ClearGroups()
ClearGroups clears the "groups" edge to the Group entity.
func (*TagMutation) ClearTweetTags ¶
func (m *TagMutation) ClearTweetTags()
ClearTweetTags clears the "tweet_tags" edge to the TweetTag entity.
func (*TagMutation) ClearTweets ¶
func (m *TagMutation) ClearTweets()
ClearTweets clears the "tweets" edge to the Tweet entity.
func (*TagMutation) ClearedEdges ¶
func (m *TagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TagMutation) ClearedFields ¶
func (m *TagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TagMutation) Client ¶
func (m TagMutation) 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 (*TagMutation) EdgeCleared ¶
func (m *TagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TagMutation) Field ¶
func (m *TagMutation) 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 (*TagMutation) FieldCleared ¶
func (m *TagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TagMutation) Fields ¶
func (m *TagMutation) 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 (*TagMutation) Filter ¶ added in v0.11.2
func (m *TagMutation) Filter() *TagFilter
Filter returns an entql.Where implementation to apply filters on the TagMutation builder.
func (*TagMutation) GroupTagsCleared ¶ added in v0.11.5
func (m *TagMutation) GroupTagsCleared() bool
GroupTagsCleared reports if the "group_tags" edge to the GroupTag entity was cleared.
func (*TagMutation) GroupTagsIDs ¶ added in v0.11.5
func (m *TagMutation) GroupTagsIDs() (ids []int)
GroupTagsIDs returns the "group_tags" edge IDs in the mutation.
func (*TagMutation) GroupsCleared ¶ added in v0.11.5
func (m *TagMutation) GroupsCleared() bool
GroupsCleared reports if the "groups" edge to the Group entity was cleared.
func (*TagMutation) GroupsIDs ¶ added in v0.11.5
func (m *TagMutation) GroupsIDs() (ids []int)
GroupsIDs returns the "groups" edge IDs in the mutation.
func (*TagMutation) ID ¶
func (m *TagMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TagMutation) IDs ¶
func (m *TagMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TagMutation) 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 (*TagMutation) OldValue ¶
func (m *TagMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the Tag entity. If the Tag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TagMutation) RemoveGroupIDs ¶ added in v0.11.5
func (m *TagMutation) RemoveGroupIDs(ids ...int)
RemoveGroupIDs removes the "groups" edge to the Group entity by IDs.
func (*TagMutation) RemoveGroupTagIDs ¶ added in v0.11.5
func (m *TagMutation) RemoveGroupTagIDs(ids ...int)
RemoveGroupTagIDs removes the "group_tags" edge to the GroupTag entity by IDs.
func (*TagMutation) RemoveTweetIDs ¶
func (m *TagMutation) RemoveTweetIDs(ids ...int)
RemoveTweetIDs removes the "tweets" edge to the Tweet entity by IDs.
func (*TagMutation) RemoveTweetTagIDs ¶
func (m *TagMutation) RemoveTweetTagIDs(ids ...uuid.UUID)
RemoveTweetTagIDs removes the "tweet_tags" edge to the TweetTag entity by IDs.
func (*TagMutation) RemovedEdges ¶
func (m *TagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagMutation) RemovedGroupTagsIDs ¶ added in v0.11.5
func (m *TagMutation) RemovedGroupTagsIDs() (ids []int)
RemovedGroupTags returns the removed IDs of the "group_tags" edge to the GroupTag entity.
func (*TagMutation) RemovedGroupsIDs ¶ added in v0.11.5
func (m *TagMutation) RemovedGroupsIDs() (ids []int)
RemovedGroups returns the removed IDs of the "groups" edge to the Group entity.
func (*TagMutation) RemovedIDs ¶
func (m *TagMutation) 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 (*TagMutation) RemovedTweetTagsIDs ¶
func (m *TagMutation) RemovedTweetTagsIDs() (ids []uuid.UUID)
RemovedTweetTags returns the removed IDs of the "tweet_tags" edge to the TweetTag entity.
func (*TagMutation) RemovedTweetsIDs ¶
func (m *TagMutation) RemovedTweetsIDs() (ids []int)
RemovedTweets returns the removed IDs of the "tweets" edge to the Tweet entity.
func (*TagMutation) ResetEdge ¶
func (m *TagMutation) 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 (*TagMutation) ResetField ¶
func (m *TagMutation) 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 (*TagMutation) ResetGroupTags ¶ added in v0.11.5
func (m *TagMutation) ResetGroupTags()
ResetGroupTags resets all changes to the "group_tags" edge.
func (*TagMutation) ResetGroups ¶ added in v0.11.5
func (m *TagMutation) ResetGroups()
ResetGroups resets all changes to the "groups" edge.
func (*TagMutation) ResetTweetTags ¶
func (m *TagMutation) ResetTweetTags()
ResetTweetTags resets all changes to the "tweet_tags" edge.
func (*TagMutation) ResetTweets ¶
func (m *TagMutation) ResetTweets()
ResetTweets resets all changes to the "tweets" edge.
func (*TagMutation) ResetValue ¶
func (m *TagMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*TagMutation) SetField ¶
func (m *TagMutation) 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 (*TagMutation) SetOp ¶ added in v0.11.5
func (m *TagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TagMutation) SetValue ¶
func (m *TagMutation) SetValue(s string)
SetValue sets the "value" field.
func (*TagMutation) TweetTagsCleared ¶
func (m *TagMutation) TweetTagsCleared() bool
TweetTagsCleared reports if the "tweet_tags" edge to the TweetTag entity was cleared.
func (*TagMutation) TweetTagsIDs ¶
func (m *TagMutation) TweetTagsIDs() (ids []uuid.UUID)
TweetTagsIDs returns the "tweet_tags" edge IDs in the mutation.
func (*TagMutation) TweetsCleared ¶
func (m *TagMutation) TweetsCleared() bool
TweetsCleared reports if the "tweets" edge to the Tweet entity was cleared.
func (*TagMutation) TweetsIDs ¶
func (m *TagMutation) TweetsIDs() (ids []int)
TweetsIDs returns the "tweets" edge IDs in the mutation.
func (TagMutation) Tx ¶
func (m TagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TagMutation) Type ¶
func (m *TagMutation) Type() string
Type returns the node type of this mutation (Tag).
func (*TagMutation) Value ¶
func (m *TagMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*TagMutation) Where ¶
func (m *TagMutation) Where(ps ...predicate.Tag)
Where appends a list predicates to the TagMutation builder.
func (*TagMutation) WhereP ¶ added in v0.11.5
func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TagQuery ¶
type TagQuery struct {
// contains filtered or unexported fields
}
TagQuery is the builder for querying Tag entities.
func (*TagQuery) Aggregate ¶ added in v0.11.4
func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate returns a TagSelect configured with the given aggregations.
func (*TagQuery) Clone ¶
Clone returns a duplicate of the TagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TagQuery) Filter ¶ added in v0.11.2
Filter returns a Filter implementation to apply filters on the TagQuery builder.
func (*TagQuery) First ¶
First returns the first Tag entity from the query. Returns a *NotFoundError when no Tag was found.
func (*TagQuery) FirstID ¶
FirstID returns the first Tag ID from the query. Returns a *NotFoundError when no Tag ID was found.
func (*TagQuery) GroupBy ¶
func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
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 { Value string `json:"value,omitempty"` Count int `json:"count,omitempty"` } client.Tag.Query(). GroupBy(tag.FieldValue). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TagQuery) Only ¶
Only returns a single Tag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tag entity is found. Returns a *NotFoundError when no Tag entities are found.
func (*TagQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tag ID in the query. Returns a *NotSingularError when more than one Tag ID is found. Returns a *NotFoundError when no entities are found.
func (*TagQuery) QueryGroupTags ¶ added in v0.11.5
func (tq *TagQuery) QueryGroupTags() *GroupTagQuery
QueryGroupTags chains the current query on the "group_tags" edge.
func (*TagQuery) QueryGroups ¶ added in v0.11.5
func (tq *TagQuery) QueryGroups() *GroupQuery
QueryGroups chains the current query on the "groups" edge.
func (*TagQuery) QueryTweetTags ¶
func (tq *TagQuery) QueryTweetTags() *TweetTagQuery
QueryTweetTags chains the current query on the "tweet_tags" edge.
func (*TagQuery) QueryTweets ¶
func (tq *TagQuery) QueryTweets() *TweetQuery
QueryTweets chains the current query on the "tweets" edge.
func (*TagQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Value string `json:"value,omitempty"` } client.Tag.Query(). Select(tag.FieldValue). Scan(ctx, &v)
func (*TagQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*TagQuery) WithGroupTags ¶ added in v0.11.5
func (tq *TagQuery) WithGroupTags(opts ...func(*GroupTagQuery)) *TagQuery
WithGroupTags tells the query-builder to eager-load the nodes that are connected to the "group_tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*TagQuery) WithGroups ¶ added in v0.11.5
func (tq *TagQuery) WithGroups(opts ...func(*GroupQuery)) *TagQuery
WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.
func (*TagQuery) WithTweetTags ¶
func (tq *TagQuery) WithTweetTags(opts ...func(*TweetTagQuery)) *TagQuery
WithTweetTags tells the query-builder to eager-load the nodes that are connected to the "tweet_tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*TagQuery) WithTweets ¶
func (tq *TagQuery) WithTweets(opts ...func(*TweetQuery)) *TagQuery
WithTweets tells the query-builder to eager-load the nodes that are connected to the "tweets" edge. The optional arguments are used to configure the query builder of the edge.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Aggregate ¶ added in v0.11.4
func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagUpdate ¶
type TagUpdate struct {
// contains filtered or unexported fields
}
TagUpdate is the builder for updating Tag entities.
func (*TagUpdate) AddGroupIDs ¶ added in v0.11.5
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*TagUpdate) AddGroupTagIDs ¶ added in v0.11.5
AddGroupTagIDs adds the "group_tags" edge to the GroupTag entity by IDs.
func (*TagUpdate) AddGroupTags ¶ added in v0.11.5
AddGroupTags adds the "group_tags" edges to the GroupTag entity.
func (*TagUpdate) AddGroups ¶ added in v0.11.5
AddGroups adds the "groups" edges to the Group entity.
func (*TagUpdate) AddTweetIDs ¶
AddTweetIDs adds the "tweets" edge to the Tweet entity by IDs.
func (*TagUpdate) AddTweetTagIDs ¶
AddTweetTagIDs adds the "tweet_tags" edge to the TweetTag entity by IDs.
func (*TagUpdate) AddTweetTags ¶
AddTweetTags adds the "tweet_tags" edges to the TweetTag entity.
func (*TagUpdate) ClearGroupTags ¶ added in v0.11.5
ClearGroupTags clears all "group_tags" edges to the GroupTag entity.
func (*TagUpdate) ClearGroups ¶ added in v0.11.5
ClearGroups clears all "groups" edges to the Group entity.
func (*TagUpdate) ClearTweetTags ¶
ClearTweetTags clears all "tweet_tags" edges to the TweetTag entity.
func (*TagUpdate) ClearTweets ¶
ClearTweets clears all "tweets" edges to the Tweet entity.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) RemoveGroupIDs ¶ added in v0.11.5
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*TagUpdate) RemoveGroupTagIDs ¶ added in v0.11.5
RemoveGroupTagIDs removes the "group_tags" edge to GroupTag entities by IDs.
func (*TagUpdate) RemoveGroupTags ¶ added in v0.11.5
RemoveGroupTags removes "group_tags" edges to GroupTag entities.
func (*TagUpdate) RemoveGroups ¶ added in v0.11.5
RemoveGroups removes "groups" edges to Group entities.
func (*TagUpdate) RemoveTweetIDs ¶
RemoveTweetIDs removes the "tweets" edge to Tweet entities by IDs.
func (*TagUpdate) RemoveTweetTagIDs ¶
RemoveTweetTagIDs removes the "tweet_tags" edge to TweetTag entities by IDs.
func (*TagUpdate) RemoveTweetTags ¶
RemoveTweetTags removes "tweet_tags" edges to TweetTag entities.
func (*TagUpdate) RemoveTweets ¶
RemoveTweets removes "tweets" edges to Tweet entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddGroupIDs ¶ added in v0.11.5
func (tuo *TagUpdateOne) AddGroupIDs(ids ...int) *TagUpdateOne
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*TagUpdateOne) AddGroupTagIDs ¶ added in v0.11.5
func (tuo *TagUpdateOne) AddGroupTagIDs(ids ...int) *TagUpdateOne
AddGroupTagIDs adds the "group_tags" edge to the GroupTag entity by IDs.
func (*TagUpdateOne) AddGroupTags ¶ added in v0.11.5
func (tuo *TagUpdateOne) AddGroupTags(g ...*GroupTag) *TagUpdateOne
AddGroupTags adds the "group_tags" edges to the GroupTag entity.
func (*TagUpdateOne) AddGroups ¶ added in v0.11.5
func (tuo *TagUpdateOne) AddGroups(g ...*Group) *TagUpdateOne
AddGroups adds the "groups" edges to the Group entity.
func (*TagUpdateOne) AddTweetIDs ¶
func (tuo *TagUpdateOne) AddTweetIDs(ids ...int) *TagUpdateOne
AddTweetIDs adds the "tweets" edge to the Tweet entity by IDs.
func (*TagUpdateOne) AddTweetTagIDs ¶
func (tuo *TagUpdateOne) AddTweetTagIDs(ids ...uuid.UUID) *TagUpdateOne
AddTweetTagIDs adds the "tweet_tags" edge to the TweetTag entity by IDs.
func (*TagUpdateOne) AddTweetTags ¶
func (tuo *TagUpdateOne) AddTweetTags(t ...*TweetTag) *TagUpdateOne
AddTweetTags adds the "tweet_tags" edges to the TweetTag entity.
func (*TagUpdateOne) AddTweets ¶
func (tuo *TagUpdateOne) AddTweets(t ...*Tweet) *TagUpdateOne
AddTweets adds the "tweets" edges to the Tweet entity.
func (*TagUpdateOne) ClearGroupTags ¶ added in v0.11.5
func (tuo *TagUpdateOne) ClearGroupTags() *TagUpdateOne
ClearGroupTags clears all "group_tags" edges to the GroupTag entity.
func (*TagUpdateOne) ClearGroups ¶ added in v0.11.5
func (tuo *TagUpdateOne) ClearGroups() *TagUpdateOne
ClearGroups clears all "groups" edges to the Group entity.
func (*TagUpdateOne) ClearTweetTags ¶
func (tuo *TagUpdateOne) ClearTweetTags() *TagUpdateOne
ClearTweetTags clears all "tweet_tags" edges to the TweetTag entity.
func (*TagUpdateOne) ClearTweets ¶
func (tuo *TagUpdateOne) ClearTweets() *TagUpdateOne
ClearTweets clears all "tweets" edges to the Tweet entity.
func (*TagUpdateOne) Exec ¶
func (tuo *TagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagUpdateOne) ExecX ¶
func (tuo *TagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpdateOne) Mutation ¶
func (tuo *TagUpdateOne) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdateOne) RemoveGroupIDs ¶ added in v0.11.5
func (tuo *TagUpdateOne) RemoveGroupIDs(ids ...int) *TagUpdateOne
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*TagUpdateOne) RemoveGroupTagIDs ¶ added in v0.11.5
func (tuo *TagUpdateOne) RemoveGroupTagIDs(ids ...int) *TagUpdateOne
RemoveGroupTagIDs removes the "group_tags" edge to GroupTag entities by IDs.
func (*TagUpdateOne) RemoveGroupTags ¶ added in v0.11.5
func (tuo *TagUpdateOne) RemoveGroupTags(g ...*GroupTag) *TagUpdateOne
RemoveGroupTags removes "group_tags" edges to GroupTag entities.
func (*TagUpdateOne) RemoveGroups ¶ added in v0.11.5
func (tuo *TagUpdateOne) RemoveGroups(g ...*Group) *TagUpdateOne
RemoveGroups removes "groups" edges to Group entities.
func (*TagUpdateOne) RemoveTweetIDs ¶
func (tuo *TagUpdateOne) RemoveTweetIDs(ids ...int) *TagUpdateOne
RemoveTweetIDs removes the "tweets" edge to Tweet entities by IDs.
func (*TagUpdateOne) RemoveTweetTagIDs ¶
func (tuo *TagUpdateOne) RemoveTweetTagIDs(ids ...uuid.UUID) *TagUpdateOne
RemoveTweetTagIDs removes the "tweet_tags" edge to TweetTag entities by IDs.
func (*TagUpdateOne) RemoveTweetTags ¶
func (tuo *TagUpdateOne) RemoveTweetTags(t ...*TweetTag) *TagUpdateOne
RemoveTweetTags removes "tweet_tags" edges to TweetTag entities.
func (*TagUpdateOne) RemoveTweets ¶
func (tuo *TagUpdateOne) RemoveTweets(t ...*Tweet) *TagUpdateOne
RemoveTweets removes "tweets" edges to Tweet entities.
func (*TagUpdateOne) Save ¶
func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
Save executes the query and returns the updated Tag entity.
func (*TagUpdateOne) SaveX ¶
func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
SaveX is like Save, but panics if an error occurs.
func (*TagUpdateOne) Select ¶
func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TagUpdateOne) SetValue ¶
func (tuo *TagUpdateOne) SetValue(s string) *TagUpdateOne
SetValue sets the "value" field.
func (*TagUpdateOne) Where ¶ added in v0.11.8
func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
Where appends a list predicates to the TagUpdate builder.
type TagUpsert ¶
TagUpsert is the "OnConflict" setter.
func (*TagUpsert) UpdateValue ¶
UpdateValue sets the "value" field to the value that was provided on create.
type TagUpsertBulk ¶
type TagUpsertBulk struct {
// contains filtered or unexported fields
}
TagUpsertBulk is the builder for "upsert"-ing a bulk of Tag nodes.
func (*TagUpsertBulk) DoNothing ¶
func (u *TagUpsertBulk) DoNothing() *TagUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TagUpsertBulk) Exec ¶
func (u *TagUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagUpsertBulk) ExecX ¶
func (u *TagUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpsertBulk) Ignore ¶
func (u *TagUpsertBulk) Ignore() *TagUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TagUpsertBulk) SetValue ¶
func (u *TagUpsertBulk) SetValue(v string) *TagUpsertBulk
SetValue sets the "value" field.
func (*TagUpsertBulk) Update ¶
func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk
Update allows overriding fields `UPDATE` values. See the TagCreateBulk.OnConflict documentation for more info.
func (*TagUpsertBulk) UpdateNewValues ¶
func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tag.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TagUpsertBulk) UpdateValue ¶
func (u *TagUpsertBulk) UpdateValue() *TagUpsertBulk
UpdateValue sets the "value" field to the value that was provided on create.
type TagUpsertOne ¶
type TagUpsertOne struct {
// contains filtered or unexported fields
}
TagUpsertOne is the builder for "upsert"-ing
one Tag node.
func (*TagUpsertOne) DoNothing ¶
func (u *TagUpsertOne) DoNothing() *TagUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TagUpsertOne) Exec ¶
func (u *TagUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TagUpsertOne) ExecX ¶
func (u *TagUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpsertOne) ID ¶
func (u *TagUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TagUpsertOne) IDX ¶
func (u *TagUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*TagUpsertOne) Ignore ¶
func (u *TagUpsertOne) Ignore() *TagUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TagUpsertOne) SetValue ¶
func (u *TagUpsertOne) SetValue(v string) *TagUpsertOne
SetValue sets the "value" field.
func (*TagUpsertOne) Update ¶
func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne
Update allows overriding fields `UPDATE` values. See the TagCreate.OnConflict documentation for more info.
func (*TagUpsertOne) UpdateNewValues ¶
func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tag.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TagUpsertOne) UpdateValue ¶
func (u *TagUpsertOne) UpdateValue() *TagUpsertOne
UpdateValue sets the "value" field to the value that was provided on create.
type TraverseFunc ¶ added in v0.11.5
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tweet ¶
type Tweet struct { // ID of the ent. ID int `json:"id,omitempty"` // Text holds the value of the "text" field. Text string `json:"text,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TweetQuery when eager-loading is set. Edges TweetEdges `json:"edges"` // contains filtered or unexported fields }
Tweet is the model entity for the Tweet schema.
func (*Tweet) QueryLikedUsers ¶
QueryLikedUsers queries the "liked_users" edge of the Tweet entity.
func (*Tweet) QueryLikes ¶
func (t *Tweet) QueryLikes() *TweetLikeQuery
QueryLikes queries the "likes" edge of the Tweet entity.
func (*Tweet) QueryTweetTags ¶
func (t *Tweet) QueryTweetTags() *TweetTagQuery
QueryTweetTags queries the "tweet_tags" edge of the Tweet entity.
func (*Tweet) QueryTweetUser ¶
func (t *Tweet) QueryTweetUser() *UserTweetQuery
QueryTweetUser queries the "tweet_user" edge of the Tweet entity.
func (*Tweet) Unwrap ¶
Unwrap unwraps the Tweet 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 (*Tweet) Update ¶
func (t *Tweet) Update() *TweetUpdateOne
Update returns a builder for updating this Tweet. Note that you need to call Tweet.Unwrap() before calling this method if this Tweet was returned from a transaction, and the transaction was committed or rolled back.
type TweetClient ¶
type TweetClient struct {
// contains filtered or unexported fields
}
TweetClient is a client for the Tweet schema.
func NewTweetClient ¶
func NewTweetClient(c config) *TweetClient
NewTweetClient returns a client for the Tweet from the given config.
func (*TweetClient) Create ¶
func (c *TweetClient) Create() *TweetCreate
Create returns a builder for creating a Tweet entity.
func (*TweetClient) CreateBulk ¶
func (c *TweetClient) CreateBulk(builders ...*TweetCreate) *TweetCreateBulk
CreateBulk returns a builder for creating a bulk of Tweet entities.
func (*TweetClient) Delete ¶
func (c *TweetClient) Delete() *TweetDelete
Delete returns a delete builder for Tweet.
func (*TweetClient) DeleteOne ¶
func (c *TweetClient) DeleteOne(t *Tweet) *TweetDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TweetClient) DeleteOneID ¶
func (c *TweetClient) DeleteOneID(id int) *TweetDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TweetClient) GetX ¶
func (c *TweetClient) GetX(ctx context.Context, id int) *Tweet
GetX is like Get, but panics if an error occurs.
func (*TweetClient) Intercept ¶ added in v0.11.5
func (c *TweetClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tweet.Intercept(f(g(h())))`.
func (*TweetClient) Interceptors ¶ added in v0.11.5
func (c *TweetClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TweetClient) Query ¶
func (c *TweetClient) Query() *TweetQuery
Query returns a query builder for Tweet.
func (*TweetClient) QueryLikedUsers ¶
func (c *TweetClient) QueryLikedUsers(t *Tweet) *UserQuery
QueryLikedUsers queries the liked_users edge of a Tweet.
func (*TweetClient) QueryLikes ¶
func (c *TweetClient) QueryLikes(t *Tweet) *TweetLikeQuery
QueryLikes queries the likes edge of a Tweet.
func (*TweetClient) QueryTags ¶
func (c *TweetClient) QueryTags(t *Tweet) *TagQuery
QueryTags queries the tags edge of a Tweet.
func (*TweetClient) QueryTweetTags ¶
func (c *TweetClient) QueryTweetTags(t *Tweet) *TweetTagQuery
QueryTweetTags queries the tweet_tags edge of a Tweet.
func (*TweetClient) QueryTweetUser ¶
func (c *TweetClient) QueryTweetUser(t *Tweet) *UserTweetQuery
QueryTweetUser queries the tweet_user edge of a Tweet.
func (*TweetClient) QueryUser ¶
func (c *TweetClient) QueryUser(t *Tweet) *UserQuery
QueryUser queries the user edge of a Tweet.
func (*TweetClient) Update ¶
func (c *TweetClient) Update() *TweetUpdate
Update returns an update builder for Tweet.
func (*TweetClient) UpdateOne ¶
func (c *TweetClient) UpdateOne(t *Tweet) *TweetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TweetClient) UpdateOneID ¶
func (c *TweetClient) UpdateOneID(id int) *TweetUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TweetClient) Use ¶
func (c *TweetClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tweet.Hooks(f(g(h())))`.
type TweetCreate ¶
type TweetCreate struct {
// contains filtered or unexported fields
}
TweetCreate is the builder for creating a Tweet entity.
func (*TweetCreate) AddLikedUserIDs ¶
func (tc *TweetCreate) AddLikedUserIDs(ids ...int) *TweetCreate
AddLikedUserIDs adds the "liked_users" edge to the User entity by IDs.
func (*TweetCreate) AddLikedUsers ¶
func (tc *TweetCreate) AddLikedUsers(u ...*User) *TweetCreate
AddLikedUsers adds the "liked_users" edges to the User entity.
func (*TweetCreate) AddTagIDs ¶
func (tc *TweetCreate) AddTagIDs(ids ...int) *TweetCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*TweetCreate) AddTags ¶
func (tc *TweetCreate) AddTags(t ...*Tag) *TweetCreate
AddTags adds the "tags" edges to the Tag entity.
func (*TweetCreate) AddTweetTagIDs ¶
func (tc *TweetCreate) AddTweetTagIDs(ids ...uuid.UUID) *TweetCreate
AddTweetTagIDs adds the "tweet_tags" edge to the TweetTag entity by IDs.
func (*TweetCreate) AddTweetTags ¶
func (tc *TweetCreate) AddTweetTags(t ...*TweetTag) *TweetCreate
AddTweetTags adds the "tweet_tags" edges to the TweetTag entity.
func (*TweetCreate) AddTweetUser ¶
func (tc *TweetCreate) AddTweetUser(u ...*UserTweet) *TweetCreate
AddTweetUser adds the "tweet_user" edges to the UserTweet entity.
func (*TweetCreate) AddTweetUserIDs ¶
func (tc *TweetCreate) AddTweetUserIDs(ids ...int) *TweetCreate
AddTweetUserIDs adds the "tweet_user" edge to the UserTweet entity by IDs.
func (*TweetCreate) AddUser ¶
func (tc *TweetCreate) AddUser(u ...*User) *TweetCreate
AddUser adds the "user" edges to the User entity.
func (*TweetCreate) AddUserIDs ¶
func (tc *TweetCreate) AddUserIDs(ids ...int) *TweetCreate
AddUserIDs adds the "user" edge to the User entity by IDs.
func (*TweetCreate) Exec ¶
func (tc *TweetCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetCreate) ExecX ¶
func (tc *TweetCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetCreate) Mutation ¶
func (tc *TweetCreate) Mutation() *TweetMutation
Mutation returns the TweetMutation object of the builder.
func (*TweetCreate) OnConflict ¶
func (tc *TweetCreate) OnConflict(opts ...sql.ConflictOption) *TweetUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tweet.Create(). SetText(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TweetUpsert) { SetText(v+v). }). Exec(ctx)
func (*TweetCreate) OnConflictColumns ¶
func (tc *TweetCreate) OnConflictColumns(columns ...string) *TweetUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tweet.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TweetCreate) Save ¶
func (tc *TweetCreate) Save(ctx context.Context) (*Tweet, error)
Save creates the Tweet in the database.
func (*TweetCreate) SaveX ¶
func (tc *TweetCreate) SaveX(ctx context.Context) *Tweet
SaveX calls Save and panics if Save returns an error.
func (*TweetCreate) SetText ¶
func (tc *TweetCreate) SetText(s string) *TweetCreate
SetText sets the "text" field.
type TweetCreateBulk ¶
type TweetCreateBulk struct {
// contains filtered or unexported fields
}
TweetCreateBulk is the builder for creating many Tweet entities in bulk.
func (*TweetCreateBulk) Exec ¶
func (tcb *TweetCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetCreateBulk) ExecX ¶
func (tcb *TweetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetCreateBulk) OnConflict ¶
func (tcb *TweetCreateBulk) OnConflict(opts ...sql.ConflictOption) *TweetUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tweet.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TweetUpsert) { SetText(v+v). }). Exec(ctx)
func (*TweetCreateBulk) OnConflictColumns ¶
func (tcb *TweetCreateBulk) OnConflictColumns(columns ...string) *TweetUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tweet.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TweetDelete ¶
type TweetDelete struct {
// contains filtered or unexported fields
}
TweetDelete is the builder for deleting a Tweet entity.
func (*TweetDelete) Exec ¶
func (td *TweetDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TweetDelete) ExecX ¶
func (td *TweetDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TweetDelete) Where ¶
func (td *TweetDelete) Where(ps ...predicate.Tweet) *TweetDelete
Where appends a list predicates to the TweetDelete builder.
type TweetDeleteOne ¶
type TweetDeleteOne struct {
// contains filtered or unexported fields
}
TweetDeleteOne is the builder for deleting a single Tweet entity.
func (*TweetDeleteOne) Exec ¶
func (tdo *TweetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TweetDeleteOne) ExecX ¶
func (tdo *TweetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetDeleteOne) Where ¶ added in v0.11.7
func (tdo *TweetDeleteOne) Where(ps ...predicate.Tweet) *TweetDeleteOne
Where appends a list predicates to the TweetDelete builder.
type TweetEdges ¶
type TweetEdges struct { // LikedUsers holds the value of the liked_users edge. LikedUsers []*User `json:"liked_users,omitempty"` // The uniqueness is enforced on the edge schema User []*User `json:"user,omitempty"` // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // Likes holds the value of the likes edge. Likes []*TweetLike `json:"likes,omitempty"` // TweetUser holds the value of the tweet_user edge. TweetUser []*UserTweet `json:"tweet_user,omitempty"` // TweetTags holds the value of the tweet_tags edge. TweetTags []*TweetTag `json:"tweet_tags,omitempty"` // contains filtered or unexported fields }
TweetEdges holds the relations/edges for other nodes in the graph.
func (TweetEdges) LikedUsersOrErr ¶
func (e TweetEdges) LikedUsersOrErr() ([]*User, error)
LikedUsersOrErr returns the LikedUsers value or an error if the edge was not loaded in eager-loading.
func (TweetEdges) LikesOrErr ¶
func (e TweetEdges) LikesOrErr() ([]*TweetLike, error)
LikesOrErr returns the Likes value or an error if the edge was not loaded in eager-loading.
func (TweetEdges) TagsOrErr ¶
func (e TweetEdges) TagsOrErr() ([]*Tag, error)
TagsOrErr returns the Tags value or an error if the edge was not loaded in eager-loading.
func (TweetEdges) TweetTagsOrErr ¶
func (e TweetEdges) TweetTagsOrErr() ([]*TweetTag, error)
TweetTagsOrErr returns the TweetTags value or an error if the edge was not loaded in eager-loading.
func (TweetEdges) TweetUserOrErr ¶
func (e TweetEdges) TweetUserOrErr() ([]*UserTweet, error)
TweetUserOrErr returns the TweetUser value or an error if the edge was not loaded in eager-loading.
func (TweetEdges) UserOrErr ¶
func (e TweetEdges) UserOrErr() ([]*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading.
type TweetFilter ¶ added in v0.11.2
type TweetFilter struct {
// contains filtered or unexported fields
}
TweetFilter provides a generic filtering capability at runtime for TweetQuery.
func (*TweetFilter) Where ¶ added in v0.11.2
func (f *TweetFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*TweetFilter) WhereHasLikedUsers ¶ added in v0.11.2
func (f *TweetFilter) WhereHasLikedUsers()
WhereHasLikedUsers applies a predicate to check if query has an edge liked_users.
func (*TweetFilter) WhereHasLikedUsersWith ¶ added in v0.11.2
func (f *TweetFilter) WhereHasLikedUsersWith(preds ...predicate.User)
WhereHasLikedUsersWith applies a predicate to check if query has an edge liked_users with a given conditions (other predicates).
func (*TweetFilter) WhereHasLikes ¶ added in v0.11.2
func (f *TweetFilter) WhereHasLikes()
WhereHasLikes applies a predicate to check if query has an edge likes.
func (*TweetFilter) WhereHasLikesWith ¶ added in v0.11.2
func (f *TweetFilter) WhereHasLikesWith(preds ...predicate.TweetLike)
WhereHasLikesWith applies a predicate to check if query has an edge likes with a given conditions (other predicates).
func (*TweetFilter) WhereHasTags ¶ added in v0.11.2
func (f *TweetFilter) WhereHasTags()
WhereHasTags applies a predicate to check if query has an edge tags.
func (*TweetFilter) WhereHasTagsWith ¶ added in v0.11.2
func (f *TweetFilter) WhereHasTagsWith(preds ...predicate.Tag)
WhereHasTagsWith applies a predicate to check if query has an edge tags with a given conditions (other predicates).
func (*TweetFilter) WhereHasTweetTags ¶ added in v0.11.2
func (f *TweetFilter) WhereHasTweetTags()
WhereHasTweetTags applies a predicate to check if query has an edge tweet_tags.
func (*TweetFilter) WhereHasTweetTagsWith ¶ added in v0.11.2
func (f *TweetFilter) WhereHasTweetTagsWith(preds ...predicate.TweetTag)
WhereHasTweetTagsWith applies a predicate to check if query has an edge tweet_tags with a given conditions (other predicates).
func (*TweetFilter) WhereHasTweetUser ¶ added in v0.11.2
func (f *TweetFilter) WhereHasTweetUser()
WhereHasTweetUser applies a predicate to check if query has an edge tweet_user.
func (*TweetFilter) WhereHasTweetUserWith ¶ added in v0.11.2
func (f *TweetFilter) WhereHasTweetUserWith(preds ...predicate.UserTweet)
WhereHasTweetUserWith applies a predicate to check if query has an edge tweet_user with a given conditions (other predicates).
func (*TweetFilter) WhereHasUser ¶ added in v0.11.2
func (f *TweetFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (*TweetFilter) WhereHasUserWith ¶ added in v0.11.2
func (f *TweetFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (*TweetFilter) WhereID ¶ added in v0.11.2
func (f *TweetFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*TweetFilter) WhereText ¶ added in v0.11.2
func (f *TweetFilter) WhereText(p entql.StringP)
WhereText applies the entql string predicate on the text field.
type TweetGroupBy ¶
type TweetGroupBy struct {
// contains filtered or unexported fields
}
TweetGroupBy is the group-by builder for Tweet entities.
func (*TweetGroupBy) Aggregate ¶
func (tgb *TweetGroupBy) Aggregate(fns ...AggregateFunc) *TweetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TweetGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TweetGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TweetGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TweetGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TweetGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TweetGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TweetGroupBy) Scan ¶
func (tgb *TweetGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TweetGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TweetLike ¶
type TweetLike struct { // LikedAt holds the value of the "liked_at" field. LikedAt time.Time `json:"liked_at,omitempty"` // UserID holds the value of the "user_id" field. UserID int `json:"user_id,omitempty"` // TweetID holds the value of the "tweet_id" field. TweetID int `json:"tweet_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TweetLikeQuery when eager-loading is set. Edges TweetLikeEdges `json:"edges"` // contains filtered or unexported fields }
TweetLike is the model entity for the TweetLike schema.
func (*TweetLike) QueryTweet ¶
func (tl *TweetLike) QueryTweet() *TweetQuery
QueryTweet queries the "tweet" edge of the TweetLike entity.
func (*TweetLike) Unwrap ¶
Unwrap unwraps the TweetLike 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 (*TweetLike) Update ¶
func (tl *TweetLike) Update() *TweetLikeUpdateOne
Update returns a builder for updating this TweetLike. Note that you need to call TweetLike.Unwrap() before calling this method if this TweetLike was returned from a transaction, and the transaction was committed or rolled back.
type TweetLikeClient ¶
type TweetLikeClient struct {
// contains filtered or unexported fields
}
TweetLikeClient is a client for the TweetLike schema.
func NewTweetLikeClient ¶
func NewTweetLikeClient(c config) *TweetLikeClient
NewTweetLikeClient returns a client for the TweetLike from the given config.
func (*TweetLikeClient) Create ¶
func (c *TweetLikeClient) Create() *TweetLikeCreate
Create returns a builder for creating a TweetLike entity.
func (*TweetLikeClient) CreateBulk ¶
func (c *TweetLikeClient) CreateBulk(builders ...*TweetLikeCreate) *TweetLikeCreateBulk
CreateBulk returns a builder for creating a bulk of TweetLike entities.
func (*TweetLikeClient) Delete ¶
func (c *TweetLikeClient) Delete() *TweetLikeDelete
Delete returns a delete builder for TweetLike.
func (*TweetLikeClient) Hooks ¶
func (c *TweetLikeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TweetLikeClient) Intercept ¶ added in v0.11.5
func (c *TweetLikeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tweetlike.Intercept(f(g(h())))`.
func (*TweetLikeClient) Interceptors ¶ added in v0.11.5
func (c *TweetLikeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TweetLikeClient) Query ¶
func (c *TweetLikeClient) Query() *TweetLikeQuery
Query returns a query builder for TweetLike.
func (*TweetLikeClient) QueryTweet ¶
func (c *TweetLikeClient) QueryTweet(tl *TweetLike) *TweetQuery
QueryTweet queries the tweet edge of a TweetLike.
func (*TweetLikeClient) QueryUser ¶
func (c *TweetLikeClient) QueryUser(tl *TweetLike) *UserQuery
QueryUser queries the user edge of a TweetLike.
func (*TweetLikeClient) Update ¶
func (c *TweetLikeClient) Update() *TweetLikeUpdate
Update returns an update builder for TweetLike.
func (*TweetLikeClient) UpdateOne ¶
func (c *TweetLikeClient) UpdateOne(tl *TweetLike) *TweetLikeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TweetLikeClient) Use ¶
func (c *TweetLikeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tweetlike.Hooks(f(g(h())))`.
type TweetLikeCreate ¶
type TweetLikeCreate struct {
// contains filtered or unexported fields
}
TweetLikeCreate is the builder for creating a TweetLike entity.
func (*TweetLikeCreate) Exec ¶
func (tlc *TweetLikeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetLikeCreate) ExecX ¶
func (tlc *TweetLikeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetLikeCreate) Mutation ¶
func (tlc *TweetLikeCreate) Mutation() *TweetLikeMutation
Mutation returns the TweetLikeMutation object of the builder.
func (*TweetLikeCreate) OnConflict ¶
func (tlc *TweetLikeCreate) OnConflict(opts ...sql.ConflictOption) *TweetLikeUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TweetLike.Create(). SetLikedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TweetLikeUpsert) { SetLikedAt(v+v). }). Exec(ctx)
func (*TweetLikeCreate) OnConflictColumns ¶
func (tlc *TweetLikeCreate) OnConflictColumns(columns ...string) *TweetLikeUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TweetLike.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TweetLikeCreate) Save ¶
func (tlc *TweetLikeCreate) Save(ctx context.Context) (*TweetLike, error)
Save creates the TweetLike in the database.
func (*TweetLikeCreate) SaveX ¶
func (tlc *TweetLikeCreate) SaveX(ctx context.Context) *TweetLike
SaveX calls Save and panics if Save returns an error.
func (*TweetLikeCreate) SetLikedAt ¶
func (tlc *TweetLikeCreate) SetLikedAt(t time.Time) *TweetLikeCreate
SetLikedAt sets the "liked_at" field.
func (*TweetLikeCreate) SetNillableLikedAt ¶
func (tlc *TweetLikeCreate) SetNillableLikedAt(t *time.Time) *TweetLikeCreate
SetNillableLikedAt sets the "liked_at" field if the given value is not nil.
func (*TweetLikeCreate) SetTweet ¶
func (tlc *TweetLikeCreate) SetTweet(t *Tweet) *TweetLikeCreate
SetTweet sets the "tweet" edge to the Tweet entity.
func (*TweetLikeCreate) SetTweetID ¶
func (tlc *TweetLikeCreate) SetTweetID(i int) *TweetLikeCreate
SetTweetID sets the "tweet_id" field.
func (*TweetLikeCreate) SetUser ¶
func (tlc *TweetLikeCreate) SetUser(u *User) *TweetLikeCreate
SetUser sets the "user" edge to the User entity.
func (*TweetLikeCreate) SetUserID ¶
func (tlc *TweetLikeCreate) SetUserID(i int) *TweetLikeCreate
SetUserID sets the "user_id" field.
type TweetLikeCreateBulk ¶
type TweetLikeCreateBulk struct {
// contains filtered or unexported fields
}
TweetLikeCreateBulk is the builder for creating many TweetLike entities in bulk.
func (*TweetLikeCreateBulk) Exec ¶
func (tlcb *TweetLikeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetLikeCreateBulk) ExecX ¶
func (tlcb *TweetLikeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetLikeCreateBulk) OnConflict ¶
func (tlcb *TweetLikeCreateBulk) OnConflict(opts ...sql.ConflictOption) *TweetLikeUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TweetLike.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TweetLikeUpsert) { SetLikedAt(v+v). }). Exec(ctx)
func (*TweetLikeCreateBulk) OnConflictColumns ¶
func (tlcb *TweetLikeCreateBulk) OnConflictColumns(columns ...string) *TweetLikeUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TweetLike.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TweetLikeDelete ¶
type TweetLikeDelete struct {
// contains filtered or unexported fields
}
TweetLikeDelete is the builder for deleting a TweetLike entity.
func (*TweetLikeDelete) Exec ¶
func (tld *TweetLikeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TweetLikeDelete) ExecX ¶
func (tld *TweetLikeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TweetLikeDelete) Where ¶
func (tld *TweetLikeDelete) Where(ps ...predicate.TweetLike) *TweetLikeDelete
Where appends a list predicates to the TweetLikeDelete builder.
type TweetLikeDeleteOne ¶
type TweetLikeDeleteOne struct {
// contains filtered or unexported fields
}
TweetLikeDeleteOne is the builder for deleting a single TweetLike entity.
func (*TweetLikeDeleteOne) Exec ¶
func (tldo *TweetLikeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TweetLikeDeleteOne) ExecX ¶
func (tldo *TweetLikeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetLikeDeleteOne) Where ¶ added in v0.11.7
func (tldo *TweetLikeDeleteOne) Where(ps ...predicate.TweetLike) *TweetLikeDeleteOne
Where appends a list predicates to the TweetLikeDelete builder.
type TweetLikeEdges ¶
type TweetLikeEdges struct { // Tweet holds the value of the tweet edge. Tweet *Tweet `json:"tweet,omitempty"` // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
TweetLikeEdges holds the relations/edges for other nodes in the graph.
func (TweetLikeEdges) TweetOrErr ¶
func (e TweetLikeEdges) TweetOrErr() (*Tweet, error)
TweetOrErr returns the Tweet value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (TweetLikeEdges) UserOrErr ¶
func (e TweetLikeEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TweetLikeFilter ¶ added in v0.11.2
type TweetLikeFilter struct {
// contains filtered or unexported fields
}
TweetLikeFilter provides a generic filtering capability at runtime for TweetLikeQuery.
func (*TweetLikeFilter) Where ¶ added in v0.11.2
func (f *TweetLikeFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*TweetLikeFilter) WhereHasTweet ¶ added in v0.11.2
func (f *TweetLikeFilter) WhereHasTweet()
WhereHasTweet applies a predicate to check if query has an edge tweet.
func (*TweetLikeFilter) WhereHasTweetWith ¶ added in v0.11.2
func (f *TweetLikeFilter) WhereHasTweetWith(preds ...predicate.Tweet)
WhereHasTweetWith applies a predicate to check if query has an edge tweet with a given conditions (other predicates).
func (*TweetLikeFilter) WhereHasUser ¶ added in v0.11.2
func (f *TweetLikeFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (*TweetLikeFilter) WhereHasUserWith ¶ added in v0.11.2
func (f *TweetLikeFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (*TweetLikeFilter) WhereLikedAt ¶ added in v0.11.2
func (f *TweetLikeFilter) WhereLikedAt(p entql.TimeP)
WhereLikedAt applies the entql time.Time predicate on the liked_at field.
func (*TweetLikeFilter) WhereTweetID ¶ added in v0.11.2
func (f *TweetLikeFilter) WhereTweetID(p entql.IntP)
WhereTweetID applies the entql int predicate on the tweet_id field.
func (*TweetLikeFilter) WhereUserID ¶ added in v0.11.2
func (f *TweetLikeFilter) WhereUserID(p entql.IntP)
WhereUserID applies the entql int predicate on the user_id field.
type TweetLikeGroupBy ¶
type TweetLikeGroupBy struct {
// contains filtered or unexported fields
}
TweetLikeGroupBy is the group-by builder for TweetLike entities.
func (*TweetLikeGroupBy) Aggregate ¶
func (tlgb *TweetLikeGroupBy) Aggregate(fns ...AggregateFunc) *TweetLikeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TweetLikeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TweetLikeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TweetLikeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TweetLikeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TweetLikeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TweetLikeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TweetLikeGroupBy) Scan ¶
func (tlgb *TweetLikeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TweetLikeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TweetLikeMutation ¶
type TweetLikeMutation struct {
// contains filtered or unexported fields
}
TweetLikeMutation represents an operation that mutates the TweetLike nodes in the graph.
func (*TweetLikeMutation) AddField ¶
func (m *TweetLikeMutation) 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 (*TweetLikeMutation) AddedEdges ¶
func (m *TweetLikeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TweetLikeMutation) AddedField ¶
func (m *TweetLikeMutation) 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 (*TweetLikeMutation) AddedFields ¶
func (m *TweetLikeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TweetLikeMutation) AddedIDs ¶
func (m *TweetLikeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TweetLikeMutation) ClearEdge ¶
func (m *TweetLikeMutation) 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 (*TweetLikeMutation) ClearField ¶
func (m *TweetLikeMutation) 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 (*TweetLikeMutation) ClearTweet ¶
func (m *TweetLikeMutation) ClearTweet()
ClearTweet clears the "tweet" edge to the Tweet entity.
func (*TweetLikeMutation) ClearUser ¶
func (m *TweetLikeMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*TweetLikeMutation) ClearedEdges ¶
func (m *TweetLikeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TweetLikeMutation) ClearedFields ¶
func (m *TweetLikeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TweetLikeMutation) Client ¶
func (m TweetLikeMutation) 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 (*TweetLikeMutation) EdgeCleared ¶
func (m *TweetLikeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TweetLikeMutation) Field ¶
func (m *TweetLikeMutation) 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 (*TweetLikeMutation) FieldCleared ¶
func (m *TweetLikeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TweetLikeMutation) Fields ¶
func (m *TweetLikeMutation) 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 (*TweetLikeMutation) Filter ¶ added in v0.11.2
func (m *TweetLikeMutation) Filter() *TweetLikeFilter
Filter returns an entql.Where implementation to apply filters on the TweetLikeMutation builder.
func (*TweetLikeMutation) LikedAt ¶
func (m *TweetLikeMutation) LikedAt() (r time.Time, exists bool)
LikedAt returns the value of the "liked_at" field in the mutation.
func (*TweetLikeMutation) 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 (*TweetLikeMutation) RemovedEdges ¶
func (m *TweetLikeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TweetLikeMutation) RemovedIDs ¶
func (m *TweetLikeMutation) 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 (*TweetLikeMutation) ResetEdge ¶
func (m *TweetLikeMutation) 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 (*TweetLikeMutation) ResetField ¶
func (m *TweetLikeMutation) 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 (*TweetLikeMutation) ResetLikedAt ¶
func (m *TweetLikeMutation) ResetLikedAt()
ResetLikedAt resets all changes to the "liked_at" field.
func (*TweetLikeMutation) ResetTweet ¶
func (m *TweetLikeMutation) ResetTweet()
ResetTweet resets all changes to the "tweet" edge.
func (*TweetLikeMutation) ResetTweetID ¶
func (m *TweetLikeMutation) ResetTweetID()
ResetTweetID resets all changes to the "tweet_id" field.
func (*TweetLikeMutation) ResetUser ¶
func (m *TweetLikeMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*TweetLikeMutation) ResetUserID ¶
func (m *TweetLikeMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*TweetLikeMutation) SetField ¶
func (m *TweetLikeMutation) 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 (*TweetLikeMutation) SetLikedAt ¶
func (m *TweetLikeMutation) SetLikedAt(t time.Time)
SetLikedAt sets the "liked_at" field.
func (*TweetLikeMutation) SetOp ¶ added in v0.11.5
func (m *TweetLikeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TweetLikeMutation) SetTweetID ¶
func (m *TweetLikeMutation) SetTweetID(i int)
SetTweetID sets the "tweet_id" field.
func (*TweetLikeMutation) SetUserID ¶
func (m *TweetLikeMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (*TweetLikeMutation) TweetCleared ¶
func (m *TweetLikeMutation) TweetCleared() bool
TweetCleared reports if the "tweet" edge to the Tweet entity was cleared.
func (*TweetLikeMutation) TweetID ¶
func (m *TweetLikeMutation) TweetID() (r int, exists bool)
TweetID returns the value of the "tweet_id" field in the mutation.
func (*TweetLikeMutation) TweetIDs ¶
func (m *TweetLikeMutation) TweetIDs() (ids []int)
TweetIDs returns the "tweet" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TweetID instead. It exists only for internal usage by the builders.
func (TweetLikeMutation) Tx ¶
func (m TweetLikeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TweetLikeMutation) Type ¶
func (m *TweetLikeMutation) Type() string
Type returns the node type of this mutation (TweetLike).
func (*TweetLikeMutation) UserCleared ¶
func (m *TweetLikeMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*TweetLikeMutation) UserID ¶
func (m *TweetLikeMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*TweetLikeMutation) UserIDs ¶
func (m *TweetLikeMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*TweetLikeMutation) Where ¶
func (m *TweetLikeMutation) Where(ps ...predicate.TweetLike)
Where appends a list predicates to the TweetLikeMutation builder.
func (*TweetLikeMutation) WhereP ¶ added in v0.11.5
func (m *TweetLikeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TweetLikeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TweetLikeQuery ¶
type TweetLikeQuery struct {
// contains filtered or unexported fields
}
TweetLikeQuery is the builder for querying TweetLike entities.
func (*TweetLikeQuery) Aggregate ¶ added in v0.11.4
func (tlq *TweetLikeQuery) Aggregate(fns ...AggregateFunc) *TweetLikeSelect
Aggregate returns a TweetLikeSelect configured with the given aggregations.
func (*TweetLikeQuery) All ¶
func (tlq *TweetLikeQuery) All(ctx context.Context) ([]*TweetLike, error)
All executes the query and returns a list of TweetLikes.
func (*TweetLikeQuery) AllX ¶
func (tlq *TweetLikeQuery) AllX(ctx context.Context) []*TweetLike
AllX is like All, but panics if an error occurs.
func (*TweetLikeQuery) Clone ¶
func (tlq *TweetLikeQuery) Clone() *TweetLikeQuery
Clone returns a duplicate of the TweetLikeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TweetLikeQuery) Count ¶
func (tlq *TweetLikeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TweetLikeQuery) CountX ¶
func (tlq *TweetLikeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TweetLikeQuery) Exist ¶
func (tlq *TweetLikeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TweetLikeQuery) ExistX ¶
func (tlq *TweetLikeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TweetLikeQuery) Filter ¶ added in v0.11.2
func (tlq *TweetLikeQuery) Filter() *TweetLikeFilter
Filter returns a Filter implementation to apply filters on the TweetLikeQuery builder.
func (*TweetLikeQuery) First ¶
func (tlq *TweetLikeQuery) First(ctx context.Context) (*TweetLike, error)
First returns the first TweetLike entity from the query. Returns a *NotFoundError when no TweetLike was found.
func (*TweetLikeQuery) FirstX ¶
func (tlq *TweetLikeQuery) FirstX(ctx context.Context) *TweetLike
FirstX is like First, but panics if an error occurs.
func (*TweetLikeQuery) GroupBy ¶
func (tlq *TweetLikeQuery) GroupBy(field string, fields ...string) *TweetLikeGroupBy
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 { LikedAt time.Time `json:"liked_at,omitempty"` Count int `json:"count,omitempty"` } client.TweetLike.Query(). GroupBy(tweetlike.FieldLikedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TweetLikeQuery) Limit ¶
func (tlq *TweetLikeQuery) Limit(limit int) *TweetLikeQuery
Limit the number of records to be returned by this query.
func (*TweetLikeQuery) Offset ¶
func (tlq *TweetLikeQuery) Offset(offset int) *TweetLikeQuery
Offset to start from.
func (*TweetLikeQuery) Only ¶
func (tlq *TweetLikeQuery) Only(ctx context.Context) (*TweetLike, error)
Only returns a single TweetLike entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TweetLike entity is found. Returns a *NotFoundError when no TweetLike entities are found.
func (*TweetLikeQuery) OnlyX ¶
func (tlq *TweetLikeQuery) OnlyX(ctx context.Context) *TweetLike
OnlyX is like Only, but panics if an error occurs.
func (*TweetLikeQuery) Order ¶
func (tlq *TweetLikeQuery) Order(o ...OrderFunc) *TweetLikeQuery
Order specifies how the records should be ordered.
func (*TweetLikeQuery) QueryTweet ¶
func (tlq *TweetLikeQuery) QueryTweet() *TweetQuery
QueryTweet chains the current query on the "tweet" edge.
func (*TweetLikeQuery) QueryUser ¶
func (tlq *TweetLikeQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*TweetLikeQuery) Select ¶
func (tlq *TweetLikeQuery) Select(fields ...string) *TweetLikeSelect
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 { LikedAt time.Time `json:"liked_at,omitempty"` } client.TweetLike.Query(). Select(tweetlike.FieldLikedAt). Scan(ctx, &v)
func (*TweetLikeQuery) Unique ¶
func (tlq *TweetLikeQuery) Unique(unique bool) *TweetLikeQuery
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 (*TweetLikeQuery) Where ¶
func (tlq *TweetLikeQuery) Where(ps ...predicate.TweetLike) *TweetLikeQuery
Where adds a new predicate for the TweetLikeQuery builder.
func (*TweetLikeQuery) WithTweet ¶
func (tlq *TweetLikeQuery) WithTweet(opts ...func(*TweetQuery)) *TweetLikeQuery
WithTweet tells the query-builder to eager-load the nodes that are connected to the "tweet" edge. The optional arguments are used to configure the query builder of the edge.
func (*TweetLikeQuery) WithUser ¶
func (tlq *TweetLikeQuery) WithUser(opts ...func(*UserQuery)) *TweetLikeQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type TweetLikeSelect ¶
type TweetLikeSelect struct { *TweetLikeQuery // contains filtered or unexported fields }
TweetLikeSelect is the builder for selecting fields of TweetLike entities.
func (*TweetLikeSelect) Aggregate ¶ added in v0.11.4
func (tls *TweetLikeSelect) Aggregate(fns ...AggregateFunc) *TweetLikeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TweetLikeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TweetLikeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TweetLikeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TweetLikeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TweetLikeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TweetLikeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TweetLikeSelect) Scan ¶
func (tls *TweetLikeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TweetLikeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TweetLikeUpdate ¶
type TweetLikeUpdate struct {
// contains filtered or unexported fields
}
TweetLikeUpdate is the builder for updating TweetLike entities.
func (*TweetLikeUpdate) ClearTweet ¶
func (tlu *TweetLikeUpdate) ClearTweet() *TweetLikeUpdate
ClearTweet clears the "tweet" edge to the Tweet entity.
func (*TweetLikeUpdate) ClearUser ¶
func (tlu *TweetLikeUpdate) ClearUser() *TweetLikeUpdate
ClearUser clears the "user" edge to the User entity.
func (*TweetLikeUpdate) Exec ¶
func (tlu *TweetLikeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetLikeUpdate) ExecX ¶
func (tlu *TweetLikeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetLikeUpdate) Mutation ¶
func (tlu *TweetLikeUpdate) Mutation() *TweetLikeMutation
Mutation returns the TweetLikeMutation object of the builder.
func (*TweetLikeUpdate) Save ¶
func (tlu *TweetLikeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TweetLikeUpdate) SaveX ¶
func (tlu *TweetLikeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TweetLikeUpdate) SetLikedAt ¶
func (tlu *TweetLikeUpdate) SetLikedAt(t time.Time) *TweetLikeUpdate
SetLikedAt sets the "liked_at" field.
func (*TweetLikeUpdate) SetNillableLikedAt ¶
func (tlu *TweetLikeUpdate) SetNillableLikedAt(t *time.Time) *TweetLikeUpdate
SetNillableLikedAt sets the "liked_at" field if the given value is not nil.
func (*TweetLikeUpdate) SetTweet ¶
func (tlu *TweetLikeUpdate) SetTweet(t *Tweet) *TweetLikeUpdate
SetTweet sets the "tweet" edge to the Tweet entity.
func (*TweetLikeUpdate) SetTweetID ¶
func (tlu *TweetLikeUpdate) SetTweetID(i int) *TweetLikeUpdate
SetTweetID sets the "tweet_id" field.
func (*TweetLikeUpdate) SetUser ¶
func (tlu *TweetLikeUpdate) SetUser(u *User) *TweetLikeUpdate
SetUser sets the "user" edge to the User entity.
func (*TweetLikeUpdate) SetUserID ¶
func (tlu *TweetLikeUpdate) SetUserID(i int) *TweetLikeUpdate
SetUserID sets the "user_id" field.
func (*TweetLikeUpdate) Where ¶
func (tlu *TweetLikeUpdate) Where(ps ...predicate.TweetLike) *TweetLikeUpdate
Where appends a list predicates to the TweetLikeUpdate builder.
type TweetLikeUpdateOne ¶
type TweetLikeUpdateOne struct {
// contains filtered or unexported fields
}
TweetLikeUpdateOne is the builder for updating a single TweetLike entity.
func (*TweetLikeUpdateOne) ClearTweet ¶
func (tluo *TweetLikeUpdateOne) ClearTweet() *TweetLikeUpdateOne
ClearTweet clears the "tweet" edge to the Tweet entity.
func (*TweetLikeUpdateOne) ClearUser ¶
func (tluo *TweetLikeUpdateOne) ClearUser() *TweetLikeUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*TweetLikeUpdateOne) Exec ¶
func (tluo *TweetLikeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TweetLikeUpdateOne) ExecX ¶
func (tluo *TweetLikeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetLikeUpdateOne) Mutation ¶
func (tluo *TweetLikeUpdateOne) Mutation() *TweetLikeMutation
Mutation returns the TweetLikeMutation object of the builder.
func (*TweetLikeUpdateOne) Save ¶
func (tluo *TweetLikeUpdateOne) Save(ctx context.Context) (*TweetLike, error)
Save executes the query and returns the updated TweetLike entity.
func (*TweetLikeUpdateOne) SaveX ¶
func (tluo *TweetLikeUpdateOne) SaveX(ctx context.Context) *TweetLike
SaveX is like Save, but panics if an error occurs.
func (*TweetLikeUpdateOne) Select ¶
func (tluo *TweetLikeUpdateOne) Select(field string, fields ...string) *TweetLikeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TweetLikeUpdateOne) SetLikedAt ¶
func (tluo *TweetLikeUpdateOne) SetLikedAt(t time.Time) *TweetLikeUpdateOne
SetLikedAt sets the "liked_at" field.
func (*TweetLikeUpdateOne) SetNillableLikedAt ¶
func (tluo *TweetLikeUpdateOne) SetNillableLikedAt(t *time.Time) *TweetLikeUpdateOne
SetNillableLikedAt sets the "liked_at" field if the given value is not nil.
func (*TweetLikeUpdateOne) SetTweet ¶
func (tluo *TweetLikeUpdateOne) SetTweet(t *Tweet) *TweetLikeUpdateOne
SetTweet sets the "tweet" edge to the Tweet entity.
func (*TweetLikeUpdateOne) SetTweetID ¶
func (tluo *TweetLikeUpdateOne) SetTweetID(i int) *TweetLikeUpdateOne
SetTweetID sets the "tweet_id" field.
func (*TweetLikeUpdateOne) SetUser ¶
func (tluo *TweetLikeUpdateOne) SetUser(u *User) *TweetLikeUpdateOne
SetUser sets the "user" edge to the User entity.
func (*TweetLikeUpdateOne) SetUserID ¶
func (tluo *TweetLikeUpdateOne) SetUserID(i int) *TweetLikeUpdateOne
SetUserID sets the "user_id" field.
func (*TweetLikeUpdateOne) Where ¶ added in v0.11.8
func (tluo *TweetLikeUpdateOne) Where(ps ...predicate.TweetLike) *TweetLikeUpdateOne
Where appends a list predicates to the TweetLikeUpdate builder.
type TweetLikeUpsert ¶
TweetLikeUpsert is the "OnConflict" setter.
func (*TweetLikeUpsert) SetLikedAt ¶
func (u *TweetLikeUpsert) SetLikedAt(v time.Time) *TweetLikeUpsert
SetLikedAt sets the "liked_at" field.
func (*TweetLikeUpsert) SetTweetID ¶
func (u *TweetLikeUpsert) SetTweetID(v int) *TweetLikeUpsert
SetTweetID sets the "tweet_id" field.
func (*TweetLikeUpsert) SetUserID ¶
func (u *TweetLikeUpsert) SetUserID(v int) *TweetLikeUpsert
SetUserID sets the "user_id" field.
func (*TweetLikeUpsert) UpdateLikedAt ¶
func (u *TweetLikeUpsert) UpdateLikedAt() *TweetLikeUpsert
UpdateLikedAt sets the "liked_at" field to the value that was provided on create.
func (*TweetLikeUpsert) UpdateTweetID ¶
func (u *TweetLikeUpsert) UpdateTweetID() *TweetLikeUpsert
UpdateTweetID sets the "tweet_id" field to the value that was provided on create.
func (*TweetLikeUpsert) UpdateUserID ¶
func (u *TweetLikeUpsert) UpdateUserID() *TweetLikeUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type TweetLikeUpsertBulk ¶
type TweetLikeUpsertBulk struct {
// contains filtered or unexported fields
}
TweetLikeUpsertBulk is the builder for "upsert"-ing a bulk of TweetLike nodes.
func (*TweetLikeUpsertBulk) DoNothing ¶
func (u *TweetLikeUpsertBulk) DoNothing() *TweetLikeUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TweetLikeUpsertBulk) Exec ¶
func (u *TweetLikeUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetLikeUpsertBulk) ExecX ¶
func (u *TweetLikeUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetLikeUpsertBulk) Ignore ¶
func (u *TweetLikeUpsertBulk) Ignore() *TweetLikeUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TweetLike.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TweetLikeUpsertBulk) SetLikedAt ¶
func (u *TweetLikeUpsertBulk) SetLikedAt(v time.Time) *TweetLikeUpsertBulk
SetLikedAt sets the "liked_at" field.
func (*TweetLikeUpsertBulk) SetTweetID ¶
func (u *TweetLikeUpsertBulk) SetTweetID(v int) *TweetLikeUpsertBulk
SetTweetID sets the "tweet_id" field.
func (*TweetLikeUpsertBulk) SetUserID ¶
func (u *TweetLikeUpsertBulk) SetUserID(v int) *TweetLikeUpsertBulk
SetUserID sets the "user_id" field.
func (*TweetLikeUpsertBulk) Update ¶
func (u *TweetLikeUpsertBulk) Update(set func(*TweetLikeUpsert)) *TweetLikeUpsertBulk
Update allows overriding fields `UPDATE` values. See the TweetLikeCreateBulk.OnConflict documentation for more info.
func (*TweetLikeUpsertBulk) UpdateLikedAt ¶
func (u *TweetLikeUpsertBulk) UpdateLikedAt() *TweetLikeUpsertBulk
UpdateLikedAt sets the "liked_at" field to the value that was provided on create.
func (*TweetLikeUpsertBulk) UpdateNewValues ¶
func (u *TweetLikeUpsertBulk) UpdateNewValues() *TweetLikeUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TweetLike.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TweetLikeUpsertBulk) UpdateTweetID ¶
func (u *TweetLikeUpsertBulk) UpdateTweetID() *TweetLikeUpsertBulk
UpdateTweetID sets the "tweet_id" field to the value that was provided on create.
func (*TweetLikeUpsertBulk) UpdateUserID ¶
func (u *TweetLikeUpsertBulk) UpdateUserID() *TweetLikeUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type TweetLikeUpsertOne ¶
type TweetLikeUpsertOne struct {
// contains filtered or unexported fields
}
TweetLikeUpsertOne is the builder for "upsert"-ing
one TweetLike node.
func (*TweetLikeUpsertOne) DoNothing ¶
func (u *TweetLikeUpsertOne) DoNothing() *TweetLikeUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TweetLikeUpsertOne) Exec ¶
func (u *TweetLikeUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetLikeUpsertOne) ExecX ¶
func (u *TweetLikeUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetLikeUpsertOne) Ignore ¶
func (u *TweetLikeUpsertOne) Ignore() *TweetLikeUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TweetLike.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TweetLikeUpsertOne) SetLikedAt ¶
func (u *TweetLikeUpsertOne) SetLikedAt(v time.Time) *TweetLikeUpsertOne
SetLikedAt sets the "liked_at" field.
func (*TweetLikeUpsertOne) SetTweetID ¶
func (u *TweetLikeUpsertOne) SetTweetID(v int) *TweetLikeUpsertOne
SetTweetID sets the "tweet_id" field.
func (*TweetLikeUpsertOne) SetUserID ¶
func (u *TweetLikeUpsertOne) SetUserID(v int) *TweetLikeUpsertOne
SetUserID sets the "user_id" field.
func (*TweetLikeUpsertOne) Update ¶
func (u *TweetLikeUpsertOne) Update(set func(*TweetLikeUpsert)) *TweetLikeUpsertOne
Update allows overriding fields `UPDATE` values. See the TweetLikeCreate.OnConflict documentation for more info.
func (*TweetLikeUpsertOne) UpdateLikedAt ¶
func (u *TweetLikeUpsertOne) UpdateLikedAt() *TweetLikeUpsertOne
UpdateLikedAt sets the "liked_at" field to the value that was provided on create.
func (*TweetLikeUpsertOne) UpdateNewValues ¶
func (u *TweetLikeUpsertOne) UpdateNewValues() *TweetLikeUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TweetLike.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TweetLikeUpsertOne) UpdateTweetID ¶
func (u *TweetLikeUpsertOne) UpdateTweetID() *TweetLikeUpsertOne
UpdateTweetID sets the "tweet_id" field to the value that was provided on create.
func (*TweetLikeUpsertOne) UpdateUserID ¶
func (u *TweetLikeUpsertOne) UpdateUserID() *TweetLikeUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type TweetMutation ¶
type TweetMutation struct {
// contains filtered or unexported fields
}
TweetMutation represents an operation that mutates the Tweet nodes in the graph.
func (*TweetMutation) AddField ¶
func (m *TweetMutation) 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 (*TweetMutation) AddLikedUserIDs ¶
func (m *TweetMutation) AddLikedUserIDs(ids ...int)
AddLikedUserIDs adds the "liked_users" edge to the User entity by ids.
func (*TweetMutation) AddTagIDs ¶
func (m *TweetMutation) AddTagIDs(ids ...int)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*TweetMutation) AddTweetTagIDs ¶
func (m *TweetMutation) AddTweetTagIDs(ids ...uuid.UUID)
AddTweetTagIDs adds the "tweet_tags" edge to the TweetTag entity by ids.
func (*TweetMutation) AddTweetUserIDs ¶
func (m *TweetMutation) AddTweetUserIDs(ids ...int)
AddTweetUserIDs adds the "tweet_user" edge to the UserTweet entity by ids.
func (*TweetMutation) AddUserIDs ¶
func (m *TweetMutation) AddUserIDs(ids ...int)
AddUserIDs adds the "user" edge to the User entity by ids.
func (*TweetMutation) AddedEdges ¶
func (m *TweetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TweetMutation) AddedField ¶
func (m *TweetMutation) 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 (*TweetMutation) AddedFields ¶
func (m *TweetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TweetMutation) AddedIDs ¶
func (m *TweetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TweetMutation) ClearEdge ¶
func (m *TweetMutation) 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 (*TweetMutation) ClearField ¶
func (m *TweetMutation) 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 (*TweetMutation) ClearLikedUsers ¶
func (m *TweetMutation) ClearLikedUsers()
ClearLikedUsers clears the "liked_users" edge to the User entity.
func (*TweetMutation) ClearTags ¶
func (m *TweetMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*TweetMutation) ClearTweetTags ¶
func (m *TweetMutation) ClearTweetTags()
ClearTweetTags clears the "tweet_tags" edge to the TweetTag entity.
func (*TweetMutation) ClearTweetUser ¶
func (m *TweetMutation) ClearTweetUser()
ClearTweetUser clears the "tweet_user" edge to the UserTweet entity.
func (*TweetMutation) ClearUser ¶
func (m *TweetMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*TweetMutation) ClearedEdges ¶
func (m *TweetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TweetMutation) ClearedFields ¶
func (m *TweetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TweetMutation) Client ¶
func (m TweetMutation) 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 (*TweetMutation) EdgeCleared ¶
func (m *TweetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TweetMutation) Field ¶
func (m *TweetMutation) 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 (*TweetMutation) FieldCleared ¶
func (m *TweetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TweetMutation) Fields ¶
func (m *TweetMutation) 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 (*TweetMutation) Filter ¶ added in v0.11.2
func (m *TweetMutation) Filter() *TweetFilter
Filter returns an entql.Where implementation to apply filters on the TweetMutation builder.
func (*TweetMutation) ID ¶
func (m *TweetMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*TweetMutation) IDs ¶
func (m *TweetMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*TweetMutation) LikedUsersCleared ¶
func (m *TweetMutation) LikedUsersCleared() bool
LikedUsersCleared reports if the "liked_users" edge to the User entity was cleared.
func (*TweetMutation) LikedUsersIDs ¶
func (m *TweetMutation) LikedUsersIDs() (ids []int)
LikedUsersIDs returns the "liked_users" edge IDs in the mutation.
func (*TweetMutation) 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 (*TweetMutation) OldText ¶
func (m *TweetMutation) OldText(ctx context.Context) (v string, err error)
OldText returns the old "text" field's value of the Tweet entity. If the Tweet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TweetMutation) RemoveLikedUserIDs ¶
func (m *TweetMutation) RemoveLikedUserIDs(ids ...int)
RemoveLikedUserIDs removes the "liked_users" edge to the User entity by IDs.
func (*TweetMutation) RemoveTagIDs ¶
func (m *TweetMutation) RemoveTagIDs(ids ...int)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*TweetMutation) RemoveTweetTagIDs ¶
func (m *TweetMutation) RemoveTweetTagIDs(ids ...uuid.UUID)
RemoveTweetTagIDs removes the "tweet_tags" edge to the TweetTag entity by IDs.
func (*TweetMutation) RemoveTweetUserIDs ¶
func (m *TweetMutation) RemoveTweetUserIDs(ids ...int)
RemoveTweetUserIDs removes the "tweet_user" edge to the UserTweet entity by IDs.
func (*TweetMutation) RemoveUserIDs ¶
func (m *TweetMutation) RemoveUserIDs(ids ...int)
RemoveUserIDs removes the "user" edge to the User entity by IDs.
func (*TweetMutation) RemovedEdges ¶
func (m *TweetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TweetMutation) RemovedIDs ¶
func (m *TweetMutation) 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 (*TweetMutation) RemovedLikedUsersIDs ¶
func (m *TweetMutation) RemovedLikedUsersIDs() (ids []int)
RemovedLikedUsers returns the removed IDs of the "liked_users" edge to the User entity.
func (*TweetMutation) RemovedTagsIDs ¶
func (m *TweetMutation) RemovedTagsIDs() (ids []int)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*TweetMutation) RemovedTweetTagsIDs ¶
func (m *TweetMutation) RemovedTweetTagsIDs() (ids []uuid.UUID)
RemovedTweetTags returns the removed IDs of the "tweet_tags" edge to the TweetTag entity.
func (*TweetMutation) RemovedTweetUserIDs ¶
func (m *TweetMutation) RemovedTweetUserIDs() (ids []int)
RemovedTweetUser returns the removed IDs of the "tweet_user" edge to the UserTweet entity.
func (*TweetMutation) RemovedUserIDs ¶
func (m *TweetMutation) RemovedUserIDs() (ids []int)
RemovedUser returns the removed IDs of the "user" edge to the User entity.
func (*TweetMutation) ResetEdge ¶
func (m *TweetMutation) 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 (*TweetMutation) ResetField ¶
func (m *TweetMutation) 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 (*TweetMutation) ResetLikedUsers ¶
func (m *TweetMutation) ResetLikedUsers()
ResetLikedUsers resets all changes to the "liked_users" edge.
func (*TweetMutation) ResetTags ¶
func (m *TweetMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*TweetMutation) ResetText ¶
func (m *TweetMutation) ResetText()
ResetText resets all changes to the "text" field.
func (*TweetMutation) ResetTweetTags ¶
func (m *TweetMutation) ResetTweetTags()
ResetTweetTags resets all changes to the "tweet_tags" edge.
func (*TweetMutation) ResetTweetUser ¶
func (m *TweetMutation) ResetTweetUser()
ResetTweetUser resets all changes to the "tweet_user" edge.
func (*TweetMutation) ResetUser ¶
func (m *TweetMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*TweetMutation) SetField ¶
func (m *TweetMutation) 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 (*TweetMutation) SetOp ¶ added in v0.11.5
func (m *TweetMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TweetMutation) SetText ¶
func (m *TweetMutation) SetText(s string)
SetText sets the "text" field.
func (*TweetMutation) TagsCleared ¶
func (m *TweetMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*TweetMutation) TagsIDs ¶
func (m *TweetMutation) TagsIDs() (ids []int)
TagsIDs returns the "tags" edge IDs in the mutation.
func (*TweetMutation) Text ¶
func (m *TweetMutation) Text() (r string, exists bool)
Text returns the value of the "text" field in the mutation.
func (*TweetMutation) TweetTagsCleared ¶
func (m *TweetMutation) TweetTagsCleared() bool
TweetTagsCleared reports if the "tweet_tags" edge to the TweetTag entity was cleared.
func (*TweetMutation) TweetTagsIDs ¶
func (m *TweetMutation) TweetTagsIDs() (ids []uuid.UUID)
TweetTagsIDs returns the "tweet_tags" edge IDs in the mutation.
func (*TweetMutation) TweetUserCleared ¶
func (m *TweetMutation) TweetUserCleared() bool
TweetUserCleared reports if the "tweet_user" edge to the UserTweet entity was cleared.
func (*TweetMutation) TweetUserIDs ¶
func (m *TweetMutation) TweetUserIDs() (ids []int)
TweetUserIDs returns the "tweet_user" edge IDs in the mutation.
func (TweetMutation) Tx ¶
func (m TweetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TweetMutation) Type ¶
func (m *TweetMutation) Type() string
Type returns the node type of this mutation (Tweet).
func (*TweetMutation) UserCleared ¶
func (m *TweetMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*TweetMutation) UserIDs ¶
func (m *TweetMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation.
func (*TweetMutation) Where ¶
func (m *TweetMutation) Where(ps ...predicate.Tweet)
Where appends a list predicates to the TweetMutation builder.
func (*TweetMutation) WhereP ¶ added in v0.11.5
func (m *TweetMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TweetMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TweetQuery ¶
type TweetQuery struct {
// contains filtered or unexported fields
}
TweetQuery is the builder for querying Tweet entities.
func (*TweetQuery) Aggregate ¶ added in v0.11.4
func (tq *TweetQuery) Aggregate(fns ...AggregateFunc) *TweetSelect
Aggregate returns a TweetSelect configured with the given aggregations.
func (*TweetQuery) All ¶
func (tq *TweetQuery) All(ctx context.Context) ([]*Tweet, error)
All executes the query and returns a list of Tweets.
func (*TweetQuery) AllX ¶
func (tq *TweetQuery) AllX(ctx context.Context) []*Tweet
AllX is like All, but panics if an error occurs.
func (*TweetQuery) Clone ¶
func (tq *TweetQuery) Clone() *TweetQuery
Clone returns a duplicate of the TweetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TweetQuery) Count ¶
func (tq *TweetQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TweetQuery) CountX ¶
func (tq *TweetQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TweetQuery) Exist ¶
func (tq *TweetQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TweetQuery) ExistX ¶
func (tq *TweetQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TweetQuery) Filter ¶ added in v0.11.2
func (tq *TweetQuery) Filter() *TweetFilter
Filter returns a Filter implementation to apply filters on the TweetQuery builder.
func (*TweetQuery) First ¶
func (tq *TweetQuery) First(ctx context.Context) (*Tweet, error)
First returns the first Tweet entity from the query. Returns a *NotFoundError when no Tweet was found.
func (*TweetQuery) FirstID ¶
func (tq *TweetQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Tweet ID from the query. Returns a *NotFoundError when no Tweet ID was found.
func (*TweetQuery) FirstIDX ¶
func (tq *TweetQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TweetQuery) FirstX ¶
func (tq *TweetQuery) FirstX(ctx context.Context) *Tweet
FirstX is like First, but panics if an error occurs.
func (*TweetQuery) GroupBy ¶
func (tq *TweetQuery) GroupBy(field string, fields ...string) *TweetGroupBy
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 { Text string `json:"text,omitempty"` Count int `json:"count,omitempty"` } client.Tweet.Query(). GroupBy(tweet.FieldText). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TweetQuery) IDs ¶
func (tq *TweetQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Tweet IDs.
func (*TweetQuery) IDsX ¶
func (tq *TweetQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TweetQuery) Limit ¶
func (tq *TweetQuery) Limit(limit int) *TweetQuery
Limit the number of records to be returned by this query.
func (*TweetQuery) Offset ¶
func (tq *TweetQuery) Offset(offset int) *TweetQuery
Offset to start from.
func (*TweetQuery) Only ¶
func (tq *TweetQuery) Only(ctx context.Context) (*Tweet, error)
Only returns a single Tweet entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tweet entity is found. Returns a *NotFoundError when no Tweet entities are found.
func (*TweetQuery) OnlyID ¶
func (tq *TweetQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Tweet ID in the query. Returns a *NotSingularError when more than one Tweet ID is found. Returns a *NotFoundError when no entities are found.
func (*TweetQuery) OnlyIDX ¶
func (tq *TweetQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TweetQuery) OnlyX ¶
func (tq *TweetQuery) OnlyX(ctx context.Context) *Tweet
OnlyX is like Only, but panics if an error occurs.
func (*TweetQuery) Order ¶
func (tq *TweetQuery) Order(o ...OrderFunc) *TweetQuery
Order specifies how the records should be ordered.
func (*TweetQuery) QueryLikedUsers ¶
func (tq *TweetQuery) QueryLikedUsers() *UserQuery
QueryLikedUsers chains the current query on the "liked_users" edge.
func (*TweetQuery) QueryLikes ¶
func (tq *TweetQuery) QueryLikes() *TweetLikeQuery
QueryLikes chains the current query on the "likes" edge.
func (*TweetQuery) QueryTags ¶
func (tq *TweetQuery) QueryTags() *TagQuery
QueryTags chains the current query on the "tags" edge.
func (*TweetQuery) QueryTweetTags ¶
func (tq *TweetQuery) QueryTweetTags() *TweetTagQuery
QueryTweetTags chains the current query on the "tweet_tags" edge.
func (*TweetQuery) QueryTweetUser ¶
func (tq *TweetQuery) QueryTweetUser() *UserTweetQuery
QueryTweetUser chains the current query on the "tweet_user" edge.
func (*TweetQuery) QueryUser ¶
func (tq *TweetQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*TweetQuery) Select ¶
func (tq *TweetQuery) Select(fields ...string) *TweetSelect
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 { Text string `json:"text,omitempty"` } client.Tweet.Query(). Select(tweet.FieldText). Scan(ctx, &v)
func (*TweetQuery) Unique ¶
func (tq *TweetQuery) Unique(unique bool) *TweetQuery
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 (*TweetQuery) Where ¶
func (tq *TweetQuery) Where(ps ...predicate.Tweet) *TweetQuery
Where adds a new predicate for the TweetQuery builder.
func (*TweetQuery) WithLikedUsers ¶
func (tq *TweetQuery) WithLikedUsers(opts ...func(*UserQuery)) *TweetQuery
WithLikedUsers tells the query-builder to eager-load the nodes that are connected to the "liked_users" edge. The optional arguments are used to configure the query builder of the edge.
func (*TweetQuery) WithLikes ¶
func (tq *TweetQuery) WithLikes(opts ...func(*TweetLikeQuery)) *TweetQuery
WithLikes tells the query-builder to eager-load the nodes that are connected to the "likes" edge. The optional arguments are used to configure the query builder of the edge.
func (*TweetQuery) WithTags ¶
func (tq *TweetQuery) WithTags(opts ...func(*TagQuery)) *TweetQuery
WithTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*TweetQuery) WithTweetTags ¶
func (tq *TweetQuery) WithTweetTags(opts ...func(*TweetTagQuery)) *TweetQuery
WithTweetTags tells the query-builder to eager-load the nodes that are connected to the "tweet_tags" edge. The optional arguments are used to configure the query builder of the edge.
func (*TweetQuery) WithTweetUser ¶
func (tq *TweetQuery) WithTweetUser(opts ...func(*UserTweetQuery)) *TweetQuery
WithTweetUser tells the query-builder to eager-load the nodes that are connected to the "tweet_user" edge. The optional arguments are used to configure the query builder of the edge.
func (*TweetQuery) WithUser ¶
func (tq *TweetQuery) WithUser(opts ...func(*UserQuery)) *TweetQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type TweetSelect ¶
type TweetSelect struct { *TweetQuery // contains filtered or unexported fields }
TweetSelect is the builder for selecting fields of Tweet entities.
func (*TweetSelect) Aggregate ¶ added in v0.11.4
func (ts *TweetSelect) Aggregate(fns ...AggregateFunc) *TweetSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TweetSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TweetSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TweetSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TweetSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TweetSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TweetSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TweetSelect) Scan ¶
func (ts *TweetSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TweetSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TweetTag ¶
type TweetTag struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // AddedAt holds the value of the "added_at" field. AddedAt time.Time `json:"added_at,omitempty"` // TagID holds the value of the "tag_id" field. TagID int `json:"tag_id,omitempty"` // TweetID holds the value of the "tweet_id" field. TweetID int `json:"tweet_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TweetTagQuery when eager-loading is set. Edges TweetTagEdges `json:"edges"` // contains filtered or unexported fields }
TweetTag is the model entity for the TweetTag schema.
func (*TweetTag) QueryTweet ¶
func (tt *TweetTag) QueryTweet() *TweetQuery
QueryTweet queries the "tweet" edge of the TweetTag entity.
func (*TweetTag) Unwrap ¶
Unwrap unwraps the TweetTag 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 (*TweetTag) Update ¶
func (tt *TweetTag) Update() *TweetTagUpdateOne
Update returns a builder for updating this TweetTag. Note that you need to call TweetTag.Unwrap() before calling this method if this TweetTag was returned from a transaction, and the transaction was committed or rolled back.
type TweetTagClient ¶
type TweetTagClient struct {
// contains filtered or unexported fields
}
TweetTagClient is a client for the TweetTag schema.
func NewTweetTagClient ¶
func NewTweetTagClient(c config) *TweetTagClient
NewTweetTagClient returns a client for the TweetTag from the given config.
func (*TweetTagClient) Create ¶
func (c *TweetTagClient) Create() *TweetTagCreate
Create returns a builder for creating a TweetTag entity.
func (*TweetTagClient) CreateBulk ¶
func (c *TweetTagClient) CreateBulk(builders ...*TweetTagCreate) *TweetTagCreateBulk
CreateBulk returns a builder for creating a bulk of TweetTag entities.
func (*TweetTagClient) Delete ¶
func (c *TweetTagClient) Delete() *TweetTagDelete
Delete returns a delete builder for TweetTag.
func (*TweetTagClient) DeleteOne ¶
func (c *TweetTagClient) DeleteOne(tt *TweetTag) *TweetTagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TweetTagClient) DeleteOneID ¶
func (c *TweetTagClient) DeleteOneID(id uuid.UUID) *TweetTagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TweetTagClient) Hooks ¶
func (c *TweetTagClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TweetTagClient) Intercept ¶ added in v0.11.5
func (c *TweetTagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tweettag.Intercept(f(g(h())))`.
func (*TweetTagClient) Interceptors ¶ added in v0.11.5
func (c *TweetTagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TweetTagClient) Query ¶
func (c *TweetTagClient) Query() *TweetTagQuery
Query returns a query builder for TweetTag.
func (*TweetTagClient) QueryTag ¶
func (c *TweetTagClient) QueryTag(tt *TweetTag) *TagQuery
QueryTag queries the tag edge of a TweetTag.
func (*TweetTagClient) QueryTweet ¶
func (c *TweetTagClient) QueryTweet(tt *TweetTag) *TweetQuery
QueryTweet queries the tweet edge of a TweetTag.
func (*TweetTagClient) Update ¶
func (c *TweetTagClient) Update() *TweetTagUpdate
Update returns an update builder for TweetTag.
func (*TweetTagClient) UpdateOne ¶
func (c *TweetTagClient) UpdateOne(tt *TweetTag) *TweetTagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TweetTagClient) UpdateOneID ¶
func (c *TweetTagClient) UpdateOneID(id uuid.UUID) *TweetTagUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TweetTagClient) Use ¶
func (c *TweetTagClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tweettag.Hooks(f(g(h())))`.
type TweetTagCreate ¶
type TweetTagCreate struct {
// contains filtered or unexported fields
}
TweetTagCreate is the builder for creating a TweetTag entity.
func (*TweetTagCreate) Exec ¶
func (ttc *TweetTagCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetTagCreate) ExecX ¶
func (ttc *TweetTagCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetTagCreate) Mutation ¶
func (ttc *TweetTagCreate) Mutation() *TweetTagMutation
Mutation returns the TweetTagMutation object of the builder.
func (*TweetTagCreate) OnConflict ¶
func (ttc *TweetTagCreate) OnConflict(opts ...sql.ConflictOption) *TweetTagUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TweetTag.Create(). SetAddedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TweetTagUpsert) { SetAddedAt(v+v). }). Exec(ctx)
func (*TweetTagCreate) OnConflictColumns ¶
func (ttc *TweetTagCreate) OnConflictColumns(columns ...string) *TweetTagUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TweetTag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TweetTagCreate) Save ¶
func (ttc *TweetTagCreate) Save(ctx context.Context) (*TweetTag, error)
Save creates the TweetTag in the database.
func (*TweetTagCreate) SaveX ¶
func (ttc *TweetTagCreate) SaveX(ctx context.Context) *TweetTag
SaveX calls Save and panics if Save returns an error.
func (*TweetTagCreate) SetAddedAt ¶
func (ttc *TweetTagCreate) SetAddedAt(t time.Time) *TweetTagCreate
SetAddedAt sets the "added_at" field.
func (*TweetTagCreate) SetID ¶
func (ttc *TweetTagCreate) SetID(u uuid.UUID) *TweetTagCreate
SetID sets the "id" field.
func (*TweetTagCreate) SetNillableAddedAt ¶
func (ttc *TweetTagCreate) SetNillableAddedAt(t *time.Time) *TweetTagCreate
SetNillableAddedAt sets the "added_at" field if the given value is not nil.
func (*TweetTagCreate) SetNillableID ¶
func (ttc *TweetTagCreate) SetNillableID(u *uuid.UUID) *TweetTagCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*TweetTagCreate) SetTag ¶
func (ttc *TweetTagCreate) SetTag(t *Tag) *TweetTagCreate
SetTag sets the "tag" edge to the Tag entity.
func (*TweetTagCreate) SetTagID ¶
func (ttc *TweetTagCreate) SetTagID(i int) *TweetTagCreate
SetTagID sets the "tag_id" field.
func (*TweetTagCreate) SetTweet ¶
func (ttc *TweetTagCreate) SetTweet(t *Tweet) *TweetTagCreate
SetTweet sets the "tweet" edge to the Tweet entity.
func (*TweetTagCreate) SetTweetID ¶
func (ttc *TweetTagCreate) SetTweetID(i int) *TweetTagCreate
SetTweetID sets the "tweet_id" field.
type TweetTagCreateBulk ¶
type TweetTagCreateBulk struct {
// contains filtered or unexported fields
}
TweetTagCreateBulk is the builder for creating many TweetTag entities in bulk.
func (*TweetTagCreateBulk) Exec ¶
func (ttcb *TweetTagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetTagCreateBulk) ExecX ¶
func (ttcb *TweetTagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetTagCreateBulk) OnConflict ¶
func (ttcb *TweetTagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TweetTagUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.TweetTag.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TweetTagUpsert) { SetAddedAt(v+v). }). Exec(ctx)
func (*TweetTagCreateBulk) OnConflictColumns ¶
func (ttcb *TweetTagCreateBulk) OnConflictColumns(columns ...string) *TweetTagUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.TweetTag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TweetTagDelete ¶
type TweetTagDelete struct {
// contains filtered or unexported fields
}
TweetTagDelete is the builder for deleting a TweetTag entity.
func (*TweetTagDelete) Exec ¶
func (ttd *TweetTagDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TweetTagDelete) ExecX ¶
func (ttd *TweetTagDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TweetTagDelete) Where ¶
func (ttd *TweetTagDelete) Where(ps ...predicate.TweetTag) *TweetTagDelete
Where appends a list predicates to the TweetTagDelete builder.
type TweetTagDeleteOne ¶
type TweetTagDeleteOne struct {
// contains filtered or unexported fields
}
TweetTagDeleteOne is the builder for deleting a single TweetTag entity.
func (*TweetTagDeleteOne) Exec ¶
func (ttdo *TweetTagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TweetTagDeleteOne) ExecX ¶
func (ttdo *TweetTagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetTagDeleteOne) Where ¶ added in v0.11.7
func (ttdo *TweetTagDeleteOne) Where(ps ...predicate.TweetTag) *TweetTagDeleteOne
Where appends a list predicates to the TweetTagDelete builder.
type TweetTagEdges ¶
type TweetTagEdges struct { // Tag holds the value of the tag edge. Tag *Tag `json:"tag,omitempty"` // Tweet holds the value of the tweet edge. Tweet *Tweet `json:"tweet,omitempty"` // contains filtered or unexported fields }
TweetTagEdges holds the relations/edges for other nodes in the graph.
func (TweetTagEdges) TagOrErr ¶
func (e TweetTagEdges) TagOrErr() (*Tag, error)
TagOrErr returns the Tag value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (TweetTagEdges) TweetOrErr ¶
func (e TweetTagEdges) TweetOrErr() (*Tweet, error)
TweetOrErr returns the Tweet value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TweetTagFilter ¶ added in v0.11.2
type TweetTagFilter struct {
// contains filtered or unexported fields
}
TweetTagFilter provides a generic filtering capability at runtime for TweetTagQuery.
func (*TweetTagFilter) Where ¶ added in v0.11.2
func (f *TweetTagFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*TweetTagFilter) WhereAddedAt ¶ added in v0.11.2
func (f *TweetTagFilter) WhereAddedAt(p entql.TimeP)
WhereAddedAt applies the entql time.Time predicate on the added_at field.
func (*TweetTagFilter) WhereHasTag ¶ added in v0.11.2
func (f *TweetTagFilter) WhereHasTag()
WhereHasTag applies a predicate to check if query has an edge tag.
func (*TweetTagFilter) WhereHasTagWith ¶ added in v0.11.2
func (f *TweetTagFilter) WhereHasTagWith(preds ...predicate.Tag)
WhereHasTagWith applies a predicate to check if query has an edge tag with a given conditions (other predicates).
func (*TweetTagFilter) WhereHasTweet ¶ added in v0.11.2
func (f *TweetTagFilter) WhereHasTweet()
WhereHasTweet applies a predicate to check if query has an edge tweet.
func (*TweetTagFilter) WhereHasTweetWith ¶ added in v0.11.2
func (f *TweetTagFilter) WhereHasTweetWith(preds ...predicate.Tweet)
WhereHasTweetWith applies a predicate to check if query has an edge tweet with a given conditions (other predicates).
func (*TweetTagFilter) WhereID ¶ added in v0.11.2
func (f *TweetTagFilter) WhereID(p entql.ValueP)
WhereID applies the entql [16]byte predicate on the id field.
func (*TweetTagFilter) WhereTagID ¶ added in v0.11.2
func (f *TweetTagFilter) WhereTagID(p entql.IntP)
WhereTagID applies the entql int predicate on the tag_id field.
func (*TweetTagFilter) WhereTweetID ¶ added in v0.11.2
func (f *TweetTagFilter) WhereTweetID(p entql.IntP)
WhereTweetID applies the entql int predicate on the tweet_id field.
type TweetTagGroupBy ¶
type TweetTagGroupBy struct {
// contains filtered or unexported fields
}
TweetTagGroupBy is the group-by builder for TweetTag entities.
func (*TweetTagGroupBy) Aggregate ¶
func (ttgb *TweetTagGroupBy) Aggregate(fns ...AggregateFunc) *TweetTagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TweetTagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TweetTagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TweetTagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TweetTagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TweetTagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TweetTagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TweetTagGroupBy) Scan ¶
func (ttgb *TweetTagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TweetTagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TweetTagMutation ¶
type TweetTagMutation struct {
// contains filtered or unexported fields
}
TweetTagMutation represents an operation that mutates the TweetTag nodes in the graph.
func (*TweetTagMutation) AddField ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) AddedAt ¶
func (m *TweetTagMutation) AddedAt() (r time.Time, exists bool)
AddedAt returns the value of the "added_at" field in the mutation.
func (*TweetTagMutation) AddedEdges ¶
func (m *TweetTagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TweetTagMutation) AddedField ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) AddedFields ¶
func (m *TweetTagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TweetTagMutation) AddedIDs ¶
func (m *TweetTagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TweetTagMutation) ClearEdge ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) ClearField ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) ClearTag ¶
func (m *TweetTagMutation) ClearTag()
ClearTag clears the "tag" edge to the Tag entity.
func (*TweetTagMutation) ClearTweet ¶
func (m *TweetTagMutation) ClearTweet()
ClearTweet clears the "tweet" edge to the Tweet entity.
func (*TweetTagMutation) ClearedEdges ¶
func (m *TweetTagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TweetTagMutation) ClearedFields ¶
func (m *TweetTagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TweetTagMutation) Client ¶
func (m TweetTagMutation) 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 (*TweetTagMutation) EdgeCleared ¶
func (m *TweetTagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TweetTagMutation) Field ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) FieldCleared ¶
func (m *TweetTagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TweetTagMutation) Fields ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) Filter ¶ added in v0.11.2
func (m *TweetTagMutation) Filter() *TweetTagFilter
Filter returns an entql.Where implementation to apply filters on the TweetTagMutation builder.
func (*TweetTagMutation) ID ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) 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 (*TweetTagMutation) OldAddedAt ¶
OldAddedAt returns the old "added_at" field's value of the TweetTag entity. If the TweetTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TweetTagMutation) 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 (*TweetTagMutation) OldTagID ¶
func (m *TweetTagMutation) OldTagID(ctx context.Context) (v int, err error)
OldTagID returns the old "tag_id" field's value of the TweetTag entity. If the TweetTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TweetTagMutation) OldTweetID ¶
func (m *TweetTagMutation) OldTweetID(ctx context.Context) (v int, err error)
OldTweetID returns the old "tweet_id" field's value of the TweetTag entity. If the TweetTag object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*TweetTagMutation) RemovedEdges ¶
func (m *TweetTagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TweetTagMutation) RemovedIDs ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) ResetAddedAt ¶
func (m *TweetTagMutation) ResetAddedAt()
ResetAddedAt resets all changes to the "added_at" field.
func (*TweetTagMutation) ResetEdge ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) ResetField ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) ResetTag ¶
func (m *TweetTagMutation) ResetTag()
ResetTag resets all changes to the "tag" edge.
func (*TweetTagMutation) ResetTagID ¶
func (m *TweetTagMutation) ResetTagID()
ResetTagID resets all changes to the "tag_id" field.
func (*TweetTagMutation) ResetTweet ¶
func (m *TweetTagMutation) ResetTweet()
ResetTweet resets all changes to the "tweet" edge.
func (*TweetTagMutation) ResetTweetID ¶
func (m *TweetTagMutation) ResetTweetID()
ResetTweetID resets all changes to the "tweet_id" field.
func (*TweetTagMutation) SetAddedAt ¶
func (m *TweetTagMutation) SetAddedAt(t time.Time)
SetAddedAt sets the "added_at" field.
func (*TweetTagMutation) SetField ¶
func (m *TweetTagMutation) 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 (*TweetTagMutation) SetID ¶
func (m *TweetTagMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TweetTag entities.
func (*TweetTagMutation) SetOp ¶ added in v0.11.5
func (m *TweetTagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TweetTagMutation) SetTagID ¶
func (m *TweetTagMutation) SetTagID(i int)
SetTagID sets the "tag_id" field.
func (*TweetTagMutation) SetTweetID ¶
func (m *TweetTagMutation) SetTweetID(i int)
SetTweetID sets the "tweet_id" field.
func (*TweetTagMutation) TagCleared ¶
func (m *TweetTagMutation) TagCleared() bool
TagCleared reports if the "tag" edge to the Tag entity was cleared.
func (*TweetTagMutation) TagID ¶
func (m *TweetTagMutation) TagID() (r int, exists bool)
TagID returns the value of the "tag_id" field in the mutation.
func (*TweetTagMutation) TagIDs ¶
func (m *TweetTagMutation) TagIDs() (ids []int)
TagIDs returns the "tag" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TagID instead. It exists only for internal usage by the builders.
func (*TweetTagMutation) TweetCleared ¶
func (m *TweetTagMutation) TweetCleared() bool
TweetCleared reports if the "tweet" edge to the Tweet entity was cleared.
func (*TweetTagMutation) TweetID ¶
func (m *TweetTagMutation) TweetID() (r int, exists bool)
TweetID returns the value of the "tweet_id" field in the mutation.
func (*TweetTagMutation) TweetIDs ¶
func (m *TweetTagMutation) TweetIDs() (ids []int)
TweetIDs returns the "tweet" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TweetID instead. It exists only for internal usage by the builders.
func (TweetTagMutation) Tx ¶
func (m TweetTagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TweetTagMutation) Type ¶
func (m *TweetTagMutation) Type() string
Type returns the node type of this mutation (TweetTag).
func (*TweetTagMutation) Where ¶
func (m *TweetTagMutation) Where(ps ...predicate.TweetTag)
Where appends a list predicates to the TweetTagMutation builder.
func (*TweetTagMutation) WhereP ¶ added in v0.11.5
func (m *TweetTagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TweetTagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TweetTagQuery ¶
type TweetTagQuery struct {
// contains filtered or unexported fields
}
TweetTagQuery is the builder for querying TweetTag entities.
func (*TweetTagQuery) Aggregate ¶ added in v0.11.4
func (ttq *TweetTagQuery) Aggregate(fns ...AggregateFunc) *TweetTagSelect
Aggregate returns a TweetTagSelect configured with the given aggregations.
func (*TweetTagQuery) All ¶
func (ttq *TweetTagQuery) All(ctx context.Context) ([]*TweetTag, error)
All executes the query and returns a list of TweetTags.
func (*TweetTagQuery) AllX ¶
func (ttq *TweetTagQuery) AllX(ctx context.Context) []*TweetTag
AllX is like All, but panics if an error occurs.
func (*TweetTagQuery) Clone ¶
func (ttq *TweetTagQuery) Clone() *TweetTagQuery
Clone returns a duplicate of the TweetTagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TweetTagQuery) Count ¶
func (ttq *TweetTagQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TweetTagQuery) CountX ¶
func (ttq *TweetTagQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TweetTagQuery) Exist ¶
func (ttq *TweetTagQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TweetTagQuery) ExistX ¶
func (ttq *TweetTagQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TweetTagQuery) Filter ¶ added in v0.11.2
func (ttq *TweetTagQuery) Filter() *TweetTagFilter
Filter returns a Filter implementation to apply filters on the TweetTagQuery builder.
func (*TweetTagQuery) First ¶
func (ttq *TweetTagQuery) First(ctx context.Context) (*TweetTag, error)
First returns the first TweetTag entity from the query. Returns a *NotFoundError when no TweetTag was found.
func (*TweetTagQuery) FirstID ¶
FirstID returns the first TweetTag ID from the query. Returns a *NotFoundError when no TweetTag ID was found.
func (*TweetTagQuery) FirstIDX ¶
func (ttq *TweetTagQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*TweetTagQuery) FirstX ¶
func (ttq *TweetTagQuery) FirstX(ctx context.Context) *TweetTag
FirstX is like First, but panics if an error occurs.
func (*TweetTagQuery) GroupBy ¶
func (ttq *TweetTagQuery) GroupBy(field string, fields ...string) *TweetTagGroupBy
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 { AddedAt time.Time `json:"added_at,omitempty"` Count int `json:"count,omitempty"` } client.TweetTag.Query(). GroupBy(tweettag.FieldAddedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TweetTagQuery) IDsX ¶
func (ttq *TweetTagQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*TweetTagQuery) Limit ¶
func (ttq *TweetTagQuery) Limit(limit int) *TweetTagQuery
Limit the number of records to be returned by this query.
func (*TweetTagQuery) Offset ¶
func (ttq *TweetTagQuery) Offset(offset int) *TweetTagQuery
Offset to start from.
func (*TweetTagQuery) Only ¶
func (ttq *TweetTagQuery) Only(ctx context.Context) (*TweetTag, error)
Only returns a single TweetTag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TweetTag entity is found. Returns a *NotFoundError when no TweetTag entities are found.
func (*TweetTagQuery) OnlyID ¶
OnlyID is like Only, but returns the only TweetTag ID in the query. Returns a *NotSingularError when more than one TweetTag ID is found. Returns a *NotFoundError when no entities are found.
func (*TweetTagQuery) OnlyIDX ¶
func (ttq *TweetTagQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TweetTagQuery) OnlyX ¶
func (ttq *TweetTagQuery) OnlyX(ctx context.Context) *TweetTag
OnlyX is like Only, but panics if an error occurs.
func (*TweetTagQuery) Order ¶
func (ttq *TweetTagQuery) Order(o ...OrderFunc) *TweetTagQuery
Order specifies how the records should be ordered.
func (*TweetTagQuery) QueryTag ¶
func (ttq *TweetTagQuery) QueryTag() *TagQuery
QueryTag chains the current query on the "tag" edge.
func (*TweetTagQuery) QueryTweet ¶
func (ttq *TweetTagQuery) QueryTweet() *TweetQuery
QueryTweet chains the current query on the "tweet" edge.
func (*TweetTagQuery) Select ¶
func (ttq *TweetTagQuery) Select(fields ...string) *TweetTagSelect
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 { AddedAt time.Time `json:"added_at,omitempty"` } client.TweetTag.Query(). Select(tweettag.FieldAddedAt). Scan(ctx, &v)
func (*TweetTagQuery) Unique ¶
func (ttq *TweetTagQuery) Unique(unique bool) *TweetTagQuery
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 (*TweetTagQuery) Where ¶
func (ttq *TweetTagQuery) Where(ps ...predicate.TweetTag) *TweetTagQuery
Where adds a new predicate for the TweetTagQuery builder.
func (*TweetTagQuery) WithTag ¶
func (ttq *TweetTagQuery) WithTag(opts ...func(*TagQuery)) *TweetTagQuery
WithTag tells the query-builder to eager-load the nodes that are connected to the "tag" edge. The optional arguments are used to configure the query builder of the edge.
func (*TweetTagQuery) WithTweet ¶
func (ttq *TweetTagQuery) WithTweet(opts ...func(*TweetQuery)) *TweetTagQuery
WithTweet tells the query-builder to eager-load the nodes that are connected to the "tweet" edge. The optional arguments are used to configure the query builder of the edge.
type TweetTagSelect ¶
type TweetTagSelect struct { *TweetTagQuery // contains filtered or unexported fields }
TweetTagSelect is the builder for selecting fields of TweetTag entities.
func (*TweetTagSelect) Aggregate ¶ added in v0.11.4
func (tts *TweetTagSelect) Aggregate(fns ...AggregateFunc) *TweetTagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TweetTagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TweetTagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TweetTagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TweetTagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TweetTagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TweetTagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TweetTagSelect) Scan ¶
func (tts *TweetTagSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TweetTagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TweetTagUpdate ¶
type TweetTagUpdate struct {
// contains filtered or unexported fields
}
TweetTagUpdate is the builder for updating TweetTag entities.
func (*TweetTagUpdate) ClearTag ¶
func (ttu *TweetTagUpdate) ClearTag() *TweetTagUpdate
ClearTag clears the "tag" edge to the Tag entity.
func (*TweetTagUpdate) ClearTweet ¶
func (ttu *TweetTagUpdate) ClearTweet() *TweetTagUpdate
ClearTweet clears the "tweet" edge to the Tweet entity.
func (*TweetTagUpdate) Exec ¶
func (ttu *TweetTagUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetTagUpdate) ExecX ¶
func (ttu *TweetTagUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetTagUpdate) Mutation ¶
func (ttu *TweetTagUpdate) Mutation() *TweetTagMutation
Mutation returns the TweetTagMutation object of the builder.
func (*TweetTagUpdate) Save ¶
func (ttu *TweetTagUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TweetTagUpdate) SaveX ¶
func (ttu *TweetTagUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TweetTagUpdate) SetAddedAt ¶
func (ttu *TweetTagUpdate) SetAddedAt(t time.Time) *TweetTagUpdate
SetAddedAt sets the "added_at" field.
func (*TweetTagUpdate) SetNillableAddedAt ¶
func (ttu *TweetTagUpdate) SetNillableAddedAt(t *time.Time) *TweetTagUpdate
SetNillableAddedAt sets the "added_at" field if the given value is not nil.
func (*TweetTagUpdate) SetTag ¶
func (ttu *TweetTagUpdate) SetTag(t *Tag) *TweetTagUpdate
SetTag sets the "tag" edge to the Tag entity.
func (*TweetTagUpdate) SetTagID ¶
func (ttu *TweetTagUpdate) SetTagID(i int) *TweetTagUpdate
SetTagID sets the "tag_id" field.
func (*TweetTagUpdate) SetTweet ¶
func (ttu *TweetTagUpdate) SetTweet(t *Tweet) *TweetTagUpdate
SetTweet sets the "tweet" edge to the Tweet entity.
func (*TweetTagUpdate) SetTweetID ¶
func (ttu *TweetTagUpdate) SetTweetID(i int) *TweetTagUpdate
SetTweetID sets the "tweet_id" field.
func (*TweetTagUpdate) Where ¶
func (ttu *TweetTagUpdate) Where(ps ...predicate.TweetTag) *TweetTagUpdate
Where appends a list predicates to the TweetTagUpdate builder.
type TweetTagUpdateOne ¶
type TweetTagUpdateOne struct {
// contains filtered or unexported fields
}
TweetTagUpdateOne is the builder for updating a single TweetTag entity.
func (*TweetTagUpdateOne) ClearTag ¶
func (ttuo *TweetTagUpdateOne) ClearTag() *TweetTagUpdateOne
ClearTag clears the "tag" edge to the Tag entity.
func (*TweetTagUpdateOne) ClearTweet ¶
func (ttuo *TweetTagUpdateOne) ClearTweet() *TweetTagUpdateOne
ClearTweet clears the "tweet" edge to the Tweet entity.
func (*TweetTagUpdateOne) Exec ¶
func (ttuo *TweetTagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TweetTagUpdateOne) ExecX ¶
func (ttuo *TweetTagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetTagUpdateOne) Mutation ¶
func (ttuo *TweetTagUpdateOne) Mutation() *TweetTagMutation
Mutation returns the TweetTagMutation object of the builder.
func (*TweetTagUpdateOne) Save ¶
func (ttuo *TweetTagUpdateOne) Save(ctx context.Context) (*TweetTag, error)
Save executes the query and returns the updated TweetTag entity.
func (*TweetTagUpdateOne) SaveX ¶
func (ttuo *TweetTagUpdateOne) SaveX(ctx context.Context) *TweetTag
SaveX is like Save, but panics if an error occurs.
func (*TweetTagUpdateOne) Select ¶
func (ttuo *TweetTagUpdateOne) Select(field string, fields ...string) *TweetTagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TweetTagUpdateOne) SetAddedAt ¶
func (ttuo *TweetTagUpdateOne) SetAddedAt(t time.Time) *TweetTagUpdateOne
SetAddedAt sets the "added_at" field.
func (*TweetTagUpdateOne) SetNillableAddedAt ¶
func (ttuo *TweetTagUpdateOne) SetNillableAddedAt(t *time.Time) *TweetTagUpdateOne
SetNillableAddedAt sets the "added_at" field if the given value is not nil.
func (*TweetTagUpdateOne) SetTag ¶
func (ttuo *TweetTagUpdateOne) SetTag(t *Tag) *TweetTagUpdateOne
SetTag sets the "tag" edge to the Tag entity.
func (*TweetTagUpdateOne) SetTagID ¶
func (ttuo *TweetTagUpdateOne) SetTagID(i int) *TweetTagUpdateOne
SetTagID sets the "tag_id" field.
func (*TweetTagUpdateOne) SetTweet ¶
func (ttuo *TweetTagUpdateOne) SetTweet(t *Tweet) *TweetTagUpdateOne
SetTweet sets the "tweet" edge to the Tweet entity.
func (*TweetTagUpdateOne) SetTweetID ¶
func (ttuo *TweetTagUpdateOne) SetTweetID(i int) *TweetTagUpdateOne
SetTweetID sets the "tweet_id" field.
func (*TweetTagUpdateOne) Where ¶ added in v0.11.8
func (ttuo *TweetTagUpdateOne) Where(ps ...predicate.TweetTag) *TweetTagUpdateOne
Where appends a list predicates to the TweetTagUpdate builder.
type TweetTagUpsert ¶
TweetTagUpsert is the "OnConflict" setter.
func (*TweetTagUpsert) SetAddedAt ¶
func (u *TweetTagUpsert) SetAddedAt(v time.Time) *TweetTagUpsert
SetAddedAt sets the "added_at" field.
func (*TweetTagUpsert) SetTagID ¶
func (u *TweetTagUpsert) SetTagID(v int) *TweetTagUpsert
SetTagID sets the "tag_id" field.
func (*TweetTagUpsert) SetTweetID ¶
func (u *TweetTagUpsert) SetTweetID(v int) *TweetTagUpsert
SetTweetID sets the "tweet_id" field.
func (*TweetTagUpsert) UpdateAddedAt ¶
func (u *TweetTagUpsert) UpdateAddedAt() *TweetTagUpsert
UpdateAddedAt sets the "added_at" field to the value that was provided on create.
func (*TweetTagUpsert) UpdateTagID ¶
func (u *TweetTagUpsert) UpdateTagID() *TweetTagUpsert
UpdateTagID sets the "tag_id" field to the value that was provided on create.
func (*TweetTagUpsert) UpdateTweetID ¶
func (u *TweetTagUpsert) UpdateTweetID() *TweetTagUpsert
UpdateTweetID sets the "tweet_id" field to the value that was provided on create.
type TweetTagUpsertBulk ¶
type TweetTagUpsertBulk struct {
// contains filtered or unexported fields
}
TweetTagUpsertBulk is the builder for "upsert"-ing a bulk of TweetTag nodes.
func (*TweetTagUpsertBulk) DoNothing ¶
func (u *TweetTagUpsertBulk) DoNothing() *TweetTagUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TweetTagUpsertBulk) Exec ¶
func (u *TweetTagUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetTagUpsertBulk) ExecX ¶
func (u *TweetTagUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetTagUpsertBulk) Ignore ¶
func (u *TweetTagUpsertBulk) Ignore() *TweetTagUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TweetTag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TweetTagUpsertBulk) SetAddedAt ¶
func (u *TweetTagUpsertBulk) SetAddedAt(v time.Time) *TweetTagUpsertBulk
SetAddedAt sets the "added_at" field.
func (*TweetTagUpsertBulk) SetTagID ¶
func (u *TweetTagUpsertBulk) SetTagID(v int) *TweetTagUpsertBulk
SetTagID sets the "tag_id" field.
func (*TweetTagUpsertBulk) SetTweetID ¶
func (u *TweetTagUpsertBulk) SetTweetID(v int) *TweetTagUpsertBulk
SetTweetID sets the "tweet_id" field.
func (*TweetTagUpsertBulk) Update ¶
func (u *TweetTagUpsertBulk) Update(set func(*TweetTagUpsert)) *TweetTagUpsertBulk
Update allows overriding fields `UPDATE` values. See the TweetTagCreateBulk.OnConflict documentation for more info.
func (*TweetTagUpsertBulk) UpdateAddedAt ¶
func (u *TweetTagUpsertBulk) UpdateAddedAt() *TweetTagUpsertBulk
UpdateAddedAt sets the "added_at" field to the value that was provided on create.
func (*TweetTagUpsertBulk) UpdateNewValues ¶
func (u *TweetTagUpsertBulk) UpdateNewValues() *TweetTagUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.TweetTag.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(tweettag.FieldID) }), ). Exec(ctx)
func (*TweetTagUpsertBulk) UpdateTagID ¶
func (u *TweetTagUpsertBulk) UpdateTagID() *TweetTagUpsertBulk
UpdateTagID sets the "tag_id" field to the value that was provided on create.
func (*TweetTagUpsertBulk) UpdateTweetID ¶
func (u *TweetTagUpsertBulk) UpdateTweetID() *TweetTagUpsertBulk
UpdateTweetID sets the "tweet_id" field to the value that was provided on create.
type TweetTagUpsertOne ¶
type TweetTagUpsertOne struct {
// contains filtered or unexported fields
}
TweetTagUpsertOne is the builder for "upsert"-ing
one TweetTag node.
func (*TweetTagUpsertOne) DoNothing ¶
func (u *TweetTagUpsertOne) DoNothing() *TweetTagUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TweetTagUpsertOne) Exec ¶
func (u *TweetTagUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetTagUpsertOne) ExecX ¶
func (u *TweetTagUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetTagUpsertOne) IDX ¶
func (u *TweetTagUpsertOne) IDX(ctx context.Context) uuid.UUID
IDX is like ID, but panics if an error occurs.
func (*TweetTagUpsertOne) Ignore ¶
func (u *TweetTagUpsertOne) Ignore() *TweetTagUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.TweetTag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TweetTagUpsertOne) SetAddedAt ¶
func (u *TweetTagUpsertOne) SetAddedAt(v time.Time) *TweetTagUpsertOne
SetAddedAt sets the "added_at" field.
func (*TweetTagUpsertOne) SetTagID ¶
func (u *TweetTagUpsertOne) SetTagID(v int) *TweetTagUpsertOne
SetTagID sets the "tag_id" field.
func (*TweetTagUpsertOne) SetTweetID ¶
func (u *TweetTagUpsertOne) SetTweetID(v int) *TweetTagUpsertOne
SetTweetID sets the "tweet_id" field.
func (*TweetTagUpsertOne) Update ¶
func (u *TweetTagUpsertOne) Update(set func(*TweetTagUpsert)) *TweetTagUpsertOne
Update allows overriding fields `UPDATE` values. See the TweetTagCreate.OnConflict documentation for more info.
func (*TweetTagUpsertOne) UpdateAddedAt ¶
func (u *TweetTagUpsertOne) UpdateAddedAt() *TweetTagUpsertOne
UpdateAddedAt sets the "added_at" field to the value that was provided on create.
func (*TweetTagUpsertOne) UpdateNewValues ¶
func (u *TweetTagUpsertOne) UpdateNewValues() *TweetTagUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create except the ID field. Using this option is equivalent to using:
client.TweetTag.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(tweettag.FieldID) }), ). Exec(ctx)
func (*TweetTagUpsertOne) UpdateTagID ¶
func (u *TweetTagUpsertOne) UpdateTagID() *TweetTagUpsertOne
UpdateTagID sets the "tag_id" field to the value that was provided on create.
func (*TweetTagUpsertOne) UpdateTweetID ¶
func (u *TweetTagUpsertOne) UpdateTweetID() *TweetTagUpsertOne
UpdateTweetID sets the "tweet_id" field to the value that was provided on create.
type TweetUpdate ¶
type TweetUpdate struct {
// contains filtered or unexported fields
}
TweetUpdate is the builder for updating Tweet entities.
func (*TweetUpdate) AddLikedUserIDs ¶
func (tu *TweetUpdate) AddLikedUserIDs(ids ...int) *TweetUpdate
AddLikedUserIDs adds the "liked_users" edge to the User entity by IDs.
func (*TweetUpdate) AddLikedUsers ¶
func (tu *TweetUpdate) AddLikedUsers(u ...*User) *TweetUpdate
AddLikedUsers adds the "liked_users" edges to the User entity.
func (*TweetUpdate) AddTagIDs ¶
func (tu *TweetUpdate) AddTagIDs(ids ...int) *TweetUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*TweetUpdate) AddTags ¶
func (tu *TweetUpdate) AddTags(t ...*Tag) *TweetUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*TweetUpdate) AddTweetTagIDs ¶
func (tu *TweetUpdate) AddTweetTagIDs(ids ...uuid.UUID) *TweetUpdate
AddTweetTagIDs adds the "tweet_tags" edge to the TweetTag entity by IDs.
func (*TweetUpdate) AddTweetTags ¶
func (tu *TweetUpdate) AddTweetTags(t ...*TweetTag) *TweetUpdate
AddTweetTags adds the "tweet_tags" edges to the TweetTag entity.
func (*TweetUpdate) AddTweetUser ¶
func (tu *TweetUpdate) AddTweetUser(u ...*UserTweet) *TweetUpdate
AddTweetUser adds the "tweet_user" edges to the UserTweet entity.
func (*TweetUpdate) AddTweetUserIDs ¶
func (tu *TweetUpdate) AddTweetUserIDs(ids ...int) *TweetUpdate
AddTweetUserIDs adds the "tweet_user" edge to the UserTweet entity by IDs.
func (*TweetUpdate) AddUser ¶
func (tu *TweetUpdate) AddUser(u ...*User) *TweetUpdate
AddUser adds the "user" edges to the User entity.
func (*TweetUpdate) AddUserIDs ¶
func (tu *TweetUpdate) AddUserIDs(ids ...int) *TweetUpdate
AddUserIDs adds the "user" edge to the User entity by IDs.
func (*TweetUpdate) ClearLikedUsers ¶
func (tu *TweetUpdate) ClearLikedUsers() *TweetUpdate
ClearLikedUsers clears all "liked_users" edges to the User entity.
func (*TweetUpdate) ClearTags ¶
func (tu *TweetUpdate) ClearTags() *TweetUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*TweetUpdate) ClearTweetTags ¶
func (tu *TweetUpdate) ClearTweetTags() *TweetUpdate
ClearTweetTags clears all "tweet_tags" edges to the TweetTag entity.
func (*TweetUpdate) ClearTweetUser ¶
func (tu *TweetUpdate) ClearTweetUser() *TweetUpdate
ClearTweetUser clears all "tweet_user" edges to the UserTweet entity.
func (*TweetUpdate) ClearUser ¶
func (tu *TweetUpdate) ClearUser() *TweetUpdate
ClearUser clears all "user" edges to the User entity.
func (*TweetUpdate) Exec ¶
func (tu *TweetUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetUpdate) ExecX ¶
func (tu *TweetUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetUpdate) Mutation ¶
func (tu *TweetUpdate) Mutation() *TweetMutation
Mutation returns the TweetMutation object of the builder.
func (*TweetUpdate) RemoveLikedUserIDs ¶
func (tu *TweetUpdate) RemoveLikedUserIDs(ids ...int) *TweetUpdate
RemoveLikedUserIDs removes the "liked_users" edge to User entities by IDs.
func (*TweetUpdate) RemoveLikedUsers ¶
func (tu *TweetUpdate) RemoveLikedUsers(u ...*User) *TweetUpdate
RemoveLikedUsers removes "liked_users" edges to User entities.
func (*TweetUpdate) RemoveTagIDs ¶
func (tu *TweetUpdate) RemoveTagIDs(ids ...int) *TweetUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*TweetUpdate) RemoveTags ¶
func (tu *TweetUpdate) RemoveTags(t ...*Tag) *TweetUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*TweetUpdate) RemoveTweetTagIDs ¶
func (tu *TweetUpdate) RemoveTweetTagIDs(ids ...uuid.UUID) *TweetUpdate
RemoveTweetTagIDs removes the "tweet_tags" edge to TweetTag entities by IDs.
func (*TweetUpdate) RemoveTweetTags ¶
func (tu *TweetUpdate) RemoveTweetTags(t ...*TweetTag) *TweetUpdate
RemoveTweetTags removes "tweet_tags" edges to TweetTag entities.
func (*TweetUpdate) RemoveTweetUser ¶
func (tu *TweetUpdate) RemoveTweetUser(u ...*UserTweet) *TweetUpdate
RemoveTweetUser removes "tweet_user" edges to UserTweet entities.
func (*TweetUpdate) RemoveTweetUserIDs ¶
func (tu *TweetUpdate) RemoveTweetUserIDs(ids ...int) *TweetUpdate
RemoveTweetUserIDs removes the "tweet_user" edge to UserTweet entities by IDs.
func (*TweetUpdate) RemoveUser ¶
func (tu *TweetUpdate) RemoveUser(u ...*User) *TweetUpdate
RemoveUser removes "user" edges to User entities.
func (*TweetUpdate) RemoveUserIDs ¶
func (tu *TweetUpdate) RemoveUserIDs(ids ...int) *TweetUpdate
RemoveUserIDs removes the "user" edge to User entities by IDs.
func (*TweetUpdate) Save ¶
func (tu *TweetUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TweetUpdate) SaveX ¶
func (tu *TweetUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TweetUpdate) SetText ¶
func (tu *TweetUpdate) SetText(s string) *TweetUpdate
SetText sets the "text" field.
func (*TweetUpdate) Where ¶
func (tu *TweetUpdate) Where(ps ...predicate.Tweet) *TweetUpdate
Where appends a list predicates to the TweetUpdate builder.
type TweetUpdateOne ¶
type TweetUpdateOne struct {
// contains filtered or unexported fields
}
TweetUpdateOne is the builder for updating a single Tweet entity.
func (*TweetUpdateOne) AddLikedUserIDs ¶
func (tuo *TweetUpdateOne) AddLikedUserIDs(ids ...int) *TweetUpdateOne
AddLikedUserIDs adds the "liked_users" edge to the User entity by IDs.
func (*TweetUpdateOne) AddLikedUsers ¶
func (tuo *TweetUpdateOne) AddLikedUsers(u ...*User) *TweetUpdateOne
AddLikedUsers adds the "liked_users" edges to the User entity.
func (*TweetUpdateOne) AddTagIDs ¶
func (tuo *TweetUpdateOne) AddTagIDs(ids ...int) *TweetUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*TweetUpdateOne) AddTags ¶
func (tuo *TweetUpdateOne) AddTags(t ...*Tag) *TweetUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*TweetUpdateOne) AddTweetTagIDs ¶
func (tuo *TweetUpdateOne) AddTweetTagIDs(ids ...uuid.UUID) *TweetUpdateOne
AddTweetTagIDs adds the "tweet_tags" edge to the TweetTag entity by IDs.
func (*TweetUpdateOne) AddTweetTags ¶
func (tuo *TweetUpdateOne) AddTweetTags(t ...*TweetTag) *TweetUpdateOne
AddTweetTags adds the "tweet_tags" edges to the TweetTag entity.
func (*TweetUpdateOne) AddTweetUser ¶
func (tuo *TweetUpdateOne) AddTweetUser(u ...*UserTweet) *TweetUpdateOne
AddTweetUser adds the "tweet_user" edges to the UserTweet entity.
func (*TweetUpdateOne) AddTweetUserIDs ¶
func (tuo *TweetUpdateOne) AddTweetUserIDs(ids ...int) *TweetUpdateOne
AddTweetUserIDs adds the "tweet_user" edge to the UserTweet entity by IDs.
func (*TweetUpdateOne) AddUser ¶
func (tuo *TweetUpdateOne) AddUser(u ...*User) *TweetUpdateOne
AddUser adds the "user" edges to the User entity.
func (*TweetUpdateOne) AddUserIDs ¶
func (tuo *TweetUpdateOne) AddUserIDs(ids ...int) *TweetUpdateOne
AddUserIDs adds the "user" edge to the User entity by IDs.
func (*TweetUpdateOne) ClearLikedUsers ¶
func (tuo *TweetUpdateOne) ClearLikedUsers() *TweetUpdateOne
ClearLikedUsers clears all "liked_users" edges to the User entity.
func (*TweetUpdateOne) ClearTags ¶
func (tuo *TweetUpdateOne) ClearTags() *TweetUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*TweetUpdateOne) ClearTweetTags ¶
func (tuo *TweetUpdateOne) ClearTweetTags() *TweetUpdateOne
ClearTweetTags clears all "tweet_tags" edges to the TweetTag entity.
func (*TweetUpdateOne) ClearTweetUser ¶
func (tuo *TweetUpdateOne) ClearTweetUser() *TweetUpdateOne
ClearTweetUser clears all "tweet_user" edges to the UserTweet entity.
func (*TweetUpdateOne) ClearUser ¶
func (tuo *TweetUpdateOne) ClearUser() *TweetUpdateOne
ClearUser clears all "user" edges to the User entity.
func (*TweetUpdateOne) Exec ¶
func (tuo *TweetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TweetUpdateOne) ExecX ¶
func (tuo *TweetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetUpdateOne) Mutation ¶
func (tuo *TweetUpdateOne) Mutation() *TweetMutation
Mutation returns the TweetMutation object of the builder.
func (*TweetUpdateOne) RemoveLikedUserIDs ¶
func (tuo *TweetUpdateOne) RemoveLikedUserIDs(ids ...int) *TweetUpdateOne
RemoveLikedUserIDs removes the "liked_users" edge to User entities by IDs.
func (*TweetUpdateOne) RemoveLikedUsers ¶
func (tuo *TweetUpdateOne) RemoveLikedUsers(u ...*User) *TweetUpdateOne
RemoveLikedUsers removes "liked_users" edges to User entities.
func (*TweetUpdateOne) RemoveTagIDs ¶
func (tuo *TweetUpdateOne) RemoveTagIDs(ids ...int) *TweetUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*TweetUpdateOne) RemoveTags ¶
func (tuo *TweetUpdateOne) RemoveTags(t ...*Tag) *TweetUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*TweetUpdateOne) RemoveTweetTagIDs ¶
func (tuo *TweetUpdateOne) RemoveTweetTagIDs(ids ...uuid.UUID) *TweetUpdateOne
RemoveTweetTagIDs removes the "tweet_tags" edge to TweetTag entities by IDs.
func (*TweetUpdateOne) RemoveTweetTags ¶
func (tuo *TweetUpdateOne) RemoveTweetTags(t ...*TweetTag) *TweetUpdateOne
RemoveTweetTags removes "tweet_tags" edges to TweetTag entities.
func (*TweetUpdateOne) RemoveTweetUser ¶
func (tuo *TweetUpdateOne) RemoveTweetUser(u ...*UserTweet) *TweetUpdateOne
RemoveTweetUser removes "tweet_user" edges to UserTweet entities.
func (*TweetUpdateOne) RemoveTweetUserIDs ¶
func (tuo *TweetUpdateOne) RemoveTweetUserIDs(ids ...int) *TweetUpdateOne
RemoveTweetUserIDs removes the "tweet_user" edge to UserTweet entities by IDs.
func (*TweetUpdateOne) RemoveUser ¶
func (tuo *TweetUpdateOne) RemoveUser(u ...*User) *TweetUpdateOne
RemoveUser removes "user" edges to User entities.
func (*TweetUpdateOne) RemoveUserIDs ¶
func (tuo *TweetUpdateOne) RemoveUserIDs(ids ...int) *TweetUpdateOne
RemoveUserIDs removes the "user" edge to User entities by IDs.
func (*TweetUpdateOne) Save ¶
func (tuo *TweetUpdateOne) Save(ctx context.Context) (*Tweet, error)
Save executes the query and returns the updated Tweet entity.
func (*TweetUpdateOne) SaveX ¶
func (tuo *TweetUpdateOne) SaveX(ctx context.Context) *Tweet
SaveX is like Save, but panics if an error occurs.
func (*TweetUpdateOne) Select ¶
func (tuo *TweetUpdateOne) Select(field string, fields ...string) *TweetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TweetUpdateOne) SetText ¶
func (tuo *TweetUpdateOne) SetText(s string) *TweetUpdateOne
SetText sets the "text" field.
func (*TweetUpdateOne) Where ¶ added in v0.11.8
func (tuo *TweetUpdateOne) Where(ps ...predicate.Tweet) *TweetUpdateOne
Where appends a list predicates to the TweetUpdate builder.
type TweetUpsert ¶
TweetUpsert is the "OnConflict" setter.
func (*TweetUpsert) SetText ¶
func (u *TweetUpsert) SetText(v string) *TweetUpsert
SetText sets the "text" field.
func (*TweetUpsert) UpdateText ¶
func (u *TweetUpsert) UpdateText() *TweetUpsert
UpdateText sets the "text" field to the value that was provided on create.
type TweetUpsertBulk ¶
type TweetUpsertBulk struct {
// contains filtered or unexported fields
}
TweetUpsertBulk is the builder for "upsert"-ing a bulk of Tweet nodes.
func (*TweetUpsertBulk) DoNothing ¶
func (u *TweetUpsertBulk) DoNothing() *TweetUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TweetUpsertBulk) Exec ¶
func (u *TweetUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetUpsertBulk) ExecX ¶
func (u *TweetUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetUpsertBulk) Ignore ¶
func (u *TweetUpsertBulk) Ignore() *TweetUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tweet.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TweetUpsertBulk) SetText ¶
func (u *TweetUpsertBulk) SetText(v string) *TweetUpsertBulk
SetText sets the "text" field.
func (*TweetUpsertBulk) Update ¶
func (u *TweetUpsertBulk) Update(set func(*TweetUpsert)) *TweetUpsertBulk
Update allows overriding fields `UPDATE` values. See the TweetCreateBulk.OnConflict documentation for more info.
func (*TweetUpsertBulk) UpdateNewValues ¶
func (u *TweetUpsertBulk) UpdateNewValues() *TweetUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tweet.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TweetUpsertBulk) UpdateText ¶
func (u *TweetUpsertBulk) UpdateText() *TweetUpsertBulk
UpdateText sets the "text" field to the value that was provided on create.
type TweetUpsertOne ¶
type TweetUpsertOne struct {
// contains filtered or unexported fields
}
TweetUpsertOne is the builder for "upsert"-ing
one Tweet node.
func (*TweetUpsertOne) DoNothing ¶
func (u *TweetUpsertOne) DoNothing() *TweetUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TweetUpsertOne) Exec ¶
func (u *TweetUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TweetUpsertOne) ExecX ¶
func (u *TweetUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TweetUpsertOne) ID ¶
func (u *TweetUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TweetUpsertOne) IDX ¶
func (u *TweetUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*TweetUpsertOne) Ignore ¶
func (u *TweetUpsertOne) Ignore() *TweetUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tweet.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TweetUpsertOne) SetText ¶
func (u *TweetUpsertOne) SetText(v string) *TweetUpsertOne
SetText sets the "text" field.
func (*TweetUpsertOne) Update ¶
func (u *TweetUpsertOne) Update(set func(*TweetUpsert)) *TweetUpsertOne
Update allows overriding fields `UPDATE` values. See the TweetCreate.OnConflict documentation for more info.
func (*TweetUpsertOne) UpdateNewValues ¶
func (u *TweetUpsertOne) UpdateNewValues() *TweetUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tweet.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TweetUpsertOne) UpdateText ¶
func (u *TweetUpsertOne) UpdateText() *TweetUpsertOne
UpdateText sets the "text" field to the value that was provided on create.
type Tx ¶
type Tx struct { // AttachedFile is the client for interacting with the AttachedFile builders. AttachedFile *AttachedFileClient // File is the client for interacting with the File builders. File *FileClient // Friendship is the client for interacting with the Friendship builders. Friendship *FriendshipClient // Group is the client for interacting with the Group builders. Group *GroupClient // GroupTag is the client for interacting with the GroupTag builders. GroupTag *GroupTagClient // Process is the client for interacting with the Process builders. Process *ProcessClient // Relationship is the client for interacting with the Relationship builders. Relationship *RelationshipClient // RelationshipInfo is the client for interacting with the RelationshipInfo builders. RelationshipInfo *RelationshipInfoClient // Role is the client for interacting with the Role builders. Role *RoleClient // RoleUser is the client for interacting with the RoleUser builders. RoleUser *RoleUserClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // Tweet is the client for interacting with the Tweet builders. Tweet *TweetClient // TweetLike is the client for interacting with the TweetLike builders. TweetLike *TweetLikeClient // TweetTag is the client for interacting with the TweetTag builders. TweetTag *TweetTagClient // User is the client for interacting with the User builders. User *UserClient // UserGroup is the client for interacting with the UserGroup builders. UserGroup *UserGroupClient // UserTweet is the client for interacting with the UserTweet builders. UserTweet *UserTweetClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) QueryFriends ¶
QueryFriends queries the "friends" edge of the User entity.
func (*User) QueryFriendships ¶
func (u *User) QueryFriendships() *FriendshipQuery
QueryFriendships queries the "friendships" edge of the User entity.
func (*User) QueryGroups ¶
func (u *User) QueryGroups() *GroupQuery
QueryGroups queries the "groups" edge of the User entity.
func (*User) QueryJoinedGroups ¶
func (u *User) QueryJoinedGroups() *UserGroupQuery
QueryJoinedGroups queries the "joined_groups" edge of the User entity.
func (*User) QueryLikedTweets ¶
func (u *User) QueryLikedTweets() *TweetQuery
QueryLikedTweets queries the "liked_tweets" edge of the User entity.
func (*User) QueryLikes ¶
func (u *User) QueryLikes() *TweetLikeQuery
QueryLikes queries the "likes" edge of the User entity.
func (*User) QueryRelationship ¶
func (u *User) QueryRelationship() *RelationshipQuery
QueryRelationship queries the "relationship" edge of the User entity.
func (*User) QueryRelatives ¶
QueryRelatives queries the "relatives" edge of the User entity.
func (*User) QueryRoles ¶ added in v0.11.1
QueryRoles queries the "roles" edge of the User entity.
func (*User) QueryRolesUsers ¶ added in v0.11.1
func (u *User) QueryRolesUsers() *RoleUserQuery
QueryRolesUsers queries the "roles_users" edge of the User entity.
func (*User) QueryTweets ¶
func (u *User) QueryTweets() *TweetQuery
QueryTweets queries the "tweets" edge of the User entity.
func (*User) QueryUserTweets ¶
func (u *User) QueryUserTweets() *UserTweetQuery
QueryUserTweets queries the "user_tweets" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶ added in v0.11.5
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶ added in v0.11.5
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryFriends ¶
func (c *UserClient) QueryFriends(u *User) *UserQuery
QueryFriends queries the friends edge of a User.
func (*UserClient) QueryFriendships ¶
func (c *UserClient) QueryFriendships(u *User) *FriendshipQuery
QueryFriendships queries the friendships edge of a User.
func (*UserClient) QueryGroups ¶
func (c *UserClient) QueryGroups(u *User) *GroupQuery
QueryGroups queries the groups edge of a User.
func (*UserClient) QueryJoinedGroups ¶
func (c *UserClient) QueryJoinedGroups(u *User) *UserGroupQuery
QueryJoinedGroups queries the joined_groups edge of a User.
func (*UserClient) QueryLikedTweets ¶
func (c *UserClient) QueryLikedTweets(u *User) *TweetQuery
QueryLikedTweets queries the liked_tweets edge of a User.
func (*UserClient) QueryLikes ¶
func (c *UserClient) QueryLikes(u *User) *TweetLikeQuery
QueryLikes queries the likes edge of a User.
func (*UserClient) QueryRelationship ¶
func (c *UserClient) QueryRelationship(u *User) *RelationshipQuery
QueryRelationship queries the relationship edge of a User.
func (*UserClient) QueryRelatives ¶
func (c *UserClient) QueryRelatives(u *User) *UserQuery
QueryRelatives queries the relatives edge of a User.
func (*UserClient) QueryRoles ¶ added in v0.11.1
func (c *UserClient) QueryRoles(u *User) *RoleQuery
QueryRoles queries the roles edge of a User.
func (*UserClient) QueryRolesUsers ¶ added in v0.11.1
func (c *UserClient) QueryRolesUsers(u *User) *RoleUserQuery
QueryRolesUsers queries the roles_users edge of a User.
func (*UserClient) QueryTweets ¶
func (c *UserClient) QueryTweets(u *User) *TweetQuery
QueryTweets queries the tweets edge of a User.
func (*UserClient) QueryUserTweets ¶
func (c *UserClient) QueryUserTweets(u *User) *UserTweetQuery
QueryUserTweets queries the user_tweets edge of a User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddFriendIDs ¶
func (uc *UserCreate) AddFriendIDs(ids ...int) *UserCreate
AddFriendIDs adds the "friends" edge to the User entity by IDs.
func (*UserCreate) AddFriends ¶
func (uc *UserCreate) AddFriends(u ...*User) *UserCreate
AddFriends adds the "friends" edges to the User entity.
func (*UserCreate) AddFriendshipIDs ¶
func (uc *UserCreate) AddFriendshipIDs(ids ...int) *UserCreate
AddFriendshipIDs adds the "friendships" edge to the Friendship entity by IDs.
func (*UserCreate) AddFriendships ¶
func (uc *UserCreate) AddFriendships(f ...*Friendship) *UserCreate
AddFriendships adds the "friendships" edges to the Friendship entity.
func (*UserCreate) AddGroupIDs ¶
func (uc *UserCreate) AddGroupIDs(ids ...int) *UserCreate
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*UserCreate) AddGroups ¶
func (uc *UserCreate) AddGroups(g ...*Group) *UserCreate
AddGroups adds the "groups" edges to the Group entity.
func (*UserCreate) AddJoinedGroupIDs ¶
func (uc *UserCreate) AddJoinedGroupIDs(ids ...int) *UserCreate
AddJoinedGroupIDs adds the "joined_groups" edge to the UserGroup entity by IDs.
func (*UserCreate) AddJoinedGroups ¶
func (uc *UserCreate) AddJoinedGroups(u ...*UserGroup) *UserCreate
AddJoinedGroups adds the "joined_groups" edges to the UserGroup entity.
func (*UserCreate) AddLikedTweetIDs ¶
func (uc *UserCreate) AddLikedTweetIDs(ids ...int) *UserCreate
AddLikedTweetIDs adds the "liked_tweets" edge to the Tweet entity by IDs.
func (*UserCreate) AddLikedTweets ¶
func (uc *UserCreate) AddLikedTweets(t ...*Tweet) *UserCreate
AddLikedTweets adds the "liked_tweets" edges to the Tweet entity.
func (*UserCreate) AddRelativeIDs ¶
func (uc *UserCreate) AddRelativeIDs(ids ...int) *UserCreate
AddRelativeIDs adds the "relatives" edge to the User entity by IDs.
func (*UserCreate) AddRelatives ¶
func (uc *UserCreate) AddRelatives(u ...*User) *UserCreate
AddRelatives adds the "relatives" edges to the User entity.
func (*UserCreate) AddRoleIDs ¶ added in v0.11.1
func (uc *UserCreate) AddRoleIDs(ids ...int) *UserCreate
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*UserCreate) AddRoles ¶ added in v0.11.1
func (uc *UserCreate) AddRoles(r ...*Role) *UserCreate
AddRoles adds the "roles" edges to the Role entity.
func (*UserCreate) AddTweetIDs ¶
func (uc *UserCreate) AddTweetIDs(ids ...int) *UserCreate
AddTweetIDs adds the "tweets" edge to the Tweet entity by IDs.
func (*UserCreate) AddTweets ¶
func (uc *UserCreate) AddTweets(t ...*Tweet) *UserCreate
AddTweets adds the "tweets" edges to the Tweet entity.
func (*UserCreate) AddUserTweetIDs ¶
func (uc *UserCreate) AddUserTweetIDs(ids ...int) *UserCreate
AddUserTweetIDs adds the "user_tweets" edge to the UserTweet entity by IDs.
func (*UserCreate) AddUserTweets ¶
func (uc *UserCreate) AddUserTweets(u ...*UserTweet) *UserCreate
AddUserTweets adds the "user_tweets" edges to the UserTweet entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetName(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableName ¶
func (uc *UserCreate) SetNillableName(s *string) *UserCreate
SetNillableName sets the "name" field if the given value is not nil.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetName(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶ added in v0.11.7
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Groups holds the value of the groups edge. Groups []*Group `json:"groups,omitempty"` // Friends holds the value of the friends edge. Friends []*User `json:"friends,omitempty"` // Relatives holds the value of the relatives edge. Relatives []*User `json:"relatives,omitempty"` // LikedTweets holds the value of the liked_tweets edge. LikedTweets []*Tweet `json:"liked_tweets,omitempty"` // Tweets holds the value of the tweets edge. Tweets []*Tweet `json:"tweets,omitempty"` // Roles holds the value of the roles edge. Roles []*Role `json:"roles,omitempty"` // JoinedGroups holds the value of the joined_groups edge. JoinedGroups []*UserGroup `json:"joined_groups,omitempty"` // Friendships holds the value of the friendships edge. Friendships []*Friendship `json:"friendships,omitempty"` // Relationship holds the value of the relationship edge. Relationship []*Relationship `json:"relationship,omitempty"` // Likes holds the value of the likes edge. Likes []*TweetLike `json:"likes,omitempty"` // UserTweets holds the value of the user_tweets edge. UserTweets []*UserTweet `json:"user_tweets,omitempty"` // RolesUsers holds the value of the roles_users edge. RolesUsers []*RoleUser `json:"roles_users,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) FriendsOrErr ¶
FriendsOrErr returns the Friends value or an error if the edge was not loaded in eager-loading.
func (UserEdges) FriendshipsOrErr ¶
func (e UserEdges) FriendshipsOrErr() ([]*Friendship, error)
FriendshipsOrErr returns the Friendships value or an error if the edge was not loaded in eager-loading.
func (UserEdges) GroupsOrErr ¶
GroupsOrErr returns the Groups value or an error if the edge was not loaded in eager-loading.
func (UserEdges) JoinedGroupsOrErr ¶
JoinedGroupsOrErr returns the JoinedGroups value or an error if the edge was not loaded in eager-loading.
func (UserEdges) LikedTweetsOrErr ¶
LikedTweetsOrErr returns the LikedTweets value or an error if the edge was not loaded in eager-loading.
func (UserEdges) LikesOrErr ¶
LikesOrErr returns the Likes value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RelationshipOrErr ¶
func (e UserEdges) RelationshipOrErr() ([]*Relationship, error)
RelationshipOrErr returns the Relationship value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RelativesOrErr ¶
RelativesOrErr returns the Relatives value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RolesOrErr ¶ added in v0.11.1
RolesOrErr returns the Roles value or an error if the edge was not loaded in eager-loading.
func (UserEdges) RolesUsersOrErr ¶ added in v0.11.1
RolesUsersOrErr returns the RolesUsers value or an error if the edge was not loaded in eager-loading.
func (UserEdges) TweetsOrErr ¶
TweetsOrErr returns the Tweets value or an error if the edge was not loaded in eager-loading.
func (UserEdges) UserTweetsOrErr ¶
UserTweetsOrErr returns the UserTweets value or an error if the edge was not loaded in eager-loading.
type UserFilter ¶ added in v0.11.2
type UserFilter struct {
// contains filtered or unexported fields
}
UserFilter provides a generic filtering capability at runtime for UserQuery.
func (*UserFilter) Where ¶ added in v0.11.2
func (f *UserFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*UserFilter) WhereHasFriends ¶ added in v0.11.2
func (f *UserFilter) WhereHasFriends()
WhereHasFriends applies a predicate to check if query has an edge friends.
func (*UserFilter) WhereHasFriendsWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasFriendsWith(preds ...predicate.User)
WhereHasFriendsWith applies a predicate to check if query has an edge friends with a given conditions (other predicates).
func (*UserFilter) WhereHasFriendships ¶ added in v0.11.2
func (f *UserFilter) WhereHasFriendships()
WhereHasFriendships applies a predicate to check if query has an edge friendships.
func (*UserFilter) WhereHasFriendshipsWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasFriendshipsWith(preds ...predicate.Friendship)
WhereHasFriendshipsWith applies a predicate to check if query has an edge friendships with a given conditions (other predicates).
func (*UserFilter) WhereHasGroups ¶ added in v0.11.2
func (f *UserFilter) WhereHasGroups()
WhereHasGroups applies a predicate to check if query has an edge groups.
func (*UserFilter) WhereHasGroupsWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasGroupsWith(preds ...predicate.Group)
WhereHasGroupsWith applies a predicate to check if query has an edge groups with a given conditions (other predicates).
func (*UserFilter) WhereHasJoinedGroups ¶ added in v0.11.2
func (f *UserFilter) WhereHasJoinedGroups()
WhereHasJoinedGroups applies a predicate to check if query has an edge joined_groups.
func (*UserFilter) WhereHasJoinedGroupsWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasJoinedGroupsWith(preds ...predicate.UserGroup)
WhereHasJoinedGroupsWith applies a predicate to check if query has an edge joined_groups with a given conditions (other predicates).
func (*UserFilter) WhereHasLikedTweets ¶ added in v0.11.2
func (f *UserFilter) WhereHasLikedTweets()
WhereHasLikedTweets applies a predicate to check if query has an edge liked_tweets.
func (*UserFilter) WhereHasLikedTweetsWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasLikedTweetsWith(preds ...predicate.Tweet)
WhereHasLikedTweetsWith applies a predicate to check if query has an edge liked_tweets with a given conditions (other predicates).
func (*UserFilter) WhereHasLikes ¶ added in v0.11.2
func (f *UserFilter) WhereHasLikes()
WhereHasLikes applies a predicate to check if query has an edge likes.
func (*UserFilter) WhereHasLikesWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasLikesWith(preds ...predicate.TweetLike)
WhereHasLikesWith applies a predicate to check if query has an edge likes with a given conditions (other predicates).
func (*UserFilter) WhereHasRelationship ¶ added in v0.11.2
func (f *UserFilter) WhereHasRelationship()
WhereHasRelationship applies a predicate to check if query has an edge relationship.
func (*UserFilter) WhereHasRelationshipWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasRelationshipWith(preds ...predicate.Relationship)
WhereHasRelationshipWith applies a predicate to check if query has an edge relationship with a given conditions (other predicates).
func (*UserFilter) WhereHasRelatives ¶ added in v0.11.2
func (f *UserFilter) WhereHasRelatives()
WhereHasRelatives applies a predicate to check if query has an edge relatives.
func (*UserFilter) WhereHasRelativesWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasRelativesWith(preds ...predicate.User)
WhereHasRelativesWith applies a predicate to check if query has an edge relatives with a given conditions (other predicates).
func (*UserFilter) WhereHasRoles ¶ added in v0.11.2
func (f *UserFilter) WhereHasRoles()
WhereHasRoles applies a predicate to check if query has an edge roles.
func (*UserFilter) WhereHasRolesUsers ¶ added in v0.11.2
func (f *UserFilter) WhereHasRolesUsers()
WhereHasRolesUsers applies a predicate to check if query has an edge roles_users.
func (*UserFilter) WhereHasRolesUsersWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasRolesUsersWith(preds ...predicate.RoleUser)
WhereHasRolesUsersWith applies a predicate to check if query has an edge roles_users with a given conditions (other predicates).
func (*UserFilter) WhereHasRolesWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasRolesWith(preds ...predicate.Role)
WhereHasRolesWith applies a predicate to check if query has an edge roles with a given conditions (other predicates).
func (*UserFilter) WhereHasTweets ¶ added in v0.11.2
func (f *UserFilter) WhereHasTweets()
WhereHasTweets applies a predicate to check if query has an edge tweets.
func (*UserFilter) WhereHasTweetsWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasTweetsWith(preds ...predicate.Tweet)
WhereHasTweetsWith applies a predicate to check if query has an edge tweets with a given conditions (other predicates).
func (*UserFilter) WhereHasUserTweets ¶ added in v0.11.2
func (f *UserFilter) WhereHasUserTweets()
WhereHasUserTweets applies a predicate to check if query has an edge user_tweets.
func (*UserFilter) WhereHasUserTweetsWith ¶ added in v0.11.2
func (f *UserFilter) WhereHasUserTweetsWith(preds ...predicate.UserTweet)
WhereHasUserTweetsWith applies a predicate to check if query has an edge user_tweets with a given conditions (other predicates).
func (*UserFilter) WhereID ¶ added in v0.11.2
func (f *UserFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*UserFilter) WhereName ¶ added in v0.11.2
func (f *UserFilter) WhereName(p entql.StringP)
WhereName applies the entql string predicate on the name field.
type UserGroup ¶
type UserGroup struct { // ID of the ent. ID int `json:"id,omitempty"` // JoinedAt holds the value of the "joined_at" field. JoinedAt time.Time `json:"joined_at,omitempty"` // UserID holds the value of the "user_id" field. UserID int `json:"user_id,omitempty"` // GroupID holds the value of the "group_id" field. GroupID int `json:"group_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserGroupQuery when eager-loading is set. Edges UserGroupEdges `json:"edges"` // contains filtered or unexported fields }
UserGroup is the model entity for the UserGroup schema.
func (*UserGroup) QueryGroup ¶
func (ug *UserGroup) QueryGroup() *GroupQuery
QueryGroup queries the "group" edge of the UserGroup entity.
func (*UserGroup) Unwrap ¶
Unwrap unwraps the UserGroup 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 (*UserGroup) Update ¶
func (ug *UserGroup) Update() *UserGroupUpdateOne
Update returns a builder for updating this UserGroup. Note that you need to call UserGroup.Unwrap() before calling this method if this UserGroup was returned from a transaction, and the transaction was committed or rolled back.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserGroupClient ¶
type UserGroupClient struct {
// contains filtered or unexported fields
}
UserGroupClient is a client for the UserGroup schema.
func NewUserGroupClient ¶
func NewUserGroupClient(c config) *UserGroupClient
NewUserGroupClient returns a client for the UserGroup from the given config.
func (*UserGroupClient) Create ¶
func (c *UserGroupClient) Create() *UserGroupCreate
Create returns a builder for creating a UserGroup entity.
func (*UserGroupClient) CreateBulk ¶
func (c *UserGroupClient) CreateBulk(builders ...*UserGroupCreate) *UserGroupCreateBulk
CreateBulk returns a builder for creating a bulk of UserGroup entities.
func (*UserGroupClient) Delete ¶
func (c *UserGroupClient) Delete() *UserGroupDelete
Delete returns a delete builder for UserGroup.
func (*UserGroupClient) DeleteOne ¶
func (c *UserGroupClient) DeleteOne(ug *UserGroup) *UserGroupDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserGroupClient) DeleteOneID ¶
func (c *UserGroupClient) DeleteOneID(id int) *UserGroupDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserGroupClient) GetX ¶
func (c *UserGroupClient) GetX(ctx context.Context, id int) *UserGroup
GetX is like Get, but panics if an error occurs.
func (*UserGroupClient) Hooks ¶
func (c *UserGroupClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserGroupClient) Intercept ¶ added in v0.11.5
func (c *UserGroupClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usergroup.Intercept(f(g(h())))`.
func (*UserGroupClient) Interceptors ¶ added in v0.11.5
func (c *UserGroupClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserGroupClient) Query ¶
func (c *UserGroupClient) Query() *UserGroupQuery
Query returns a query builder for UserGroup.
func (*UserGroupClient) QueryGroup ¶
func (c *UserGroupClient) QueryGroup(ug *UserGroup) *GroupQuery
QueryGroup queries the group edge of a UserGroup.
func (*UserGroupClient) QueryUser ¶
func (c *UserGroupClient) QueryUser(ug *UserGroup) *UserQuery
QueryUser queries the user edge of a UserGroup.
func (*UserGroupClient) Update ¶
func (c *UserGroupClient) Update() *UserGroupUpdate
Update returns an update builder for UserGroup.
func (*UserGroupClient) UpdateOne ¶
func (c *UserGroupClient) UpdateOne(ug *UserGroup) *UserGroupUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserGroupClient) UpdateOneID ¶
func (c *UserGroupClient) UpdateOneID(id int) *UserGroupUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserGroupClient) Use ¶
func (c *UserGroupClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usergroup.Hooks(f(g(h())))`.
type UserGroupCreate ¶
type UserGroupCreate struct {
// contains filtered or unexported fields
}
UserGroupCreate is the builder for creating a UserGroup entity.
func (*UserGroupCreate) Exec ¶
func (ugc *UserGroupCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserGroupCreate) ExecX ¶
func (ugc *UserGroupCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupCreate) Mutation ¶
func (ugc *UserGroupCreate) Mutation() *UserGroupMutation
Mutation returns the UserGroupMutation object of the builder.
func (*UserGroupCreate) OnConflict ¶
func (ugc *UserGroupCreate) OnConflict(opts ...sql.ConflictOption) *UserGroupUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserGroup.Create(). SetJoinedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserGroupUpsert) { SetJoinedAt(v+v). }). Exec(ctx)
func (*UserGroupCreate) OnConflictColumns ¶
func (ugc *UserGroupCreate) OnConflictColumns(columns ...string) *UserGroupUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserGroup.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserGroupCreate) Save ¶
func (ugc *UserGroupCreate) Save(ctx context.Context) (*UserGroup, error)
Save creates the UserGroup in the database.
func (*UserGroupCreate) SaveX ¶
func (ugc *UserGroupCreate) SaveX(ctx context.Context) *UserGroup
SaveX calls Save and panics if Save returns an error.
func (*UserGroupCreate) SetGroup ¶
func (ugc *UserGroupCreate) SetGroup(g *Group) *UserGroupCreate
SetGroup sets the "group" edge to the Group entity.
func (*UserGroupCreate) SetGroupID ¶
func (ugc *UserGroupCreate) SetGroupID(i int) *UserGroupCreate
SetGroupID sets the "group_id" field.
func (*UserGroupCreate) SetJoinedAt ¶
func (ugc *UserGroupCreate) SetJoinedAt(t time.Time) *UserGroupCreate
SetJoinedAt sets the "joined_at" field.
func (*UserGroupCreate) SetNillableJoinedAt ¶
func (ugc *UserGroupCreate) SetNillableJoinedAt(t *time.Time) *UserGroupCreate
SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.
func (*UserGroupCreate) SetUser ¶
func (ugc *UserGroupCreate) SetUser(u *User) *UserGroupCreate
SetUser sets the "user" edge to the User entity.
func (*UserGroupCreate) SetUserID ¶
func (ugc *UserGroupCreate) SetUserID(i int) *UserGroupCreate
SetUserID sets the "user_id" field.
type UserGroupCreateBulk ¶
type UserGroupCreateBulk struct {
// contains filtered or unexported fields
}
UserGroupCreateBulk is the builder for creating many UserGroup entities in bulk.
func (*UserGroupCreateBulk) Exec ¶
func (ugcb *UserGroupCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserGroupCreateBulk) ExecX ¶
func (ugcb *UserGroupCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupCreateBulk) OnConflict ¶
func (ugcb *UserGroupCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserGroupUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserGroup.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserGroupUpsert) { SetJoinedAt(v+v). }). Exec(ctx)
func (*UserGroupCreateBulk) OnConflictColumns ¶
func (ugcb *UserGroupCreateBulk) OnConflictColumns(columns ...string) *UserGroupUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserGroup.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserGroupDelete ¶
type UserGroupDelete struct {
// contains filtered or unexported fields
}
UserGroupDelete is the builder for deleting a UserGroup entity.
func (*UserGroupDelete) Exec ¶
func (ugd *UserGroupDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserGroupDelete) ExecX ¶
func (ugd *UserGroupDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupDelete) Where ¶
func (ugd *UserGroupDelete) Where(ps ...predicate.UserGroup) *UserGroupDelete
Where appends a list predicates to the UserGroupDelete builder.
type UserGroupDeleteOne ¶
type UserGroupDeleteOne struct {
// contains filtered or unexported fields
}
UserGroupDeleteOne is the builder for deleting a single UserGroup entity.
func (*UserGroupDeleteOne) Exec ¶
func (ugdo *UserGroupDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserGroupDeleteOne) ExecX ¶
func (ugdo *UserGroupDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupDeleteOne) Where ¶ added in v0.11.7
func (ugdo *UserGroupDeleteOne) Where(ps ...predicate.UserGroup) *UserGroupDeleteOne
Where appends a list predicates to the UserGroupDelete builder.
type UserGroupEdges ¶
type UserGroupEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Group holds the value of the group edge. Group *Group `json:"group,omitempty"` // contains filtered or unexported fields }
UserGroupEdges holds the relations/edges for other nodes in the graph.
func (UserGroupEdges) GroupOrErr ¶
func (e UserGroupEdges) GroupOrErr() (*Group, error)
GroupOrErr returns the Group value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserGroupEdges) UserOrErr ¶
func (e UserGroupEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserGroupFilter ¶ added in v0.11.2
type UserGroupFilter struct {
// contains filtered or unexported fields
}
UserGroupFilter provides a generic filtering capability at runtime for UserGroupQuery.
func (*UserGroupFilter) Where ¶ added in v0.11.2
func (f *UserGroupFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*UserGroupFilter) WhereGroupID ¶ added in v0.11.2
func (f *UserGroupFilter) WhereGroupID(p entql.IntP)
WhereGroupID applies the entql int predicate on the group_id field.
func (*UserGroupFilter) WhereHasGroup ¶ added in v0.11.2
func (f *UserGroupFilter) WhereHasGroup()
WhereHasGroup applies a predicate to check if query has an edge group.
func (*UserGroupFilter) WhereHasGroupWith ¶ added in v0.11.2
func (f *UserGroupFilter) WhereHasGroupWith(preds ...predicate.Group)
WhereHasGroupWith applies a predicate to check if query has an edge group with a given conditions (other predicates).
func (*UserGroupFilter) WhereHasUser ¶ added in v0.11.2
func (f *UserGroupFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (*UserGroupFilter) WhereHasUserWith ¶ added in v0.11.2
func (f *UserGroupFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (*UserGroupFilter) WhereID ¶ added in v0.11.2
func (f *UserGroupFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*UserGroupFilter) WhereJoinedAt ¶ added in v0.11.2
func (f *UserGroupFilter) WhereJoinedAt(p entql.TimeP)
WhereJoinedAt applies the entql time.Time predicate on the joined_at field.
func (*UserGroupFilter) WhereUserID ¶ added in v0.11.2
func (f *UserGroupFilter) WhereUserID(p entql.IntP)
WhereUserID applies the entql int predicate on the user_id field.
type UserGroupGroupBy ¶
type UserGroupGroupBy struct {
// contains filtered or unexported fields
}
UserGroupGroupBy is the group-by builder for UserGroup entities.
func (*UserGroupGroupBy) Aggregate ¶
func (uggb *UserGroupGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupGroupBy) Scan ¶
func (uggb *UserGroupGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserGroupMutation ¶
type UserGroupMutation struct {
// contains filtered or unexported fields
}
UserGroupMutation represents an operation that mutates the UserGroup nodes in the graph.
func (*UserGroupMutation) AddField ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) AddedEdges ¶
func (m *UserGroupMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserGroupMutation) AddedField ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) AddedFields ¶
func (m *UserGroupMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserGroupMutation) AddedIDs ¶
func (m *UserGroupMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserGroupMutation) ClearEdge ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) ClearField ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) ClearGroup ¶
func (m *UserGroupMutation) ClearGroup()
ClearGroup clears the "group" edge to the Group entity.
func (*UserGroupMutation) ClearUser ¶
func (m *UserGroupMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserGroupMutation) ClearedEdges ¶
func (m *UserGroupMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserGroupMutation) ClearedFields ¶
func (m *UserGroupMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserGroupMutation) Client ¶
func (m UserGroupMutation) 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 (*UserGroupMutation) EdgeCleared ¶
func (m *UserGroupMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserGroupMutation) Field ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) FieldCleared ¶
func (m *UserGroupMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserGroupMutation) Fields ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) Filter ¶ added in v0.11.2
func (m *UserGroupMutation) Filter() *UserGroupFilter
Filter returns an entql.Where implementation to apply filters on the UserGroupMutation builder.
func (*UserGroupMutation) GroupCleared ¶
func (m *UserGroupMutation) GroupCleared() bool
GroupCleared reports if the "group" edge to the Group entity was cleared.
func (*UserGroupMutation) GroupID ¶
func (m *UserGroupMutation) GroupID() (r int, exists bool)
GroupID returns the value of the "group_id" field in the mutation.
func (*UserGroupMutation) GroupIDs ¶
func (m *UserGroupMutation) GroupIDs() (ids []int)
GroupIDs returns the "group" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GroupID instead. It exists only for internal usage by the builders.
func (*UserGroupMutation) ID ¶
func (m *UserGroupMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserGroupMutation) IDs ¶
func (m *UserGroupMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserGroupMutation) JoinedAt ¶
func (m *UserGroupMutation) JoinedAt() (r time.Time, exists bool)
JoinedAt returns the value of the "joined_at" field in the mutation.
func (*UserGroupMutation) 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 (*UserGroupMutation) OldGroupID ¶
func (m *UserGroupMutation) OldGroupID(ctx context.Context) (v int, err error)
OldGroupID returns the old "group_id" field's value of the UserGroup entity. If the UserGroup object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserGroupMutation) OldJoinedAt ¶
OldJoinedAt returns the old "joined_at" field's value of the UserGroup entity. If the UserGroup object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserGroupMutation) OldUserID ¶
func (m *UserGroupMutation) OldUserID(ctx context.Context) (v int, err error)
OldUserID returns the old "user_id" field's value of the UserGroup entity. If the UserGroup object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserGroupMutation) RemovedEdges ¶
func (m *UserGroupMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserGroupMutation) RemovedIDs ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) ResetEdge ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) ResetField ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) ResetGroup ¶
func (m *UserGroupMutation) ResetGroup()
ResetGroup resets all changes to the "group" edge.
func (*UserGroupMutation) ResetGroupID ¶
func (m *UserGroupMutation) ResetGroupID()
ResetGroupID resets all changes to the "group_id" field.
func (*UserGroupMutation) ResetJoinedAt ¶
func (m *UserGroupMutation) ResetJoinedAt()
ResetJoinedAt resets all changes to the "joined_at" field.
func (*UserGroupMutation) ResetUser ¶
func (m *UserGroupMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserGroupMutation) ResetUserID ¶
func (m *UserGroupMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserGroupMutation) SetField ¶
func (m *UserGroupMutation) 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 (*UserGroupMutation) SetGroupID ¶
func (m *UserGroupMutation) SetGroupID(i int)
SetGroupID sets the "group_id" field.
func (*UserGroupMutation) SetJoinedAt ¶
func (m *UserGroupMutation) SetJoinedAt(t time.Time)
SetJoinedAt sets the "joined_at" field.
func (*UserGroupMutation) SetOp ¶ added in v0.11.5
func (m *UserGroupMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserGroupMutation) SetUserID ¶
func (m *UserGroupMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (UserGroupMutation) Tx ¶
func (m UserGroupMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserGroupMutation) Type ¶
func (m *UserGroupMutation) Type() string
Type returns the node type of this mutation (UserGroup).
func (*UserGroupMutation) UserCleared ¶
func (m *UserGroupMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserGroupMutation) UserID ¶
func (m *UserGroupMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*UserGroupMutation) UserIDs ¶
func (m *UserGroupMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*UserGroupMutation) Where ¶
func (m *UserGroupMutation) Where(ps ...predicate.UserGroup)
Where appends a list predicates to the UserGroupMutation builder.
func (*UserGroupMutation) WhereP ¶ added in v0.11.5
func (m *UserGroupMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserGroupMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserGroupQuery ¶
type UserGroupQuery struct {
// contains filtered or unexported fields
}
UserGroupQuery is the builder for querying UserGroup entities.
func (*UserGroupQuery) Aggregate ¶ added in v0.11.4
func (ugq *UserGroupQuery) Aggregate(fns ...AggregateFunc) *UserGroupSelect
Aggregate returns a UserGroupSelect configured with the given aggregations.
func (*UserGroupQuery) All ¶
func (ugq *UserGroupQuery) All(ctx context.Context) ([]*UserGroup, error)
All executes the query and returns a list of UserGroups.
func (*UserGroupQuery) AllX ¶
func (ugq *UserGroupQuery) AllX(ctx context.Context) []*UserGroup
AllX is like All, but panics if an error occurs.
func (*UserGroupQuery) Clone ¶
func (ugq *UserGroupQuery) Clone() *UserGroupQuery
Clone returns a duplicate of the UserGroupQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserGroupQuery) Count ¶
func (ugq *UserGroupQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserGroupQuery) CountX ¶
func (ugq *UserGroupQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserGroupQuery) Exist ¶
func (ugq *UserGroupQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserGroupQuery) ExistX ¶
func (ugq *UserGroupQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserGroupQuery) Filter ¶ added in v0.11.2
func (ugq *UserGroupQuery) Filter() *UserGroupFilter
Filter returns a Filter implementation to apply filters on the UserGroupQuery builder.
func (*UserGroupQuery) First ¶
func (ugq *UserGroupQuery) First(ctx context.Context) (*UserGroup, error)
First returns the first UserGroup entity from the query. Returns a *NotFoundError when no UserGroup was found.
func (*UserGroupQuery) FirstID ¶
func (ugq *UserGroupQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserGroup ID from the query. Returns a *NotFoundError when no UserGroup ID was found.
func (*UserGroupQuery) FirstIDX ¶
func (ugq *UserGroupQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserGroupQuery) FirstX ¶
func (ugq *UserGroupQuery) FirstX(ctx context.Context) *UserGroup
FirstX is like First, but panics if an error occurs.
func (*UserGroupQuery) GroupBy ¶
func (ugq *UserGroupQuery) GroupBy(field string, fields ...string) *UserGroupGroupBy
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 { JoinedAt time.Time `json:"joined_at,omitempty"` Count int `json:"count,omitempty"` } client.UserGroup.Query(). GroupBy(usergroup.FieldJoinedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserGroupQuery) IDs ¶
func (ugq *UserGroupQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of UserGroup IDs.
func (*UserGroupQuery) IDsX ¶
func (ugq *UserGroupQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserGroupQuery) Limit ¶
func (ugq *UserGroupQuery) Limit(limit int) *UserGroupQuery
Limit the number of records to be returned by this query.
func (*UserGroupQuery) Offset ¶
func (ugq *UserGroupQuery) Offset(offset int) *UserGroupQuery
Offset to start from.
func (*UserGroupQuery) Only ¶
func (ugq *UserGroupQuery) Only(ctx context.Context) (*UserGroup, error)
Only returns a single UserGroup entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserGroup entity is found. Returns a *NotFoundError when no UserGroup entities are found.
func (*UserGroupQuery) OnlyID ¶
func (ugq *UserGroupQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserGroup ID in the query. Returns a *NotSingularError when more than one UserGroup ID is found. Returns a *NotFoundError when no entities are found.
func (*UserGroupQuery) OnlyIDX ¶
func (ugq *UserGroupQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserGroupQuery) OnlyX ¶
func (ugq *UserGroupQuery) OnlyX(ctx context.Context) *UserGroup
OnlyX is like Only, but panics if an error occurs.
func (*UserGroupQuery) Order ¶
func (ugq *UserGroupQuery) Order(o ...OrderFunc) *UserGroupQuery
Order specifies how the records should be ordered.
func (*UserGroupQuery) QueryGroup ¶
func (ugq *UserGroupQuery) QueryGroup() *GroupQuery
QueryGroup chains the current query on the "group" edge.
func (*UserGroupQuery) QueryUser ¶
func (ugq *UserGroupQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserGroupQuery) Select ¶
func (ugq *UserGroupQuery) Select(fields ...string) *UserGroupSelect
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 { JoinedAt time.Time `json:"joined_at,omitempty"` } client.UserGroup.Query(). Select(usergroup.FieldJoinedAt). Scan(ctx, &v)
func (*UserGroupQuery) Unique ¶
func (ugq *UserGroupQuery) Unique(unique bool) *UserGroupQuery
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 (*UserGroupQuery) Where ¶
func (ugq *UserGroupQuery) Where(ps ...predicate.UserGroup) *UserGroupQuery
Where adds a new predicate for the UserGroupQuery builder.
func (*UserGroupQuery) WithGroup ¶
func (ugq *UserGroupQuery) WithGroup(opts ...func(*GroupQuery)) *UserGroupQuery
WithGroup tells the query-builder to eager-load the nodes that are connected to the "group" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserGroupQuery) WithUser ¶
func (ugq *UserGroupQuery) WithUser(opts ...func(*UserQuery)) *UserGroupQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type UserGroupSelect ¶
type UserGroupSelect struct { *UserGroupQuery // contains filtered or unexported fields }
UserGroupSelect is the builder for selecting fields of UserGroup entities.
func (*UserGroupSelect) Aggregate ¶ added in v0.11.4
func (ugs *UserGroupSelect) Aggregate(fns ...AggregateFunc) *UserGroupSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserGroupSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupSelect) Scan ¶
func (ugs *UserGroupSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserGroupUpdate ¶
type UserGroupUpdate struct {
// contains filtered or unexported fields
}
UserGroupUpdate is the builder for updating UserGroup entities.
func (*UserGroupUpdate) ClearGroup ¶
func (ugu *UserGroupUpdate) ClearGroup() *UserGroupUpdate
ClearGroup clears the "group" edge to the Group entity.
func (*UserGroupUpdate) ClearUser ¶
func (ugu *UserGroupUpdate) ClearUser() *UserGroupUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserGroupUpdate) Exec ¶
func (ugu *UserGroupUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserGroupUpdate) ExecX ¶
func (ugu *UserGroupUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupUpdate) Mutation ¶
func (ugu *UserGroupUpdate) Mutation() *UserGroupMutation
Mutation returns the UserGroupMutation object of the builder.
func (*UserGroupUpdate) Save ¶
func (ugu *UserGroupUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserGroupUpdate) SaveX ¶
func (ugu *UserGroupUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserGroupUpdate) SetGroup ¶
func (ugu *UserGroupUpdate) SetGroup(g *Group) *UserGroupUpdate
SetGroup sets the "group" edge to the Group entity.
func (*UserGroupUpdate) SetGroupID ¶
func (ugu *UserGroupUpdate) SetGroupID(i int) *UserGroupUpdate
SetGroupID sets the "group_id" field.
func (*UserGroupUpdate) SetJoinedAt ¶
func (ugu *UserGroupUpdate) SetJoinedAt(t time.Time) *UserGroupUpdate
SetJoinedAt sets the "joined_at" field.
func (*UserGroupUpdate) SetNillableJoinedAt ¶
func (ugu *UserGroupUpdate) SetNillableJoinedAt(t *time.Time) *UserGroupUpdate
SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.
func (*UserGroupUpdate) SetUser ¶
func (ugu *UserGroupUpdate) SetUser(u *User) *UserGroupUpdate
SetUser sets the "user" edge to the User entity.
func (*UserGroupUpdate) SetUserID ¶
func (ugu *UserGroupUpdate) SetUserID(i int) *UserGroupUpdate
SetUserID sets the "user_id" field.
func (*UserGroupUpdate) Where ¶
func (ugu *UserGroupUpdate) Where(ps ...predicate.UserGroup) *UserGroupUpdate
Where appends a list predicates to the UserGroupUpdate builder.
type UserGroupUpdateOne ¶
type UserGroupUpdateOne struct {
// contains filtered or unexported fields
}
UserGroupUpdateOne is the builder for updating a single UserGroup entity.
func (*UserGroupUpdateOne) ClearGroup ¶
func (uguo *UserGroupUpdateOne) ClearGroup() *UserGroupUpdateOne
ClearGroup clears the "group" edge to the Group entity.
func (*UserGroupUpdateOne) ClearUser ¶
func (uguo *UserGroupUpdateOne) ClearUser() *UserGroupUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserGroupUpdateOne) Exec ¶
func (uguo *UserGroupUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserGroupUpdateOne) ExecX ¶
func (uguo *UserGroupUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupUpdateOne) Mutation ¶
func (uguo *UserGroupUpdateOne) Mutation() *UserGroupMutation
Mutation returns the UserGroupMutation object of the builder.
func (*UserGroupUpdateOne) Save ¶
func (uguo *UserGroupUpdateOne) Save(ctx context.Context) (*UserGroup, error)
Save executes the query and returns the updated UserGroup entity.
func (*UserGroupUpdateOne) SaveX ¶
func (uguo *UserGroupUpdateOne) SaveX(ctx context.Context) *UserGroup
SaveX is like Save, but panics if an error occurs.
func (*UserGroupUpdateOne) Select ¶
func (uguo *UserGroupUpdateOne) Select(field string, fields ...string) *UserGroupUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserGroupUpdateOne) SetGroup ¶
func (uguo *UserGroupUpdateOne) SetGroup(g *Group) *UserGroupUpdateOne
SetGroup sets the "group" edge to the Group entity.
func (*UserGroupUpdateOne) SetGroupID ¶
func (uguo *UserGroupUpdateOne) SetGroupID(i int) *UserGroupUpdateOne
SetGroupID sets the "group_id" field.
func (*UserGroupUpdateOne) SetJoinedAt ¶
func (uguo *UserGroupUpdateOne) SetJoinedAt(t time.Time) *UserGroupUpdateOne
SetJoinedAt sets the "joined_at" field.
func (*UserGroupUpdateOne) SetNillableJoinedAt ¶
func (uguo *UserGroupUpdateOne) SetNillableJoinedAt(t *time.Time) *UserGroupUpdateOne
SetNillableJoinedAt sets the "joined_at" field if the given value is not nil.
func (*UserGroupUpdateOne) SetUser ¶
func (uguo *UserGroupUpdateOne) SetUser(u *User) *UserGroupUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserGroupUpdateOne) SetUserID ¶
func (uguo *UserGroupUpdateOne) SetUserID(i int) *UserGroupUpdateOne
SetUserID sets the "user_id" field.
func (*UserGroupUpdateOne) Where ¶ added in v0.11.8
func (uguo *UserGroupUpdateOne) Where(ps ...predicate.UserGroup) *UserGroupUpdateOne
Where appends a list predicates to the UserGroupUpdate builder.
type UserGroupUpsert ¶
UserGroupUpsert is the "OnConflict" setter.
func (*UserGroupUpsert) SetGroupID ¶
func (u *UserGroupUpsert) SetGroupID(v int) *UserGroupUpsert
SetGroupID sets the "group_id" field.
func (*UserGroupUpsert) SetJoinedAt ¶
func (u *UserGroupUpsert) SetJoinedAt(v time.Time) *UserGroupUpsert
SetJoinedAt sets the "joined_at" field.
func (*UserGroupUpsert) SetUserID ¶
func (u *UserGroupUpsert) SetUserID(v int) *UserGroupUpsert
SetUserID sets the "user_id" field.
func (*UserGroupUpsert) UpdateGroupID ¶
func (u *UserGroupUpsert) UpdateGroupID() *UserGroupUpsert
UpdateGroupID sets the "group_id" field to the value that was provided on create.
func (*UserGroupUpsert) UpdateJoinedAt ¶
func (u *UserGroupUpsert) UpdateJoinedAt() *UserGroupUpsert
UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.
func (*UserGroupUpsert) UpdateUserID ¶
func (u *UserGroupUpsert) UpdateUserID() *UserGroupUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type UserGroupUpsertBulk ¶
type UserGroupUpsertBulk struct {
// contains filtered or unexported fields
}
UserGroupUpsertBulk is the builder for "upsert"-ing a bulk of UserGroup nodes.
func (*UserGroupUpsertBulk) DoNothing ¶
func (u *UserGroupUpsertBulk) DoNothing() *UserGroupUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserGroupUpsertBulk) Exec ¶
func (u *UserGroupUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserGroupUpsertBulk) ExecX ¶
func (u *UserGroupUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupUpsertBulk) Ignore ¶
func (u *UserGroupUpsertBulk) Ignore() *UserGroupUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserGroup.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserGroupUpsertBulk) SetGroupID ¶
func (u *UserGroupUpsertBulk) SetGroupID(v int) *UserGroupUpsertBulk
SetGroupID sets the "group_id" field.
func (*UserGroupUpsertBulk) SetJoinedAt ¶
func (u *UserGroupUpsertBulk) SetJoinedAt(v time.Time) *UserGroupUpsertBulk
SetJoinedAt sets the "joined_at" field.
func (*UserGroupUpsertBulk) SetUserID ¶
func (u *UserGroupUpsertBulk) SetUserID(v int) *UserGroupUpsertBulk
SetUserID sets the "user_id" field.
func (*UserGroupUpsertBulk) Update ¶
func (u *UserGroupUpsertBulk) Update(set func(*UserGroupUpsert)) *UserGroupUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserGroupCreateBulk.OnConflict documentation for more info.
func (*UserGroupUpsertBulk) UpdateGroupID ¶
func (u *UserGroupUpsertBulk) UpdateGroupID() *UserGroupUpsertBulk
UpdateGroupID sets the "group_id" field to the value that was provided on create.
func (*UserGroupUpsertBulk) UpdateJoinedAt ¶
func (u *UserGroupUpsertBulk) UpdateJoinedAt() *UserGroupUpsertBulk
UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.
func (*UserGroupUpsertBulk) UpdateNewValues ¶
func (u *UserGroupUpsertBulk) UpdateNewValues() *UserGroupUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserGroup.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserGroupUpsertBulk) UpdateUserID ¶
func (u *UserGroupUpsertBulk) UpdateUserID() *UserGroupUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type UserGroupUpsertOne ¶
type UserGroupUpsertOne struct {
// contains filtered or unexported fields
}
UserGroupUpsertOne is the builder for "upsert"-ing
one UserGroup node.
func (*UserGroupUpsertOne) DoNothing ¶
func (u *UserGroupUpsertOne) DoNothing() *UserGroupUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserGroupUpsertOne) Exec ¶
func (u *UserGroupUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserGroupUpsertOne) ExecX ¶
func (u *UserGroupUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserGroupUpsertOne) ID ¶
func (u *UserGroupUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserGroupUpsertOne) IDX ¶
func (u *UserGroupUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*UserGroupUpsertOne) Ignore ¶
func (u *UserGroupUpsertOne) Ignore() *UserGroupUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserGroup.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserGroupUpsertOne) SetGroupID ¶
func (u *UserGroupUpsertOne) SetGroupID(v int) *UserGroupUpsertOne
SetGroupID sets the "group_id" field.
func (*UserGroupUpsertOne) SetJoinedAt ¶
func (u *UserGroupUpsertOne) SetJoinedAt(v time.Time) *UserGroupUpsertOne
SetJoinedAt sets the "joined_at" field.
func (*UserGroupUpsertOne) SetUserID ¶
func (u *UserGroupUpsertOne) SetUserID(v int) *UserGroupUpsertOne
SetUserID sets the "user_id" field.
func (*UserGroupUpsertOne) Update ¶
func (u *UserGroupUpsertOne) Update(set func(*UserGroupUpsert)) *UserGroupUpsertOne
Update allows overriding fields `UPDATE` values. See the UserGroupCreate.OnConflict documentation for more info.
func (*UserGroupUpsertOne) UpdateGroupID ¶
func (u *UserGroupUpsertOne) UpdateGroupID() *UserGroupUpsertOne
UpdateGroupID sets the "group_id" field to the value that was provided on create.
func (*UserGroupUpsertOne) UpdateJoinedAt ¶
func (u *UserGroupUpsertOne) UpdateJoinedAt() *UserGroupUpsertOne
UpdateJoinedAt sets the "joined_at" field to the value that was provided on create.
func (*UserGroupUpsertOne) UpdateNewValues ¶
func (u *UserGroupUpsertOne) UpdateNewValues() *UserGroupUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserGroup.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserGroupUpsertOne) UpdateUserID ¶
func (u *UserGroupUpsertOne) UpdateUserID() *UserGroupUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddFriendIDs ¶
func (m *UserMutation) AddFriendIDs(ids ...int)
AddFriendIDs adds the "friends" edge to the User entity by ids.
func (*UserMutation) AddFriendshipIDs ¶
func (m *UserMutation) AddFriendshipIDs(ids ...int)
AddFriendshipIDs adds the "friendships" edge to the Friendship entity by ids.
func (*UserMutation) AddGroupIDs ¶
func (m *UserMutation) AddGroupIDs(ids ...int)
AddGroupIDs adds the "groups" edge to the Group entity by ids.
func (*UserMutation) AddJoinedGroupIDs ¶
func (m *UserMutation) AddJoinedGroupIDs(ids ...int)
AddJoinedGroupIDs adds the "joined_groups" edge to the UserGroup entity by ids.
func (*UserMutation) AddLikedTweetIDs ¶
func (m *UserMutation) AddLikedTweetIDs(ids ...int)
AddLikedTweetIDs adds the "liked_tweets" edge to the Tweet entity by ids.
func (*UserMutation) AddRelativeIDs ¶
func (m *UserMutation) AddRelativeIDs(ids ...int)
AddRelativeIDs adds the "relatives" edge to the User entity by ids.
func (*UserMutation) AddRoleIDs ¶ added in v0.11.1
func (m *UserMutation) AddRoleIDs(ids ...int)
AddRoleIDs adds the "roles" edge to the Role entity by ids.
func (*UserMutation) AddTweetIDs ¶
func (m *UserMutation) AddTweetIDs(ids ...int)
AddTweetIDs adds the "tweets" edge to the Tweet entity by ids.
func (*UserMutation) AddUserTweetIDs ¶
func (m *UserMutation) AddUserTweetIDs(ids ...int)
AddUserTweetIDs adds the "user_tweets" edge to the UserTweet entity by ids.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearFriends ¶
func (m *UserMutation) ClearFriends()
ClearFriends clears the "friends" edge to the User entity.
func (*UserMutation) ClearFriendships ¶
func (m *UserMutation) ClearFriendships()
ClearFriendships clears the "friendships" edge to the Friendship entity.
func (*UserMutation) ClearGroups ¶
func (m *UserMutation) ClearGroups()
ClearGroups clears the "groups" edge to the Group entity.
func (*UserMutation) ClearJoinedGroups ¶
func (m *UserMutation) ClearJoinedGroups()
ClearJoinedGroups clears the "joined_groups" edge to the UserGroup entity.
func (*UserMutation) ClearLikedTweets ¶
func (m *UserMutation) ClearLikedTweets()
ClearLikedTweets clears the "liked_tweets" edge to the Tweet entity.
func (*UserMutation) ClearRelatives ¶
func (m *UserMutation) ClearRelatives()
ClearRelatives clears the "relatives" edge to the User entity.
func (*UserMutation) ClearRoles ¶ added in v0.11.1
func (m *UserMutation) ClearRoles()
ClearRoles clears the "roles" edge to the Role entity.
func (*UserMutation) ClearTweets ¶
func (m *UserMutation) ClearTweets()
ClearTweets clears the "tweets" edge to the Tweet entity.
func (*UserMutation) ClearUserTweets ¶
func (m *UserMutation) ClearUserTweets()
ClearUserTweets clears the "user_tweets" edge to the UserTweet entity.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) Filter ¶ added in v0.11.2
func (m *UserMutation) Filter() *UserFilter
Filter returns an entql.Where implementation to apply filters on the UserMutation builder.
func (*UserMutation) FriendsCleared ¶
func (m *UserMutation) FriendsCleared() bool
FriendsCleared reports if the "friends" edge to the User entity was cleared.
func (*UserMutation) FriendsIDs ¶
func (m *UserMutation) FriendsIDs() (ids []int)
FriendsIDs returns the "friends" edge IDs in the mutation.
func (*UserMutation) FriendshipsCleared ¶
func (m *UserMutation) FriendshipsCleared() bool
FriendshipsCleared reports if the "friendships" edge to the Friendship entity was cleared.
func (*UserMutation) FriendshipsIDs ¶
func (m *UserMutation) FriendshipsIDs() (ids []int)
FriendshipsIDs returns the "friendships" edge IDs in the mutation.
func (*UserMutation) GroupsCleared ¶
func (m *UserMutation) GroupsCleared() bool
GroupsCleared reports if the "groups" edge to the Group entity was cleared.
func (*UserMutation) GroupsIDs ¶
func (m *UserMutation) GroupsIDs() (ids []int)
GroupsIDs returns the "groups" edge IDs in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserMutation) JoinedGroupsCleared ¶
func (m *UserMutation) JoinedGroupsCleared() bool
JoinedGroupsCleared reports if the "joined_groups" edge to the UserGroup entity was cleared.
func (*UserMutation) JoinedGroupsIDs ¶
func (m *UserMutation) JoinedGroupsIDs() (ids []int)
JoinedGroupsIDs returns the "joined_groups" edge IDs in the mutation.
func (*UserMutation) LikedTweetsCleared ¶
func (m *UserMutation) LikedTweetsCleared() bool
LikedTweetsCleared reports if the "liked_tweets" edge to the Tweet entity was cleared.
func (*UserMutation) LikedTweetsIDs ¶
func (m *UserMutation) LikedTweetsIDs() (ids []int)
LikedTweetsIDs returns the "liked_tweets" edge IDs in the mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) RelativesCleared ¶
func (m *UserMutation) RelativesCleared() bool
RelativesCleared reports if the "relatives" edge to the User entity was cleared.
func (*UserMutation) RelativesIDs ¶
func (m *UserMutation) RelativesIDs() (ids []int)
RelativesIDs returns the "relatives" edge IDs in the mutation.
func (*UserMutation) RemoveFriendIDs ¶
func (m *UserMutation) RemoveFriendIDs(ids ...int)
RemoveFriendIDs removes the "friends" edge to the User entity by IDs.
func (*UserMutation) RemoveFriendshipIDs ¶
func (m *UserMutation) RemoveFriendshipIDs(ids ...int)
RemoveFriendshipIDs removes the "friendships" edge to the Friendship entity by IDs.
func (*UserMutation) RemoveGroupIDs ¶
func (m *UserMutation) RemoveGroupIDs(ids ...int)
RemoveGroupIDs removes the "groups" edge to the Group entity by IDs.
func (*UserMutation) RemoveJoinedGroupIDs ¶
func (m *UserMutation) RemoveJoinedGroupIDs(ids ...int)
RemoveJoinedGroupIDs removes the "joined_groups" edge to the UserGroup entity by IDs.
func (*UserMutation) RemoveLikedTweetIDs ¶
func (m *UserMutation) RemoveLikedTweetIDs(ids ...int)
RemoveLikedTweetIDs removes the "liked_tweets" edge to the Tweet entity by IDs.
func (*UserMutation) RemoveRelativeIDs ¶
func (m *UserMutation) RemoveRelativeIDs(ids ...int)
RemoveRelativeIDs removes the "relatives" edge to the User entity by IDs.
func (*UserMutation) RemoveRoleIDs ¶ added in v0.11.1
func (m *UserMutation) RemoveRoleIDs(ids ...int)
RemoveRoleIDs removes the "roles" edge to the Role entity by IDs.
func (*UserMutation) RemoveTweetIDs ¶
func (m *UserMutation) RemoveTweetIDs(ids ...int)
RemoveTweetIDs removes the "tweets" edge to the Tweet entity by IDs.
func (*UserMutation) RemoveUserTweetIDs ¶
func (m *UserMutation) RemoveUserTweetIDs(ids ...int)
RemoveUserTweetIDs removes the "user_tweets" edge to the UserTweet entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedFriendsIDs ¶
func (m *UserMutation) RemovedFriendsIDs() (ids []int)
RemovedFriends returns the removed IDs of the "friends" edge to the User entity.
func (*UserMutation) RemovedFriendshipsIDs ¶
func (m *UserMutation) RemovedFriendshipsIDs() (ids []int)
RemovedFriendships returns the removed IDs of the "friendships" edge to the Friendship entity.
func (*UserMutation) RemovedGroupsIDs ¶
func (m *UserMutation) RemovedGroupsIDs() (ids []int)
RemovedGroups returns the removed IDs of the "groups" edge to the Group entity.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*UserMutation) RemovedJoinedGroupsIDs ¶
func (m *UserMutation) RemovedJoinedGroupsIDs() (ids []int)
RemovedJoinedGroups returns the removed IDs of the "joined_groups" edge to the UserGroup entity.
func (*UserMutation) RemovedLikedTweetsIDs ¶
func (m *UserMutation) RemovedLikedTweetsIDs() (ids []int)
RemovedLikedTweets returns the removed IDs of the "liked_tweets" edge to the Tweet entity.
func (*UserMutation) RemovedRelativesIDs ¶
func (m *UserMutation) RemovedRelativesIDs() (ids []int)
RemovedRelatives returns the removed IDs of the "relatives" edge to the User entity.
func (*UserMutation) RemovedRolesIDs ¶ added in v0.11.1
func (m *UserMutation) RemovedRolesIDs() (ids []int)
RemovedRoles returns the removed IDs of the "roles" edge to the Role entity.
func (*UserMutation) RemovedTweetsIDs ¶
func (m *UserMutation) RemovedTweetsIDs() (ids []int)
RemovedTweets returns the removed IDs of the "tweets" edge to the Tweet entity.
func (*UserMutation) RemovedUserTweetsIDs ¶
func (m *UserMutation) RemovedUserTweetsIDs() (ids []int)
RemovedUserTweets returns the removed IDs of the "user_tweets" edge to the UserTweet entity.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetFriends ¶
func (m *UserMutation) ResetFriends()
ResetFriends resets all changes to the "friends" edge.
func (*UserMutation) ResetFriendships ¶
func (m *UserMutation) ResetFriendships()
ResetFriendships resets all changes to the "friendships" edge.
func (*UserMutation) ResetGroups ¶
func (m *UserMutation) ResetGroups()
ResetGroups resets all changes to the "groups" edge.
func (*UserMutation) ResetJoinedGroups ¶
func (m *UserMutation) ResetJoinedGroups()
ResetJoinedGroups resets all changes to the "joined_groups" edge.
func (*UserMutation) ResetLikedTweets ¶
func (m *UserMutation) ResetLikedTweets()
ResetLikedTweets resets all changes to the "liked_tweets" edge.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetRelatives ¶
func (m *UserMutation) ResetRelatives()
ResetRelatives resets all changes to the "relatives" edge.
func (*UserMutation) ResetRoles ¶ added in v0.11.1
func (m *UserMutation) ResetRoles()
ResetRoles resets all changes to the "roles" edge.
func (*UserMutation) ResetTweets ¶
func (m *UserMutation) ResetTweets()
ResetTweets resets all changes to the "tweets" edge.
func (*UserMutation) ResetUserTweets ¶
func (m *UserMutation) ResetUserTweets()
ResetUserTweets resets all changes to the "user_tweets" edge.
func (*UserMutation) RolesCleared ¶ added in v0.11.1
func (m *UserMutation) RolesCleared() bool
RolesCleared reports if the "roles" edge to the Role entity was cleared.
func (*UserMutation) RolesIDs ¶ added in v0.11.1
func (m *UserMutation) RolesIDs() (ids []int)
RolesIDs returns the "roles" edge IDs in the mutation.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOp ¶ added in v0.11.5
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) TweetsCleared ¶
func (m *UserMutation) TweetsCleared() bool
TweetsCleared reports if the "tweets" edge to the Tweet entity was cleared.
func (*UserMutation) TweetsIDs ¶
func (m *UserMutation) TweetsIDs() (ids []int)
TweetsIDs returns the "tweets" edge IDs in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UserTweetsCleared ¶
func (m *UserMutation) UserTweetsCleared() bool
UserTweetsCleared reports if the "user_tweets" edge to the UserTweet entity was cleared.
func (*UserMutation) UserTweetsIDs ¶
func (m *UserMutation) UserTweetsIDs() (ids []int)
UserTweetsIDs returns the "user_tweets" edge IDs in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶ added in v0.11.5
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶ added in v0.11.4
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) Filter ¶ added in v0.11.2
func (uq *UserQuery) Filter() *UserFilter
Filter returns a Filter implementation to apply filters on the UserQuery builder.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) QueryFriends ¶
QueryFriends chains the current query on the "friends" edge.
func (*UserQuery) QueryFriendships ¶
func (uq *UserQuery) QueryFriendships() *FriendshipQuery
QueryFriendships chains the current query on the "friendships" edge.
func (*UserQuery) QueryGroups ¶
func (uq *UserQuery) QueryGroups() *GroupQuery
QueryGroups chains the current query on the "groups" edge.
func (*UserQuery) QueryJoinedGroups ¶
func (uq *UserQuery) QueryJoinedGroups() *UserGroupQuery
QueryJoinedGroups chains the current query on the "joined_groups" edge.
func (*UserQuery) QueryLikedTweets ¶
func (uq *UserQuery) QueryLikedTweets() *TweetQuery
QueryLikedTweets chains the current query on the "liked_tweets" edge.
func (*UserQuery) QueryLikes ¶
func (uq *UserQuery) QueryLikes() *TweetLikeQuery
QueryLikes chains the current query on the "likes" edge.
func (*UserQuery) QueryRelationship ¶
func (uq *UserQuery) QueryRelationship() *RelationshipQuery
QueryRelationship chains the current query on the "relationship" edge.
func (*UserQuery) QueryRelatives ¶
QueryRelatives chains the current query on the "relatives" edge.
func (*UserQuery) QueryRoles ¶ added in v0.11.1
QueryRoles chains the current query on the "roles" edge.
func (*UserQuery) QueryRolesUsers ¶ added in v0.11.1
func (uq *UserQuery) QueryRolesUsers() *RoleUserQuery
QueryRolesUsers chains the current query on the "roles_users" edge.
func (*UserQuery) QueryTweets ¶
func (uq *UserQuery) QueryTweets() *TweetQuery
QueryTweets chains the current query on the "tweets" edge.
func (*UserQuery) QueryUserTweets ¶
func (uq *UserQuery) QueryUserTweets() *UserTweetQuery
QueryUserTweets chains the current query on the "user_tweets" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.User.Query(). Select(user.FieldName). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*UserQuery) WithFriends ¶
WithFriends tells the query-builder to eager-load the nodes that are connected to the "friends" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithFriendships ¶
func (uq *UserQuery) WithFriendships(opts ...func(*FriendshipQuery)) *UserQuery
WithFriendships tells the query-builder to eager-load the nodes that are connected to the "friendships" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithGroups ¶
func (uq *UserQuery) WithGroups(opts ...func(*GroupQuery)) *UserQuery
WithGroups tells the query-builder to eager-load the nodes that are connected to the "groups" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithJoinedGroups ¶
func (uq *UserQuery) WithJoinedGroups(opts ...func(*UserGroupQuery)) *UserQuery
WithJoinedGroups tells the query-builder to eager-load the nodes that are connected to the "joined_groups" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithLikedTweets ¶
func (uq *UserQuery) WithLikedTweets(opts ...func(*TweetQuery)) *UserQuery
WithLikedTweets tells the query-builder to eager-load the nodes that are connected to the "liked_tweets" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithLikes ¶
func (uq *UserQuery) WithLikes(opts ...func(*TweetLikeQuery)) *UserQuery
WithLikes tells the query-builder to eager-load the nodes that are connected to the "likes" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithRelationship ¶
func (uq *UserQuery) WithRelationship(opts ...func(*RelationshipQuery)) *UserQuery
WithRelationship tells the query-builder to eager-load the nodes that are connected to the "relationship" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithRelatives ¶
WithRelatives tells the query-builder to eager-load the nodes that are connected to the "relatives" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithRoles ¶ added in v0.11.1
WithRoles tells the query-builder to eager-load the nodes that are connected to the "roles" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithRolesUsers ¶ added in v0.11.1
func (uq *UserQuery) WithRolesUsers(opts ...func(*RoleUserQuery)) *UserQuery
WithRolesUsers tells the query-builder to eager-load the nodes that are connected to the "roles_users" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithTweets ¶
func (uq *UserQuery) WithTweets(opts ...func(*TweetQuery)) *UserQuery
WithTweets tells the query-builder to eager-load the nodes that are connected to the "tweets" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithUserTweets ¶
func (uq *UserQuery) WithUserTweets(opts ...func(*UserTweetQuery)) *UserQuery
WithUserTweets tells the query-builder to eager-load the nodes that are connected to the "user_tweets" edge. The optional arguments are used to configure the query builder of the edge.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶ added in v0.11.4
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserTweet ¶
type UserTweet struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UserID holds the value of the "user_id" field. UserID int `json:"user_id,omitempty"` // TweetID holds the value of the "tweet_id" field. TweetID int `json:"tweet_id,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserTweetQuery when eager-loading is set. Edges UserTweetEdges `json:"edges"` // contains filtered or unexported fields }
UserTweet is the model entity for the UserTweet schema.
func (*UserTweet) QueryTweet ¶
func (ut *UserTweet) QueryTweet() *TweetQuery
QueryTweet queries the "tweet" edge of the UserTweet entity.
func (*UserTweet) Unwrap ¶
Unwrap unwraps the UserTweet 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 (*UserTweet) Update ¶
func (ut *UserTweet) Update() *UserTweetUpdateOne
Update returns a builder for updating this UserTweet. Note that you need to call UserTweet.Unwrap() before calling this method if this UserTweet was returned from a transaction, and the transaction was committed or rolled back.
type UserTweetClient ¶
type UserTweetClient struct {
// contains filtered or unexported fields
}
UserTweetClient is a client for the UserTweet schema.
func NewUserTweetClient ¶
func NewUserTweetClient(c config) *UserTweetClient
NewUserTweetClient returns a client for the UserTweet from the given config.
func (*UserTweetClient) Create ¶
func (c *UserTweetClient) Create() *UserTweetCreate
Create returns a builder for creating a UserTweet entity.
func (*UserTweetClient) CreateBulk ¶
func (c *UserTweetClient) CreateBulk(builders ...*UserTweetCreate) *UserTweetCreateBulk
CreateBulk returns a builder for creating a bulk of UserTweet entities.
func (*UserTweetClient) Delete ¶
func (c *UserTweetClient) Delete() *UserTweetDelete
Delete returns a delete builder for UserTweet.
func (*UserTweetClient) DeleteOne ¶
func (c *UserTweetClient) DeleteOne(ut *UserTweet) *UserTweetDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserTweetClient) DeleteOneID ¶
func (c *UserTweetClient) DeleteOneID(id int) *UserTweetDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserTweetClient) GetX ¶
func (c *UserTweetClient) GetX(ctx context.Context, id int) *UserTweet
GetX is like Get, but panics if an error occurs.
func (*UserTweetClient) Hooks ¶
func (c *UserTweetClient) Hooks() []Hook
Hooks returns the client hooks.
func (*UserTweetClient) Intercept ¶ added in v0.11.5
func (c *UserTweetClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `usertweet.Intercept(f(g(h())))`.
func (*UserTweetClient) Interceptors ¶ added in v0.11.5
func (c *UserTweetClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserTweetClient) Query ¶
func (c *UserTweetClient) Query() *UserTweetQuery
Query returns a query builder for UserTweet.
func (*UserTweetClient) QueryTweet ¶
func (c *UserTweetClient) QueryTweet(ut *UserTweet) *TweetQuery
QueryTweet queries the tweet edge of a UserTweet.
func (*UserTweetClient) QueryUser ¶
func (c *UserTweetClient) QueryUser(ut *UserTweet) *UserQuery
QueryUser queries the user edge of a UserTweet.
func (*UserTweetClient) Update ¶
func (c *UserTweetClient) Update() *UserTweetUpdate
Update returns an update builder for UserTweet.
func (*UserTweetClient) UpdateOne ¶
func (c *UserTweetClient) UpdateOne(ut *UserTweet) *UserTweetUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserTweetClient) UpdateOneID ¶
func (c *UserTweetClient) UpdateOneID(id int) *UserTweetUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserTweetClient) Use ¶
func (c *UserTweetClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `usertweet.Hooks(f(g(h())))`.
type UserTweetCreate ¶
type UserTweetCreate struct {
// contains filtered or unexported fields
}
UserTweetCreate is the builder for creating a UserTweet entity.
func (*UserTweetCreate) Exec ¶
func (utc *UserTweetCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTweetCreate) ExecX ¶
func (utc *UserTweetCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTweetCreate) Mutation ¶
func (utc *UserTweetCreate) Mutation() *UserTweetMutation
Mutation returns the UserTweetMutation object of the builder.
func (*UserTweetCreate) OnConflict ¶
func (utc *UserTweetCreate) OnConflict(opts ...sql.ConflictOption) *UserTweetUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserTweet.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserTweetUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*UserTweetCreate) OnConflictColumns ¶
func (utc *UserTweetCreate) OnConflictColumns(columns ...string) *UserTweetUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserTweet.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserTweetCreate) Save ¶
func (utc *UserTweetCreate) Save(ctx context.Context) (*UserTweet, error)
Save creates the UserTweet in the database.
func (*UserTweetCreate) SaveX ¶
func (utc *UserTweetCreate) SaveX(ctx context.Context) *UserTweet
SaveX calls Save and panics if Save returns an error.
func (*UserTweetCreate) SetCreatedAt ¶
func (utc *UserTweetCreate) SetCreatedAt(t time.Time) *UserTweetCreate
SetCreatedAt sets the "created_at" field.
func (*UserTweetCreate) SetNillableCreatedAt ¶
func (utc *UserTweetCreate) SetNillableCreatedAt(t *time.Time) *UserTweetCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserTweetCreate) SetTweet ¶
func (utc *UserTweetCreate) SetTweet(t *Tweet) *UserTweetCreate
SetTweet sets the "tweet" edge to the Tweet entity.
func (*UserTweetCreate) SetTweetID ¶
func (utc *UserTweetCreate) SetTweetID(i int) *UserTweetCreate
SetTweetID sets the "tweet_id" field.
func (*UserTweetCreate) SetUser ¶
func (utc *UserTweetCreate) SetUser(u *User) *UserTweetCreate
SetUser sets the "user" edge to the User entity.
func (*UserTweetCreate) SetUserID ¶
func (utc *UserTweetCreate) SetUserID(i int) *UserTweetCreate
SetUserID sets the "user_id" field.
type UserTweetCreateBulk ¶
type UserTweetCreateBulk struct {
// contains filtered or unexported fields
}
UserTweetCreateBulk is the builder for creating many UserTweet entities in bulk.
func (*UserTweetCreateBulk) Exec ¶
func (utcb *UserTweetCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTweetCreateBulk) ExecX ¶
func (utcb *UserTweetCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTweetCreateBulk) OnConflict ¶
func (utcb *UserTweetCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserTweetUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.UserTweet.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserTweetUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*UserTweetCreateBulk) OnConflictColumns ¶
func (utcb *UserTweetCreateBulk) OnConflictColumns(columns ...string) *UserTweetUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.UserTweet.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserTweetDelete ¶
type UserTweetDelete struct {
// contains filtered or unexported fields
}
UserTweetDelete is the builder for deleting a UserTweet entity.
func (*UserTweetDelete) Exec ¶
func (utd *UserTweetDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserTweetDelete) ExecX ¶
func (utd *UserTweetDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserTweetDelete) Where ¶
func (utd *UserTweetDelete) Where(ps ...predicate.UserTweet) *UserTweetDelete
Where appends a list predicates to the UserTweetDelete builder.
type UserTweetDeleteOne ¶
type UserTweetDeleteOne struct {
// contains filtered or unexported fields
}
UserTweetDeleteOne is the builder for deleting a single UserTweet entity.
func (*UserTweetDeleteOne) Exec ¶
func (utdo *UserTweetDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserTweetDeleteOne) ExecX ¶
func (utdo *UserTweetDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTweetDeleteOne) Where ¶ added in v0.11.7
func (utdo *UserTweetDeleteOne) Where(ps ...predicate.UserTweet) *UserTweetDeleteOne
Where appends a list predicates to the UserTweetDelete builder.
type UserTweetEdges ¶
type UserTweetEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // Tweet holds the value of the tweet edge. Tweet *Tweet `json:"tweet,omitempty"` // contains filtered or unexported fields }
UserTweetEdges holds the relations/edges for other nodes in the graph.
func (UserTweetEdges) TweetOrErr ¶
func (e UserTweetEdges) TweetOrErr() (*Tweet, error)
TweetOrErr returns the Tweet value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserTweetEdges) UserOrErr ¶
func (e UserTweetEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type UserTweetFilter ¶ added in v0.11.2
type UserTweetFilter struct {
// contains filtered or unexported fields
}
UserTweetFilter provides a generic filtering capability at runtime for UserTweetQuery.
func (*UserTweetFilter) Where ¶ added in v0.11.2
func (f *UserTweetFilter) Where(p entql.P)
Where applies the entql predicate on the query filter.
func (*UserTweetFilter) WhereCreatedAt ¶ added in v0.11.2
func (f *UserTweetFilter) WhereCreatedAt(p entql.TimeP)
WhereCreatedAt applies the entql time.Time predicate on the created_at field.
func (*UserTweetFilter) WhereHasTweet ¶ added in v0.11.2
func (f *UserTweetFilter) WhereHasTweet()
WhereHasTweet applies a predicate to check if query has an edge tweet.
func (*UserTweetFilter) WhereHasTweetWith ¶ added in v0.11.2
func (f *UserTweetFilter) WhereHasTweetWith(preds ...predicate.Tweet)
WhereHasTweetWith applies a predicate to check if query has an edge tweet with a given conditions (other predicates).
func (*UserTweetFilter) WhereHasUser ¶ added in v0.11.2
func (f *UserTweetFilter) WhereHasUser()
WhereHasUser applies a predicate to check if query has an edge user.
func (*UserTweetFilter) WhereHasUserWith ¶ added in v0.11.2
func (f *UserTweetFilter) WhereHasUserWith(preds ...predicate.User)
WhereHasUserWith applies a predicate to check if query has an edge user with a given conditions (other predicates).
func (*UserTweetFilter) WhereID ¶ added in v0.11.2
func (f *UserTweetFilter) WhereID(p entql.IntP)
WhereID applies the entql int predicate on the id field.
func (*UserTweetFilter) WhereTweetID ¶ added in v0.11.2
func (f *UserTweetFilter) WhereTweetID(p entql.IntP)
WhereTweetID applies the entql int predicate on the tweet_id field.
func (*UserTweetFilter) WhereUserID ¶ added in v0.11.2
func (f *UserTweetFilter) WhereUserID(p entql.IntP)
WhereUserID applies the entql int predicate on the user_id field.
type UserTweetGroupBy ¶
type UserTweetGroupBy struct {
// contains filtered or unexported fields
}
UserTweetGroupBy is the group-by builder for UserTweet entities.
func (*UserTweetGroupBy) Aggregate ¶
func (utgb *UserTweetGroupBy) Aggregate(fns ...AggregateFunc) *UserTweetGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserTweetGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserTweetGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserTweetGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserTweetGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserTweetGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserTweetGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserTweetGroupBy) Scan ¶
func (utgb *UserTweetGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserTweetGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserTweetMutation ¶
type UserTweetMutation struct {
// contains filtered or unexported fields
}
UserTweetMutation represents an operation that mutates the UserTweet nodes in the graph.
func (*UserTweetMutation) AddField ¶
func (m *UserTweetMutation) 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 (*UserTweetMutation) AddedEdges ¶
func (m *UserTweetMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserTweetMutation) AddedField ¶
func (m *UserTweetMutation) 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 (*UserTweetMutation) AddedFields ¶
func (m *UserTweetMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserTweetMutation) AddedIDs ¶
func (m *UserTweetMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserTweetMutation) ClearEdge ¶
func (m *UserTweetMutation) 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 (*UserTweetMutation) ClearField ¶
func (m *UserTweetMutation) 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 (*UserTweetMutation) ClearTweet ¶
func (m *UserTweetMutation) ClearTweet()
ClearTweet clears the "tweet" edge to the Tweet entity.
func (*UserTweetMutation) ClearUser ¶
func (m *UserTweetMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*UserTweetMutation) ClearedEdges ¶
func (m *UserTweetMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserTweetMutation) ClearedFields ¶
func (m *UserTweetMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserTweetMutation) Client ¶
func (m UserTweetMutation) 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 (*UserTweetMutation) CreatedAt ¶
func (m *UserTweetMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserTweetMutation) EdgeCleared ¶
func (m *UserTweetMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserTweetMutation) Field ¶
func (m *UserTweetMutation) 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 (*UserTweetMutation) FieldCleared ¶
func (m *UserTweetMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserTweetMutation) Fields ¶
func (m *UserTweetMutation) 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 (*UserTweetMutation) Filter ¶ added in v0.11.2
func (m *UserTweetMutation) Filter() *UserTweetFilter
Filter returns an entql.Where implementation to apply filters on the UserTweetMutation builder.
func (*UserTweetMutation) ID ¶
func (m *UserTweetMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserTweetMutation) IDs ¶
func (m *UserTweetMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*UserTweetMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the UserTweet entity. If the UserTweet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserTweetMutation) 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 (*UserTweetMutation) OldTweetID ¶
func (m *UserTweetMutation) OldTweetID(ctx context.Context) (v int, err error)
OldTweetID returns the old "tweet_id" field's value of the UserTweet entity. If the UserTweet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserTweetMutation) OldUserID ¶
func (m *UserTweetMutation) OldUserID(ctx context.Context) (v int, err error)
OldUserID returns the old "user_id" field's value of the UserTweet entity. If the UserTweet object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserTweetMutation) RemovedEdges ¶
func (m *UserTweetMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserTweetMutation) RemovedIDs ¶
func (m *UserTweetMutation) 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 (*UserTweetMutation) ResetCreatedAt ¶
func (m *UserTweetMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserTweetMutation) ResetEdge ¶
func (m *UserTweetMutation) 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 (*UserTweetMutation) ResetField ¶
func (m *UserTweetMutation) 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 (*UserTweetMutation) ResetTweet ¶
func (m *UserTweetMutation) ResetTweet()
ResetTweet resets all changes to the "tweet" edge.
func (*UserTweetMutation) ResetTweetID ¶
func (m *UserTweetMutation) ResetTweetID()
ResetTweetID resets all changes to the "tweet_id" field.
func (*UserTweetMutation) ResetUser ¶
func (m *UserTweetMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*UserTweetMutation) ResetUserID ¶
func (m *UserTweetMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*UserTweetMutation) SetCreatedAt ¶
func (m *UserTweetMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserTweetMutation) SetField ¶
func (m *UserTweetMutation) 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 (*UserTweetMutation) SetOp ¶ added in v0.11.5
func (m *UserTweetMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserTweetMutation) SetTweetID ¶
func (m *UserTweetMutation) SetTweetID(i int)
SetTweetID sets the "tweet_id" field.
func (*UserTweetMutation) SetUserID ¶
func (m *UserTweetMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (*UserTweetMutation) TweetCleared ¶
func (m *UserTweetMutation) TweetCleared() bool
TweetCleared reports if the "tweet" edge to the Tweet entity was cleared.
func (*UserTweetMutation) TweetID ¶
func (m *UserTweetMutation) TweetID() (r int, exists bool)
TweetID returns the value of the "tweet_id" field in the mutation.
func (*UserTweetMutation) TweetIDs ¶
func (m *UserTweetMutation) TweetIDs() (ids []int)
TweetIDs returns the "tweet" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TweetID instead. It exists only for internal usage by the builders.
func (UserTweetMutation) Tx ¶
func (m UserTweetMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserTweetMutation) Type ¶
func (m *UserTweetMutation) Type() string
Type returns the node type of this mutation (UserTweet).
func (*UserTweetMutation) UserCleared ¶
func (m *UserTweetMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*UserTweetMutation) UserID ¶
func (m *UserTweetMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*UserTweetMutation) UserIDs ¶
func (m *UserTweetMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*UserTweetMutation) Where ¶
func (m *UserTweetMutation) Where(ps ...predicate.UserTweet)
Where appends a list predicates to the UserTweetMutation builder.
func (*UserTweetMutation) WhereP ¶ added in v0.11.5
func (m *UserTweetMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserTweetMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserTweetQuery ¶
type UserTweetQuery struct {
// contains filtered or unexported fields
}
UserTweetQuery is the builder for querying UserTweet entities.
func (*UserTweetQuery) Aggregate ¶ added in v0.11.4
func (utq *UserTweetQuery) Aggregate(fns ...AggregateFunc) *UserTweetSelect
Aggregate returns a UserTweetSelect configured with the given aggregations.
func (*UserTweetQuery) All ¶
func (utq *UserTweetQuery) All(ctx context.Context) ([]*UserTweet, error)
All executes the query and returns a list of UserTweets.
func (*UserTweetQuery) AllX ¶
func (utq *UserTweetQuery) AllX(ctx context.Context) []*UserTweet
AllX is like All, but panics if an error occurs.
func (*UserTweetQuery) Clone ¶
func (utq *UserTweetQuery) Clone() *UserTweetQuery
Clone returns a duplicate of the UserTweetQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserTweetQuery) Count ¶
func (utq *UserTweetQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*UserTweetQuery) CountX ¶
func (utq *UserTweetQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*UserTweetQuery) Exist ¶
func (utq *UserTweetQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*UserTweetQuery) ExistX ¶
func (utq *UserTweetQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*UserTweetQuery) Filter ¶ added in v0.11.2
func (utq *UserTweetQuery) Filter() *UserTweetFilter
Filter returns a Filter implementation to apply filters on the UserTweetQuery builder.
func (*UserTweetQuery) First ¶
func (utq *UserTweetQuery) First(ctx context.Context) (*UserTweet, error)
First returns the first UserTweet entity from the query. Returns a *NotFoundError when no UserTweet was found.
func (*UserTweetQuery) FirstID ¶
func (utq *UserTweetQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first UserTweet ID from the query. Returns a *NotFoundError when no UserTweet ID was found.
func (*UserTweetQuery) FirstIDX ¶
func (utq *UserTweetQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*UserTweetQuery) FirstX ¶
func (utq *UserTweetQuery) FirstX(ctx context.Context) *UserTweet
FirstX is like First, but panics if an error occurs.
func (*UserTweetQuery) GroupBy ¶
func (utq *UserTweetQuery) GroupBy(field string, fields ...string) *UserTweetGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.UserTweet.Query(). GroupBy(usertweet.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserTweetQuery) IDs ¶
func (utq *UserTweetQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of UserTweet IDs.
func (*UserTweetQuery) IDsX ¶
func (utq *UserTweetQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*UserTweetQuery) Limit ¶
func (utq *UserTweetQuery) Limit(limit int) *UserTweetQuery
Limit the number of records to be returned by this query.
func (*UserTweetQuery) Offset ¶
func (utq *UserTweetQuery) Offset(offset int) *UserTweetQuery
Offset to start from.
func (*UserTweetQuery) Only ¶
func (utq *UserTweetQuery) Only(ctx context.Context) (*UserTweet, error)
Only returns a single UserTweet entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one UserTweet entity is found. Returns a *NotFoundError when no UserTweet entities are found.
func (*UserTweetQuery) OnlyID ¶
func (utq *UserTweetQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only UserTweet ID in the query. Returns a *NotSingularError when more than one UserTweet ID is found. Returns a *NotFoundError when no entities are found.
func (*UserTweetQuery) OnlyIDX ¶
func (utq *UserTweetQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*UserTweetQuery) OnlyX ¶
func (utq *UserTweetQuery) OnlyX(ctx context.Context) *UserTweet
OnlyX is like Only, but panics if an error occurs.
func (*UserTweetQuery) Order ¶
func (utq *UserTweetQuery) Order(o ...OrderFunc) *UserTweetQuery
Order specifies how the records should be ordered.
func (*UserTweetQuery) QueryTweet ¶
func (utq *UserTweetQuery) QueryTweet() *TweetQuery
QueryTweet chains the current query on the "tweet" edge.
func (*UserTweetQuery) QueryUser ¶
func (utq *UserTweetQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*UserTweetQuery) Select ¶
func (utq *UserTweetQuery) Select(fields ...string) *UserTweetSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.UserTweet.Query(). Select(usertweet.FieldCreatedAt). Scan(ctx, &v)
func (*UserTweetQuery) Unique ¶
func (utq *UserTweetQuery) Unique(unique bool) *UserTweetQuery
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 (*UserTweetQuery) Where ¶
func (utq *UserTweetQuery) Where(ps ...predicate.UserTweet) *UserTweetQuery
Where adds a new predicate for the UserTweetQuery builder.
func (*UserTweetQuery) WithTweet ¶
func (utq *UserTweetQuery) WithTweet(opts ...func(*TweetQuery)) *UserTweetQuery
WithTweet tells the query-builder to eager-load the nodes that are connected to the "tweet" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserTweetQuery) WithUser ¶
func (utq *UserTweetQuery) WithUser(opts ...func(*UserQuery)) *UserTweetQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type UserTweetSelect ¶
type UserTweetSelect struct { *UserTweetQuery // contains filtered or unexported fields }
UserTweetSelect is the builder for selecting fields of UserTweet entities.
func (*UserTweetSelect) Aggregate ¶ added in v0.11.4
func (uts *UserTweetSelect) Aggregate(fns ...AggregateFunc) *UserTweetSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserTweetSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserTweetSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserTweetSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserTweetSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserTweetSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserTweetSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserTweetSelect) Scan ¶
func (uts *UserTweetSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserTweetSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserTweetUpdate ¶
type UserTweetUpdate struct {
// contains filtered or unexported fields
}
UserTweetUpdate is the builder for updating UserTweet entities.
func (*UserTweetUpdate) ClearTweet ¶
func (utu *UserTweetUpdate) ClearTweet() *UserTweetUpdate
ClearTweet clears the "tweet" edge to the Tweet entity.
func (*UserTweetUpdate) ClearUser ¶
func (utu *UserTweetUpdate) ClearUser() *UserTweetUpdate
ClearUser clears the "user" edge to the User entity.
func (*UserTweetUpdate) Exec ¶
func (utu *UserTweetUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTweetUpdate) ExecX ¶
func (utu *UserTweetUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTweetUpdate) Mutation ¶
func (utu *UserTweetUpdate) Mutation() *UserTweetMutation
Mutation returns the UserTweetMutation object of the builder.
func (*UserTweetUpdate) Save ¶
func (utu *UserTweetUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserTweetUpdate) SaveX ¶
func (utu *UserTweetUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserTweetUpdate) SetCreatedAt ¶
func (utu *UserTweetUpdate) SetCreatedAt(t time.Time) *UserTweetUpdate
SetCreatedAt sets the "created_at" field.
func (*UserTweetUpdate) SetNillableCreatedAt ¶
func (utu *UserTweetUpdate) SetNillableCreatedAt(t *time.Time) *UserTweetUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserTweetUpdate) SetTweet ¶
func (utu *UserTweetUpdate) SetTweet(t *Tweet) *UserTweetUpdate
SetTweet sets the "tweet" edge to the Tweet entity.
func (*UserTweetUpdate) SetTweetID ¶
func (utu *UserTweetUpdate) SetTweetID(i int) *UserTweetUpdate
SetTweetID sets the "tweet_id" field.
func (*UserTweetUpdate) SetUser ¶
func (utu *UserTweetUpdate) SetUser(u *User) *UserTweetUpdate
SetUser sets the "user" edge to the User entity.
func (*UserTweetUpdate) SetUserID ¶
func (utu *UserTweetUpdate) SetUserID(i int) *UserTweetUpdate
SetUserID sets the "user_id" field.
func (*UserTweetUpdate) Where ¶
func (utu *UserTweetUpdate) Where(ps ...predicate.UserTweet) *UserTweetUpdate
Where appends a list predicates to the UserTweetUpdate builder.
type UserTweetUpdateOne ¶
type UserTweetUpdateOne struct {
// contains filtered or unexported fields
}
UserTweetUpdateOne is the builder for updating a single UserTweet entity.
func (*UserTweetUpdateOne) ClearTweet ¶
func (utuo *UserTweetUpdateOne) ClearTweet() *UserTweetUpdateOne
ClearTweet clears the "tweet" edge to the Tweet entity.
func (*UserTweetUpdateOne) ClearUser ¶
func (utuo *UserTweetUpdateOne) ClearUser() *UserTweetUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*UserTweetUpdateOne) Exec ¶
func (utuo *UserTweetUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserTweetUpdateOne) ExecX ¶
func (utuo *UserTweetUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTweetUpdateOne) Mutation ¶
func (utuo *UserTweetUpdateOne) Mutation() *UserTweetMutation
Mutation returns the UserTweetMutation object of the builder.
func (*UserTweetUpdateOne) Save ¶
func (utuo *UserTweetUpdateOne) Save(ctx context.Context) (*UserTweet, error)
Save executes the query and returns the updated UserTweet entity.
func (*UserTweetUpdateOne) SaveX ¶
func (utuo *UserTweetUpdateOne) SaveX(ctx context.Context) *UserTweet
SaveX is like Save, but panics if an error occurs.
func (*UserTweetUpdateOne) Select ¶
func (utuo *UserTweetUpdateOne) Select(field string, fields ...string) *UserTweetUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserTweetUpdateOne) SetCreatedAt ¶
func (utuo *UserTweetUpdateOne) SetCreatedAt(t time.Time) *UserTweetUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserTweetUpdateOne) SetNillableCreatedAt ¶
func (utuo *UserTweetUpdateOne) SetNillableCreatedAt(t *time.Time) *UserTweetUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserTweetUpdateOne) SetTweet ¶
func (utuo *UserTweetUpdateOne) SetTweet(t *Tweet) *UserTweetUpdateOne
SetTweet sets the "tweet" edge to the Tweet entity.
func (*UserTweetUpdateOne) SetTweetID ¶
func (utuo *UserTweetUpdateOne) SetTweetID(i int) *UserTweetUpdateOne
SetTweetID sets the "tweet_id" field.
func (*UserTweetUpdateOne) SetUser ¶
func (utuo *UserTweetUpdateOne) SetUser(u *User) *UserTweetUpdateOne
SetUser sets the "user" edge to the User entity.
func (*UserTweetUpdateOne) SetUserID ¶
func (utuo *UserTweetUpdateOne) SetUserID(i int) *UserTweetUpdateOne
SetUserID sets the "user_id" field.
func (*UserTweetUpdateOne) Where ¶ added in v0.11.8
func (utuo *UserTweetUpdateOne) Where(ps ...predicate.UserTweet) *UserTweetUpdateOne
Where appends a list predicates to the UserTweetUpdate builder.
type UserTweetUpsert ¶
UserTweetUpsert is the "OnConflict" setter.
func (*UserTweetUpsert) SetCreatedAt ¶
func (u *UserTweetUpsert) SetCreatedAt(v time.Time) *UserTweetUpsert
SetCreatedAt sets the "created_at" field.
func (*UserTweetUpsert) SetTweetID ¶
func (u *UserTweetUpsert) SetTweetID(v int) *UserTweetUpsert
SetTweetID sets the "tweet_id" field.
func (*UserTweetUpsert) SetUserID ¶
func (u *UserTweetUpsert) SetUserID(v int) *UserTweetUpsert
SetUserID sets the "user_id" field.
func (*UserTweetUpsert) UpdateCreatedAt ¶
func (u *UserTweetUpsert) UpdateCreatedAt() *UserTweetUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserTweetUpsert) UpdateTweetID ¶
func (u *UserTweetUpsert) UpdateTweetID() *UserTweetUpsert
UpdateTweetID sets the "tweet_id" field to the value that was provided on create.
func (*UserTweetUpsert) UpdateUserID ¶
func (u *UserTweetUpsert) UpdateUserID() *UserTweetUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type UserTweetUpsertBulk ¶
type UserTweetUpsertBulk struct {
// contains filtered or unexported fields
}
UserTweetUpsertBulk is the builder for "upsert"-ing a bulk of UserTweet nodes.
func (*UserTweetUpsertBulk) DoNothing ¶
func (u *UserTweetUpsertBulk) DoNothing() *UserTweetUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserTweetUpsertBulk) Exec ¶
func (u *UserTweetUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTweetUpsertBulk) ExecX ¶
func (u *UserTweetUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTweetUpsertBulk) Ignore ¶
func (u *UserTweetUpsertBulk) Ignore() *UserTweetUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserTweet.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserTweetUpsertBulk) SetCreatedAt ¶
func (u *UserTweetUpsertBulk) SetCreatedAt(v time.Time) *UserTweetUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*UserTweetUpsertBulk) SetTweetID ¶
func (u *UserTweetUpsertBulk) SetTweetID(v int) *UserTweetUpsertBulk
SetTweetID sets the "tweet_id" field.
func (*UserTweetUpsertBulk) SetUserID ¶
func (u *UserTweetUpsertBulk) SetUserID(v int) *UserTweetUpsertBulk
SetUserID sets the "user_id" field.
func (*UserTweetUpsertBulk) Update ¶
func (u *UserTweetUpsertBulk) Update(set func(*UserTweetUpsert)) *UserTweetUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserTweetCreateBulk.OnConflict documentation for more info.
func (*UserTweetUpsertBulk) UpdateCreatedAt ¶
func (u *UserTweetUpsertBulk) UpdateCreatedAt() *UserTweetUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserTweetUpsertBulk) UpdateNewValues ¶
func (u *UserTweetUpsertBulk) UpdateNewValues() *UserTweetUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserTweet.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserTweetUpsertBulk) UpdateTweetID ¶
func (u *UserTweetUpsertBulk) UpdateTweetID() *UserTweetUpsertBulk
UpdateTweetID sets the "tweet_id" field to the value that was provided on create.
func (*UserTweetUpsertBulk) UpdateUserID ¶
func (u *UserTweetUpsertBulk) UpdateUserID() *UserTweetUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type UserTweetUpsertOne ¶
type UserTweetUpsertOne struct {
// contains filtered or unexported fields
}
UserTweetUpsertOne is the builder for "upsert"-ing
one UserTweet node.
func (*UserTweetUpsertOne) DoNothing ¶
func (u *UserTweetUpsertOne) DoNothing() *UserTweetUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserTweetUpsertOne) Exec ¶
func (u *UserTweetUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserTweetUpsertOne) ExecX ¶
func (u *UserTweetUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserTweetUpsertOne) ID ¶
func (u *UserTweetUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserTweetUpsertOne) IDX ¶
func (u *UserTweetUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*UserTweetUpsertOne) Ignore ¶
func (u *UserTweetUpsertOne) Ignore() *UserTweetUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.UserTweet.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserTweetUpsertOne) SetCreatedAt ¶
func (u *UserTweetUpsertOne) SetCreatedAt(v time.Time) *UserTweetUpsertOne
SetCreatedAt sets the "created_at" field.
func (*UserTweetUpsertOne) SetTweetID ¶
func (u *UserTweetUpsertOne) SetTweetID(v int) *UserTweetUpsertOne
SetTweetID sets the "tweet_id" field.
func (*UserTweetUpsertOne) SetUserID ¶
func (u *UserTweetUpsertOne) SetUserID(v int) *UserTweetUpsertOne
SetUserID sets the "user_id" field.
func (*UserTweetUpsertOne) Update ¶
func (u *UserTweetUpsertOne) Update(set func(*UserTweetUpsert)) *UserTweetUpsertOne
Update allows overriding fields `UPDATE` values. See the UserTweetCreate.OnConflict documentation for more info.
func (*UserTweetUpsertOne) UpdateCreatedAt ¶
func (u *UserTweetUpsertOne) UpdateCreatedAt() *UserTweetUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserTweetUpsertOne) UpdateNewValues ¶
func (u *UserTweetUpsertOne) UpdateNewValues() *UserTweetUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.UserTweet.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserTweetUpsertOne) UpdateTweetID ¶
func (u *UserTweetUpsertOne) UpdateTweetID() *UserTweetUpsertOne
UpdateTweetID sets the "tweet_id" field to the value that was provided on create.
func (*UserTweetUpsertOne) UpdateUserID ¶
func (u *UserTweetUpsertOne) UpdateUserID() *UserTweetUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddFriendIDs ¶
func (uu *UserUpdate) AddFriendIDs(ids ...int) *UserUpdate
AddFriendIDs adds the "friends" edge to the User entity by IDs.
func (*UserUpdate) AddFriends ¶
func (uu *UserUpdate) AddFriends(u ...*User) *UserUpdate
AddFriends adds the "friends" edges to the User entity.
func (*UserUpdate) AddFriendshipIDs ¶
func (uu *UserUpdate) AddFriendshipIDs(ids ...int) *UserUpdate
AddFriendshipIDs adds the "friendships" edge to the Friendship entity by IDs.
func (*UserUpdate) AddFriendships ¶
func (uu *UserUpdate) AddFriendships(f ...*Friendship) *UserUpdate
AddFriendships adds the "friendships" edges to the Friendship entity.
func (*UserUpdate) AddGroupIDs ¶
func (uu *UserUpdate) AddGroupIDs(ids ...int) *UserUpdate
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*UserUpdate) AddGroups ¶
func (uu *UserUpdate) AddGroups(g ...*Group) *UserUpdate
AddGroups adds the "groups" edges to the Group entity.
func (*UserUpdate) AddJoinedGroupIDs ¶
func (uu *UserUpdate) AddJoinedGroupIDs(ids ...int) *UserUpdate
AddJoinedGroupIDs adds the "joined_groups" edge to the UserGroup entity by IDs.
func (*UserUpdate) AddJoinedGroups ¶
func (uu *UserUpdate) AddJoinedGroups(u ...*UserGroup) *UserUpdate
AddJoinedGroups adds the "joined_groups" edges to the UserGroup entity.
func (*UserUpdate) AddLikedTweetIDs ¶
func (uu *UserUpdate) AddLikedTweetIDs(ids ...int) *UserUpdate
AddLikedTweetIDs adds the "liked_tweets" edge to the Tweet entity by IDs.
func (*UserUpdate) AddLikedTweets ¶
func (uu *UserUpdate) AddLikedTweets(t ...*Tweet) *UserUpdate
AddLikedTweets adds the "liked_tweets" edges to the Tweet entity.
func (*UserUpdate) AddRelativeIDs ¶
func (uu *UserUpdate) AddRelativeIDs(ids ...int) *UserUpdate
AddRelativeIDs adds the "relatives" edge to the User entity by IDs.
func (*UserUpdate) AddRelatives ¶
func (uu *UserUpdate) AddRelatives(u ...*User) *UserUpdate
AddRelatives adds the "relatives" edges to the User entity.
func (*UserUpdate) AddRoleIDs ¶ added in v0.11.1
func (uu *UserUpdate) AddRoleIDs(ids ...int) *UserUpdate
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*UserUpdate) AddRoles ¶ added in v0.11.1
func (uu *UserUpdate) AddRoles(r ...*Role) *UserUpdate
AddRoles adds the "roles" edges to the Role entity.
func (*UserUpdate) AddTweetIDs ¶
func (uu *UserUpdate) AddTweetIDs(ids ...int) *UserUpdate
AddTweetIDs adds the "tweets" edge to the Tweet entity by IDs.
func (*UserUpdate) AddTweets ¶
func (uu *UserUpdate) AddTweets(t ...*Tweet) *UserUpdate
AddTweets adds the "tweets" edges to the Tweet entity.
func (*UserUpdate) AddUserTweetIDs ¶
func (uu *UserUpdate) AddUserTweetIDs(ids ...int) *UserUpdate
AddUserTweetIDs adds the "user_tweets" edge to the UserTweet entity by IDs.
func (*UserUpdate) AddUserTweets ¶
func (uu *UserUpdate) AddUserTweets(u ...*UserTweet) *UserUpdate
AddUserTweets adds the "user_tweets" edges to the UserTweet entity.
func (*UserUpdate) ClearFriends ¶
func (uu *UserUpdate) ClearFriends() *UserUpdate
ClearFriends clears all "friends" edges to the User entity.
func (*UserUpdate) ClearFriendships ¶
func (uu *UserUpdate) ClearFriendships() *UserUpdate
ClearFriendships clears all "friendships" edges to the Friendship entity.
func (*UserUpdate) ClearGroups ¶
func (uu *UserUpdate) ClearGroups() *UserUpdate
ClearGroups clears all "groups" edges to the Group entity.
func (*UserUpdate) ClearJoinedGroups ¶
func (uu *UserUpdate) ClearJoinedGroups() *UserUpdate
ClearJoinedGroups clears all "joined_groups" edges to the UserGroup entity.
func (*UserUpdate) ClearLikedTweets ¶
func (uu *UserUpdate) ClearLikedTweets() *UserUpdate
ClearLikedTweets clears all "liked_tweets" edges to the Tweet entity.
func (*UserUpdate) ClearRelatives ¶
func (uu *UserUpdate) ClearRelatives() *UserUpdate
ClearRelatives clears all "relatives" edges to the User entity.
func (*UserUpdate) ClearRoles ¶ added in v0.11.1
func (uu *UserUpdate) ClearRoles() *UserUpdate
ClearRoles clears all "roles" edges to the Role entity.
func (*UserUpdate) ClearTweets ¶
func (uu *UserUpdate) ClearTweets() *UserUpdate
ClearTweets clears all "tweets" edges to the Tweet entity.
func (*UserUpdate) ClearUserTweets ¶
func (uu *UserUpdate) ClearUserTweets() *UserUpdate
ClearUserTweets clears all "user_tweets" edges to the UserTweet entity.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) RemoveFriendIDs ¶
func (uu *UserUpdate) RemoveFriendIDs(ids ...int) *UserUpdate
RemoveFriendIDs removes the "friends" edge to User entities by IDs.
func (*UserUpdate) RemoveFriends ¶
func (uu *UserUpdate) RemoveFriends(u ...*User) *UserUpdate
RemoveFriends removes "friends" edges to User entities.
func (*UserUpdate) RemoveFriendshipIDs ¶
func (uu *UserUpdate) RemoveFriendshipIDs(ids ...int) *UserUpdate
RemoveFriendshipIDs removes the "friendships" edge to Friendship entities by IDs.
func (*UserUpdate) RemoveFriendships ¶
func (uu *UserUpdate) RemoveFriendships(f ...*Friendship) *UserUpdate
RemoveFriendships removes "friendships" edges to Friendship entities.
func (*UserUpdate) RemoveGroupIDs ¶
func (uu *UserUpdate) RemoveGroupIDs(ids ...int) *UserUpdate
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*UserUpdate) RemoveGroups ¶
func (uu *UserUpdate) RemoveGroups(g ...*Group) *UserUpdate
RemoveGroups removes "groups" edges to Group entities.
func (*UserUpdate) RemoveJoinedGroupIDs ¶
func (uu *UserUpdate) RemoveJoinedGroupIDs(ids ...int) *UserUpdate
RemoveJoinedGroupIDs removes the "joined_groups" edge to UserGroup entities by IDs.
func (*UserUpdate) RemoveJoinedGroups ¶
func (uu *UserUpdate) RemoveJoinedGroups(u ...*UserGroup) *UserUpdate
RemoveJoinedGroups removes "joined_groups" edges to UserGroup entities.
func (*UserUpdate) RemoveLikedTweetIDs ¶
func (uu *UserUpdate) RemoveLikedTweetIDs(ids ...int) *UserUpdate
RemoveLikedTweetIDs removes the "liked_tweets" edge to Tweet entities by IDs.
func (*UserUpdate) RemoveLikedTweets ¶
func (uu *UserUpdate) RemoveLikedTweets(t ...*Tweet) *UserUpdate
RemoveLikedTweets removes "liked_tweets" edges to Tweet entities.
func (*UserUpdate) RemoveRelativeIDs ¶
func (uu *UserUpdate) RemoveRelativeIDs(ids ...int) *UserUpdate
RemoveRelativeIDs removes the "relatives" edge to User entities by IDs.
func (*UserUpdate) RemoveRelatives ¶
func (uu *UserUpdate) RemoveRelatives(u ...*User) *UserUpdate
RemoveRelatives removes "relatives" edges to User entities.
func (*UserUpdate) RemoveRoleIDs ¶ added in v0.11.1
func (uu *UserUpdate) RemoveRoleIDs(ids ...int) *UserUpdate
RemoveRoleIDs removes the "roles" edge to Role entities by IDs.
func (*UserUpdate) RemoveRoles ¶ added in v0.11.1
func (uu *UserUpdate) RemoveRoles(r ...*Role) *UserUpdate
RemoveRoles removes "roles" edges to Role entities.
func (*UserUpdate) RemoveTweetIDs ¶
func (uu *UserUpdate) RemoveTweetIDs(ids ...int) *UserUpdate
RemoveTweetIDs removes the "tweets" edge to Tweet entities by IDs.
func (*UserUpdate) RemoveTweets ¶
func (uu *UserUpdate) RemoveTweets(t ...*Tweet) *UserUpdate
RemoveTweets removes "tweets" edges to Tweet entities.
func (*UserUpdate) RemoveUserTweetIDs ¶
func (uu *UserUpdate) RemoveUserTweetIDs(ids ...int) *UserUpdate
RemoveUserTweetIDs removes the "user_tweets" edge to UserTweet entities by IDs.
func (*UserUpdate) RemoveUserTweets ¶
func (uu *UserUpdate) RemoveUserTweets(u ...*UserTweet) *UserUpdate
RemoveUserTweets removes "user_tweets" edges to UserTweet entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableName ¶
func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddFriendIDs ¶
func (uuo *UserUpdateOne) AddFriendIDs(ids ...int) *UserUpdateOne
AddFriendIDs adds the "friends" edge to the User entity by IDs.
func (*UserUpdateOne) AddFriends ¶
func (uuo *UserUpdateOne) AddFriends(u ...*User) *UserUpdateOne
AddFriends adds the "friends" edges to the User entity.
func (*UserUpdateOne) AddFriendshipIDs ¶
func (uuo *UserUpdateOne) AddFriendshipIDs(ids ...int) *UserUpdateOne
AddFriendshipIDs adds the "friendships" edge to the Friendship entity by IDs.
func (*UserUpdateOne) AddFriendships ¶
func (uuo *UserUpdateOne) AddFriendships(f ...*Friendship) *UserUpdateOne
AddFriendships adds the "friendships" edges to the Friendship entity.
func (*UserUpdateOne) AddGroupIDs ¶
func (uuo *UserUpdateOne) AddGroupIDs(ids ...int) *UserUpdateOne
AddGroupIDs adds the "groups" edge to the Group entity by IDs.
func (*UserUpdateOne) AddGroups ¶
func (uuo *UserUpdateOne) AddGroups(g ...*Group) *UserUpdateOne
AddGroups adds the "groups" edges to the Group entity.
func (*UserUpdateOne) AddJoinedGroupIDs ¶
func (uuo *UserUpdateOne) AddJoinedGroupIDs(ids ...int) *UserUpdateOne
AddJoinedGroupIDs adds the "joined_groups" edge to the UserGroup entity by IDs.
func (*UserUpdateOne) AddJoinedGroups ¶
func (uuo *UserUpdateOne) AddJoinedGroups(u ...*UserGroup) *UserUpdateOne
AddJoinedGroups adds the "joined_groups" edges to the UserGroup entity.
func (*UserUpdateOne) AddLikedTweetIDs ¶
func (uuo *UserUpdateOne) AddLikedTweetIDs(ids ...int) *UserUpdateOne
AddLikedTweetIDs adds the "liked_tweets" edge to the Tweet entity by IDs.
func (*UserUpdateOne) AddLikedTweets ¶
func (uuo *UserUpdateOne) AddLikedTweets(t ...*Tweet) *UserUpdateOne
AddLikedTweets adds the "liked_tweets" edges to the Tweet entity.
func (*UserUpdateOne) AddRelativeIDs ¶
func (uuo *UserUpdateOne) AddRelativeIDs(ids ...int) *UserUpdateOne
AddRelativeIDs adds the "relatives" edge to the User entity by IDs.
func (*UserUpdateOne) AddRelatives ¶
func (uuo *UserUpdateOne) AddRelatives(u ...*User) *UserUpdateOne
AddRelatives adds the "relatives" edges to the User entity.
func (*UserUpdateOne) AddRoleIDs ¶ added in v0.11.1
func (uuo *UserUpdateOne) AddRoleIDs(ids ...int) *UserUpdateOne
AddRoleIDs adds the "roles" edge to the Role entity by IDs.
func (*UserUpdateOne) AddRoles ¶ added in v0.11.1
func (uuo *UserUpdateOne) AddRoles(r ...*Role) *UserUpdateOne
AddRoles adds the "roles" edges to the Role entity.
func (*UserUpdateOne) AddTweetIDs ¶
func (uuo *UserUpdateOne) AddTweetIDs(ids ...int) *UserUpdateOne
AddTweetIDs adds the "tweets" edge to the Tweet entity by IDs.
func (*UserUpdateOne) AddTweets ¶
func (uuo *UserUpdateOne) AddTweets(t ...*Tweet) *UserUpdateOne
AddTweets adds the "tweets" edges to the Tweet entity.
func (*UserUpdateOne) AddUserTweetIDs ¶
func (uuo *UserUpdateOne) AddUserTweetIDs(ids ...int) *UserUpdateOne
AddUserTweetIDs adds the "user_tweets" edge to the UserTweet entity by IDs.
func (*UserUpdateOne) AddUserTweets ¶
func (uuo *UserUpdateOne) AddUserTweets(u ...*UserTweet) *UserUpdateOne
AddUserTweets adds the "user_tweets" edges to the UserTweet entity.
func (*UserUpdateOne) ClearFriends ¶
func (uuo *UserUpdateOne) ClearFriends() *UserUpdateOne
ClearFriends clears all "friends" edges to the User entity.
func (*UserUpdateOne) ClearFriendships ¶
func (uuo *UserUpdateOne) ClearFriendships() *UserUpdateOne
ClearFriendships clears all "friendships" edges to the Friendship entity.
func (*UserUpdateOne) ClearGroups ¶
func (uuo *UserUpdateOne) ClearGroups() *UserUpdateOne
ClearGroups clears all "groups" edges to the Group entity.
func (*UserUpdateOne) ClearJoinedGroups ¶
func (uuo *UserUpdateOne) ClearJoinedGroups() *UserUpdateOne
ClearJoinedGroups clears all "joined_groups" edges to the UserGroup entity.
func (*UserUpdateOne) ClearLikedTweets ¶
func (uuo *UserUpdateOne) ClearLikedTweets() *UserUpdateOne
ClearLikedTweets clears all "liked_tweets" edges to the Tweet entity.
func (*UserUpdateOne) ClearRelatives ¶
func (uuo *UserUpdateOne) ClearRelatives() *UserUpdateOne
ClearRelatives clears all "relatives" edges to the User entity.
func (*UserUpdateOne) ClearRoles ¶ added in v0.11.1
func (uuo *UserUpdateOne) ClearRoles() *UserUpdateOne
ClearRoles clears all "roles" edges to the Role entity.
func (*UserUpdateOne) ClearTweets ¶
func (uuo *UserUpdateOne) ClearTweets() *UserUpdateOne
ClearTweets clears all "tweets" edges to the Tweet entity.
func (*UserUpdateOne) ClearUserTweets ¶
func (uuo *UserUpdateOne) ClearUserTweets() *UserUpdateOne
ClearUserTweets clears all "user_tweets" edges to the UserTweet entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) RemoveFriendIDs ¶
func (uuo *UserUpdateOne) RemoveFriendIDs(ids ...int) *UserUpdateOne
RemoveFriendIDs removes the "friends" edge to User entities by IDs.
func (*UserUpdateOne) RemoveFriends ¶
func (uuo *UserUpdateOne) RemoveFriends(u ...*User) *UserUpdateOne
RemoveFriends removes "friends" edges to User entities.
func (*UserUpdateOne) RemoveFriendshipIDs ¶
func (uuo *UserUpdateOne) RemoveFriendshipIDs(ids ...int) *UserUpdateOne
RemoveFriendshipIDs removes the "friendships" edge to Friendship entities by IDs.
func (*UserUpdateOne) RemoveFriendships ¶
func (uuo *UserUpdateOne) RemoveFriendships(f ...*Friendship) *UserUpdateOne
RemoveFriendships removes "friendships" edges to Friendship entities.
func (*UserUpdateOne) RemoveGroupIDs ¶
func (uuo *UserUpdateOne) RemoveGroupIDs(ids ...int) *UserUpdateOne
RemoveGroupIDs removes the "groups" edge to Group entities by IDs.
func (*UserUpdateOne) RemoveGroups ¶
func (uuo *UserUpdateOne) RemoveGroups(g ...*Group) *UserUpdateOne
RemoveGroups removes "groups" edges to Group entities.
func (*UserUpdateOne) RemoveJoinedGroupIDs ¶
func (uuo *UserUpdateOne) RemoveJoinedGroupIDs(ids ...int) *UserUpdateOne
RemoveJoinedGroupIDs removes the "joined_groups" edge to UserGroup entities by IDs.
func (*UserUpdateOne) RemoveJoinedGroups ¶
func (uuo *UserUpdateOne) RemoveJoinedGroups(u ...*UserGroup) *UserUpdateOne
RemoveJoinedGroups removes "joined_groups" edges to UserGroup entities.
func (*UserUpdateOne) RemoveLikedTweetIDs ¶
func (uuo *UserUpdateOne) RemoveLikedTweetIDs(ids ...int) *UserUpdateOne
RemoveLikedTweetIDs removes the "liked_tweets" edge to Tweet entities by IDs.
func (*UserUpdateOne) RemoveLikedTweets ¶
func (uuo *UserUpdateOne) RemoveLikedTweets(t ...*Tweet) *UserUpdateOne
RemoveLikedTweets removes "liked_tweets" edges to Tweet entities.
func (*UserUpdateOne) RemoveRelativeIDs ¶
func (uuo *UserUpdateOne) RemoveRelativeIDs(ids ...int) *UserUpdateOne
RemoveRelativeIDs removes the "relatives" edge to User entities by IDs.
func (*UserUpdateOne) RemoveRelatives ¶
func (uuo *UserUpdateOne) RemoveRelatives(u ...*User) *UserUpdateOne
RemoveRelatives removes "relatives" edges to User entities.
func (*UserUpdateOne) RemoveRoleIDs ¶ added in v0.11.1
func (uuo *UserUpdateOne) RemoveRoleIDs(ids ...int) *UserUpdateOne
RemoveRoleIDs removes the "roles" edge to Role entities by IDs.
func (*UserUpdateOne) RemoveRoles ¶ added in v0.11.1
func (uuo *UserUpdateOne) RemoveRoles(r ...*Role) *UserUpdateOne
RemoveRoles removes "roles" edges to Role entities.
func (*UserUpdateOne) RemoveTweetIDs ¶
func (uuo *UserUpdateOne) RemoveTweetIDs(ids ...int) *UserUpdateOne
RemoveTweetIDs removes the "tweets" edge to Tweet entities by IDs.
func (*UserUpdateOne) RemoveTweets ¶
func (uuo *UserUpdateOne) RemoveTweets(t ...*Tweet) *UserUpdateOne
RemoveTweets removes "tweets" edges to Tweet entities.
func (*UserUpdateOne) RemoveUserTweetIDs ¶
func (uuo *UserUpdateOne) RemoveUserTweetIDs(ids ...int) *UserUpdateOne
RemoveUserTweetIDs removes the "user_tweets" edge to UserTweet entities by IDs.
func (*UserUpdateOne) RemoveUserTweets ¶
func (uuo *UserUpdateOne) RemoveUserTweets(u ...*UserTweet) *UserUpdateOne
RemoveUserTweets removes "user_tweets" edges to UserTweet entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableName ¶
func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdateOne) Where ¶ added in v0.11.8
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) SetName ¶
func (u *UserUpsert) SetName(v string) *UserUpsert
SetName sets the "name" field.
func (*UserUpsert) UpdateName ¶
func (u *UserUpsert) UpdateName() *UserUpsert
UpdateName sets the "name" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetName ¶
func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk
SetName sets the "name" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateName ¶
func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) ID ¶
func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetName ¶
func (u *UserUpsertOne) SetName(v string) *UserUpsertOne
SetName sets the "name" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateName ¶
func (u *UserUpsertOne) UpdateName() *UserUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
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 ¶
- attachedfile.go
- attachedfile_create.go
- attachedfile_delete.go
- attachedfile_query.go
- attachedfile_update.go
- client.go
- config.go
- context.go
- ent.go
- entql.go
- file.go
- file_create.go
- file_delete.go
- file_query.go
- file_update.go
- friendship.go
- friendship_create.go
- friendship_delete.go
- friendship_query.go
- friendship_update.go
- generate.go
- group.go
- group_create.go
- group_delete.go
- group_query.go
- group_update.go
- grouptag.go
- grouptag_create.go
- grouptag_delete.go
- grouptag_query.go
- grouptag_update.go
- mutation.go
- process.go
- process_create.go
- process_delete.go
- process_query.go
- process_update.go
- relationship.go
- relationship_create.go
- relationship_delete.go
- relationship_query.go
- relationship_update.go
- relationshipinfo.go
- relationshipinfo_create.go
- relationshipinfo_delete.go
- relationshipinfo_query.go
- relationshipinfo_update.go
- role.go
- role_create.go
- role_delete.go
- role_query.go
- role_update.go
- roleuser.go
- roleuser_create.go
- roleuser_delete.go
- roleuser_query.go
- roleuser_update.go
- runtime.go
- tag.go
- tag_create.go
- tag_delete.go
- tag_query.go
- tag_update.go
- tweet.go
- tweet_create.go
- tweet_delete.go
- tweet_query.go
- tweet_update.go
- tweetlike.go
- tweetlike_create.go
- tweetlike_delete.go
- tweetlike_query.go
- tweetlike_update.go
- tweettag.go
- tweettag_create.go
- tweettag_delete.go
- tweettag_query.go
- tweettag_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go
- usergroup.go
- usergroup_create.go
- usergroup_delete.go
- usergroup_query.go
- usergroup_update.go
- usertweet.go
- usertweet_create.go
- usertweet_delete.go
- usertweet_query.go
- usertweet_update.go