Documentation ¶
Index ¶
- Constants
- Variables
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type 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) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk
- func (c *FileClient) Query() *FileQuery
- func (c *FileClient) QueryFiletype(f *File) *FiletypeQuery
- func (c *FileClient) QueryTags(f *File) *TagQuery
- func (c *FileClient) QueryUser(f *File) *UserQuery
- 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) AddTagIDs(ids ...string) *FileCreate
- func (fc *FileCreate) AddTags(t ...*Tag) *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) SetCreatedAt(t time.Time) *FileCreate
- func (fc *FileCreate) SetDeletedAt(t time.Time) *FileCreate
- func (fc *FileCreate) SetFiletype(f *Filetype) *FileCreate
- func (fc *FileCreate) SetFiletypeID(id string) *FileCreate
- func (fc *FileCreate) SetName(s string) *FileCreate
- func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate
- func (fc *FileCreate) SetNillableDeletedAt(t *time.Time) *FileCreate
- func (fc *FileCreate) SetNillableUpdatedAt(t *time.Time) *FileCreate
- func (fc *FileCreate) SetSize(i int) *FileCreate
- func (fc *FileCreate) SetType(s string) *FileCreate
- func (fc *FileCreate) SetUUID(s string) *FileCreate
- func (fc *FileCreate) SetUpdatedAt(t time.Time) *FileCreate
- func (fc *FileCreate) SetUser(u *User) *FileCreate
- func (fc *FileCreate) SetUserID(i int) *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 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) AddSize(i int)
- func (m *FileMutation) AddTagIDs(ids ...string)
- 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) AddedSize() (r int, exists bool)
- func (m *FileMutation) ClearCreatedAt()
- func (m *FileMutation) ClearDeletedAt()
- func (m *FileMutation) ClearEdge(name string) error
- func (m *FileMutation) ClearField(name string) error
- func (m *FileMutation) ClearFiletype()
- func (m *FileMutation) ClearTags()
- func (m *FileMutation) ClearUser()
- func (m *FileMutation) ClearedEdges() []string
- func (m *FileMutation) ClearedFields() []string
- func (m FileMutation) Client() *Client
- func (m *FileMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FileMutation) CreatedAtCleared() bool
- func (m *FileMutation) DeletedAt() (r time.Time, exists bool)
- func (m *FileMutation) DeletedAtCleared() bool
- 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) FiletypeCleared() bool
- func (m *FileMutation) FiletypeID() (id string, exists bool)
- func (m *FileMutation) FiletypeIDs() (ids []string)
- func (m *FileMutation) GetType() (r string, exists bool)
- 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) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *FileMutation) OldDeletedAt(ctx context.Context) (v *time.Time, err error)
- 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) OldSize(ctx context.Context) (v int, err error)
- func (m *FileMutation) OldType(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldUUID(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileMutation) OldUserID(ctx context.Context) (v int, err error)
- func (m *FileMutation) Op() Op
- func (m *FileMutation) RemoveTagIDs(ids ...string)
- func (m *FileMutation) RemovedEdges() []string
- func (m *FileMutation) RemovedIDs(name string) []ent.Value
- func (m *FileMutation) RemovedTagsIDs() (ids []string)
- func (m *FileMutation) ResetCreatedAt()
- func (m *FileMutation) ResetDeletedAt()
- func (m *FileMutation) ResetEdge(name string) error
- func (m *FileMutation) ResetField(name string) error
- func (m *FileMutation) ResetFiletype()
- func (m *FileMutation) ResetName()
- func (m *FileMutation) ResetSize()
- func (m *FileMutation) ResetTags()
- func (m *FileMutation) ResetType()
- func (m *FileMutation) ResetUUID()
- func (m *FileMutation) ResetUpdatedAt()
- func (m *FileMutation) ResetUser()
- func (m *FileMutation) ResetUserID()
- func (m *FileMutation) SetCreatedAt(t time.Time)
- func (m *FileMutation) SetDeletedAt(t time.Time)
- func (m *FileMutation) SetField(name string, value ent.Value) error
- func (m *FileMutation) SetFiletypeID(id string)
- func (m *FileMutation) SetName(s string)
- func (m *FileMutation) SetOp(op Op)
- func (m *FileMutation) SetSize(i int)
- func (m *FileMutation) SetType(s string)
- func (m *FileMutation) SetUUID(s string)
- func (m *FileMutation) SetUpdatedAt(t time.Time)
- func (m *FileMutation) SetUserID(i int)
- func (m *FileMutation) Size() (r int, exists bool)
- func (m *FileMutation) TagsCleared() bool
- func (m *FileMutation) TagsIDs() (ids []string)
- func (m FileMutation) Tx() (*Tx, error)
- func (m *FileMutation) Type() string
- func (m *FileMutation) UUID() (r string, exists bool)
- func (m *FileMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FileMutation) UserCleared() bool
- func (m *FileMutation) UserID() (r int, exists bool)
- func (m *FileMutation) UserIDs() (ids []int)
- 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) 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) ForShare(opts ...sql.LockOption) *FileQuery
- func (fq *FileQuery) ForUpdate(opts ...sql.LockOption) *FileQuery
- 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 ...file.OrderOption) *FileQuery
- func (fq *FileQuery) QueryFiletype() *FiletypeQuery
- func (fq *FileQuery) QueryTags() *TagQuery
- func (fq *FileQuery) QueryUser() *UserQuery
- 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) WithFiletype(opts ...func(*FiletypeQuery)) *FileQuery
- func (fq *FileQuery) WithTags(opts ...func(*TagQuery)) *FileQuery
- func (fq *FileQuery) WithUser(opts ...func(*UserQuery)) *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) AddSize(i int) *FileUpdate
- func (fu *FileUpdate) AddTagIDs(ids ...string) *FileUpdate
- func (fu *FileUpdate) AddTags(t ...*Tag) *FileUpdate
- func (fu *FileUpdate) ClearCreatedAt() *FileUpdate
- func (fu *FileUpdate) ClearDeletedAt() *FileUpdate
- func (fu *FileUpdate) ClearFiletype() *FileUpdate
- func (fu *FileUpdate) ClearTags() *FileUpdate
- func (fu *FileUpdate) ClearUser() *FileUpdate
- func (fu *FileUpdate) Exec(ctx context.Context) error
- func (fu *FileUpdate) ExecX(ctx context.Context)
- func (fu *FileUpdate) Mutation() *FileMutation
- func (fu *FileUpdate) RemoveTagIDs(ids ...string) *FileUpdate
- func (fu *FileUpdate) RemoveTags(t ...*Tag) *FileUpdate
- func (fu *FileUpdate) Save(ctx context.Context) (int, error)
- func (fu *FileUpdate) SaveX(ctx context.Context) int
- func (fu *FileUpdate) SetCreatedAt(t time.Time) *FileUpdate
- func (fu *FileUpdate) SetDeletedAt(t time.Time) *FileUpdate
- func (fu *FileUpdate) SetFiletype(f *Filetype) *FileUpdate
- func (fu *FileUpdate) SetFiletypeID(id string) *FileUpdate
- func (fu *FileUpdate) SetName(s string) *FileUpdate
- func (fu *FileUpdate) SetNillableCreatedAt(t *time.Time) *FileUpdate
- func (fu *FileUpdate) SetNillableDeletedAt(t *time.Time) *FileUpdate
- func (fu *FileUpdate) SetNillableName(s *string) *FileUpdate
- func (fu *FileUpdate) SetNillableSize(i *int) *FileUpdate
- func (fu *FileUpdate) SetNillableType(s *string) *FileUpdate
- func (fu *FileUpdate) SetNillableUUID(s *string) *FileUpdate
- func (fu *FileUpdate) SetNillableUserID(i *int) *FileUpdate
- func (fu *FileUpdate) SetSize(i int) *FileUpdate
- func (fu *FileUpdate) SetType(s string) *FileUpdate
- func (fu *FileUpdate) SetUUID(s string) *FileUpdate
- func (fu *FileUpdate) SetUpdatedAt(t time.Time) *FileUpdate
- func (fu *FileUpdate) SetUser(u *User) *FileUpdate
- func (fu *FileUpdate) SetUserID(i int) *FileUpdate
- func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
- type FileUpdateOne
- func (fuo *FileUpdateOne) AddSize(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) AddTagIDs(ids ...string) *FileUpdateOne
- func (fuo *FileUpdateOne) AddTags(t ...*Tag) *FileUpdateOne
- func (fuo *FileUpdateOne) ClearCreatedAt() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearDeletedAt() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearFiletype() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearTags() *FileUpdateOne
- func (fuo *FileUpdateOne) ClearUser() *FileUpdateOne
- func (fuo *FileUpdateOne) Exec(ctx context.Context) error
- func (fuo *FileUpdateOne) ExecX(ctx context.Context)
- func (fuo *FileUpdateOne) Mutation() *FileMutation
- func (fuo *FileUpdateOne) RemoveTagIDs(ids ...string) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveTags(t ...*Tag) *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) SetCreatedAt(t time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) SetDeletedAt(t time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) SetFiletype(f *Filetype) *FileUpdateOne
- func (fuo *FileUpdateOne) SetFiletypeID(id string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableCreatedAt(t *time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableDeletedAt(t *time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableName(s *string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableSize(i *int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableType(s *string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableUUID(s *string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableUserID(i *int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetSize(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetType(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetUUID(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetUpdatedAt(t time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) SetUser(u *User) *FileUpdateOne
- func (fuo *FileUpdateOne) SetUserID(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
- type FileUpsert
- func (u *FileUpsert) AddSize(v int) *FileUpsert
- func (u *FileUpsert) ClearCreatedAt() *FileUpsert
- func (u *FileUpsert) ClearDeletedAt() *FileUpsert
- func (u *FileUpsert) SetCreatedAt(v time.Time) *FileUpsert
- func (u *FileUpsert) SetDeletedAt(v time.Time) *FileUpsert
- func (u *FileUpsert) SetName(v string) *FileUpsert
- func (u *FileUpsert) SetSize(v int) *FileUpsert
- func (u *FileUpsert) SetType(v string) *FileUpsert
- func (u *FileUpsert) SetUUID(v string) *FileUpsert
- func (u *FileUpsert) SetUpdatedAt(v time.Time) *FileUpsert
- func (u *FileUpsert) SetUserID(v int) *FileUpsert
- func (u *FileUpsert) UpdateCreatedAt() *FileUpsert
- func (u *FileUpsert) UpdateDeletedAt() *FileUpsert
- func (u *FileUpsert) UpdateName() *FileUpsert
- func (u *FileUpsert) UpdateSize() *FileUpsert
- func (u *FileUpsert) UpdateType() *FileUpsert
- func (u *FileUpsert) UpdateUUID() *FileUpsert
- func (u *FileUpsert) UpdateUpdatedAt() *FileUpsert
- func (u *FileUpsert) UpdateUserID() *FileUpsert
- type FileUpsertBulk
- func (u *FileUpsertBulk) AddSize(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) ClearCreatedAt() *FileUpsertBulk
- func (u *FileUpsertBulk) ClearDeletedAt() *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) SetCreatedAt(v time.Time) *FileUpsertBulk
- func (u *FileUpsertBulk) SetDeletedAt(v time.Time) *FileUpsertBulk
- func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk
- func (u *FileUpsertBulk) SetSize(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) SetType(v string) *FileUpsertBulk
- func (u *FileUpsertBulk) SetUUID(v string) *FileUpsertBulk
- func (u *FileUpsertBulk) SetUpdatedAt(v time.Time) *FileUpsertBulk
- func (u *FileUpsertBulk) SetUserID(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateCreatedAt() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateDeletedAt() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateType() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateUUID() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateUpdatedAt() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateUserID() *FileUpsertBulk
- type FileUpsertOne
- func (u *FileUpsertOne) AddSize(v int) *FileUpsertOne
- func (u *FileUpsertOne) ClearCreatedAt() *FileUpsertOne
- func (u *FileUpsertOne) ClearDeletedAt() *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) SetCreatedAt(v time.Time) *FileUpsertOne
- func (u *FileUpsertOne) SetDeletedAt(v time.Time) *FileUpsertOne
- func (u *FileUpsertOne) SetName(v string) *FileUpsertOne
- func (u *FileUpsertOne) SetSize(v int) *FileUpsertOne
- func (u *FileUpsertOne) SetType(v string) *FileUpsertOne
- func (u *FileUpsertOne) SetUUID(v string) *FileUpsertOne
- func (u *FileUpsertOne) SetUpdatedAt(v time.Time) *FileUpsertOne
- func (u *FileUpsertOne) SetUserID(v int) *FileUpsertOne
- func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne
- func (u *FileUpsertOne) UpdateCreatedAt() *FileUpsertOne
- func (u *FileUpsertOne) UpdateDeletedAt() *FileUpsertOne
- func (u *FileUpsertOne) UpdateName() *FileUpsertOne
- func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne
- func (u *FileUpsertOne) UpdateSize() *FileUpsertOne
- func (u *FileUpsertOne) UpdateType() *FileUpsertOne
- func (u *FileUpsertOne) UpdateUUID() *FileUpsertOne
- func (u *FileUpsertOne) UpdateUpdatedAt() *FileUpsertOne
- func (u *FileUpsertOne) UpdateUserID() *FileUpsertOne
- type Files
- type Filetype
- type FiletypeClient
- func (c *FiletypeClient) Create() *FiletypeCreate
- func (c *FiletypeClient) CreateBulk(builders ...*FiletypeCreate) *FiletypeCreateBulk
- func (c *FiletypeClient) Delete() *FiletypeDelete
- func (c *FiletypeClient) DeleteOne(f *Filetype) *FiletypeDeleteOne
- func (c *FiletypeClient) DeleteOneID(id string) *FiletypeDeleteOne
- func (c *FiletypeClient) Get(ctx context.Context, id string) (*Filetype, error)
- func (c *FiletypeClient) GetX(ctx context.Context, id string) *Filetype
- func (c *FiletypeClient) Hooks() []Hook
- func (c *FiletypeClient) Intercept(interceptors ...Interceptor)
- func (c *FiletypeClient) Interceptors() []Interceptor
- func (c *FiletypeClient) MapCreateBulk(slice any, setFunc func(*FiletypeCreate, int)) *FiletypeCreateBulk
- func (c *FiletypeClient) Query() *FiletypeQuery
- func (c *FiletypeClient) QueryFiles(f *Filetype) *FileQuery
- func (c *FiletypeClient) Update() *FiletypeUpdate
- func (c *FiletypeClient) UpdateOne(f *Filetype) *FiletypeUpdateOne
- func (c *FiletypeClient) UpdateOneID(id string) *FiletypeUpdateOne
- func (c *FiletypeClient) Use(hooks ...Hook)
- type FiletypeCreate
- func (fc *FiletypeCreate) AddFileIDs(ids ...int) *FiletypeCreate
- func (fc *FiletypeCreate) AddFiles(f ...*File) *FiletypeCreate
- func (fc *FiletypeCreate) Exec(ctx context.Context) error
- func (fc *FiletypeCreate) ExecX(ctx context.Context)
- func (fc *FiletypeCreate) Mutation() *FiletypeMutation
- func (fc *FiletypeCreate) OnConflict(opts ...sql.ConflictOption) *FiletypeUpsertOne
- func (fc *FiletypeCreate) OnConflictColumns(columns ...string) *FiletypeUpsertOne
- func (fc *FiletypeCreate) Save(ctx context.Context) (*Filetype, error)
- func (fc *FiletypeCreate) SaveX(ctx context.Context) *Filetype
- func (fc *FiletypeCreate) SetAllowedSize(i int) *FiletypeCreate
- func (fc *FiletypeCreate) SetCreatedAt(t time.Time) *FiletypeCreate
- func (fc *FiletypeCreate) SetID(s string) *FiletypeCreate
- func (fc *FiletypeCreate) SetIsBanned(b bool) *FiletypeCreate
- func (fc *FiletypeCreate) SetNillableAllowedSize(i *int) *FiletypeCreate
- func (fc *FiletypeCreate) SetNillableCreatedAt(t *time.Time) *FiletypeCreate
- func (fc *FiletypeCreate) SetNillableIsBanned(b *bool) *FiletypeCreate
- func (fc *FiletypeCreate) SetNillableUpdatedAt(t *time.Time) *FiletypeCreate
- func (fc *FiletypeCreate) SetUpdatedAt(t time.Time) *FiletypeCreate
- type FiletypeCreateBulk
- func (fcb *FiletypeCreateBulk) Exec(ctx context.Context) error
- func (fcb *FiletypeCreateBulk) ExecX(ctx context.Context)
- func (fcb *FiletypeCreateBulk) OnConflict(opts ...sql.ConflictOption) *FiletypeUpsertBulk
- func (fcb *FiletypeCreateBulk) OnConflictColumns(columns ...string) *FiletypeUpsertBulk
- func (fcb *FiletypeCreateBulk) Save(ctx context.Context) ([]*Filetype, error)
- func (fcb *FiletypeCreateBulk) SaveX(ctx context.Context) []*Filetype
- type FiletypeDelete
- type FiletypeDeleteOne
- type FiletypeEdges
- type FiletypeGroupBy
- func (fgb *FiletypeGroupBy) Aggregate(fns ...AggregateFunc) *FiletypeGroupBy
- func (s *FiletypeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FiletypeGroupBy) BoolX(ctx context.Context) bool
- func (s *FiletypeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FiletypeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FiletypeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FiletypeGroupBy) Float64X(ctx context.Context) float64
- func (s *FiletypeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FiletypeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FiletypeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FiletypeGroupBy) IntX(ctx context.Context) int
- func (s *FiletypeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FiletypeGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FiletypeGroupBy) Scan(ctx context.Context, v any) error
- func (s *FiletypeGroupBy) ScanX(ctx context.Context, v any)
- func (s *FiletypeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FiletypeGroupBy) StringX(ctx context.Context) string
- func (s *FiletypeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FiletypeGroupBy) StringsX(ctx context.Context) []string
- type FiletypeMutation
- func (m *FiletypeMutation) AddAllowedSize(i int)
- func (m *FiletypeMutation) AddField(name string, value ent.Value) error
- func (m *FiletypeMutation) AddFileIDs(ids ...int)
- func (m *FiletypeMutation) AddedAllowedSize() (r int, exists bool)
- func (m *FiletypeMutation) AddedEdges() []string
- func (m *FiletypeMutation) AddedField(name string) (ent.Value, bool)
- func (m *FiletypeMutation) AddedFields() []string
- func (m *FiletypeMutation) AddedIDs(name string) []ent.Value
- func (m *FiletypeMutation) AllowedSize() (r int, exists bool)
- func (m *FiletypeMutation) ClearCreatedAt()
- func (m *FiletypeMutation) ClearEdge(name string) error
- func (m *FiletypeMutation) ClearField(name string) error
- func (m *FiletypeMutation) ClearFiles()
- func (m *FiletypeMutation) ClearedEdges() []string
- func (m *FiletypeMutation) ClearedFields() []string
- func (m FiletypeMutation) Client() *Client
- func (m *FiletypeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FiletypeMutation) CreatedAtCleared() bool
- func (m *FiletypeMutation) EdgeCleared(name string) bool
- func (m *FiletypeMutation) Field(name string) (ent.Value, bool)
- func (m *FiletypeMutation) FieldCleared(name string) bool
- func (m *FiletypeMutation) Fields() []string
- func (m *FiletypeMutation) FilesCleared() bool
- func (m *FiletypeMutation) FilesIDs() (ids []int)
- func (m *FiletypeMutation) ID() (id string, exists bool)
- func (m *FiletypeMutation) IDs(ctx context.Context) ([]string, error)
- func (m *FiletypeMutation) IsBanned() (r bool, exists bool)
- func (m *FiletypeMutation) OldAllowedSize(ctx context.Context) (v int, err error)
- func (m *FiletypeMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *FiletypeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FiletypeMutation) OldIsBanned(ctx context.Context) (v bool, err error)
- func (m *FiletypeMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FiletypeMutation) Op() Op
- func (m *FiletypeMutation) RemoveFileIDs(ids ...int)
- func (m *FiletypeMutation) RemovedEdges() []string
- func (m *FiletypeMutation) RemovedFilesIDs() (ids []int)
- func (m *FiletypeMutation) RemovedIDs(name string) []ent.Value
- func (m *FiletypeMutation) ResetAllowedSize()
- func (m *FiletypeMutation) ResetCreatedAt()
- func (m *FiletypeMutation) ResetEdge(name string) error
- func (m *FiletypeMutation) ResetField(name string) error
- func (m *FiletypeMutation) ResetFiles()
- func (m *FiletypeMutation) ResetIsBanned()
- func (m *FiletypeMutation) ResetUpdatedAt()
- func (m *FiletypeMutation) SetAllowedSize(i int)
- func (m *FiletypeMutation) SetCreatedAt(t time.Time)
- func (m *FiletypeMutation) SetField(name string, value ent.Value) error
- func (m *FiletypeMutation) SetID(id string)
- func (m *FiletypeMutation) SetIsBanned(b bool)
- func (m *FiletypeMutation) SetOp(op Op)
- func (m *FiletypeMutation) SetUpdatedAt(t time.Time)
- func (m FiletypeMutation) Tx() (*Tx, error)
- func (m *FiletypeMutation) Type() string
- func (m *FiletypeMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *FiletypeMutation) Where(ps ...predicate.Filetype)
- func (m *FiletypeMutation) WhereP(ps ...func(*sql.Selector))
- type FiletypeQuery
- func (fq *FiletypeQuery) Aggregate(fns ...AggregateFunc) *FiletypeSelect
- func (fq *FiletypeQuery) All(ctx context.Context) ([]*Filetype, error)
- func (fq *FiletypeQuery) AllX(ctx context.Context) []*Filetype
- func (fq *FiletypeQuery) Clone() *FiletypeQuery
- func (fq *FiletypeQuery) Count(ctx context.Context) (int, error)
- func (fq *FiletypeQuery) CountX(ctx context.Context) int
- func (fq *FiletypeQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FiletypeQuery) ExistX(ctx context.Context) bool
- func (fq *FiletypeQuery) First(ctx context.Context) (*Filetype, error)
- func (fq *FiletypeQuery) FirstID(ctx context.Context) (id string, err error)
- func (fq *FiletypeQuery) FirstIDX(ctx context.Context) string
- func (fq *FiletypeQuery) FirstX(ctx context.Context) *Filetype
- func (fq *FiletypeQuery) ForShare(opts ...sql.LockOption) *FiletypeQuery
- func (fq *FiletypeQuery) ForUpdate(opts ...sql.LockOption) *FiletypeQuery
- func (fq *FiletypeQuery) GroupBy(field string, fields ...string) *FiletypeGroupBy
- func (fq *FiletypeQuery) IDs(ctx context.Context) (ids []string, err error)
- func (fq *FiletypeQuery) IDsX(ctx context.Context) []string
- func (fq *FiletypeQuery) Limit(limit int) *FiletypeQuery
- func (fq *FiletypeQuery) Offset(offset int) *FiletypeQuery
- func (fq *FiletypeQuery) Only(ctx context.Context) (*Filetype, error)
- func (fq *FiletypeQuery) OnlyID(ctx context.Context) (id string, err error)
- func (fq *FiletypeQuery) OnlyIDX(ctx context.Context) string
- func (fq *FiletypeQuery) OnlyX(ctx context.Context) *Filetype
- func (fq *FiletypeQuery) Order(o ...filetype.OrderOption) *FiletypeQuery
- func (fq *FiletypeQuery) QueryFiles() *FileQuery
- func (fq *FiletypeQuery) Select(fields ...string) *FiletypeSelect
- func (fq *FiletypeQuery) Unique(unique bool) *FiletypeQuery
- func (fq *FiletypeQuery) Where(ps ...predicate.Filetype) *FiletypeQuery
- func (fq *FiletypeQuery) WithFiles(opts ...func(*FileQuery)) *FiletypeQuery
- type FiletypeSelect
- func (fs *FiletypeSelect) Aggregate(fns ...AggregateFunc) *FiletypeSelect
- func (s *FiletypeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FiletypeSelect) BoolX(ctx context.Context) bool
- func (s *FiletypeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FiletypeSelect) BoolsX(ctx context.Context) []bool
- func (s *FiletypeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FiletypeSelect) Float64X(ctx context.Context) float64
- func (s *FiletypeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FiletypeSelect) Float64sX(ctx context.Context) []float64
- func (s *FiletypeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FiletypeSelect) IntX(ctx context.Context) int
- func (s *FiletypeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FiletypeSelect) IntsX(ctx context.Context) []int
- func (fs *FiletypeSelect) Scan(ctx context.Context, v any) error
- func (s *FiletypeSelect) ScanX(ctx context.Context, v any)
- func (s *FiletypeSelect) String(ctx context.Context) (_ string, err error)
- func (s *FiletypeSelect) StringX(ctx context.Context) string
- func (s *FiletypeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FiletypeSelect) StringsX(ctx context.Context) []string
- type FiletypeUpdate
- func (fu *FiletypeUpdate) AddAllowedSize(i int) *FiletypeUpdate
- func (fu *FiletypeUpdate) AddFileIDs(ids ...int) *FiletypeUpdate
- func (fu *FiletypeUpdate) AddFiles(f ...*File) *FiletypeUpdate
- func (fu *FiletypeUpdate) ClearCreatedAt() *FiletypeUpdate
- func (fu *FiletypeUpdate) ClearFiles() *FiletypeUpdate
- func (fu *FiletypeUpdate) Exec(ctx context.Context) error
- func (fu *FiletypeUpdate) ExecX(ctx context.Context)
- func (fu *FiletypeUpdate) Mutation() *FiletypeMutation
- func (fu *FiletypeUpdate) RemoveFileIDs(ids ...int) *FiletypeUpdate
- func (fu *FiletypeUpdate) RemoveFiles(f ...*File) *FiletypeUpdate
- func (fu *FiletypeUpdate) Save(ctx context.Context) (int, error)
- func (fu *FiletypeUpdate) SaveX(ctx context.Context) int
- func (fu *FiletypeUpdate) SetAllowedSize(i int) *FiletypeUpdate
- func (fu *FiletypeUpdate) SetCreatedAt(t time.Time) *FiletypeUpdate
- func (fu *FiletypeUpdate) SetIsBanned(b bool) *FiletypeUpdate
- func (fu *FiletypeUpdate) SetNillableAllowedSize(i *int) *FiletypeUpdate
- func (fu *FiletypeUpdate) SetNillableCreatedAt(t *time.Time) *FiletypeUpdate
- func (fu *FiletypeUpdate) SetNillableIsBanned(b *bool) *FiletypeUpdate
- func (fu *FiletypeUpdate) SetUpdatedAt(t time.Time) *FiletypeUpdate
- func (fu *FiletypeUpdate) Where(ps ...predicate.Filetype) *FiletypeUpdate
- type FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) AddAllowedSize(i int) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) AddFileIDs(ids ...int) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) AddFiles(f ...*File) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) ClearCreatedAt() *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) ClearFiles() *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) Exec(ctx context.Context) error
- func (fuo *FiletypeUpdateOne) ExecX(ctx context.Context)
- func (fuo *FiletypeUpdateOne) Mutation() *FiletypeMutation
- func (fuo *FiletypeUpdateOne) RemoveFileIDs(ids ...int) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) RemoveFiles(f ...*File) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) Save(ctx context.Context) (*Filetype, error)
- func (fuo *FiletypeUpdateOne) SaveX(ctx context.Context) *Filetype
- func (fuo *FiletypeUpdateOne) Select(field string, fields ...string) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) SetAllowedSize(i int) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) SetCreatedAt(t time.Time) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) SetIsBanned(b bool) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) SetNillableAllowedSize(i *int) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) SetNillableCreatedAt(t *time.Time) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) SetNillableIsBanned(b *bool) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) SetUpdatedAt(t time.Time) *FiletypeUpdateOne
- func (fuo *FiletypeUpdateOne) Where(ps ...predicate.Filetype) *FiletypeUpdateOne
- type FiletypeUpsert
- func (u *FiletypeUpsert) AddAllowedSize(v int) *FiletypeUpsert
- func (u *FiletypeUpsert) ClearCreatedAt() *FiletypeUpsert
- func (u *FiletypeUpsert) SetAllowedSize(v int) *FiletypeUpsert
- func (u *FiletypeUpsert) SetCreatedAt(v time.Time) *FiletypeUpsert
- func (u *FiletypeUpsert) SetIsBanned(v bool) *FiletypeUpsert
- func (u *FiletypeUpsert) SetUpdatedAt(v time.Time) *FiletypeUpsert
- func (u *FiletypeUpsert) UpdateAllowedSize() *FiletypeUpsert
- func (u *FiletypeUpsert) UpdateCreatedAt() *FiletypeUpsert
- func (u *FiletypeUpsert) UpdateIsBanned() *FiletypeUpsert
- func (u *FiletypeUpsert) UpdateUpdatedAt() *FiletypeUpsert
- type FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) AddAllowedSize(v int) *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) ClearCreatedAt() *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) DoNothing() *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) Exec(ctx context.Context) error
- func (u *FiletypeUpsertBulk) ExecX(ctx context.Context)
- func (u *FiletypeUpsertBulk) Ignore() *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) SetAllowedSize(v int) *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) SetCreatedAt(v time.Time) *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) SetIsBanned(v bool) *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) SetUpdatedAt(v time.Time) *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) Update(set func(*FiletypeUpsert)) *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) UpdateAllowedSize() *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) UpdateCreatedAt() *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) UpdateIsBanned() *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) UpdateNewValues() *FiletypeUpsertBulk
- func (u *FiletypeUpsertBulk) UpdateUpdatedAt() *FiletypeUpsertBulk
- type FiletypeUpsertOne
- func (u *FiletypeUpsertOne) AddAllowedSize(v int) *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) ClearCreatedAt() *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) DoNothing() *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) Exec(ctx context.Context) error
- func (u *FiletypeUpsertOne) ExecX(ctx context.Context)
- func (u *FiletypeUpsertOne) ID(ctx context.Context) (id string, err error)
- func (u *FiletypeUpsertOne) IDX(ctx context.Context) string
- func (u *FiletypeUpsertOne) Ignore() *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) SetAllowedSize(v int) *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) SetCreatedAt(v time.Time) *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) SetIsBanned(v bool) *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) SetUpdatedAt(v time.Time) *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) Update(set func(*FiletypeUpsert)) *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) UpdateAllowedSize() *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) UpdateCreatedAt() *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) UpdateIsBanned() *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) UpdateNewValues() *FiletypeUpsertOne
- func (u *FiletypeUpsertOne) UpdateUpdatedAt() *FiletypeUpsertOne
- type Filetypes
- 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 Querier
- type QuerierFunc
- type Query
- type QueryContext
- 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 string) *TagDeleteOne
- func (c *TagClient) Get(ctx context.Context, id string) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id string) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Intercept(interceptors ...Interceptor)
- func (c *TagClient) Interceptors() []Interceptor
- func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryFiles(t *Tag) *FileQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id string) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagCreate
- func (tc *TagCreate) AddFileIDs(ids ...int) *TagCreate
- func (tc *TagCreate) AddFiles(f ...*File) *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) SetCreatedAt(t time.Time) *TagCreate
- func (tc *TagCreate) SetID(s string) *TagCreate
- func (tc *TagCreate) SetNillableCreatedAt(t *time.Time) *TagCreate
- func (tc *TagCreate) SetNillableUpdatedAt(t *time.Time) *TagCreate
- func (tc *TagCreate) SetUpdatedAt(t time.Time) *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 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) AddFileIDs(ids ...int)
- 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) ClearCreatedAt()
- func (m *TagMutation) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearFiles()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TagMutation) CreatedAtCleared() bool
- 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) FilesCleared() bool
- func (m *TagMutation) FilesIDs() (ids []int)
- func (m *TagMutation) ID() (id string, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]string, error)
- func (m *TagMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TagMutation) Op() Op
- func (m *TagMutation) RemoveFileIDs(ids ...int)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedFilesIDs() (ids []int)
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) ResetCreatedAt()
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetFiles()
- func (m *TagMutation) ResetUpdatedAt()
- func (m *TagMutation) SetCreatedAt(t time.Time)
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetID(id string)
- func (m *TagMutation) SetOp(op Op)
- func (m *TagMutation) SetUpdatedAt(t time.Time)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) UpdatedAt() (r time.Time, 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) First(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) FirstID(ctx context.Context) (id string, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) string
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) ForShare(opts ...sql.LockOption) *TagQuery
- func (tq *TagQuery) ForUpdate(opts ...sql.LockOption) *TagQuery
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) (ids []string, err error)
- func (tq *TagQuery) IDsX(ctx context.Context) []string
- 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 string, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) string
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
- func (tq *TagQuery) QueryFiles() *FileQuery
- 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) WithFiles(opts ...func(*FileQuery)) *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) AddFileIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) AddFiles(f ...*File) *TagUpdate
- func (tu *TagUpdate) ClearCreatedAt() *TagUpdate
- func (tu *TagUpdate) ClearFiles() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (tu *TagUpdate) RemoveFileIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) RemoveFiles(f ...*File) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (tu *TagUpdate) SetCreatedAt(t time.Time) *TagUpdate
- func (tu *TagUpdate) SetNillableCreatedAt(t *time.Time) *TagUpdate
- func (tu *TagUpdate) SetUpdatedAt(t time.Time) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddFileIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) AddFiles(f ...*File) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearCreatedAt() *TagUpdateOne
- func (tuo *TagUpdateOne) ClearFiles() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (tuo *TagUpdateOne) RemoveFileIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveFiles(f ...*File) *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) SetCreatedAt(t time.Time) *TagUpdateOne
- func (tuo *TagUpdateOne) SetNillableCreatedAt(t *time.Time) *TagUpdateOne
- func (tuo *TagUpdateOne) SetUpdatedAt(t time.Time) *TagUpdateOne
- func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
- type TagUpsert
- type TagUpsertBulk
- func (u *TagUpsertBulk) ClearCreatedAt() *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) SetCreatedAt(v time.Time) *TagUpsertBulk
- func (u *TagUpsertBulk) SetUpdatedAt(v time.Time) *TagUpsertBulk
- func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateCreatedAt() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateUpdatedAt() *TagUpsertBulk
- type TagUpsertOne
- func (u *TagUpsertOne) ClearCreatedAt() *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 string, err error)
- func (u *TagUpsertOne) IDX(ctx context.Context) string
- func (u *TagUpsertOne) Ignore() *TagUpsertOne
- func (u *TagUpsertOne) SetCreatedAt(v time.Time) *TagUpsertOne
- func (u *TagUpsertOne) SetUpdatedAt(v time.Time) *TagUpsertOne
- func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne
- func (u *TagUpsertOne) UpdateCreatedAt() *TagUpsertOne
- func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
- func (u *TagUpsertOne) UpdateUpdatedAt() *TagUpsertOne
- type Tags
- type TraverseFunc
- type Traverser
- type Tx
- type User
- 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) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryFiles(u *User) *FileQuery
- 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) AddFileIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddFiles(f ...*File) *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) SetAccessType(ut user.AccessType) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetFirstName(s string) *UserCreate
- func (uc *UserCreate) SetLastLoginAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetLastName(s string) *UserCreate
- func (uc *UserCreate) SetNillableAccessType(ut *user.AccessType) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate
- func (uc *UserCreate) SetNillableLastLoginAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *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
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AccessType() (r user.AccessType, exists bool)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddFileIDs(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) ClearCreatedAt()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearEmail()
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearFiles()
- func (m *UserMutation) ClearLastLoginAt()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) CreatedAtCleared() bool
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) EmailCleared() 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) FilesCleared() bool
- func (m *UserMutation) FilesIDs() (ids []int)
- func (m *UserMutation) FirstName() (r string, exists bool)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) LastLoginAt() (r time.Time, exists bool)
- func (m *UserMutation) LastLoginAtCleared() bool
- func (m *UserMutation) LastName() (r string, exists bool)
- func (m *UserMutation) OldAccessType(ctx context.Context) (v user.AccessType, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v *string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldLastLoginAt(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) RemoveFileIDs(ids ...int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedFilesIDs() (ids []int)
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetAccessType()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetFiles()
- func (m *UserMutation) ResetFirstName()
- func (m *UserMutation) ResetLastLoginAt()
- func (m *UserMutation) ResetLastName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) SetAccessType(ut user.AccessType)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetFirstName(s string)
- func (m *UserMutation) SetLastLoginAt(t time.Time)
- func (m *UserMutation) SetLastName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- 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) 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) ForShare(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryFiles() *FileQuery
- 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) WithFiles(opts ...func(*FileQuery)) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) AddFileIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddFiles(f ...*File) *UserUpdate
- func (uu *UserUpdate) ClearCreatedAt() *UserUpdate
- func (uu *UserUpdate) ClearEmail() *UserUpdate
- func (uu *UserUpdate) ClearFiles() *UserUpdate
- func (uu *UserUpdate) ClearLastLoginAt() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveFileIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveFiles(f ...*File) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAccessType(ut user.AccessType) *UserUpdate
- func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetFirstName(s string) *UserUpdate
- func (uu *UserUpdate) SetLastLoginAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetLastName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableAccessType(ut *user.AccessType) *UserUpdate
- func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableFirstName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableLastLoginAt(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableLastName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddFileIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddFiles(f ...*File) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearCreatedAt() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearFiles() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearLastLoginAt() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveFileIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveFiles(f ...*File) *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) SetAccessType(ut user.AccessType) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastLoginAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableAccessType(ut *user.AccessType) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableFirstName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastLoginAt(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) ClearCreatedAt() *UserUpsert
- func (u *UserUpsert) ClearEmail() *UserUpsert
- func (u *UserUpsert) ClearLastLoginAt() *UserUpsert
- func (u *UserUpsert) SetAccessType(v user.AccessType) *UserUpsert
- func (u *UserUpsert) SetCreatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetEmail(v string) *UserUpsert
- func (u *UserUpsert) SetFirstName(v string) *UserUpsert
- func (u *UserUpsert) SetLastLoginAt(v time.Time) *UserUpsert
- func (u *UserUpsert) SetLastName(v string) *UserUpsert
- func (u *UserUpsert) SetPassword(v string) *UserUpsert
- func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
- func (u *UserUpsert) UpdateAccessType() *UserUpsert
- func (u *UserUpsert) UpdateCreatedAt() *UserUpsert
- func (u *UserUpsert) UpdateEmail() *UserUpsert
- func (u *UserUpsert) UpdateFirstName() *UserUpsert
- func (u *UserUpsert) UpdateLastLoginAt() *UserUpsert
- func (u *UserUpsert) UpdateLastName() *UserUpsert
- func (u *UserUpsert) UpdatePassword() *UserUpsert
- func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) ClearCreatedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearEmail() *UserUpsertBulk
- func (u *UserUpsertBulk) ClearLastLoginAt() *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) SetAccessType(v user.AccessType) *UserUpsertBulk
- func (u *UserUpsertBulk) SetCreatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetFirstName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetLastLoginAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) SetLastName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateAccessType() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateCreatedAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateFirstName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateLastLoginAt() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateLastName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) ClearCreatedAt() *UserUpsertOne
- func (u *UserUpsertOne) ClearEmail() *UserUpsertOne
- func (u *UserUpsertOne) ClearLastLoginAt() *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) SetAccessType(v user.AccessType) *UserUpsertOne
- func (u *UserUpsertOne) SetCreatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetFirstName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetLastLoginAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) SetLastName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateAccessType() *UserUpsertOne
- func (u *UserUpsertOne) UpdateCreatedAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
- func (u *UserUpsertOne) UpdateFirstName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateLastLoginAt() *UserUpsertOne
- func (u *UserUpsertOne) UpdateLastName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
- func (u *UserUpsertOne) UpdateUpdatedAt() *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. TypeFile = "File" TypeFiletype = "Filetype" TypeTag = "Tag" TypeUser = "User" )
Variables ¶
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // File is the client for interacting with the File builders. File *FileClient // Filetype is the client for interacting with the Filetype builders. Filetype *FiletypeClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). File. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type File ¶
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"` // UserID holds the value of the "user_id" field. UserID int `json:"user_id,omitempty"` // UUID holds the value of the "uuid" field. UUID string `json:"uuid,omitempty"` // Size holds the value of the "size" field. Size int `json:"size,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // DeletedAt holds the value of the "deleted_at" field. DeletedAt *time.Time `json:"deleted_at,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) QueryFiletype ¶
func (f *File) QueryFiletype() *FiletypeQuery
QueryFiletype queries the "filetype" edge of the File entity.
func (*File) Unwrap ¶
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 ¶
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 ¶
type FileClient struct {
// contains filtered or unexported fields
}
FileClient is a client for the File schema.
func NewFileClient ¶
func NewFileClient(c config) *FileClient
NewFileClient returns a client for the File from the given config.
func (*FileClient) Create ¶
func (c *FileClient) Create() *FileCreate
Create returns a builder for creating a File entity.
func (*FileClient) CreateBulk ¶
func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
CreateBulk returns a builder for creating a bulk of File entities.
func (*FileClient) Delete ¶
func (c *FileClient) Delete() *FileDelete
Delete returns a delete builder for File.
func (*FileClient) DeleteOne ¶
func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FileClient) DeleteOneID ¶
func (c *FileClient) DeleteOneID(id int) *FileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FileClient) GetX ¶
func (c *FileClient) GetX(ctx context.Context, id int) *File
GetX is like Get, but panics if an error occurs.
func (*FileClient) Intercept ¶
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 ¶
func (c *FileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FileClient) MapCreateBulk ¶
func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FileClient) Query ¶
func (c *FileClient) Query() *FileQuery
Query returns a query builder for File.
func (*FileClient) QueryFiletype ¶
func (c *FileClient) QueryFiletype(f *File) *FiletypeQuery
QueryFiletype queries the filetype edge of a File.
func (*FileClient) QueryTags ¶
func (c *FileClient) QueryTags(f *File) *TagQuery
QueryTags queries the tags edge of a File.
func (*FileClient) QueryUser ¶
func (c *FileClient) QueryUser(f *File) *UserQuery
QueryUser queries the user edge of a File.
func (*FileClient) Update ¶
func (c *FileClient) Update() *FileUpdate
Update returns an update builder for File.
func (*FileClient) UpdateOne ¶
func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FileClient) UpdateOneID ¶
func (c *FileClient) UpdateOneID(id int) *FileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FileClient) Use ¶
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 ¶
type FileCreate struct {
// contains filtered or unexported fields
}
FileCreate is the builder for creating a File entity.
func (*FileCreate) AddTagIDs ¶
func (fc *FileCreate) AddTagIDs(ids ...string) *FileCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*FileCreate) AddTags ¶
func (fc *FileCreate) AddTags(t ...*Tag) *FileCreate
AddTags adds the "tags" edges to the Tag entity.
func (*FileCreate) Exec ¶
func (fc *FileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreate) ExecX ¶
func (fc *FileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreate) Mutation ¶
func (fc *FileCreate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileCreate) OnConflict ¶
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 ¶
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 ¶
func (fc *FileCreate) Save(ctx context.Context) (*File, error)
Save creates the File in the database.
func (*FileCreate) SaveX ¶
func (fc *FileCreate) SaveX(ctx context.Context) *File
SaveX calls Save and panics if Save returns an error.
func (*FileCreate) SetCreatedAt ¶
func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate
SetCreatedAt sets the "created_at" field.
func (*FileCreate) SetDeletedAt ¶
func (fc *FileCreate) SetDeletedAt(t time.Time) *FileCreate
SetDeletedAt sets the "deleted_at" field.
func (*FileCreate) SetFiletype ¶
func (fc *FileCreate) SetFiletype(f *Filetype) *FileCreate
SetFiletype sets the "filetype" edge to the Filetype entity.
func (*FileCreate) SetFiletypeID ¶
func (fc *FileCreate) SetFiletypeID(id string) *FileCreate
SetFiletypeID sets the "filetype" edge to the Filetype entity by ID.
func (*FileCreate) SetName ¶
func (fc *FileCreate) SetName(s string) *FileCreate
SetName sets the "name" field.
func (*FileCreate) SetNillableCreatedAt ¶
func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FileCreate) SetNillableDeletedAt ¶
func (fc *FileCreate) SetNillableDeletedAt(t *time.Time) *FileCreate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*FileCreate) SetNillableUpdatedAt ¶
func (fc *FileCreate) SetNillableUpdatedAt(t *time.Time) *FileCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FileCreate) SetSize ¶
func (fc *FileCreate) SetSize(i int) *FileCreate
SetSize sets the "size" field.
func (*FileCreate) SetType ¶
func (fc *FileCreate) SetType(s string) *FileCreate
SetType sets the "type" field.
func (*FileCreate) SetUUID ¶
func (fc *FileCreate) SetUUID(s string) *FileCreate
SetUUID sets the "uuid" field.
func (*FileCreate) SetUpdatedAt ¶
func (fc *FileCreate) SetUpdatedAt(t time.Time) *FileCreate
SetUpdatedAt sets the "updated_at" field.
func (*FileCreate) SetUser ¶
func (fc *FileCreate) SetUser(u *User) *FileCreate
SetUser sets the "user" edge to the User entity.
func (*FileCreate) SetUserID ¶
func (fc *FileCreate) SetUserID(i int) *FileCreate
SetUserID sets the "user_id" field.
type FileCreateBulk ¶
type FileCreateBulk struct {
// contains filtered or unexported fields
}
FileCreateBulk is the builder for creating many File entities in bulk.
func (*FileCreateBulk) Exec ¶
func (fcb *FileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreateBulk) ExecX ¶
func (fcb *FileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreateBulk) OnConflict ¶
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 ¶
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 ¶
type FileDelete struct {
// contains filtered or unexported fields
}
FileDelete is the builder for deleting a File entity.
func (*FileDelete) Exec ¶
func (fd *FileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FileDelete) ExecX ¶
func (fd *FileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FileDelete) Where ¶
func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete
Where appends a list predicates to the FileDelete builder.
type FileDeleteOne ¶
type FileDeleteOne struct {
// contains filtered or unexported fields
}
FileDeleteOne is the builder for deleting a single File entity.
func (*FileDeleteOne) Exec ¶
func (fdo *FileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FileDeleteOne) ExecX ¶
func (fdo *FileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileDeleteOne) Where ¶
func (fdo *FileDeleteOne) Where(ps ...predicate.File) *FileDeleteOne
Where appends a list predicates to the FileDelete builder.
type FileEdges ¶
type FileEdges struct { // User holds the value of the user edge. User *User `json:"files"` // Filetype holds the value of the filetype edge. Filetype *Filetype `json:"files"` // Tags holds the value of the tags edge. Tags []*Tag `json:"tags,omitempty"` // contains filtered or unexported fields }
FileEdges holds the relations/edges for other nodes in the graph.
func (FileEdges) FiletypeOrErr ¶
FiletypeOrErr returns the Filetype value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type FileGroupBy ¶
type FileGroupBy struct {
// contains filtered or unexported fields
}
FileGroupBy is the group-by builder for File entities.
func (*FileGroupBy) Aggregate ¶
func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Scan ¶
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 ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileMutation ¶
type FileMutation struct {
// contains filtered or unexported fields
}
FileMutation represents an operation that mutates the File nodes in the graph.
func (*FileMutation) AddField ¶
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) AddSize ¶
func (m *FileMutation) AddSize(i int)
AddSize adds i to the "size" field.
func (*FileMutation) AddTagIDs ¶
func (m *FileMutation) AddTagIDs(ids ...string)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*FileMutation) AddedEdges ¶
func (m *FileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FileMutation) AddedField ¶
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 ¶
func (m *FileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FileMutation) AddedIDs ¶
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) AddedSize ¶
func (m *FileMutation) AddedSize() (r int, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (*FileMutation) ClearCreatedAt ¶
func (m *FileMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*FileMutation) ClearDeletedAt ¶
func (m *FileMutation) ClearDeletedAt()
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FileMutation) ClearEdge ¶
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 ¶
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) ClearFiletype ¶
func (m *FileMutation) ClearFiletype()
ClearFiletype clears the "filetype" edge to the Filetype entity.
func (*FileMutation) ClearTags ¶
func (m *FileMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*FileMutation) ClearUser ¶
func (m *FileMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*FileMutation) ClearedEdges ¶
func (m *FileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FileMutation) ClearedFields ¶
func (m *FileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FileMutation) Client ¶
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) CreatedAt ¶
func (m *FileMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FileMutation) CreatedAtCleared ¶
func (m *FileMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*FileMutation) DeletedAt ¶
func (m *FileMutation) DeletedAt() (r time.Time, exists bool)
DeletedAt returns the value of the "deleted_at" field in the mutation.
func (*FileMutation) DeletedAtCleared ¶
func (m *FileMutation) DeletedAtCleared() bool
DeletedAtCleared returns if the "deleted_at" field was cleared in this mutation.
func (*FileMutation) EdgeCleared ¶
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 ¶
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 ¶
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 ¶
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) FiletypeCleared ¶
func (m *FileMutation) FiletypeCleared() bool
FiletypeCleared reports if the "filetype" edge to the Filetype entity was cleared.
func (*FileMutation) FiletypeID ¶
func (m *FileMutation) FiletypeID() (id string, exists bool)
FiletypeID returns the "filetype" edge ID in the mutation.
func (*FileMutation) FiletypeIDs ¶
func (m *FileMutation) FiletypeIDs() (ids []string)
FiletypeIDs returns the "filetype" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FiletypeID instead. It exists only for internal usage by the builders.
func (*FileMutation) GetType ¶
func (m *FileMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*FileMutation) ID ¶
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 ¶
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 ¶
func (m *FileMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*FileMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" 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) OldDeletedAt ¶
OldDeletedAt returns the old "deleted_at" 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) 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 (*FileMutation) OldName ¶
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) OldSize ¶
func (m *FileMutation) OldSize(ctx context.Context) (v int, err error)
OldSize returns the old "size" 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) OldType ¶
func (m *FileMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" 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) OldUUID ¶
func (m *FileMutation) OldUUID(ctx context.Context) (v string, err error)
OldUUID returns the old "uuid" 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) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" 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) OldUserID ¶
func (m *FileMutation) OldUserID(ctx context.Context) (v int, err error)
OldUserID returns the old "user_id" 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) RemoveTagIDs ¶
func (m *FileMutation) RemoveTagIDs(ids ...string)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*FileMutation) RemovedEdges ¶
func (m *FileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FileMutation) RemovedIDs ¶
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) RemovedTagsIDs ¶
func (m *FileMutation) RemovedTagsIDs() (ids []string)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*FileMutation) ResetCreatedAt ¶
func (m *FileMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FileMutation) ResetDeletedAt ¶
func (m *FileMutation) ResetDeletedAt()
ResetDeletedAt resets all changes to the "deleted_at" field.
func (*FileMutation) ResetEdge ¶
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 ¶
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) ResetFiletype ¶
func (m *FileMutation) ResetFiletype()
ResetFiletype resets all changes to the "filetype" edge.
func (*FileMutation) ResetName ¶
func (m *FileMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*FileMutation) ResetSize ¶
func (m *FileMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (*FileMutation) ResetTags ¶
func (m *FileMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*FileMutation) ResetType ¶
func (m *FileMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*FileMutation) ResetUUID ¶
func (m *FileMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*FileMutation) ResetUpdatedAt ¶
func (m *FileMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FileMutation) ResetUser ¶
func (m *FileMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*FileMutation) ResetUserID ¶
func (m *FileMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*FileMutation) SetCreatedAt ¶
func (m *FileMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FileMutation) SetDeletedAt ¶
func (m *FileMutation) SetDeletedAt(t time.Time)
SetDeletedAt sets the "deleted_at" field.
func (*FileMutation) SetField ¶
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) SetFiletypeID ¶
func (m *FileMutation) SetFiletypeID(id string)
SetFiletypeID sets the "filetype" edge to the Filetype entity by id.
func (*FileMutation) SetName ¶
func (m *FileMutation) SetName(s string)
SetName sets the "name" field.
func (*FileMutation) SetOp ¶
func (m *FileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FileMutation) SetType ¶
func (m *FileMutation) SetType(s string)
SetType sets the "type" field.
func (*FileMutation) SetUUID ¶
func (m *FileMutation) SetUUID(s string)
SetUUID sets the "uuid" field.
func (*FileMutation) SetUpdatedAt ¶
func (m *FileMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*FileMutation) SetUserID ¶
func (m *FileMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (*FileMutation) Size ¶
func (m *FileMutation) Size() (r int, exists bool)
Size returns the value of the "size" field in the mutation.
func (*FileMutation) TagsCleared ¶
func (m *FileMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*FileMutation) TagsIDs ¶
func (m *FileMutation) TagsIDs() (ids []string)
TagsIDs returns the "tags" edge IDs in the mutation.
func (FileMutation) Tx ¶
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 ¶
func (m *FileMutation) Type() string
Type returns the node type of this mutation (File).
func (*FileMutation) UUID ¶
func (m *FileMutation) UUID() (r string, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*FileMutation) UpdatedAt ¶
func (m *FileMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FileMutation) UserCleared ¶
func (m *FileMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*FileMutation) UserID ¶
func (m *FileMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*FileMutation) UserIDs ¶
func (m *FileMutation) 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 (*FileMutation) Where ¶
func (m *FileMutation) Where(ps ...predicate.File)
Where appends a list predicates to the FileMutation builder.
func (*FileMutation) WhereP ¶
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 ¶
type FileQuery struct {
// contains filtered or unexported fields
}
FileQuery is the builder for querying File entities.
func (*FileQuery) Aggregate ¶
func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate returns a FileSelect configured with the given aggregations.
func (*FileQuery) Clone ¶
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) First ¶
First returns the first File entity from the query. Returns a *NotFoundError when no File was found.
func (*FileQuery) FirstID ¶
FirstID returns the first File ID from the query. Returns a *NotFoundError when no File ID was found.
func (*FileQuery) ForShare ¶
func (fq *FileQuery) ForShare(opts ...sql.LockOption) *FileQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*FileQuery) ForUpdate ¶
func (fq *FileQuery) ForUpdate(opts ...sql.LockOption) *FileQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*FileQuery) GroupBy ¶
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) Only ¶
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 ¶
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) Order ¶
func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery
Order specifies how the records should be ordered.
func (*FileQuery) QueryFiletype ¶
func (fq *FileQuery) QueryFiletype() *FiletypeQuery
QueryFiletype chains the current query on the "filetype" edge.
func (*FileQuery) Select ¶
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 ¶
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) WithFiletype ¶
func (fq *FileQuery) WithFiletype(opts ...func(*FiletypeQuery)) *FileQuery
WithFiletype tells the query-builder to eager-load the nodes that are connected to the "filetype" edge. The optional arguments are used to configure the query builder of the edge.
type FileSelect ¶
type FileSelect struct { *FileQuery // contains filtered or unexported fields }
FileSelect is the builder for selecting fields of File entities.
func (*FileSelect) Aggregate ¶
func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileSelect) Scan ¶
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 ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileUpdate ¶
type FileUpdate struct {
// contains filtered or unexported fields
}
FileUpdate is the builder for updating File entities.
func (*FileUpdate) AddSize ¶
func (fu *FileUpdate) AddSize(i int) *FileUpdate
AddSize adds i to the "size" field.
func (*FileUpdate) AddTagIDs ¶
func (fu *FileUpdate) AddTagIDs(ids ...string) *FileUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*FileUpdate) AddTags ¶
func (fu *FileUpdate) AddTags(t ...*Tag) *FileUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*FileUpdate) ClearCreatedAt ¶
func (fu *FileUpdate) ClearCreatedAt() *FileUpdate
ClearCreatedAt clears the value of the "created_at" field.
func (*FileUpdate) ClearDeletedAt ¶
func (fu *FileUpdate) ClearDeletedAt() *FileUpdate
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FileUpdate) ClearFiletype ¶
func (fu *FileUpdate) ClearFiletype() *FileUpdate
ClearFiletype clears the "filetype" edge to the Filetype entity.
func (*FileUpdate) ClearTags ¶
func (fu *FileUpdate) ClearTags() *FileUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*FileUpdate) ClearUser ¶
func (fu *FileUpdate) ClearUser() *FileUpdate
ClearUser clears the "user" edge to the User entity.
func (*FileUpdate) Exec ¶
func (fu *FileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpdate) ExecX ¶
func (fu *FileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdate) Mutation ¶
func (fu *FileUpdate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdate) RemoveTagIDs ¶
func (fu *FileUpdate) RemoveTagIDs(ids ...string) *FileUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*FileUpdate) RemoveTags ¶
func (fu *FileUpdate) RemoveTags(t ...*Tag) *FileUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*FileUpdate) Save ¶
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 ¶
func (fu *FileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FileUpdate) SetCreatedAt ¶
func (fu *FileUpdate) SetCreatedAt(t time.Time) *FileUpdate
SetCreatedAt sets the "created_at" field.
func (*FileUpdate) SetDeletedAt ¶
func (fu *FileUpdate) SetDeletedAt(t time.Time) *FileUpdate
SetDeletedAt sets the "deleted_at" field.
func (*FileUpdate) SetFiletype ¶
func (fu *FileUpdate) SetFiletype(f *Filetype) *FileUpdate
SetFiletype sets the "filetype" edge to the Filetype entity.
func (*FileUpdate) SetFiletypeID ¶
func (fu *FileUpdate) SetFiletypeID(id string) *FileUpdate
SetFiletypeID sets the "filetype" edge to the Filetype entity by ID.
func (*FileUpdate) SetName ¶
func (fu *FileUpdate) SetName(s string) *FileUpdate
SetName sets the "name" field.
func (*FileUpdate) SetNillableCreatedAt ¶
func (fu *FileUpdate) SetNillableCreatedAt(t *time.Time) *FileUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FileUpdate) SetNillableDeletedAt ¶
func (fu *FileUpdate) SetNillableDeletedAt(t *time.Time) *FileUpdate
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*FileUpdate) SetNillableName ¶
func (fu *FileUpdate) SetNillableName(s *string) *FileUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*FileUpdate) SetNillableSize ¶
func (fu *FileUpdate) SetNillableSize(i *int) *FileUpdate
SetNillableSize sets the "size" field if the given value is not nil.
func (*FileUpdate) SetNillableType ¶
func (fu *FileUpdate) SetNillableType(s *string) *FileUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*FileUpdate) SetNillableUUID ¶
func (fu *FileUpdate) SetNillableUUID(s *string) *FileUpdate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*FileUpdate) SetNillableUserID ¶
func (fu *FileUpdate) SetNillableUserID(i *int) *FileUpdate
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*FileUpdate) SetSize ¶
func (fu *FileUpdate) SetSize(i int) *FileUpdate
SetSize sets the "size" field.
func (*FileUpdate) SetType ¶
func (fu *FileUpdate) SetType(s string) *FileUpdate
SetType sets the "type" field.
func (*FileUpdate) SetUUID ¶
func (fu *FileUpdate) SetUUID(s string) *FileUpdate
SetUUID sets the "uuid" field.
func (*FileUpdate) SetUpdatedAt ¶
func (fu *FileUpdate) SetUpdatedAt(t time.Time) *FileUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FileUpdate) SetUser ¶
func (fu *FileUpdate) SetUser(u *User) *FileUpdate
SetUser sets the "user" edge to the User entity.
func (*FileUpdate) SetUserID ¶
func (fu *FileUpdate) SetUserID(i int) *FileUpdate
SetUserID sets the "user_id" field.
func (*FileUpdate) Where ¶
func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
Where appends a list predicates to the FileUpdate builder.
type FileUpdateOne ¶
type FileUpdateOne struct {
// contains filtered or unexported fields
}
FileUpdateOne is the builder for updating a single File entity.
func (*FileUpdateOne) AddSize ¶
func (fuo *FileUpdateOne) AddSize(i int) *FileUpdateOne
AddSize adds i to the "size" field.
func (*FileUpdateOne) AddTagIDs ¶
func (fuo *FileUpdateOne) AddTagIDs(ids ...string) *FileUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*FileUpdateOne) AddTags ¶
func (fuo *FileUpdateOne) AddTags(t ...*Tag) *FileUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*FileUpdateOne) ClearCreatedAt ¶
func (fuo *FileUpdateOne) ClearCreatedAt() *FileUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*FileUpdateOne) ClearDeletedAt ¶
func (fuo *FileUpdateOne) ClearDeletedAt() *FileUpdateOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FileUpdateOne) ClearFiletype ¶
func (fuo *FileUpdateOne) ClearFiletype() *FileUpdateOne
ClearFiletype clears the "filetype" edge to the Filetype entity.
func (*FileUpdateOne) ClearTags ¶
func (fuo *FileUpdateOne) ClearTags() *FileUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*FileUpdateOne) ClearUser ¶
func (fuo *FileUpdateOne) ClearUser() *FileUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*FileUpdateOne) Exec ¶
func (fuo *FileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FileUpdateOne) ExecX ¶
func (fuo *FileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdateOne) Mutation ¶
func (fuo *FileUpdateOne) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdateOne) RemoveTagIDs ¶
func (fuo *FileUpdateOne) RemoveTagIDs(ids ...string) *FileUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*FileUpdateOne) RemoveTags ¶
func (fuo *FileUpdateOne) RemoveTags(t ...*Tag) *FileUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*FileUpdateOne) Save ¶
func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
Save executes the query and returns the updated File entity.
func (*FileUpdateOne) SaveX ¶
func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
SaveX is like Save, but panics if an error occurs.
func (*FileUpdateOne) Select ¶
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) SetCreatedAt ¶
func (fuo *FileUpdateOne) SetCreatedAt(t time.Time) *FileUpdateOne
SetCreatedAt sets the "created_at" field.
func (*FileUpdateOne) SetDeletedAt ¶
func (fuo *FileUpdateOne) SetDeletedAt(t time.Time) *FileUpdateOne
SetDeletedAt sets the "deleted_at" field.
func (*FileUpdateOne) SetFiletype ¶
func (fuo *FileUpdateOne) SetFiletype(f *Filetype) *FileUpdateOne
SetFiletype sets the "filetype" edge to the Filetype entity.
func (*FileUpdateOne) SetFiletypeID ¶
func (fuo *FileUpdateOne) SetFiletypeID(id string) *FileUpdateOne
SetFiletypeID sets the "filetype" edge to the Filetype entity by ID.
func (*FileUpdateOne) SetName ¶
func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
SetName sets the "name" field.
func (*FileUpdateOne) SetNillableCreatedAt ¶
func (fuo *FileUpdateOne) SetNillableCreatedAt(t *time.Time) *FileUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FileUpdateOne) SetNillableDeletedAt ¶
func (fuo *FileUpdateOne) SetNillableDeletedAt(t *time.Time) *FileUpdateOne
SetNillableDeletedAt sets the "deleted_at" field if the given value is not nil.
func (*FileUpdateOne) SetNillableName ¶
func (fuo *FileUpdateOne) SetNillableName(s *string) *FileUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*FileUpdateOne) SetNillableSize ¶
func (fuo *FileUpdateOne) SetNillableSize(i *int) *FileUpdateOne
SetNillableSize sets the "size" field if the given value is not nil.
func (*FileUpdateOne) SetNillableType ¶
func (fuo *FileUpdateOne) SetNillableType(s *string) *FileUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*FileUpdateOne) SetNillableUUID ¶
func (fuo *FileUpdateOne) SetNillableUUID(s *string) *FileUpdateOne
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*FileUpdateOne) SetNillableUserID ¶
func (fuo *FileUpdateOne) SetNillableUserID(i *int) *FileUpdateOne
SetNillableUserID sets the "user_id" field if the given value is not nil.
func (*FileUpdateOne) SetSize ¶
func (fuo *FileUpdateOne) SetSize(i int) *FileUpdateOne
SetSize sets the "size" field.
func (*FileUpdateOne) SetType ¶
func (fuo *FileUpdateOne) SetType(s string) *FileUpdateOne
SetType sets the "type" field.
func (*FileUpdateOne) SetUUID ¶
func (fuo *FileUpdateOne) SetUUID(s string) *FileUpdateOne
SetUUID sets the "uuid" field.
func (*FileUpdateOne) SetUpdatedAt ¶
func (fuo *FileUpdateOne) SetUpdatedAt(t time.Time) *FileUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FileUpdateOne) SetUser ¶
func (fuo *FileUpdateOne) SetUser(u *User) *FileUpdateOne
SetUser sets the "user" edge to the User entity.
func (*FileUpdateOne) SetUserID ¶
func (fuo *FileUpdateOne) SetUserID(i int) *FileUpdateOne
SetUserID sets the "user_id" field.
func (*FileUpdateOne) Where ¶
func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
Where appends a list predicates to the FileUpdate builder.
type FileUpsert ¶
FileUpsert is the "OnConflict" setter.
func (*FileUpsert) AddSize ¶
func (u *FileUpsert) AddSize(v int) *FileUpsert
AddSize adds v to the "size" field.
func (*FileUpsert) ClearCreatedAt ¶
func (u *FileUpsert) ClearCreatedAt() *FileUpsert
ClearCreatedAt clears the value of the "created_at" field.
func (*FileUpsert) ClearDeletedAt ¶
func (u *FileUpsert) ClearDeletedAt() *FileUpsert
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FileUpsert) SetCreatedAt ¶
func (u *FileUpsert) SetCreatedAt(v time.Time) *FileUpsert
SetCreatedAt sets the "created_at" field.
func (*FileUpsert) SetDeletedAt ¶
func (u *FileUpsert) SetDeletedAt(v time.Time) *FileUpsert
SetDeletedAt sets the "deleted_at" field.
func (*FileUpsert) SetName ¶
func (u *FileUpsert) SetName(v string) *FileUpsert
SetName sets the "name" field.
func (*FileUpsert) SetSize ¶
func (u *FileUpsert) SetSize(v int) *FileUpsert
SetSize sets the "size" field.
func (*FileUpsert) SetType ¶
func (u *FileUpsert) SetType(v string) *FileUpsert
SetType sets the "type" field.
func (*FileUpsert) SetUUID ¶
func (u *FileUpsert) SetUUID(v string) *FileUpsert
SetUUID sets the "uuid" field.
func (*FileUpsert) SetUpdatedAt ¶
func (u *FileUpsert) SetUpdatedAt(v time.Time) *FileUpsert
SetUpdatedAt sets the "updated_at" field.
func (*FileUpsert) SetUserID ¶
func (u *FileUpsert) SetUserID(v int) *FileUpsert
SetUserID sets the "user_id" field.
func (*FileUpsert) UpdateCreatedAt ¶
func (u *FileUpsert) UpdateCreatedAt() *FileUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FileUpsert) UpdateDeletedAt ¶
func (u *FileUpsert) UpdateDeletedAt() *FileUpsert
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*FileUpsert) UpdateName ¶
func (u *FileUpsert) UpdateName() *FileUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsert) UpdateSize ¶
func (u *FileUpsert) UpdateSize() *FileUpsert
UpdateSize sets the "size" field to the value that was provided on create.
func (*FileUpsert) UpdateType ¶
func (u *FileUpsert) UpdateType() *FileUpsert
UpdateType sets the "type" field to the value that was provided on create.
func (*FileUpsert) UpdateUUID ¶
func (u *FileUpsert) UpdateUUID() *FileUpsert
UpdateUUID sets the "uuid" field to the value that was provided on create.
func (*FileUpsert) UpdateUpdatedAt ¶
func (u *FileUpsert) UpdateUpdatedAt() *FileUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FileUpsert) UpdateUserID ¶
func (u *FileUpsert) UpdateUserID() *FileUpsert
UpdateUserID sets the "user_id" field to the value that was provided on create.
type FileUpsertBulk ¶
type FileUpsertBulk struct {
// contains filtered or unexported fields
}
FileUpsertBulk is the builder for "upsert"-ing a bulk of File nodes.
func (*FileUpsertBulk) AddSize ¶
func (u *FileUpsertBulk) AddSize(v int) *FileUpsertBulk
AddSize adds v to the "size" field.
func (*FileUpsertBulk) ClearCreatedAt ¶
func (u *FileUpsertBulk) ClearCreatedAt() *FileUpsertBulk
ClearCreatedAt clears the value of the "created_at" field.
func (*FileUpsertBulk) ClearDeletedAt ¶
func (u *FileUpsertBulk) ClearDeletedAt() *FileUpsertBulk
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FileUpsertBulk) DoNothing ¶
func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FileUpsertBulk) Exec ¶
func (u *FileUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpsertBulk) ExecX ¶
func (u *FileUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpsertBulk) Ignore ¶
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) SetCreatedAt ¶
func (u *FileUpsertBulk) SetCreatedAt(v time.Time) *FileUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*FileUpsertBulk) SetDeletedAt ¶
func (u *FileUpsertBulk) SetDeletedAt(v time.Time) *FileUpsertBulk
SetDeletedAt sets the "deleted_at" field.
func (*FileUpsertBulk) SetName ¶
func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk
SetName sets the "name" field.
func (*FileUpsertBulk) SetSize ¶
func (u *FileUpsertBulk) SetSize(v int) *FileUpsertBulk
SetSize sets the "size" field.
func (*FileUpsertBulk) SetType ¶
func (u *FileUpsertBulk) SetType(v string) *FileUpsertBulk
SetType sets the "type" field.
func (*FileUpsertBulk) SetUUID ¶
func (u *FileUpsertBulk) SetUUID(v string) *FileUpsertBulk
SetUUID sets the "uuid" field.
func (*FileUpsertBulk) SetUpdatedAt ¶
func (u *FileUpsertBulk) SetUpdatedAt(v time.Time) *FileUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*FileUpsertBulk) SetUserID ¶
func (u *FileUpsertBulk) SetUserID(v int) *FileUpsertBulk
SetUserID sets the "user_id" field.
func (*FileUpsertBulk) Update ¶
func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk
Update allows overriding fields `UPDATE` values. See the FileCreateBulk.OnConflict documentation for more info.
func (*FileUpsertBulk) UpdateCreatedAt ¶
func (u *FileUpsertBulk) UpdateCreatedAt() *FileUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateDeletedAt ¶
func (u *FileUpsertBulk) UpdateDeletedAt() *FileUpsertBulk
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateName ¶
func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateNewValues ¶
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)
func (*FileUpsertBulk) UpdateSize ¶
func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk
UpdateSize sets the "size" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateType ¶
func (u *FileUpsertBulk) UpdateType() *FileUpsertBulk
UpdateType sets the "type" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateUUID ¶
func (u *FileUpsertBulk) UpdateUUID() *FileUpsertBulk
UpdateUUID sets the "uuid" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateUpdatedAt ¶
func (u *FileUpsertBulk) UpdateUpdatedAt() *FileUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateUserID ¶
func (u *FileUpsertBulk) UpdateUserID() *FileUpsertBulk
UpdateUserID sets the "user_id" field to the value that was provided on create.
type FileUpsertOne ¶
type FileUpsertOne struct {
// contains filtered or unexported fields
}
FileUpsertOne is the builder for "upsert"-ing
one File node.
func (*FileUpsertOne) AddSize ¶
func (u *FileUpsertOne) AddSize(v int) *FileUpsertOne
AddSize adds v to the "size" field.
func (*FileUpsertOne) ClearCreatedAt ¶
func (u *FileUpsertOne) ClearCreatedAt() *FileUpsertOne
ClearCreatedAt clears the value of the "created_at" field.
func (*FileUpsertOne) ClearDeletedAt ¶
func (u *FileUpsertOne) ClearDeletedAt() *FileUpsertOne
ClearDeletedAt clears the value of the "deleted_at" field.
func (*FileUpsertOne) DoNothing ¶
func (u *FileUpsertOne) DoNothing() *FileUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FileUpsertOne) Exec ¶
func (u *FileUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpsertOne) ExecX ¶
func (u *FileUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpsertOne) ID ¶
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 ¶
func (u *FileUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*FileUpsertOne) Ignore ¶
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) SetCreatedAt ¶
func (u *FileUpsertOne) SetCreatedAt(v time.Time) *FileUpsertOne
SetCreatedAt sets the "created_at" field.
func (*FileUpsertOne) SetDeletedAt ¶
func (u *FileUpsertOne) SetDeletedAt(v time.Time) *FileUpsertOne
SetDeletedAt sets the "deleted_at" field.
func (*FileUpsertOne) SetName ¶
func (u *FileUpsertOne) SetName(v string) *FileUpsertOne
SetName sets the "name" field.
func (*FileUpsertOne) SetSize ¶
func (u *FileUpsertOne) SetSize(v int) *FileUpsertOne
SetSize sets the "size" field.
func (*FileUpsertOne) SetType ¶
func (u *FileUpsertOne) SetType(v string) *FileUpsertOne
SetType sets the "type" field.
func (*FileUpsertOne) SetUUID ¶
func (u *FileUpsertOne) SetUUID(v string) *FileUpsertOne
SetUUID sets the "uuid" field.
func (*FileUpsertOne) SetUpdatedAt ¶
func (u *FileUpsertOne) SetUpdatedAt(v time.Time) *FileUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*FileUpsertOne) SetUserID ¶
func (u *FileUpsertOne) SetUserID(v int) *FileUpsertOne
SetUserID sets the "user_id" field.
func (*FileUpsertOne) Update ¶
func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne
Update allows overriding fields `UPDATE` values. See the FileCreate.OnConflict documentation for more info.
func (*FileUpsertOne) UpdateCreatedAt ¶
func (u *FileUpsertOne) UpdateCreatedAt() *FileUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FileUpsertOne) UpdateDeletedAt ¶
func (u *FileUpsertOne) UpdateDeletedAt() *FileUpsertOne
UpdateDeletedAt sets the "deleted_at" field to the value that was provided on create.
func (*FileUpsertOne) UpdateName ¶
func (u *FileUpsertOne) UpdateName() *FileUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsertOne) UpdateNewValues ¶
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)
func (*FileUpsertOne) UpdateSize ¶
func (u *FileUpsertOne) UpdateSize() *FileUpsertOne
UpdateSize sets the "size" field to the value that was provided on create.
func (*FileUpsertOne) UpdateType ¶
func (u *FileUpsertOne) UpdateType() *FileUpsertOne
UpdateType sets the "type" field to the value that was provided on create.
func (*FileUpsertOne) UpdateUUID ¶
func (u *FileUpsertOne) UpdateUUID() *FileUpsertOne
UpdateUUID sets the "uuid" field to the value that was provided on create.
func (*FileUpsertOne) UpdateUpdatedAt ¶
func (u *FileUpsertOne) UpdateUpdatedAt() *FileUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
func (*FileUpsertOne) UpdateUserID ¶
func (u *FileUpsertOne) UpdateUserID() *FileUpsertOne
UpdateUserID sets the "user_id" field to the value that was provided on create.
type Filetype ¶
type Filetype struct { // ID of the ent. ID string `json:"id,omitempty"` // AllowedSize holds the value of the "allowed_size" field. AllowedSize int `json:"allowed_size,omitempty"` // IsBanned holds the value of the "is_banned" field. IsBanned bool `json:"is_banned,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FiletypeQuery when eager-loading is set. Edges FiletypeEdges `json:"edges"` // contains filtered or unexported fields }
Filetype is the model entity for the Filetype schema.
func (*Filetype) QueryFiles ¶
QueryFiles queries the "files" edge of the Filetype entity.
func (*Filetype) Unwrap ¶
Unwrap unwraps the Filetype 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 (*Filetype) Update ¶
func (f *Filetype) Update() *FiletypeUpdateOne
Update returns a builder for updating this Filetype. Note that you need to call Filetype.Unwrap() before calling this method if this Filetype was returned from a transaction, and the transaction was committed or rolled back.
type FiletypeClient ¶
type FiletypeClient struct {
// contains filtered or unexported fields
}
FiletypeClient is a client for the Filetype schema.
func NewFiletypeClient ¶
func NewFiletypeClient(c config) *FiletypeClient
NewFiletypeClient returns a client for the Filetype from the given config.
func (*FiletypeClient) Create ¶
func (c *FiletypeClient) Create() *FiletypeCreate
Create returns a builder for creating a Filetype entity.
func (*FiletypeClient) CreateBulk ¶
func (c *FiletypeClient) CreateBulk(builders ...*FiletypeCreate) *FiletypeCreateBulk
CreateBulk returns a builder for creating a bulk of Filetype entities.
func (*FiletypeClient) Delete ¶
func (c *FiletypeClient) Delete() *FiletypeDelete
Delete returns a delete builder for Filetype.
func (*FiletypeClient) DeleteOne ¶
func (c *FiletypeClient) DeleteOne(f *Filetype) *FiletypeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FiletypeClient) DeleteOneID ¶
func (c *FiletypeClient) DeleteOneID(id string) *FiletypeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FiletypeClient) GetX ¶
func (c *FiletypeClient) GetX(ctx context.Context, id string) *Filetype
GetX is like Get, but panics if an error occurs.
func (*FiletypeClient) Hooks ¶
func (c *FiletypeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*FiletypeClient) Intercept ¶
func (c *FiletypeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `filetype.Intercept(f(g(h())))`.
func (*FiletypeClient) Interceptors ¶
func (c *FiletypeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FiletypeClient) MapCreateBulk ¶
func (c *FiletypeClient) MapCreateBulk(slice any, setFunc func(*FiletypeCreate, int)) *FiletypeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FiletypeClient) Query ¶
func (c *FiletypeClient) Query() *FiletypeQuery
Query returns a query builder for Filetype.
func (*FiletypeClient) QueryFiles ¶
func (c *FiletypeClient) QueryFiles(f *Filetype) *FileQuery
QueryFiles queries the files edge of a Filetype.
func (*FiletypeClient) Update ¶
func (c *FiletypeClient) Update() *FiletypeUpdate
Update returns an update builder for Filetype.
func (*FiletypeClient) UpdateOne ¶
func (c *FiletypeClient) UpdateOne(f *Filetype) *FiletypeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FiletypeClient) UpdateOneID ¶
func (c *FiletypeClient) UpdateOneID(id string) *FiletypeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FiletypeClient) Use ¶
func (c *FiletypeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `filetype.Hooks(f(g(h())))`.
type FiletypeCreate ¶
type FiletypeCreate struct {
// contains filtered or unexported fields
}
FiletypeCreate is the builder for creating a Filetype entity.
func (*FiletypeCreate) AddFileIDs ¶
func (fc *FiletypeCreate) AddFileIDs(ids ...int) *FiletypeCreate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*FiletypeCreate) AddFiles ¶
func (fc *FiletypeCreate) AddFiles(f ...*File) *FiletypeCreate
AddFiles adds the "files" edges to the File entity.
func (*FiletypeCreate) Exec ¶
func (fc *FiletypeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FiletypeCreate) ExecX ¶
func (fc *FiletypeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FiletypeCreate) Mutation ¶
func (fc *FiletypeCreate) Mutation() *FiletypeMutation
Mutation returns the FiletypeMutation object of the builder.
func (*FiletypeCreate) OnConflict ¶
func (fc *FiletypeCreate) OnConflict(opts ...sql.ConflictOption) *FiletypeUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Filetype.Create(). SetAllowedSize(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.FiletypeUpsert) { SetAllowedSize(v+v). }). Exec(ctx)
func (*FiletypeCreate) OnConflictColumns ¶
func (fc *FiletypeCreate) OnConflictColumns(columns ...string) *FiletypeUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Filetype.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FiletypeCreate) Save ¶
func (fc *FiletypeCreate) Save(ctx context.Context) (*Filetype, error)
Save creates the Filetype in the database.
func (*FiletypeCreate) SaveX ¶
func (fc *FiletypeCreate) SaveX(ctx context.Context) *Filetype
SaveX calls Save and panics if Save returns an error.
func (*FiletypeCreate) SetAllowedSize ¶
func (fc *FiletypeCreate) SetAllowedSize(i int) *FiletypeCreate
SetAllowedSize sets the "allowed_size" field.
func (*FiletypeCreate) SetCreatedAt ¶
func (fc *FiletypeCreate) SetCreatedAt(t time.Time) *FiletypeCreate
SetCreatedAt sets the "created_at" field.
func (*FiletypeCreate) SetID ¶
func (fc *FiletypeCreate) SetID(s string) *FiletypeCreate
SetID sets the "id" field.
func (*FiletypeCreate) SetIsBanned ¶
func (fc *FiletypeCreate) SetIsBanned(b bool) *FiletypeCreate
SetIsBanned sets the "is_banned" field.
func (*FiletypeCreate) SetNillableAllowedSize ¶
func (fc *FiletypeCreate) SetNillableAllowedSize(i *int) *FiletypeCreate
SetNillableAllowedSize sets the "allowed_size" field if the given value is not nil.
func (*FiletypeCreate) SetNillableCreatedAt ¶
func (fc *FiletypeCreate) SetNillableCreatedAt(t *time.Time) *FiletypeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FiletypeCreate) SetNillableIsBanned ¶
func (fc *FiletypeCreate) SetNillableIsBanned(b *bool) *FiletypeCreate
SetNillableIsBanned sets the "is_banned" field if the given value is not nil.
func (*FiletypeCreate) SetNillableUpdatedAt ¶
func (fc *FiletypeCreate) SetNillableUpdatedAt(t *time.Time) *FiletypeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*FiletypeCreate) SetUpdatedAt ¶
func (fc *FiletypeCreate) SetUpdatedAt(t time.Time) *FiletypeCreate
SetUpdatedAt sets the "updated_at" field.
type FiletypeCreateBulk ¶
type FiletypeCreateBulk struct {
// contains filtered or unexported fields
}
FiletypeCreateBulk is the builder for creating many Filetype entities in bulk.
func (*FiletypeCreateBulk) Exec ¶
func (fcb *FiletypeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FiletypeCreateBulk) ExecX ¶
func (fcb *FiletypeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FiletypeCreateBulk) OnConflict ¶
func (fcb *FiletypeCreateBulk) OnConflict(opts ...sql.ConflictOption) *FiletypeUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Filetype.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.FiletypeUpsert) { SetAllowedSize(v+v). }). Exec(ctx)
func (*FiletypeCreateBulk) OnConflictColumns ¶
func (fcb *FiletypeCreateBulk) OnConflictColumns(columns ...string) *FiletypeUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Filetype.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type FiletypeDelete ¶
type FiletypeDelete struct {
// contains filtered or unexported fields
}
FiletypeDelete is the builder for deleting a Filetype entity.
func (*FiletypeDelete) Exec ¶
func (fd *FiletypeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FiletypeDelete) ExecX ¶
func (fd *FiletypeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FiletypeDelete) Where ¶
func (fd *FiletypeDelete) Where(ps ...predicate.Filetype) *FiletypeDelete
Where appends a list predicates to the FiletypeDelete builder.
type FiletypeDeleteOne ¶
type FiletypeDeleteOne struct {
// contains filtered or unexported fields
}
FiletypeDeleteOne is the builder for deleting a single Filetype entity.
func (*FiletypeDeleteOne) Exec ¶
func (fdo *FiletypeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FiletypeDeleteOne) ExecX ¶
func (fdo *FiletypeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FiletypeDeleteOne) Where ¶
func (fdo *FiletypeDeleteOne) Where(ps ...predicate.Filetype) *FiletypeDeleteOne
Where appends a list predicates to the FiletypeDelete builder.
type FiletypeEdges ¶
type FiletypeEdges struct { // Files holds the value of the files edge. Files []*File `json:"files,omitempty"` // contains filtered or unexported fields }
FiletypeEdges holds the relations/edges for other nodes in the graph.
func (FiletypeEdges) FilesOrErr ¶
func (e FiletypeEdges) FilesOrErr() ([]*File, error)
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
type FiletypeGroupBy ¶
type FiletypeGroupBy struct {
// contains filtered or unexported fields
}
FiletypeGroupBy is the group-by builder for Filetype entities.
func (*FiletypeGroupBy) Aggregate ¶
func (fgb *FiletypeGroupBy) Aggregate(fns ...AggregateFunc) *FiletypeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FiletypeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FiletypeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FiletypeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FiletypeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FiletypeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FiletypeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FiletypeGroupBy) Scan ¶
func (fgb *FiletypeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FiletypeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FiletypeMutation ¶
type FiletypeMutation struct {
// contains filtered or unexported fields
}
FiletypeMutation represents an operation that mutates the Filetype nodes in the graph.
func (*FiletypeMutation) AddAllowedSize ¶
func (m *FiletypeMutation) AddAllowedSize(i int)
AddAllowedSize adds i to the "allowed_size" field.
func (*FiletypeMutation) AddField ¶
func (m *FiletypeMutation) 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 (*FiletypeMutation) AddFileIDs ¶
func (m *FiletypeMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "files" edge to the File entity by ids.
func (*FiletypeMutation) AddedAllowedSize ¶
func (m *FiletypeMutation) AddedAllowedSize() (r int, exists bool)
AddedAllowedSize returns the value that was added to the "allowed_size" field in this mutation.
func (*FiletypeMutation) AddedEdges ¶
func (m *FiletypeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FiletypeMutation) AddedField ¶
func (m *FiletypeMutation) 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 (*FiletypeMutation) AddedFields ¶
func (m *FiletypeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FiletypeMutation) AddedIDs ¶
func (m *FiletypeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FiletypeMutation) AllowedSize ¶
func (m *FiletypeMutation) AllowedSize() (r int, exists bool)
AllowedSize returns the value of the "allowed_size" field in the mutation.
func (*FiletypeMutation) ClearCreatedAt ¶
func (m *FiletypeMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*FiletypeMutation) ClearEdge ¶
func (m *FiletypeMutation) 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 (*FiletypeMutation) ClearField ¶
func (m *FiletypeMutation) 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 (*FiletypeMutation) ClearFiles ¶
func (m *FiletypeMutation) ClearFiles()
ClearFiles clears the "files" edge to the File entity.
func (*FiletypeMutation) ClearedEdges ¶
func (m *FiletypeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FiletypeMutation) ClearedFields ¶
func (m *FiletypeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FiletypeMutation) Client ¶
func (m FiletypeMutation) 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 (*FiletypeMutation) CreatedAt ¶
func (m *FiletypeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FiletypeMutation) CreatedAtCleared ¶
func (m *FiletypeMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*FiletypeMutation) EdgeCleared ¶
func (m *FiletypeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FiletypeMutation) Field ¶
func (m *FiletypeMutation) 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 (*FiletypeMutation) FieldCleared ¶
func (m *FiletypeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FiletypeMutation) Fields ¶
func (m *FiletypeMutation) 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 (*FiletypeMutation) FilesCleared ¶
func (m *FiletypeMutation) FilesCleared() bool
FilesCleared reports if the "files" edge to the File entity was cleared.
func (*FiletypeMutation) FilesIDs ¶
func (m *FiletypeMutation) FilesIDs() (ids []int)
FilesIDs returns the "files" edge IDs in the mutation.
func (*FiletypeMutation) ID ¶
func (m *FiletypeMutation) ID() (id string, 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 (*FiletypeMutation) IDs ¶
func (m *FiletypeMutation) IDs(ctx context.Context) ([]string, 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 (*FiletypeMutation) IsBanned ¶
func (m *FiletypeMutation) IsBanned() (r bool, exists bool)
IsBanned returns the value of the "is_banned" field in the mutation.
func (*FiletypeMutation) OldAllowedSize ¶
func (m *FiletypeMutation) OldAllowedSize(ctx context.Context) (v int, err error)
OldAllowedSize returns the old "allowed_size" field's value of the Filetype entity. If the Filetype 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 (*FiletypeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Filetype entity. If the Filetype 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 (*FiletypeMutation) 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 (*FiletypeMutation) OldIsBanned ¶
func (m *FiletypeMutation) OldIsBanned(ctx context.Context) (v bool, err error)
OldIsBanned returns the old "is_banned" field's value of the Filetype entity. If the Filetype 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 (*FiletypeMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Filetype entity. If the Filetype 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 (*FiletypeMutation) RemoveFileIDs ¶
func (m *FiletypeMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "files" edge to the File entity by IDs.
func (*FiletypeMutation) RemovedEdges ¶
func (m *FiletypeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FiletypeMutation) RemovedFilesIDs ¶
func (m *FiletypeMutation) RemovedFilesIDs() (ids []int)
RemovedFiles returns the removed IDs of the "files" edge to the File entity.
func (*FiletypeMutation) RemovedIDs ¶
func (m *FiletypeMutation) 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 (*FiletypeMutation) ResetAllowedSize ¶
func (m *FiletypeMutation) ResetAllowedSize()
ResetAllowedSize resets all changes to the "allowed_size" field.
func (*FiletypeMutation) ResetCreatedAt ¶
func (m *FiletypeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FiletypeMutation) ResetEdge ¶
func (m *FiletypeMutation) 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 (*FiletypeMutation) ResetField ¶
func (m *FiletypeMutation) 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 (*FiletypeMutation) ResetFiles ¶
func (m *FiletypeMutation) ResetFiles()
ResetFiles resets all changes to the "files" edge.
func (*FiletypeMutation) ResetIsBanned ¶
func (m *FiletypeMutation) ResetIsBanned()
ResetIsBanned resets all changes to the "is_banned" field.
func (*FiletypeMutation) ResetUpdatedAt ¶
func (m *FiletypeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*FiletypeMutation) SetAllowedSize ¶
func (m *FiletypeMutation) SetAllowedSize(i int)
SetAllowedSize sets the "allowed_size" field.
func (*FiletypeMutation) SetCreatedAt ¶
func (m *FiletypeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FiletypeMutation) SetField ¶
func (m *FiletypeMutation) 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 (*FiletypeMutation) SetID ¶
func (m *FiletypeMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Filetype entities.
func (*FiletypeMutation) SetIsBanned ¶
func (m *FiletypeMutation) SetIsBanned(b bool)
SetIsBanned sets the "is_banned" field.
func (*FiletypeMutation) SetOp ¶
func (m *FiletypeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FiletypeMutation) SetUpdatedAt ¶
func (m *FiletypeMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (FiletypeMutation) Tx ¶
func (m FiletypeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FiletypeMutation) Type ¶
func (m *FiletypeMutation) Type() string
Type returns the node type of this mutation (Filetype).
func (*FiletypeMutation) UpdatedAt ¶
func (m *FiletypeMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*FiletypeMutation) Where ¶
func (m *FiletypeMutation) Where(ps ...predicate.Filetype)
Where appends a list predicates to the FiletypeMutation builder.
func (*FiletypeMutation) WhereP ¶
func (m *FiletypeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FiletypeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FiletypeQuery ¶
type FiletypeQuery struct {
// contains filtered or unexported fields
}
FiletypeQuery is the builder for querying Filetype entities.
func (*FiletypeQuery) Aggregate ¶
func (fq *FiletypeQuery) Aggregate(fns ...AggregateFunc) *FiletypeSelect
Aggregate returns a FiletypeSelect configured with the given aggregations.
func (*FiletypeQuery) All ¶
func (fq *FiletypeQuery) All(ctx context.Context) ([]*Filetype, error)
All executes the query and returns a list of Filetypes.
func (*FiletypeQuery) AllX ¶
func (fq *FiletypeQuery) AllX(ctx context.Context) []*Filetype
AllX is like All, but panics if an error occurs.
func (*FiletypeQuery) Clone ¶
func (fq *FiletypeQuery) Clone() *FiletypeQuery
Clone returns a duplicate of the FiletypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FiletypeQuery) Count ¶
func (fq *FiletypeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FiletypeQuery) CountX ¶
func (fq *FiletypeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FiletypeQuery) Exist ¶
func (fq *FiletypeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FiletypeQuery) ExistX ¶
func (fq *FiletypeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FiletypeQuery) First ¶
func (fq *FiletypeQuery) First(ctx context.Context) (*Filetype, error)
First returns the first Filetype entity from the query. Returns a *NotFoundError when no Filetype was found.
func (*FiletypeQuery) FirstID ¶
func (fq *FiletypeQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Filetype ID from the query. Returns a *NotFoundError when no Filetype ID was found.
func (*FiletypeQuery) FirstIDX ¶
func (fq *FiletypeQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*FiletypeQuery) FirstX ¶
func (fq *FiletypeQuery) FirstX(ctx context.Context) *Filetype
FirstX is like First, but panics if an error occurs.
func (*FiletypeQuery) ForShare ¶
func (fq *FiletypeQuery) ForShare(opts ...sql.LockOption) *FiletypeQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*FiletypeQuery) ForUpdate ¶
func (fq *FiletypeQuery) ForUpdate(opts ...sql.LockOption) *FiletypeQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*FiletypeQuery) GroupBy ¶
func (fq *FiletypeQuery) GroupBy(field string, fields ...string) *FiletypeGroupBy
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 { AllowedSize int `json:"allowed_size,omitempty"` Count int `json:"count,omitempty"` } client.Filetype.Query(). GroupBy(filetype.FieldAllowedSize). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FiletypeQuery) IDs ¶
func (fq *FiletypeQuery) IDs(ctx context.Context) (ids []string, err error)
IDs executes the query and returns a list of Filetype IDs.
func (*FiletypeQuery) IDsX ¶
func (fq *FiletypeQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*FiletypeQuery) Limit ¶
func (fq *FiletypeQuery) Limit(limit int) *FiletypeQuery
Limit the number of records to be returned by this query.
func (*FiletypeQuery) Offset ¶
func (fq *FiletypeQuery) Offset(offset int) *FiletypeQuery
Offset to start from.
func (*FiletypeQuery) Only ¶
func (fq *FiletypeQuery) Only(ctx context.Context) (*Filetype, error)
Only returns a single Filetype entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Filetype entity is found. Returns a *NotFoundError when no Filetype entities are found.
func (*FiletypeQuery) OnlyID ¶
func (fq *FiletypeQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Filetype ID in the query. Returns a *NotSingularError when more than one Filetype ID is found. Returns a *NotFoundError when no entities are found.
func (*FiletypeQuery) OnlyIDX ¶
func (fq *FiletypeQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FiletypeQuery) OnlyX ¶
func (fq *FiletypeQuery) OnlyX(ctx context.Context) *Filetype
OnlyX is like Only, but panics if an error occurs.
func (*FiletypeQuery) Order ¶
func (fq *FiletypeQuery) Order(o ...filetype.OrderOption) *FiletypeQuery
Order specifies how the records should be ordered.
func (*FiletypeQuery) QueryFiles ¶
func (fq *FiletypeQuery) QueryFiles() *FileQuery
QueryFiles chains the current query on the "files" edge.
func (*FiletypeQuery) Select ¶
func (fq *FiletypeQuery) Select(fields ...string) *FiletypeSelect
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 { AllowedSize int `json:"allowed_size,omitempty"` } client.Filetype.Query(). Select(filetype.FieldAllowedSize). Scan(ctx, &v)
func (*FiletypeQuery) Unique ¶
func (fq *FiletypeQuery) Unique(unique bool) *FiletypeQuery
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 (*FiletypeQuery) Where ¶
func (fq *FiletypeQuery) Where(ps ...predicate.Filetype) *FiletypeQuery
Where adds a new predicate for the FiletypeQuery builder.
func (*FiletypeQuery) WithFiles ¶
func (fq *FiletypeQuery) WithFiles(opts ...func(*FileQuery)) *FiletypeQuery
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 FiletypeSelect ¶
type FiletypeSelect struct { *FiletypeQuery // contains filtered or unexported fields }
FiletypeSelect is the builder for selecting fields of Filetype entities.
func (*FiletypeSelect) Aggregate ¶
func (fs *FiletypeSelect) Aggregate(fns ...AggregateFunc) *FiletypeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FiletypeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FiletypeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FiletypeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FiletypeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FiletypeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FiletypeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FiletypeSelect) Scan ¶
func (fs *FiletypeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FiletypeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FiletypeUpdate ¶
type FiletypeUpdate struct {
// contains filtered or unexported fields
}
FiletypeUpdate is the builder for updating Filetype entities.
func (*FiletypeUpdate) AddAllowedSize ¶
func (fu *FiletypeUpdate) AddAllowedSize(i int) *FiletypeUpdate
AddAllowedSize adds i to the "allowed_size" field.
func (*FiletypeUpdate) AddFileIDs ¶
func (fu *FiletypeUpdate) AddFileIDs(ids ...int) *FiletypeUpdate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*FiletypeUpdate) AddFiles ¶
func (fu *FiletypeUpdate) AddFiles(f ...*File) *FiletypeUpdate
AddFiles adds the "files" edges to the File entity.
func (*FiletypeUpdate) ClearCreatedAt ¶
func (fu *FiletypeUpdate) ClearCreatedAt() *FiletypeUpdate
ClearCreatedAt clears the value of the "created_at" field.
func (*FiletypeUpdate) ClearFiles ¶
func (fu *FiletypeUpdate) ClearFiles() *FiletypeUpdate
ClearFiles clears all "files" edges to the File entity.
func (*FiletypeUpdate) Exec ¶
func (fu *FiletypeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FiletypeUpdate) ExecX ¶
func (fu *FiletypeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FiletypeUpdate) Mutation ¶
func (fu *FiletypeUpdate) Mutation() *FiletypeMutation
Mutation returns the FiletypeMutation object of the builder.
func (*FiletypeUpdate) RemoveFileIDs ¶
func (fu *FiletypeUpdate) RemoveFileIDs(ids ...int) *FiletypeUpdate
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*FiletypeUpdate) RemoveFiles ¶
func (fu *FiletypeUpdate) RemoveFiles(f ...*File) *FiletypeUpdate
RemoveFiles removes "files" edges to File entities.
func (*FiletypeUpdate) Save ¶
func (fu *FiletypeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FiletypeUpdate) SaveX ¶
func (fu *FiletypeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FiletypeUpdate) SetAllowedSize ¶
func (fu *FiletypeUpdate) SetAllowedSize(i int) *FiletypeUpdate
SetAllowedSize sets the "allowed_size" field.
func (*FiletypeUpdate) SetCreatedAt ¶
func (fu *FiletypeUpdate) SetCreatedAt(t time.Time) *FiletypeUpdate
SetCreatedAt sets the "created_at" field.
func (*FiletypeUpdate) SetIsBanned ¶
func (fu *FiletypeUpdate) SetIsBanned(b bool) *FiletypeUpdate
SetIsBanned sets the "is_banned" field.
func (*FiletypeUpdate) SetNillableAllowedSize ¶
func (fu *FiletypeUpdate) SetNillableAllowedSize(i *int) *FiletypeUpdate
SetNillableAllowedSize sets the "allowed_size" field if the given value is not nil.
func (*FiletypeUpdate) SetNillableCreatedAt ¶
func (fu *FiletypeUpdate) SetNillableCreatedAt(t *time.Time) *FiletypeUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FiletypeUpdate) SetNillableIsBanned ¶
func (fu *FiletypeUpdate) SetNillableIsBanned(b *bool) *FiletypeUpdate
SetNillableIsBanned sets the "is_banned" field if the given value is not nil.
func (*FiletypeUpdate) SetUpdatedAt ¶
func (fu *FiletypeUpdate) SetUpdatedAt(t time.Time) *FiletypeUpdate
SetUpdatedAt sets the "updated_at" field.
func (*FiletypeUpdate) Where ¶
func (fu *FiletypeUpdate) Where(ps ...predicate.Filetype) *FiletypeUpdate
Where appends a list predicates to the FiletypeUpdate builder.
type FiletypeUpdateOne ¶
type FiletypeUpdateOne struct {
// contains filtered or unexported fields
}
FiletypeUpdateOne is the builder for updating a single Filetype entity.
func (*FiletypeUpdateOne) AddAllowedSize ¶
func (fuo *FiletypeUpdateOne) AddAllowedSize(i int) *FiletypeUpdateOne
AddAllowedSize adds i to the "allowed_size" field.
func (*FiletypeUpdateOne) AddFileIDs ¶
func (fuo *FiletypeUpdateOne) AddFileIDs(ids ...int) *FiletypeUpdateOne
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*FiletypeUpdateOne) AddFiles ¶
func (fuo *FiletypeUpdateOne) AddFiles(f ...*File) *FiletypeUpdateOne
AddFiles adds the "files" edges to the File entity.
func (*FiletypeUpdateOne) ClearCreatedAt ¶
func (fuo *FiletypeUpdateOne) ClearCreatedAt() *FiletypeUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*FiletypeUpdateOne) ClearFiles ¶
func (fuo *FiletypeUpdateOne) ClearFiles() *FiletypeUpdateOne
ClearFiles clears all "files" edges to the File entity.
func (*FiletypeUpdateOne) Exec ¶
func (fuo *FiletypeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FiletypeUpdateOne) ExecX ¶
func (fuo *FiletypeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FiletypeUpdateOne) Mutation ¶
func (fuo *FiletypeUpdateOne) Mutation() *FiletypeMutation
Mutation returns the FiletypeMutation object of the builder.
func (*FiletypeUpdateOne) RemoveFileIDs ¶
func (fuo *FiletypeUpdateOne) RemoveFileIDs(ids ...int) *FiletypeUpdateOne
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*FiletypeUpdateOne) RemoveFiles ¶
func (fuo *FiletypeUpdateOne) RemoveFiles(f ...*File) *FiletypeUpdateOne
RemoveFiles removes "files" edges to File entities.
func (*FiletypeUpdateOne) Save ¶
func (fuo *FiletypeUpdateOne) Save(ctx context.Context) (*Filetype, error)
Save executes the query and returns the updated Filetype entity.
func (*FiletypeUpdateOne) SaveX ¶
func (fuo *FiletypeUpdateOne) SaveX(ctx context.Context) *Filetype
SaveX is like Save, but panics if an error occurs.
func (*FiletypeUpdateOne) Select ¶
func (fuo *FiletypeUpdateOne) Select(field string, fields ...string) *FiletypeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FiletypeUpdateOne) SetAllowedSize ¶
func (fuo *FiletypeUpdateOne) SetAllowedSize(i int) *FiletypeUpdateOne
SetAllowedSize sets the "allowed_size" field.
func (*FiletypeUpdateOne) SetCreatedAt ¶
func (fuo *FiletypeUpdateOne) SetCreatedAt(t time.Time) *FiletypeUpdateOne
SetCreatedAt sets the "created_at" field.
func (*FiletypeUpdateOne) SetIsBanned ¶
func (fuo *FiletypeUpdateOne) SetIsBanned(b bool) *FiletypeUpdateOne
SetIsBanned sets the "is_banned" field.
func (*FiletypeUpdateOne) SetNillableAllowedSize ¶
func (fuo *FiletypeUpdateOne) SetNillableAllowedSize(i *int) *FiletypeUpdateOne
SetNillableAllowedSize sets the "allowed_size" field if the given value is not nil.
func (*FiletypeUpdateOne) SetNillableCreatedAt ¶
func (fuo *FiletypeUpdateOne) SetNillableCreatedAt(t *time.Time) *FiletypeUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FiletypeUpdateOne) SetNillableIsBanned ¶
func (fuo *FiletypeUpdateOne) SetNillableIsBanned(b *bool) *FiletypeUpdateOne
SetNillableIsBanned sets the "is_banned" field if the given value is not nil.
func (*FiletypeUpdateOne) SetUpdatedAt ¶
func (fuo *FiletypeUpdateOne) SetUpdatedAt(t time.Time) *FiletypeUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*FiletypeUpdateOne) Where ¶
func (fuo *FiletypeUpdateOne) Where(ps ...predicate.Filetype) *FiletypeUpdateOne
Where appends a list predicates to the FiletypeUpdate builder.
type FiletypeUpsert ¶
FiletypeUpsert is the "OnConflict" setter.
func (*FiletypeUpsert) AddAllowedSize ¶
func (u *FiletypeUpsert) AddAllowedSize(v int) *FiletypeUpsert
AddAllowedSize adds v to the "allowed_size" field.
func (*FiletypeUpsert) ClearCreatedAt ¶
func (u *FiletypeUpsert) ClearCreatedAt() *FiletypeUpsert
ClearCreatedAt clears the value of the "created_at" field.
func (*FiletypeUpsert) SetAllowedSize ¶
func (u *FiletypeUpsert) SetAllowedSize(v int) *FiletypeUpsert
SetAllowedSize sets the "allowed_size" field.
func (*FiletypeUpsert) SetCreatedAt ¶
func (u *FiletypeUpsert) SetCreatedAt(v time.Time) *FiletypeUpsert
SetCreatedAt sets the "created_at" field.
func (*FiletypeUpsert) SetIsBanned ¶
func (u *FiletypeUpsert) SetIsBanned(v bool) *FiletypeUpsert
SetIsBanned sets the "is_banned" field.
func (*FiletypeUpsert) SetUpdatedAt ¶
func (u *FiletypeUpsert) SetUpdatedAt(v time.Time) *FiletypeUpsert
SetUpdatedAt sets the "updated_at" field.
func (*FiletypeUpsert) UpdateAllowedSize ¶
func (u *FiletypeUpsert) UpdateAllowedSize() *FiletypeUpsert
UpdateAllowedSize sets the "allowed_size" field to the value that was provided on create.
func (*FiletypeUpsert) UpdateCreatedAt ¶
func (u *FiletypeUpsert) UpdateCreatedAt() *FiletypeUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FiletypeUpsert) UpdateIsBanned ¶
func (u *FiletypeUpsert) UpdateIsBanned() *FiletypeUpsert
UpdateIsBanned sets the "is_banned" field to the value that was provided on create.
func (*FiletypeUpsert) UpdateUpdatedAt ¶
func (u *FiletypeUpsert) UpdateUpdatedAt() *FiletypeUpsert
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type FiletypeUpsertBulk ¶
type FiletypeUpsertBulk struct {
// contains filtered or unexported fields
}
FiletypeUpsertBulk is the builder for "upsert"-ing a bulk of Filetype nodes.
func (*FiletypeUpsertBulk) AddAllowedSize ¶
func (u *FiletypeUpsertBulk) AddAllowedSize(v int) *FiletypeUpsertBulk
AddAllowedSize adds v to the "allowed_size" field.
func (*FiletypeUpsertBulk) ClearCreatedAt ¶
func (u *FiletypeUpsertBulk) ClearCreatedAt() *FiletypeUpsertBulk
ClearCreatedAt clears the value of the "created_at" field.
func (*FiletypeUpsertBulk) DoNothing ¶
func (u *FiletypeUpsertBulk) DoNothing() *FiletypeUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FiletypeUpsertBulk) Exec ¶
func (u *FiletypeUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FiletypeUpsertBulk) ExecX ¶
func (u *FiletypeUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FiletypeUpsertBulk) Ignore ¶
func (u *FiletypeUpsertBulk) Ignore() *FiletypeUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Filetype.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FiletypeUpsertBulk) SetAllowedSize ¶
func (u *FiletypeUpsertBulk) SetAllowedSize(v int) *FiletypeUpsertBulk
SetAllowedSize sets the "allowed_size" field.
func (*FiletypeUpsertBulk) SetCreatedAt ¶
func (u *FiletypeUpsertBulk) SetCreatedAt(v time.Time) *FiletypeUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*FiletypeUpsertBulk) SetIsBanned ¶
func (u *FiletypeUpsertBulk) SetIsBanned(v bool) *FiletypeUpsertBulk
SetIsBanned sets the "is_banned" field.
func (*FiletypeUpsertBulk) SetUpdatedAt ¶
func (u *FiletypeUpsertBulk) SetUpdatedAt(v time.Time) *FiletypeUpsertBulk
SetUpdatedAt sets the "updated_at" field.
func (*FiletypeUpsertBulk) Update ¶
func (u *FiletypeUpsertBulk) Update(set func(*FiletypeUpsert)) *FiletypeUpsertBulk
Update allows overriding fields `UPDATE` values. See the FiletypeCreateBulk.OnConflict documentation for more info.
func (*FiletypeUpsertBulk) UpdateAllowedSize ¶
func (u *FiletypeUpsertBulk) UpdateAllowedSize() *FiletypeUpsertBulk
UpdateAllowedSize sets the "allowed_size" field to the value that was provided on create.
func (*FiletypeUpsertBulk) UpdateCreatedAt ¶
func (u *FiletypeUpsertBulk) UpdateCreatedAt() *FiletypeUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FiletypeUpsertBulk) UpdateIsBanned ¶
func (u *FiletypeUpsertBulk) UpdateIsBanned() *FiletypeUpsertBulk
UpdateIsBanned sets the "is_banned" field to the value that was provided on create.
func (*FiletypeUpsertBulk) UpdateNewValues ¶
func (u *FiletypeUpsertBulk) UpdateNewValues() *FiletypeUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Filetype.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(filetype.FieldID) }), ). Exec(ctx)
func (*FiletypeUpsertBulk) UpdateUpdatedAt ¶
func (u *FiletypeUpsertBulk) UpdateUpdatedAt() *FiletypeUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type FiletypeUpsertOne ¶
type FiletypeUpsertOne struct {
// contains filtered or unexported fields
}
FiletypeUpsertOne is the builder for "upsert"-ing
one Filetype node.
func (*FiletypeUpsertOne) AddAllowedSize ¶
func (u *FiletypeUpsertOne) AddAllowedSize(v int) *FiletypeUpsertOne
AddAllowedSize adds v to the "allowed_size" field.
func (*FiletypeUpsertOne) ClearCreatedAt ¶
func (u *FiletypeUpsertOne) ClearCreatedAt() *FiletypeUpsertOne
ClearCreatedAt clears the value of the "created_at" field.
func (*FiletypeUpsertOne) DoNothing ¶
func (u *FiletypeUpsertOne) DoNothing() *FiletypeUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FiletypeUpsertOne) Exec ¶
func (u *FiletypeUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FiletypeUpsertOne) ExecX ¶
func (u *FiletypeUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FiletypeUpsertOne) ID ¶
func (u *FiletypeUpsertOne) ID(ctx context.Context) (id string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*FiletypeUpsertOne) IDX ¶
func (u *FiletypeUpsertOne) IDX(ctx context.Context) string
IDX is like ID, but panics if an error occurs.
func (*FiletypeUpsertOne) Ignore ¶
func (u *FiletypeUpsertOne) Ignore() *FiletypeUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Filetype.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FiletypeUpsertOne) SetAllowedSize ¶
func (u *FiletypeUpsertOne) SetAllowedSize(v int) *FiletypeUpsertOne
SetAllowedSize sets the "allowed_size" field.
func (*FiletypeUpsertOne) SetCreatedAt ¶
func (u *FiletypeUpsertOne) SetCreatedAt(v time.Time) *FiletypeUpsertOne
SetCreatedAt sets the "created_at" field.
func (*FiletypeUpsertOne) SetIsBanned ¶
func (u *FiletypeUpsertOne) SetIsBanned(v bool) *FiletypeUpsertOne
SetIsBanned sets the "is_banned" field.
func (*FiletypeUpsertOne) SetUpdatedAt ¶
func (u *FiletypeUpsertOne) SetUpdatedAt(v time.Time) *FiletypeUpsertOne
SetUpdatedAt sets the "updated_at" field.
func (*FiletypeUpsertOne) Update ¶
func (u *FiletypeUpsertOne) Update(set func(*FiletypeUpsert)) *FiletypeUpsertOne
Update allows overriding fields `UPDATE` values. See the FiletypeCreate.OnConflict documentation for more info.
func (*FiletypeUpsertOne) UpdateAllowedSize ¶
func (u *FiletypeUpsertOne) UpdateAllowedSize() *FiletypeUpsertOne
UpdateAllowedSize sets the "allowed_size" field to the value that was provided on create.
func (*FiletypeUpsertOne) UpdateCreatedAt ¶
func (u *FiletypeUpsertOne) UpdateCreatedAt() *FiletypeUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*FiletypeUpsertOne) UpdateIsBanned ¶
func (u *FiletypeUpsertOne) UpdateIsBanned() *FiletypeUpsertOne
UpdateIsBanned sets the "is_banned" field to the value that was provided on create.
func (*FiletypeUpsertOne) UpdateNewValues ¶
func (u *FiletypeUpsertOne) UpdateNewValues() *FiletypeUpsertOne
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.Filetype.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(filetype.FieldID) }), ). Exec(ctx)
func (*FiletypeUpsertOne) UpdateUpdatedAt ¶
func (u *FiletypeUpsertOne) UpdateUpdatedAt() *FiletypeUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type 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 string `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,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) QueryFiles ¶
QueryFiles queries the "files" 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 string) *TagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TagClient) Intercept ¶
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 ¶
func (c *TagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TagClient) MapCreateBulk ¶
func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TagClient) QueryFiles ¶
QueryFiles queries the files 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 string) *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) AddFileIDs ¶
AddFileIDs adds the "files" edge to the File entity by IDs.
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(). 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.TagUpsert) { SetCreatedAt(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)
func (*TagCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*TagCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TagCreate) SetNillableUpdatedAt ¶
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
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) { SetCreatedAt(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 ¶
func (tdo *TagDeleteOne) Where(ps ...predicate.Tag) *TagDeleteOne
Where appends a list predicates to the TagDelete builder.
type TagEdges ¶
type TagEdges struct { // Files holds the value of the files edge. Files []*File `json:"files,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) FilesOrErr ¶
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
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) AddFileIDs ¶
func (m *TagMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "files" edge to the File 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) ClearCreatedAt ¶
func (m *TagMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
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) ClearFiles ¶
func (m *TagMutation) ClearFiles()
ClearFiles clears the "files" edge to the File 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) CreatedAt ¶
func (m *TagMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TagMutation) CreatedAtCleared ¶
func (m *TagMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
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) FilesCleared ¶
func (m *TagMutation) FilesCleared() bool
FilesCleared reports if the "files" edge to the File entity was cleared.
func (*TagMutation) FilesIDs ¶
func (m *TagMutation) FilesIDs() (ids []int)
FilesIDs returns the "files" edge IDs in the mutation.
func (*TagMutation) ID ¶
func (m *TagMutation) ID() (id string, 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) ([]string, 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) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" 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) 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) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" 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) RemoveFileIDs ¶
func (m *TagMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "files" edge to the File entity by IDs.
func (*TagMutation) RemovedEdges ¶
func (m *TagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagMutation) RemovedFilesIDs ¶
func (m *TagMutation) RemovedFilesIDs() (ids []int)
RemovedFiles returns the removed IDs of the "files" edge to the File 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) ResetCreatedAt ¶
func (m *TagMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
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) ResetFiles ¶
func (m *TagMutation) ResetFiles()
ResetFiles resets all changes to the "files" edge.
func (*TagMutation) ResetUpdatedAt ¶
func (m *TagMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*TagMutation) SetCreatedAt ¶
func (m *TagMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" 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) SetID ¶
func (m *TagMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Tag entities.
func (*TagMutation) SetOp ¶
func (m *TagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TagMutation) SetUpdatedAt ¶
func (m *TagMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
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) UpdatedAt ¶
func (m *TagMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" 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 ¶
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 ¶
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) 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) ForShare ¶
func (tq *TagQuery) ForShare(opts ...sql.LockOption) *TagQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*TagQuery) ForUpdate ¶
func (tq *TagQuery) ForUpdate(opts ...sql.LockOption) *TagQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Tag.Query(). GroupBy(tag.FieldCreatedAt). 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) Order ¶
func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
Order specifies how the records should be ordered.
func (*TagQuery) QueryFiles ¶
QueryFiles chains the current query on the "files" 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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.Tag.Query(). Select(tag.FieldCreatedAt). 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.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Aggregate ¶
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) AddFileIDs ¶
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*TagUpdate) ClearCreatedAt ¶
ClearCreatedAt clears the value of the "created_at" field.
func (*TagUpdate) ClearFiles ¶
ClearFiles clears all "files" edges to the File entity.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) RemoveFileIDs ¶
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*TagUpdate) RemoveFiles ¶
RemoveFiles removes "files" edges to File entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*TagUpdate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*TagUpdate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TagUpdate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddFileIDs ¶
func (tuo *TagUpdateOne) AddFileIDs(ids ...int) *TagUpdateOne
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*TagUpdateOne) AddFiles ¶
func (tuo *TagUpdateOne) AddFiles(f ...*File) *TagUpdateOne
AddFiles adds the "files" edges to the File entity.
func (*TagUpdateOne) ClearCreatedAt ¶
func (tuo *TagUpdateOne) ClearCreatedAt() *TagUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*TagUpdateOne) ClearFiles ¶
func (tuo *TagUpdateOne) ClearFiles() *TagUpdateOne
ClearFiles clears all "files" edges to the File 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) RemoveFileIDs ¶
func (tuo *TagUpdateOne) RemoveFileIDs(ids ...int) *TagUpdateOne
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*TagUpdateOne) RemoveFiles ¶
func (tuo *TagUpdateOne) RemoveFiles(f ...*File) *TagUpdateOne
RemoveFiles removes "files" edges to File 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) SetCreatedAt ¶
func (tuo *TagUpdateOne) SetCreatedAt(t time.Time) *TagUpdateOne
SetCreatedAt sets the "created_at" field.
func (*TagUpdateOne) SetNillableCreatedAt ¶
func (tuo *TagUpdateOne) SetNillableCreatedAt(t *time.Time) *TagUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TagUpdateOne) SetUpdatedAt ¶
func (tuo *TagUpdateOne) SetUpdatedAt(t time.Time) *TagUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*TagUpdateOne) Where ¶
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) ClearCreatedAt ¶
ClearCreatedAt clears the value of the "created_at" field.
func (*TagUpsert) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*TagUpsert) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
func (*TagUpsert) UpdateCreatedAt ¶
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*TagUpsert) UpdateUpdatedAt ¶
UpdateUpdatedAt sets the "updated_at" 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) ClearCreatedAt ¶
func (u *TagUpsertBulk) ClearCreatedAt() *TagUpsertBulk
ClearCreatedAt clears the value of the "created_at" field.
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) SetCreatedAt ¶
func (u *TagUpsertBulk) SetCreatedAt(v time.Time) *TagUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*TagUpsertBulk) SetUpdatedAt ¶
func (u *TagUpsertBulk) SetUpdatedAt(v time.Time) *TagUpsertBulk
SetUpdatedAt sets the "updated_at" 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) UpdateCreatedAt ¶
func (u *TagUpsertBulk) UpdateCreatedAt() *TagUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
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(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(tag.FieldID) }), ). Exec(ctx)
func (*TagUpsertBulk) UpdateUpdatedAt ¶
func (u *TagUpsertBulk) UpdateUpdatedAt() *TagUpsertBulk
UpdateUpdatedAt sets the "updated_at" 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) ClearCreatedAt ¶
func (u *TagUpsertOne) ClearCreatedAt() *TagUpsertOne
ClearCreatedAt clears the value of the "created_at" field.
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 string, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TagUpsertOne) IDX ¶
func (u *TagUpsertOne) IDX(ctx context.Context) string
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) SetCreatedAt ¶
func (u *TagUpsertOne) SetCreatedAt(v time.Time) *TagUpsertOne
SetCreatedAt sets the "created_at" field.
func (*TagUpsertOne) SetUpdatedAt ¶
func (u *TagUpsertOne) SetUpdatedAt(v time.Time) *TagUpsertOne
SetUpdatedAt sets the "updated_at" 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) UpdateCreatedAt ¶
func (u *TagUpsertOne) UpdateCreatedAt() *TagUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*TagUpsertOne) UpdateNewValues ¶
func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
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.Tag.Create(). OnConflict( sql.ResolveWithNewValues(), sql.ResolveWith(func(u *sql.UpdateSet) { u.SetIgnore(tag.FieldID) }), ). Exec(ctx)
func (*TagUpsertOne) UpdateUpdatedAt ¶
func (u *TagUpsertOne) UpdateUpdatedAt() *TagUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // File is the client for interacting with the File builders. File *FileClient // Filetype is the client for interacting with the Filetype builders. Filetype *FiletypeClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) 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"` // FirstName holds the value of the "first_name" field. FirstName string `json:"first_name,omitempty"` // LastName holds the value of the "last_name" field. LastName string `json:"last_name,omitempty"` // Email holds the value of the "email" field. Email *string `json:"email,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // AccessType holds the value of the "access_type" field. AccessType user.AccessType `json:"access_type,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // LastLoginAt holds the value of the "last_login_at" field. LastLoginAt *time.Time `json:"last_login_at,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) QueryFiles ¶
QueryFiles queries the "files" edge of the User entity.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryFiles ¶
func (c *UserClient) QueryFiles(u *User) *FileQuery
QueryFiles queries the files 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) AddFileIDs ¶
func (uc *UserCreate) AddFileIDs(ids ...int) *UserCreate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*UserCreate) AddFiles ¶
func (uc *UserCreate) AddFiles(f ...*File) *UserCreate
AddFiles adds the "files" edges to the File entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetFirstName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetFirstName(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAccessType ¶
func (uc *UserCreate) SetAccessType(ut user.AccessType) *UserCreate
SetAccessType sets the "access_type" field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetFirstName ¶
func (uc *UserCreate) SetFirstName(s string) *UserCreate
SetFirstName sets the "first_name" field.
func (*UserCreate) SetLastLoginAt ¶
func (uc *UserCreate) SetLastLoginAt(t time.Time) *UserCreate
SetLastLoginAt sets the "last_login_at" field.
func (*UserCreate) SetLastName ¶
func (uc *UserCreate) SetLastName(s string) *UserCreate
SetLastName sets the "last_name" field.
func (*UserCreate) SetNillableAccessType ¶
func (uc *UserCreate) SetNillableAccessType(ut *user.AccessType) *UserCreate
SetNillableAccessType sets the "access_type" field if the given value is not nil.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableEmail ¶
func (uc *UserCreate) SetNillableEmail(s *string) *UserCreate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserCreate) SetNillableLastLoginAt ¶
func (uc *UserCreate) SetNillableLastLoginAt(t *time.Time) *UserCreate
SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetFirstName(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Files holds the value of the files edge. Files []*File `json:"files,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) FilesOrErr ¶
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AccessType ¶
func (m *UserMutation) AccessType() (r user.AccessType, exists bool)
AccessType returns the value of the "access_type" field in the mutation.
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) AddFileIDs ¶
func (m *UserMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "files" edge to the File 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) ClearCreatedAt ¶
func (m *UserMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearEmail ¶
func (m *UserMutation) ClearEmail()
ClearEmail clears the value of the "email" field.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearFiles ¶
func (m *UserMutation) ClearFiles()
ClearFiles clears the "files" edge to the File entity.
func (*UserMutation) ClearLastLoginAt ¶
func (m *UserMutation) ClearLastLoginAt()
ClearLastLoginAt clears the value of the "last_login_at" field.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) CreatedAtCleared ¶
func (m *UserMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) EmailCleared ¶
func (m *UserMutation) EmailCleared() bool
EmailCleared returns if the "email" field was cleared in this mutation.
func (*UserMutation) 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) FilesCleared ¶
func (m *UserMutation) FilesCleared() bool
FilesCleared reports if the "files" edge to the File entity was cleared.
func (*UserMutation) FilesIDs ¶
func (m *UserMutation) FilesIDs() (ids []int)
FilesIDs returns the "files" edge IDs in the mutation.
func (*UserMutation) FirstName ¶
func (m *UserMutation) FirstName() (r string, exists bool)
FirstName returns the value of the "first_name" field in the mutation.
func (*UserMutation) 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) LastLoginAt ¶
func (m *UserMutation) LastLoginAt() (r time.Time, exists bool)
LastLoginAt returns the value of the "last_login_at" field in the mutation.
func (*UserMutation) LastLoginAtCleared ¶
func (m *UserMutation) LastLoginAtCleared() bool
LastLoginAtCleared returns if the "last_login_at" field was cleared in this mutation.
func (*UserMutation) LastName ¶
func (m *UserMutation) LastName() (r string, exists bool)
LastName returns the value of the "last_name" field in the mutation.
func (*UserMutation) OldAccessType ¶
func (m *UserMutation) OldAccessType(ctx context.Context) (v user.AccessType, err error)
OldAccessType returns the old "access_type" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v *string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldFirstName ¶
func (m *UserMutation) OldFirstName(ctx context.Context) (v string, err error)
OldFirstName returns the old "first_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldLastLoginAt ¶
OldLastLoginAt returns the old "last_login_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldLastName ¶
func (m *UserMutation) OldLastName(ctx context.Context) (v string, err error)
OldLastName returns the old "last_name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) RemoveFileIDs ¶
func (m *UserMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "files" edge to the File entity by IDs.
func (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedFilesIDs ¶
func (m *UserMutation) RemovedFilesIDs() (ids []int)
RemovedFiles returns the removed IDs of the "files" edge to the File 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) ResetAccessType ¶
func (m *UserMutation) ResetAccessType()
ResetAccessType resets all changes to the "access_type" field.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetFiles ¶
func (m *UserMutation) ResetFiles()
ResetFiles resets all changes to the "files" edge.
func (*UserMutation) ResetFirstName ¶
func (m *UserMutation) ResetFirstName()
ResetFirstName resets all changes to the "first_name" field.
func (*UserMutation) ResetLastLoginAt ¶
func (m *UserMutation) ResetLastLoginAt()
ResetLastLoginAt resets all changes to the "last_login_at" field.
func (*UserMutation) ResetLastName ¶
func (m *UserMutation) ResetLastName()
ResetLastName resets all changes to the "last_name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) SetAccessType ¶
func (m *UserMutation) SetAccessType(ut user.AccessType)
SetAccessType sets the "access_type" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetFirstName ¶
func (m *UserMutation) SetFirstName(s string)
SetFirstName sets the "first_name" field.
func (*UserMutation) SetLastLoginAt ¶
func (m *UserMutation) SetLastLoginAt(t time.Time)
SetLastLoginAt sets the "last_login_at" field.
func (*UserMutation) SetLastName ¶
func (m *UserMutation) SetLastName(s string)
SetLastName sets the "last_name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) ForShare ¶
func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery
ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.
func (*UserQuery) ForUpdate ¶
func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery
ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { FirstName string `json:"first_name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldFirstName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) QueryFiles ¶
QueryFiles chains the current query on the "files" edge.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { FirstName string `json:"first_name,omitempty"` } client.User.Query(). Select(user.FieldFirstName). Scan(ctx, &v)
func (*UserQuery) Unique ¶
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) AddFileIDs ¶
func (uu *UserUpdate) AddFileIDs(ids ...int) *UserUpdate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*UserUpdate) AddFiles ¶
func (uu *UserUpdate) AddFiles(f ...*File) *UserUpdate
AddFiles adds the "files" edges to the File entity.
func (*UserUpdate) ClearCreatedAt ¶
func (uu *UserUpdate) ClearCreatedAt() *UserUpdate
ClearCreatedAt clears the value of the "created_at" field.
func (*UserUpdate) ClearEmail ¶
func (uu *UserUpdate) ClearEmail() *UserUpdate
ClearEmail clears the value of the "email" field.
func (*UserUpdate) ClearFiles ¶
func (uu *UserUpdate) ClearFiles() *UserUpdate
ClearFiles clears all "files" edges to the File entity.
func (*UserUpdate) ClearLastLoginAt ¶
func (uu *UserUpdate) ClearLastLoginAt() *UserUpdate
ClearLastLoginAt clears the value of the "last_login_at" field.
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) RemoveFileIDs ¶
func (uu *UserUpdate) RemoveFileIDs(ids ...int) *UserUpdate
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*UserUpdate) RemoveFiles ¶
func (uu *UserUpdate) RemoveFiles(f ...*File) *UserUpdate
RemoveFiles removes "files" edges to File 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) SetAccessType ¶
func (uu *UserUpdate) SetAccessType(ut user.AccessType) *UserUpdate
SetAccessType sets the "access_type" field.
func (*UserUpdate) SetCreatedAt ¶
func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate
SetCreatedAt sets the "created_at" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetFirstName ¶
func (uu *UserUpdate) SetFirstName(s string) *UserUpdate
SetFirstName sets the "first_name" field.
func (*UserUpdate) SetLastLoginAt ¶
func (uu *UserUpdate) SetLastLoginAt(t time.Time) *UserUpdate
SetLastLoginAt sets the "last_login_at" field.
func (*UserUpdate) SetLastName ¶
func (uu *UserUpdate) SetLastName(s string) *UserUpdate
SetLastName sets the "last_name" field.
func (*UserUpdate) SetNillableAccessType ¶
func (uu *UserUpdate) SetNillableAccessType(ut *user.AccessType) *UserUpdate
SetNillableAccessType sets the "access_type" field if the given value is not nil.
func (*UserUpdate) SetNillableCreatedAt ¶
func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdate) SetNillableEmail ¶
func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillableFirstName ¶
func (uu *UserUpdate) SetNillableFirstName(s *string) *UserUpdate
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*UserUpdate) SetNillableLastLoginAt ¶
func (uu *UserUpdate) SetNillableLastLoginAt(t *time.Time) *UserUpdate
SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.
func (*UserUpdate) SetNillableLastName ¶
func (uu *UserUpdate) SetNillableLastName(s *string) *UserUpdate
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddFileIDs ¶
func (uuo *UserUpdateOne) AddFileIDs(ids ...int) *UserUpdateOne
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*UserUpdateOne) AddFiles ¶
func (uuo *UserUpdateOne) AddFiles(f ...*File) *UserUpdateOne
AddFiles adds the "files" edges to the File entity.
func (*UserUpdateOne) ClearCreatedAt ¶
func (uuo *UserUpdateOne) ClearCreatedAt() *UserUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*UserUpdateOne) ClearEmail ¶
func (uuo *UserUpdateOne) ClearEmail() *UserUpdateOne
ClearEmail clears the value of the "email" field.
func (*UserUpdateOne) ClearFiles ¶
func (uuo *UserUpdateOne) ClearFiles() *UserUpdateOne
ClearFiles clears all "files" edges to the File entity.
func (*UserUpdateOne) ClearLastLoginAt ¶
func (uuo *UserUpdateOne) ClearLastLoginAt() *UserUpdateOne
ClearLastLoginAt clears the value of the "last_login_at" field.
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) RemoveFileIDs ¶
func (uuo *UserUpdateOne) RemoveFileIDs(ids ...int) *UserUpdateOne
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*UserUpdateOne) RemoveFiles ¶
func (uuo *UserUpdateOne) RemoveFiles(f ...*File) *UserUpdateOne
RemoveFiles removes "files" edges to File 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) SetAccessType ¶
func (uuo *UserUpdateOne) SetAccessType(ut user.AccessType) *UserUpdateOne
SetAccessType sets the "access_type" field.
func (*UserUpdateOne) SetCreatedAt ¶
func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetFirstName ¶
func (uuo *UserUpdateOne) SetFirstName(s string) *UserUpdateOne
SetFirstName sets the "first_name" field.
func (*UserUpdateOne) SetLastLoginAt ¶
func (uuo *UserUpdateOne) SetLastLoginAt(t time.Time) *UserUpdateOne
SetLastLoginAt sets the "last_login_at" field.
func (*UserUpdateOne) SetLastName ¶
func (uuo *UserUpdateOne) SetLastName(s string) *UserUpdateOne
SetLastName sets the "last_name" field.
func (*UserUpdateOne) SetNillableAccessType ¶
func (uuo *UserUpdateOne) SetNillableAccessType(ut *user.AccessType) *UserUpdateOne
SetNillableAccessType sets the "access_type" field if the given value is not nil.
func (*UserUpdateOne) SetNillableCreatedAt ¶
func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmail ¶
func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillableFirstName ¶
func (uuo *UserUpdateOne) SetNillableFirstName(s *string) *UserUpdateOne
SetNillableFirstName sets the "first_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastLoginAt ¶
func (uuo *UserUpdateOne) SetNillableLastLoginAt(t *time.Time) *UserUpdateOne
SetNillableLastLoginAt sets the "last_login_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastName ¶
func (uuo *UserUpdateOne) SetNillableLastName(s *string) *UserUpdateOne
SetNillableLastName sets the "last_name" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) ClearCreatedAt ¶
func (u *UserUpsert) ClearCreatedAt() *UserUpsert
ClearCreatedAt clears the value of the "created_at" field.
func (*UserUpsert) ClearEmail ¶
func (u *UserUpsert) ClearEmail() *UserUpsert
ClearEmail clears the value of the "email" field.
func (*UserUpsert) ClearLastLoginAt ¶
func (u *UserUpsert) ClearLastLoginAt() *UserUpsert
ClearLastLoginAt clears the value of the "last_login_at" field.
func (*UserUpsert) SetAccessType ¶
func (u *UserUpsert) SetAccessType(v user.AccessType) *UserUpsert
SetAccessType sets the "access_type" field.
func (*UserUpsert) SetCreatedAt ¶
func (u *UserUpsert) SetCreatedAt(v time.Time) *UserUpsert
SetCreatedAt sets the "created_at" field.
func (*UserUpsert) SetEmail ¶
func (u *UserUpsert) SetEmail(v string) *UserUpsert
SetEmail sets the "email" field.
func (*UserUpsert) SetFirstName ¶
func (u *UserUpsert) SetFirstName(v string) *UserUpsert
SetFirstName sets the "first_name" field.
func (*UserUpsert) SetLastLoginAt ¶
func (u *UserUpsert) SetLastLoginAt(v time.Time) *UserUpsert
SetLastLoginAt sets the "last_login_at" field.
func (*UserUpsert) SetLastName ¶
func (u *UserUpsert) SetLastName(v string) *UserUpsert
SetLastName sets the "last_name" field.
func (*UserUpsert) SetPassword ¶
func (u *UserUpsert) SetPassword(v string) *UserUpsert
SetPassword sets the "password" field.
func (*UserUpsert) SetUpdatedAt ¶
func (u *UserUpsert) SetUpdatedAt(v time.Time) *UserUpsert
SetUpdatedAt sets the "updated_at" field.
func (*UserUpsert) UpdateAccessType ¶
func (u *UserUpsert) UpdateAccessType() *UserUpsert
UpdateAccessType sets the "access_type" field to the value that was provided on create.
func (*UserUpsert) UpdateCreatedAt ¶
func (u *UserUpsert) UpdateCreatedAt() *UserUpsert
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsert) UpdateEmail ¶
func (u *UserUpsert) UpdateEmail() *UserUpsert
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsert) UpdateFirstName ¶
func (u *UserUpsert) UpdateFirstName() *UserUpsert
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*UserUpsert) UpdateLastLoginAt ¶
func (u *UserUpsert) UpdateLastLoginAt() *UserUpsert
UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.
func (*UserUpsert) UpdateLastName ¶
func (u *UserUpsert) UpdateLastName() *UserUpsert
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*UserUpsert) UpdatePassword ¶
func (u *UserUpsert) UpdatePassword() *UserUpsert
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsert) UpdateUpdatedAt ¶
func (u *UserUpsert) UpdateUpdatedAt() *UserUpsert
UpdateUpdatedAt sets the "updated_at" 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) ClearCreatedAt ¶
func (u *UserUpsertBulk) ClearCreatedAt() *UserUpsertBulk
ClearCreatedAt clears the value of the "created_at" field.
func (*UserUpsertBulk) ClearEmail ¶
func (u *UserUpsertBulk) ClearEmail() *UserUpsertBulk
ClearEmail clears the value of the "email" field.
func (*UserUpsertBulk) ClearLastLoginAt ¶
func (u *UserUpsertBulk) ClearLastLoginAt() *UserUpsertBulk
ClearLastLoginAt clears the value of the "last_login_at" field.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetAccessType ¶
func (u *UserUpsertBulk) SetAccessType(v user.AccessType) *UserUpsertBulk
SetAccessType sets the "access_type" field.
func (*UserUpsertBulk) SetCreatedAt ¶
func (u *UserUpsertBulk) SetCreatedAt(v time.Time) *UserUpsertBulk
SetCreatedAt sets the "created_at" field.
func (*UserUpsertBulk) SetEmail ¶
func (u *UserUpsertBulk) SetEmail(v string) *UserUpsertBulk
SetEmail sets the "email" field.
func (*UserUpsertBulk) SetFirstName ¶
func (u *UserUpsertBulk) SetFirstName(v string) *UserUpsertBulk
SetFirstName sets the "first_name" field.
func (*UserUpsertBulk) SetLastLoginAt ¶
func (u *UserUpsertBulk) SetLastLoginAt(v time.Time) *UserUpsertBulk
SetLastLoginAt sets the "last_login_at" field.
func (*UserUpsertBulk) SetLastName ¶
func (u *UserUpsertBulk) SetLastName(v string) *UserUpsertBulk
SetLastName sets the "last_name" field.
func (*UserUpsertBulk) SetPassword ¶
func (u *UserUpsertBulk) SetPassword(v string) *UserUpsertBulk
SetPassword sets the "password" field.
func (*UserUpsertBulk) SetUpdatedAt ¶
func (u *UserUpsertBulk) SetUpdatedAt(v time.Time) *UserUpsertBulk
SetUpdatedAt sets the "updated_at" 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) UpdateAccessType ¶
func (u *UserUpsertBulk) UpdateAccessType() *UserUpsertBulk
UpdateAccessType sets the "access_type" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateCreatedAt ¶
func (u *UserUpsertBulk) UpdateCreatedAt() *UserUpsertBulk
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateEmail ¶
func (u *UserUpsertBulk) UpdateEmail() *UserUpsertBulk
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateFirstName ¶
func (u *UserUpsertBulk) UpdateFirstName() *UserUpsertBulk
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateLastLoginAt ¶
func (u *UserUpsertBulk) UpdateLastLoginAt() *UserUpsertBulk
UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateLastName ¶
func (u *UserUpsertBulk) UpdateLastName() *UserUpsertBulk
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserUpsertBulk) UpdatePassword ¶
func (u *UserUpsertBulk) UpdatePassword() *UserUpsertBulk
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateUpdatedAt ¶
func (u *UserUpsertBulk) UpdateUpdatedAt() *UserUpsertBulk
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) ClearCreatedAt ¶
func (u *UserUpsertOne) ClearCreatedAt() *UserUpsertOne
ClearCreatedAt clears the value of the "created_at" field.
func (*UserUpsertOne) ClearEmail ¶
func (u *UserUpsertOne) ClearEmail() *UserUpsertOne
ClearEmail clears the value of the "email" field.
func (*UserUpsertOne) ClearLastLoginAt ¶
func (u *UserUpsertOne) ClearLastLoginAt() *UserUpsertOne
ClearLastLoginAt clears the value of the "last_login_at" field.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) ID ¶
func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetAccessType ¶
func (u *UserUpsertOne) SetAccessType(v user.AccessType) *UserUpsertOne
SetAccessType sets the "access_type" field.
func (*UserUpsertOne) SetCreatedAt ¶
func (u *UserUpsertOne) SetCreatedAt(v time.Time) *UserUpsertOne
SetCreatedAt sets the "created_at" field.
func (*UserUpsertOne) SetEmail ¶
func (u *UserUpsertOne) SetEmail(v string) *UserUpsertOne
SetEmail sets the "email" field.
func (*UserUpsertOne) SetFirstName ¶
func (u *UserUpsertOne) SetFirstName(v string) *UserUpsertOne
SetFirstName sets the "first_name" field.
func (*UserUpsertOne) SetLastLoginAt ¶
func (u *UserUpsertOne) SetLastLoginAt(v time.Time) *UserUpsertOne
SetLastLoginAt sets the "last_login_at" field.
func (*UserUpsertOne) SetLastName ¶
func (u *UserUpsertOne) SetLastName(v string) *UserUpsertOne
SetLastName sets the "last_name" field.
func (*UserUpsertOne) SetPassword ¶
func (u *UserUpsertOne) SetPassword(v string) *UserUpsertOne
SetPassword sets the "password" field.
func (*UserUpsertOne) SetUpdatedAt ¶
func (u *UserUpsertOne) SetUpdatedAt(v time.Time) *UserUpsertOne
SetUpdatedAt sets the "updated_at" 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) UpdateAccessType ¶
func (u *UserUpsertOne) UpdateAccessType() *UserUpsertOne
UpdateAccessType sets the "access_type" field to the value that was provided on create.
func (*UserUpsertOne) UpdateCreatedAt ¶
func (u *UserUpsertOne) UpdateCreatedAt() *UserUpsertOne
UpdateCreatedAt sets the "created_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateEmail ¶
func (u *UserUpsertOne) UpdateEmail() *UserUpsertOne
UpdateEmail sets the "email" field to the value that was provided on create.
func (*UserUpsertOne) UpdateFirstName ¶
func (u *UserUpsertOne) UpdateFirstName() *UserUpsertOne
UpdateFirstName sets the "first_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateLastLoginAt ¶
func (u *UserUpsertOne) UpdateLastLoginAt() *UserUpsertOne
UpdateLastLoginAt sets the "last_login_at" field to the value that was provided on create.
func (*UserUpsertOne) UpdateLastName ¶
func (u *UserUpsertOne) UpdateLastName() *UserUpsertOne
UpdateLastName sets the "last_name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserUpsertOne) UpdatePassword ¶
func (u *UserUpsertOne) UpdatePassword() *UserUpsertOne
UpdatePassword sets the "password" field to the value that was provided on create.
func (*UserUpsertOne) UpdateUpdatedAt ¶
func (u *UserUpsertOne) UpdateUpdatedAt() *UserUpsertOne
UpdateUpdatedAt sets the "updated_at" field to the value that was provided on create.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- ent.go
- file.go
- file_create.go
- file_delete.go
- file_query.go
- file_update.go
- filetype.go
- filetype_create.go
- filetype_delete.go
- filetype_query.go
- filetype_update.go
- mutation.go
- runtime.go
- tag.go
- tag_create.go
- tag_delete.go
- tag_query.go
- tag_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go