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 ContentTypeDef
- type ContentTypeDefClient
- func (c *ContentTypeDefClient) Create() *ContentTypeDefCreate
- func (c *ContentTypeDefClient) CreateBulk(builders ...*ContentTypeDefCreate) *ContentTypeDefCreateBulk
- func (c *ContentTypeDefClient) Delete() *ContentTypeDefDelete
- func (c *ContentTypeDefClient) DeleteOne(_m *ContentTypeDef) *ContentTypeDefDeleteOne
- func (c *ContentTypeDefClient) DeleteOneID(id int) *ContentTypeDefDeleteOne
- func (c *ContentTypeDefClient) Get(ctx context.Context, id int) (*ContentTypeDef, error)
- func (c *ContentTypeDefClient) GetX(ctx context.Context, id int) *ContentTypeDef
- func (c *ContentTypeDefClient) Hooks() []Hook
- func (c *ContentTypeDefClient) Intercept(interceptors ...Interceptor)
- func (c *ContentTypeDefClient) Interceptors() []Interceptor
- func (c *ContentTypeDefClient) MapCreateBulk(slice any, setFunc func(*ContentTypeDefCreate, int)) *ContentTypeDefCreateBulk
- func (c *ContentTypeDefClient) Query() *ContentTypeDefQuery
- func (c *ContentTypeDefClient) Update() *ContentTypeDefUpdate
- func (c *ContentTypeDefClient) UpdateOne(_m *ContentTypeDef) *ContentTypeDefUpdateOne
- func (c *ContentTypeDefClient) UpdateOneID(id int) *ContentTypeDefUpdateOne
- func (c *ContentTypeDefClient) Use(hooks ...Hook)
- type ContentTypeDefCreate
- func (_c *ContentTypeDefCreate) Exec(ctx context.Context) error
- func (_c *ContentTypeDefCreate) ExecX(ctx context.Context)
- func (_c *ContentTypeDefCreate) Mutation() *ContentTypeDefMutation
- func (_c *ContentTypeDefCreate) Save(ctx context.Context) (*ContentTypeDef, error)
- func (_c *ContentTypeDefCreate) SaveX(ctx context.Context) *ContentTypeDef
- func (_c *ContentTypeDefCreate) SetID(v int) *ContentTypeDefCreate
- type ContentTypeDefCreateBulk
- func (_c *ContentTypeDefCreateBulk) Exec(ctx context.Context) error
- func (_c *ContentTypeDefCreateBulk) ExecX(ctx context.Context)
- func (_c *ContentTypeDefCreateBulk) Save(ctx context.Context) ([]*ContentTypeDef, error)
- func (_c *ContentTypeDefCreateBulk) SaveX(ctx context.Context) []*ContentTypeDef
- type ContentTypeDefDelete
- type ContentTypeDefDeleteOne
- type ContentTypeDefGroupBy
- func (_g *ContentTypeDefGroupBy) Aggregate(fns ...AggregateFunc) *ContentTypeDefGroupBy
- func (s *ContentTypeDefGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContentTypeDefGroupBy) BoolX(ctx context.Context) bool
- func (s *ContentTypeDefGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ContentTypeDefGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ContentTypeDefGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContentTypeDefGroupBy) Float64X(ctx context.Context) float64
- func (s *ContentTypeDefGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContentTypeDefGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ContentTypeDefGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ContentTypeDefGroupBy) IntX(ctx context.Context) int
- func (s *ContentTypeDefGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ContentTypeDefGroupBy) IntsX(ctx context.Context) []int
- func (_g *ContentTypeDefGroupBy) Scan(ctx context.Context, v any) error
- func (s *ContentTypeDefGroupBy) ScanX(ctx context.Context, v any)
- func (s *ContentTypeDefGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ContentTypeDefGroupBy) StringX(ctx context.Context) string
- func (s *ContentTypeDefGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ContentTypeDefGroupBy) StringsX(ctx context.Context) []string
- type ContentTypeDefMutation
- func (m *ContentTypeDefMutation) AddField(name string, value ent.Value) error
- func (m *ContentTypeDefMutation) AddedEdges() []string
- func (m *ContentTypeDefMutation) AddedField(name string) (ent.Value, bool)
- func (m *ContentTypeDefMutation) AddedFields() []string
- func (m *ContentTypeDefMutation) AddedIDs(name string) []ent.Value
- func (m *ContentTypeDefMutation) ClearEdge(name string) error
- func (m *ContentTypeDefMutation) ClearField(name string) error
- func (m *ContentTypeDefMutation) ClearedEdges() []string
- func (m *ContentTypeDefMutation) ClearedFields() []string
- func (m ContentTypeDefMutation) Client() *Client
- func (m *ContentTypeDefMutation) EdgeCleared(name string) bool
- func (m *ContentTypeDefMutation) Field(name string) (ent.Value, bool)
- func (m *ContentTypeDefMutation) FieldCleared(name string) bool
- func (m *ContentTypeDefMutation) Fields() []string
- func (m *ContentTypeDefMutation) ID() (id int, exists bool)
- func (m *ContentTypeDefMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ContentTypeDefMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ContentTypeDefMutation) Op() Op
- func (m *ContentTypeDefMutation) RemovedEdges() []string
- func (m *ContentTypeDefMutation) RemovedIDs(name string) []ent.Value
- func (m *ContentTypeDefMutation) ResetEdge(name string) error
- func (m *ContentTypeDefMutation) ResetField(name string) error
- func (m *ContentTypeDefMutation) SetField(name string, value ent.Value) error
- func (m *ContentTypeDefMutation) SetID(id int)
- func (m *ContentTypeDefMutation) SetOp(op Op)
- func (m ContentTypeDefMutation) Tx() (*Tx, error)
- func (m *ContentTypeDefMutation) Type() string
- func (m *ContentTypeDefMutation) Where(ps ...predicate.ContentTypeDef)
- func (m *ContentTypeDefMutation) WhereP(ps ...func(*sql.Selector))
- type ContentTypeDefQuery
- func (_q *ContentTypeDefQuery) Aggregate(fns ...AggregateFunc) *ContentTypeDefSelect
- func (_q *ContentTypeDefQuery) All(ctx context.Context) ([]*ContentTypeDef, error)
- func (_q *ContentTypeDefQuery) AllX(ctx context.Context) []*ContentTypeDef
- func (_q *ContentTypeDefQuery) Clone() *ContentTypeDefQuery
- func (_q *ContentTypeDefQuery) Count(ctx context.Context) (int, error)
- func (_q *ContentTypeDefQuery) CountX(ctx context.Context) int
- func (_q *ContentTypeDefQuery) Exist(ctx context.Context) (bool, error)
- func (_q *ContentTypeDefQuery) ExistX(ctx context.Context) bool
- func (_q *ContentTypeDefQuery) First(ctx context.Context) (*ContentTypeDef, error)
- func (_q *ContentTypeDefQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *ContentTypeDefQuery) FirstIDX(ctx context.Context) int
- func (_q *ContentTypeDefQuery) FirstX(ctx context.Context) *ContentTypeDef
- func (_q *ContentTypeDefQuery) GroupBy(field string, fields ...string) *ContentTypeDefGroupBy
- func (_q *ContentTypeDefQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *ContentTypeDefQuery) IDsX(ctx context.Context) []int
- func (_q *ContentTypeDefQuery) Limit(limit int) *ContentTypeDefQuery
- func (_q *ContentTypeDefQuery) Offset(offset int) *ContentTypeDefQuery
- func (_q *ContentTypeDefQuery) Only(ctx context.Context) (*ContentTypeDef, error)
- func (_q *ContentTypeDefQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *ContentTypeDefQuery) OnlyIDX(ctx context.Context) int
- func (_q *ContentTypeDefQuery) OnlyX(ctx context.Context) *ContentTypeDef
- func (_q *ContentTypeDefQuery) Order(o ...contenttypedef.OrderOption) *ContentTypeDefQuery
- func (_q *ContentTypeDefQuery) Select(fields ...string) *ContentTypeDefSelect
- func (_q *ContentTypeDefQuery) Unique(unique bool) *ContentTypeDefQuery
- func (_q *ContentTypeDefQuery) Where(ps ...predicate.ContentTypeDef) *ContentTypeDefQuery
- type ContentTypeDefSelect
- func (_s *ContentTypeDefSelect) Aggregate(fns ...AggregateFunc) *ContentTypeDefSelect
- func (s *ContentTypeDefSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContentTypeDefSelect) BoolX(ctx context.Context) bool
- func (s *ContentTypeDefSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ContentTypeDefSelect) BoolsX(ctx context.Context) []bool
- func (s *ContentTypeDefSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContentTypeDefSelect) Float64X(ctx context.Context) float64
- func (s *ContentTypeDefSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContentTypeDefSelect) Float64sX(ctx context.Context) []float64
- func (s *ContentTypeDefSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ContentTypeDefSelect) IntX(ctx context.Context) int
- func (s *ContentTypeDefSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ContentTypeDefSelect) IntsX(ctx context.Context) []int
- func (_s *ContentTypeDefSelect) Scan(ctx context.Context, v any) error
- func (s *ContentTypeDefSelect) ScanX(ctx context.Context, v any)
- func (s *ContentTypeDefSelect) String(ctx context.Context) (_ string, err error)
- func (s *ContentTypeDefSelect) StringX(ctx context.Context) string
- func (s *ContentTypeDefSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ContentTypeDefSelect) StringsX(ctx context.Context) []string
- type ContentTypeDefUpdate
- func (_u *ContentTypeDefUpdate) Exec(ctx context.Context) error
- func (_u *ContentTypeDefUpdate) ExecX(ctx context.Context)
- func (_u *ContentTypeDefUpdate) Mutation() *ContentTypeDefMutation
- func (_u *ContentTypeDefUpdate) Save(ctx context.Context) (int, error)
- func (_u *ContentTypeDefUpdate) SaveX(ctx context.Context) int
- func (_u *ContentTypeDefUpdate) Where(ps ...predicate.ContentTypeDef) *ContentTypeDefUpdate
- type ContentTypeDefUpdateOne
- func (_u *ContentTypeDefUpdateOne) Exec(ctx context.Context) error
- func (_u *ContentTypeDefUpdateOne) ExecX(ctx context.Context)
- func (_u *ContentTypeDefUpdateOne) Mutation() *ContentTypeDefMutation
- func (_u *ContentTypeDefUpdateOne) Save(ctx context.Context) (*ContentTypeDef, error)
- func (_u *ContentTypeDefUpdateOne) SaveX(ctx context.Context) *ContentTypeDef
- func (_u *ContentTypeDefUpdateOne) Select(field string, fields ...string) *ContentTypeDefUpdateOne
- func (_u *ContentTypeDefUpdateOne) Where(ps ...predicate.ContentTypeDef) *ContentTypeDefUpdateOne
- type ContentTypeDefs
- 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(_m *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) Update() *FileUpdate
- func (c *FileClient) UpdateOne(_m *File) *FileUpdateOne
- func (c *FileClient) UpdateOneID(id int) *FileUpdateOne
- func (c *FileClient) Use(hooks ...Hook)
- type FileCreate
- func (_c *FileCreate) Exec(ctx context.Context) error
- func (_c *FileCreate) ExecX(ctx context.Context)
- func (_c *FileCreate) Mutation() *FileMutation
- func (_c *FileCreate) Save(ctx context.Context) (*File, error)
- func (_c *FileCreate) SaveX(ctx context.Context) *File
- func (_c *FileCreate) SetID(v int) *FileCreate
- type FileCreateBulk
- type FileDelete
- type FileDeleteOne
- type FileGroupBy
- func (_g *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 (_g *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) AddedEdges() []string
- func (m *FileMutation) AddedField(name string) (ent.Value, bool)
- func (m *FileMutation) AddedFields() []string
- func (m *FileMutation) AddedIDs(name string) []ent.Value
- func (m *FileMutation) ClearEdge(name string) error
- func (m *FileMutation) ClearField(name string) error
- func (m *FileMutation) ClearedEdges() []string
- func (m *FileMutation) ClearedFields() []string
- func (m FileMutation) Client() *Client
- func (m *FileMutation) EdgeCleared(name string) bool
- func (m *FileMutation) Field(name string) (ent.Value, bool)
- func (m *FileMutation) FieldCleared(name string) bool
- func (m *FileMutation) Fields() []string
- func (m *FileMutation) ID() (id int, exists bool)
- func (m *FileMutation) IDs(ctx context.Context) ([]int, error)
- func (m *FileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FileMutation) Op() Op
- func (m *FileMutation) RemovedEdges() []string
- func (m *FileMutation) RemovedIDs(name string) []ent.Value
- func (m *FileMutation) ResetEdge(name string) error
- func (m *FileMutation) ResetField(name string) error
- func (m *FileMutation) SetField(name string, value ent.Value) error
- func (m *FileMutation) SetID(id int)
- func (m *FileMutation) SetOp(op Op)
- func (m FileMutation) Tx() (*Tx, error)
- func (m *FileMutation) Type() string
- func (m *FileMutation) Where(ps ...predicate.File)
- func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
- type FileQuery
- func (_q *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
- func (_q *FileQuery) All(ctx context.Context) ([]*File, error)
- func (_q *FileQuery) AllX(ctx context.Context) []*File
- func (_q *FileQuery) Clone() *FileQuery
- func (_q *FileQuery) Count(ctx context.Context) (int, error)
- func (_q *FileQuery) CountX(ctx context.Context) int
- func (_q *FileQuery) Exist(ctx context.Context) (bool, error)
- func (_q *FileQuery) ExistX(ctx context.Context) bool
- func (_q *FileQuery) First(ctx context.Context) (*File, error)
- func (_q *FileQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *FileQuery) FirstIDX(ctx context.Context) int
- func (_q *FileQuery) FirstX(ctx context.Context) *File
- func (_q *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
- func (_q *FileQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *FileQuery) IDsX(ctx context.Context) []int
- func (_q *FileQuery) Limit(limit int) *FileQuery
- func (_q *FileQuery) Offset(offset int) *FileQuery
- func (_q *FileQuery) Only(ctx context.Context) (*File, error)
- func (_q *FileQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *FileQuery) OnlyIDX(ctx context.Context) int
- func (_q *FileQuery) OnlyX(ctx context.Context) *File
- func (_q *FileQuery) Order(o ...file.OrderOption) *FileQuery
- func (_q *FileQuery) Select(fields ...string) *FileSelect
- func (_q *FileQuery) Unique(unique bool) *FileQuery
- func (_q *FileQuery) Where(ps ...predicate.File) *FileQuery
- type FileSelect
- func (_s *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 (_s *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 (_u *FileUpdate) Exec(ctx context.Context) error
- func (_u *FileUpdate) ExecX(ctx context.Context)
- func (_u *FileUpdate) Mutation() *FileMutation
- func (_u *FileUpdate) Save(ctx context.Context) (int, error)
- func (_u *FileUpdate) SaveX(ctx context.Context) int
- func (_u *FileUpdate) Where(ps ...predicate.File) *FileUpdate
- type FileUpdateOne
- func (_u *FileUpdateOne) Exec(ctx context.Context) error
- func (_u *FileUpdateOne) ExecX(ctx context.Context)
- func (_u *FileUpdateOne) Mutation() *FileMutation
- func (_u *FileUpdateOne) Save(ctx context.Context) (*File, error)
- func (_u *FileUpdateOne) SaveX(ctx context.Context) *File
- func (_u *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
- func (_u *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
- type Files
- type Galleries
- type Gallery
- type GalleryClient
- func (c *GalleryClient) Create() *GalleryCreate
- func (c *GalleryClient) CreateBulk(builders ...*GalleryCreate) *GalleryCreateBulk
- func (c *GalleryClient) Delete() *GalleryDelete
- func (c *GalleryClient) DeleteOne(_m *Gallery) *GalleryDeleteOne
- func (c *GalleryClient) DeleteOneID(id int) *GalleryDeleteOne
- func (c *GalleryClient) Get(ctx context.Context, id int) (*Gallery, error)
- func (c *GalleryClient) GetX(ctx context.Context, id int) *Gallery
- func (c *GalleryClient) Hooks() []Hook
- func (c *GalleryClient) Intercept(interceptors ...Interceptor)
- func (c *GalleryClient) Interceptors() []Interceptor
- func (c *GalleryClient) MapCreateBulk(slice any, setFunc func(*GalleryCreate, int)) *GalleryCreateBulk
- func (c *GalleryClient) Query() *GalleryQuery
- func (c *GalleryClient) QueryItems(_m *Gallery) *GalleryItemQuery
- func (c *GalleryClient) QueryNode(_m *Gallery) *NodeQuery
- func (c *GalleryClient) Update() *GalleryUpdate
- func (c *GalleryClient) UpdateOne(_m *Gallery) *GalleryUpdateOne
- func (c *GalleryClient) UpdateOneID(id int) *GalleryUpdateOne
- func (c *GalleryClient) Use(hooks ...Hook)
- type GalleryContentType
- func (_m *GalleryContentType) QueryContentType() *ContentTypeDefQuery
- func (_m *GalleryContentType) String() string
- func (_m *GalleryContentType) Unwrap() *GalleryContentType
- func (_m *GalleryContentType) Update() *GalleryContentTypeUpdateOne
- func (_m *GalleryContentType) Value(name string) (ent.Value, error)
- type GalleryContentTypeClient
- func (c *GalleryContentTypeClient) Create() *GalleryContentTypeCreate
- func (c *GalleryContentTypeClient) CreateBulk(builders ...*GalleryContentTypeCreate) *GalleryContentTypeCreateBulk
- func (c *GalleryContentTypeClient) Delete() *GalleryContentTypeDelete
- func (c *GalleryContentTypeClient) DeleteOne(_m *GalleryContentType) *GalleryContentTypeDeleteOne
- func (c *GalleryContentTypeClient) DeleteOneID(id int) *GalleryContentTypeDeleteOne
- func (c *GalleryContentTypeClient) Get(ctx context.Context, id int) (*GalleryContentType, error)
- func (c *GalleryContentTypeClient) GetX(ctx context.Context, id int) *GalleryContentType
- func (c *GalleryContentTypeClient) Hooks() []Hook
- func (c *GalleryContentTypeClient) Intercept(interceptors ...Interceptor)
- func (c *GalleryContentTypeClient) Interceptors() []Interceptor
- func (c *GalleryContentTypeClient) MapCreateBulk(slice any, setFunc func(*GalleryContentTypeCreate, int)) *GalleryContentTypeCreateBulk
- func (c *GalleryContentTypeClient) Query() *GalleryContentTypeQuery
- func (c *GalleryContentTypeClient) QueryContentType(_m *GalleryContentType) *ContentTypeDefQuery
- func (c *GalleryContentTypeClient) Update() *GalleryContentTypeUpdate
- func (c *GalleryContentTypeClient) UpdateOne(_m *GalleryContentType) *GalleryContentTypeUpdateOne
- func (c *GalleryContentTypeClient) UpdateOneID(id int) *GalleryContentTypeUpdateOne
- func (c *GalleryContentTypeClient) Use(hooks ...Hook)
- type GalleryContentTypeCreate
- func (_c *GalleryContentTypeCreate) Exec(ctx context.Context) error
- func (_c *GalleryContentTypeCreate) ExecX(ctx context.Context)
- func (_c *GalleryContentTypeCreate) Mutation() *GalleryContentTypeMutation
- func (_c *GalleryContentTypeCreate) Save(ctx context.Context) (*GalleryContentType, error)
- func (_c *GalleryContentTypeCreate) SaveX(ctx context.Context) *GalleryContentType
- func (_c *GalleryContentTypeCreate) SetContentType(v *ContentTypeDef) *GalleryContentTypeCreate
- func (_c *GalleryContentTypeCreate) SetContentTypeID(v int) *GalleryContentTypeCreate
- func (_c *GalleryContentTypeCreate) SetDefaultEnabled(v bool) *GalleryContentTypeCreate
- func (_c *GalleryContentTypeCreate) SetID(v int) *GalleryContentTypeCreate
- func (_c *GalleryContentTypeCreate) SetNillableDefaultEnabled(v *bool) *GalleryContentTypeCreate
- func (_c *GalleryContentTypeCreate) SetNillablePictureField(v *string) *GalleryContentTypeCreate
- func (_c *GalleryContentTypeCreate) SetPictureField(v string) *GalleryContentTypeCreate
- type GalleryContentTypeCreateBulk
- func (_c *GalleryContentTypeCreateBulk) Exec(ctx context.Context) error
- func (_c *GalleryContentTypeCreateBulk) ExecX(ctx context.Context)
- func (_c *GalleryContentTypeCreateBulk) Save(ctx context.Context) ([]*GalleryContentType, error)
- func (_c *GalleryContentTypeCreateBulk) SaveX(ctx context.Context) []*GalleryContentType
- type GalleryContentTypeDelete
- type GalleryContentTypeDeleteOne
- type GalleryContentTypeEdges
- type GalleryContentTypeGroupBy
- func (_g *GalleryContentTypeGroupBy) Aggregate(fns ...AggregateFunc) *GalleryContentTypeGroupBy
- func (s *GalleryContentTypeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GalleryContentTypeGroupBy) BoolX(ctx context.Context) bool
- func (s *GalleryContentTypeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GalleryContentTypeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GalleryContentTypeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GalleryContentTypeGroupBy) Float64X(ctx context.Context) float64
- func (s *GalleryContentTypeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GalleryContentTypeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GalleryContentTypeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GalleryContentTypeGroupBy) IntX(ctx context.Context) int
- func (s *GalleryContentTypeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GalleryContentTypeGroupBy) IntsX(ctx context.Context) []int
- func (_g *GalleryContentTypeGroupBy) Scan(ctx context.Context, v any) error
- func (s *GalleryContentTypeGroupBy) ScanX(ctx context.Context, v any)
- func (s *GalleryContentTypeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GalleryContentTypeGroupBy) StringX(ctx context.Context) string
- func (s *GalleryContentTypeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GalleryContentTypeGroupBy) StringsX(ctx context.Context) []string
- type GalleryContentTypeMutation
- func (m *GalleryContentTypeMutation) AddField(name string, value ent.Value) error
- func (m *GalleryContentTypeMutation) AddedEdges() []string
- func (m *GalleryContentTypeMutation) AddedField(name string) (ent.Value, bool)
- func (m *GalleryContentTypeMutation) AddedFields() []string
- func (m *GalleryContentTypeMutation) AddedIDs(name string) []ent.Value
- func (m *GalleryContentTypeMutation) ClearContentType()
- func (m *GalleryContentTypeMutation) ClearEdge(name string) error
- func (m *GalleryContentTypeMutation) ClearField(name string) error
- func (m *GalleryContentTypeMutation) ClearedEdges() []string
- func (m *GalleryContentTypeMutation) ClearedFields() []string
- func (m GalleryContentTypeMutation) Client() *Client
- func (m *GalleryContentTypeMutation) ContentTypeCleared() bool
- func (m *GalleryContentTypeMutation) ContentTypeID() (r int, exists bool)
- func (m *GalleryContentTypeMutation) ContentTypeIDs() (ids []int)
- func (m *GalleryContentTypeMutation) DefaultEnabled() (r bool, exists bool)
- func (m *GalleryContentTypeMutation) EdgeCleared(name string) bool
- func (m *GalleryContentTypeMutation) Field(name string) (ent.Value, bool)
- func (m *GalleryContentTypeMutation) FieldCleared(name string) bool
- func (m *GalleryContentTypeMutation) Fields() []string
- func (m *GalleryContentTypeMutation) ID() (id int, exists bool)
- func (m *GalleryContentTypeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GalleryContentTypeMutation) OldContentTypeID(ctx context.Context) (v int, err error)
- func (m *GalleryContentTypeMutation) OldDefaultEnabled(ctx context.Context) (v bool, err error)
- func (m *GalleryContentTypeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GalleryContentTypeMutation) OldPictureField(ctx context.Context) (v string, err error)
- func (m *GalleryContentTypeMutation) Op() Op
- func (m *GalleryContentTypeMutation) PictureField() (r string, exists bool)
- func (m *GalleryContentTypeMutation) RemovedEdges() []string
- func (m *GalleryContentTypeMutation) RemovedIDs(name string) []ent.Value
- func (m *GalleryContentTypeMutation) ResetContentType()
- func (m *GalleryContentTypeMutation) ResetContentTypeID()
- func (m *GalleryContentTypeMutation) ResetDefaultEnabled()
- func (m *GalleryContentTypeMutation) ResetEdge(name string) error
- func (m *GalleryContentTypeMutation) ResetField(name string) error
- func (m *GalleryContentTypeMutation) ResetPictureField()
- func (m *GalleryContentTypeMutation) SetContentTypeID(i int)
- func (m *GalleryContentTypeMutation) SetDefaultEnabled(b bool)
- func (m *GalleryContentTypeMutation) SetField(name string, value ent.Value) error
- func (m *GalleryContentTypeMutation) SetID(id int)
- func (m *GalleryContentTypeMutation) SetOp(op Op)
- func (m *GalleryContentTypeMutation) SetPictureField(s string)
- func (m GalleryContentTypeMutation) Tx() (*Tx, error)
- func (m *GalleryContentTypeMutation) Type() string
- func (m *GalleryContentTypeMutation) Where(ps ...predicate.GalleryContentType)
- func (m *GalleryContentTypeMutation) WhereP(ps ...func(*sql.Selector))
- type GalleryContentTypeQuery
- func (_q *GalleryContentTypeQuery) Aggregate(fns ...AggregateFunc) *GalleryContentTypeSelect
- func (_q *GalleryContentTypeQuery) All(ctx context.Context) ([]*GalleryContentType, error)
- func (_q *GalleryContentTypeQuery) AllX(ctx context.Context) []*GalleryContentType
- func (_q *GalleryContentTypeQuery) Clone() *GalleryContentTypeQuery
- func (_q *GalleryContentTypeQuery) Count(ctx context.Context) (int, error)
- func (_q *GalleryContentTypeQuery) CountX(ctx context.Context) int
- func (_q *GalleryContentTypeQuery) Exist(ctx context.Context) (bool, error)
- func (_q *GalleryContentTypeQuery) ExistX(ctx context.Context) bool
- func (_q *GalleryContentTypeQuery) First(ctx context.Context) (*GalleryContentType, error)
- func (_q *GalleryContentTypeQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *GalleryContentTypeQuery) FirstIDX(ctx context.Context) int
- func (_q *GalleryContentTypeQuery) FirstX(ctx context.Context) *GalleryContentType
- func (_q *GalleryContentTypeQuery) GroupBy(field string, fields ...string) *GalleryContentTypeGroupBy
- func (_q *GalleryContentTypeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *GalleryContentTypeQuery) IDsX(ctx context.Context) []int
- func (_q *GalleryContentTypeQuery) Limit(limit int) *GalleryContentTypeQuery
- func (_q *GalleryContentTypeQuery) Offset(offset int) *GalleryContentTypeQuery
- func (_q *GalleryContentTypeQuery) Only(ctx context.Context) (*GalleryContentType, error)
- func (_q *GalleryContentTypeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *GalleryContentTypeQuery) OnlyIDX(ctx context.Context) int
- func (_q *GalleryContentTypeQuery) OnlyX(ctx context.Context) *GalleryContentType
- func (_q *GalleryContentTypeQuery) Order(o ...gallerycontenttype.OrderOption) *GalleryContentTypeQuery
- func (_q *GalleryContentTypeQuery) QueryContentType() *ContentTypeDefQuery
- func (_q *GalleryContentTypeQuery) Select(fields ...string) *GalleryContentTypeSelect
- func (_q *GalleryContentTypeQuery) Unique(unique bool) *GalleryContentTypeQuery
- func (_q *GalleryContentTypeQuery) Where(ps ...predicate.GalleryContentType) *GalleryContentTypeQuery
- func (_q *GalleryContentTypeQuery) WithContentType(opts ...func(*ContentTypeDefQuery)) *GalleryContentTypeQuery
- type GalleryContentTypeSelect
- func (_s *GalleryContentTypeSelect) Aggregate(fns ...AggregateFunc) *GalleryContentTypeSelect
- func (s *GalleryContentTypeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GalleryContentTypeSelect) BoolX(ctx context.Context) bool
- func (s *GalleryContentTypeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GalleryContentTypeSelect) BoolsX(ctx context.Context) []bool
- func (s *GalleryContentTypeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GalleryContentTypeSelect) Float64X(ctx context.Context) float64
- func (s *GalleryContentTypeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GalleryContentTypeSelect) Float64sX(ctx context.Context) []float64
- func (s *GalleryContentTypeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GalleryContentTypeSelect) IntX(ctx context.Context) int
- func (s *GalleryContentTypeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GalleryContentTypeSelect) IntsX(ctx context.Context) []int
- func (_s *GalleryContentTypeSelect) Scan(ctx context.Context, v any) error
- func (s *GalleryContentTypeSelect) ScanX(ctx context.Context, v any)
- func (s *GalleryContentTypeSelect) String(ctx context.Context) (_ string, err error)
- func (s *GalleryContentTypeSelect) StringX(ctx context.Context) string
- func (s *GalleryContentTypeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GalleryContentTypeSelect) StringsX(ctx context.Context) []string
- type GalleryContentTypeUpdate
- func (_u *GalleryContentTypeUpdate) ClearContentType() *GalleryContentTypeUpdate
- func (_u *GalleryContentTypeUpdate) Exec(ctx context.Context) error
- func (_u *GalleryContentTypeUpdate) ExecX(ctx context.Context)
- func (_u *GalleryContentTypeUpdate) Mutation() *GalleryContentTypeMutation
- func (_u *GalleryContentTypeUpdate) Save(ctx context.Context) (int, error)
- func (_u *GalleryContentTypeUpdate) SaveX(ctx context.Context) int
- func (_u *GalleryContentTypeUpdate) SetContentType(v *ContentTypeDef) *GalleryContentTypeUpdate
- func (_u *GalleryContentTypeUpdate) SetContentTypeID(v int) *GalleryContentTypeUpdate
- func (_u *GalleryContentTypeUpdate) SetDefaultEnabled(v bool) *GalleryContentTypeUpdate
- func (_u *GalleryContentTypeUpdate) SetNillableContentTypeID(v *int) *GalleryContentTypeUpdate
- func (_u *GalleryContentTypeUpdate) SetNillableDefaultEnabled(v *bool) *GalleryContentTypeUpdate
- func (_u *GalleryContentTypeUpdate) SetNillablePictureField(v *string) *GalleryContentTypeUpdate
- func (_u *GalleryContentTypeUpdate) SetPictureField(v string) *GalleryContentTypeUpdate
- func (_u *GalleryContentTypeUpdate) Where(ps ...predicate.GalleryContentType) *GalleryContentTypeUpdate
- type GalleryContentTypeUpdateOne
- func (_u *GalleryContentTypeUpdateOne) ClearContentType() *GalleryContentTypeUpdateOne
- func (_u *GalleryContentTypeUpdateOne) Exec(ctx context.Context) error
- func (_u *GalleryContentTypeUpdateOne) ExecX(ctx context.Context)
- func (_u *GalleryContentTypeUpdateOne) Mutation() *GalleryContentTypeMutation
- func (_u *GalleryContentTypeUpdateOne) Save(ctx context.Context) (*GalleryContentType, error)
- func (_u *GalleryContentTypeUpdateOne) SaveX(ctx context.Context) *GalleryContentType
- func (_u *GalleryContentTypeUpdateOne) Select(field string, fields ...string) *GalleryContentTypeUpdateOne
- func (_u *GalleryContentTypeUpdateOne) SetContentType(v *ContentTypeDef) *GalleryContentTypeUpdateOne
- func (_u *GalleryContentTypeUpdateOne) SetContentTypeID(v int) *GalleryContentTypeUpdateOne
- func (_u *GalleryContentTypeUpdateOne) SetDefaultEnabled(v bool) *GalleryContentTypeUpdateOne
- func (_u *GalleryContentTypeUpdateOne) SetNillableContentTypeID(v *int) *GalleryContentTypeUpdateOne
- func (_u *GalleryContentTypeUpdateOne) SetNillableDefaultEnabled(v *bool) *GalleryContentTypeUpdateOne
- func (_u *GalleryContentTypeUpdateOne) SetNillablePictureField(v *string) *GalleryContentTypeUpdateOne
- func (_u *GalleryContentTypeUpdateOne) SetPictureField(v string) *GalleryContentTypeUpdateOne
- func (_u *GalleryContentTypeUpdateOne) Where(ps ...predicate.GalleryContentType) *GalleryContentTypeUpdateOne
- type GalleryContentTypes
- type GalleryCreate
- func (_c *GalleryCreate) AddItemIDs(ids ...int) *GalleryCreate
- func (_c *GalleryCreate) AddItems(v ...*GalleryItem) *GalleryCreate
- func (_c *GalleryCreate) Exec(ctx context.Context) error
- func (_c *GalleryCreate) ExecX(ctx context.Context)
- func (_c *GalleryCreate) Mutation() *GalleryMutation
- func (_c *GalleryCreate) Save(ctx context.Context) (*Gallery, error)
- func (_c *GalleryCreate) SaveX(ctx context.Context) *Gallery
- func (_c *GalleryCreate) SetCreatedAt(v time.Time) *GalleryCreate
- func (_c *GalleryCreate) SetDescription(v string) *GalleryCreate
- func (_c *GalleryCreate) SetID(v int) *GalleryCreate
- func (_c *GalleryCreate) SetNid(v int) *GalleryCreate
- func (_c *GalleryCreate) SetNillableCreatedAt(v *time.Time) *GalleryCreate
- func (_c *GalleryCreate) SetNillableDescription(v *string) *GalleryCreate
- func (_c *GalleryCreate) SetNillablePreviewMediumStyle(v *string) *GalleryCreate
- func (_c *GalleryCreate) SetNillablePreviewSmallStyle(v *string) *GalleryCreate
- func (_c *GalleryCreate) SetNillableStatus(v *bool) *GalleryCreate
- func (_c *GalleryCreate) SetNillableTitle(v *string) *GalleryCreate
- func (_c *GalleryCreate) SetNillableUpdatedAt(v *time.Time) *GalleryCreate
- func (_c *GalleryCreate) SetNillableWeight(v *int) *GalleryCreate
- func (_c *GalleryCreate) SetNode(v *Node) *GalleryCreate
- func (_c *GalleryCreate) SetNodeID(id int) *GalleryCreate
- func (_c *GalleryCreate) SetPreviewMediumStyle(v string) *GalleryCreate
- func (_c *GalleryCreate) SetPreviewSmallStyle(v string) *GalleryCreate
- func (_c *GalleryCreate) SetStatus(v bool) *GalleryCreate
- func (_c *GalleryCreate) SetTitle(v string) *GalleryCreate
- func (_c *GalleryCreate) SetUpdatedAt(v time.Time) *GalleryCreate
- func (_c *GalleryCreate) SetWeight(v int) *GalleryCreate
- type GalleryCreateBulk
- type GalleryDelete
- type GalleryDeleteOne
- type GalleryEdges
- type GalleryGroupBy
- func (_g *GalleryGroupBy) Aggregate(fns ...AggregateFunc) *GalleryGroupBy
- func (s *GalleryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GalleryGroupBy) BoolX(ctx context.Context) bool
- func (s *GalleryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GalleryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GalleryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GalleryGroupBy) Float64X(ctx context.Context) float64
- func (s *GalleryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GalleryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GalleryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GalleryGroupBy) IntX(ctx context.Context) int
- func (s *GalleryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GalleryGroupBy) IntsX(ctx context.Context) []int
- func (_g *GalleryGroupBy) Scan(ctx context.Context, v any) error
- func (s *GalleryGroupBy) ScanX(ctx context.Context, v any)
- func (s *GalleryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GalleryGroupBy) StringX(ctx context.Context) string
- func (s *GalleryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GalleryGroupBy) StringsX(ctx context.Context) []string
- type GalleryItem
- type GalleryItemClient
- func (c *GalleryItemClient) Create() *GalleryItemCreate
- func (c *GalleryItemClient) CreateBulk(builders ...*GalleryItemCreate) *GalleryItemCreateBulk
- func (c *GalleryItemClient) Delete() *GalleryItemDelete
- func (c *GalleryItemClient) DeleteOne(_m *GalleryItem) *GalleryItemDeleteOne
- func (c *GalleryItemClient) DeleteOneID(id int) *GalleryItemDeleteOne
- func (c *GalleryItemClient) Get(ctx context.Context, id int) (*GalleryItem, error)
- func (c *GalleryItemClient) GetX(ctx context.Context, id int) *GalleryItem
- func (c *GalleryItemClient) Hooks() []Hook
- func (c *GalleryItemClient) Intercept(interceptors ...Interceptor)
- func (c *GalleryItemClient) Interceptors() []Interceptor
- func (c *GalleryItemClient) MapCreateBulk(slice any, setFunc func(*GalleryItemCreate, int)) *GalleryItemCreateBulk
- func (c *GalleryItemClient) Query() *GalleryItemQuery
- func (c *GalleryItemClient) QueryFile(_m *GalleryItem) *FileQuery
- func (c *GalleryItemClient) QueryGallery(_m *GalleryItem) *GalleryQuery
- func (c *GalleryItemClient) Update() *GalleryItemUpdate
- func (c *GalleryItemClient) UpdateOne(_m *GalleryItem) *GalleryItemUpdateOne
- func (c *GalleryItemClient) UpdateOneID(id int) *GalleryItemUpdateOne
- func (c *GalleryItemClient) Use(hooks ...Hook)
- type GalleryItemCreate
- func (_c *GalleryItemCreate) Exec(ctx context.Context) error
- func (_c *GalleryItemCreate) ExecX(ctx context.Context)
- func (_c *GalleryItemCreate) Mutation() *GalleryItemMutation
- func (_c *GalleryItemCreate) Save(ctx context.Context) (*GalleryItem, error)
- func (_c *GalleryItemCreate) SaveX(ctx context.Context) *GalleryItem
- func (_c *GalleryItemCreate) SetCreatedAt(v time.Time) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetDescription(v string) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetFid(v int) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetFile(v *File) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetFileID(id int) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetGallery(v *Gallery) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetGalleryID(v int) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetID(v int) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetIsCover(v bool) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetNillableCreatedAt(v *time.Time) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetNillableDescription(v *string) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetNillableIsCover(v *bool) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetNillableTitle(v *string) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetNillableWeight(v *int) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetTitle(v string) *GalleryItemCreate
- func (_c *GalleryItemCreate) SetWeight(v int) *GalleryItemCreate
- type GalleryItemCreateBulk
- type GalleryItemDelete
- type GalleryItemDeleteOne
- type GalleryItemEdges
- type GalleryItemGroupBy
- func (_g *GalleryItemGroupBy) Aggregate(fns ...AggregateFunc) *GalleryItemGroupBy
- func (s *GalleryItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GalleryItemGroupBy) BoolX(ctx context.Context) bool
- func (s *GalleryItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GalleryItemGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GalleryItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GalleryItemGroupBy) Float64X(ctx context.Context) float64
- func (s *GalleryItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GalleryItemGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GalleryItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GalleryItemGroupBy) IntX(ctx context.Context) int
- func (s *GalleryItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GalleryItemGroupBy) IntsX(ctx context.Context) []int
- func (_g *GalleryItemGroupBy) Scan(ctx context.Context, v any) error
- func (s *GalleryItemGroupBy) ScanX(ctx context.Context, v any)
- func (s *GalleryItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GalleryItemGroupBy) StringX(ctx context.Context) string
- func (s *GalleryItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GalleryItemGroupBy) StringsX(ctx context.Context) []string
- type GalleryItemMutation
- func (m *GalleryItemMutation) AddField(name string, value ent.Value) error
- func (m *GalleryItemMutation) AddWeight(i int)
- func (m *GalleryItemMutation) AddedEdges() []string
- func (m *GalleryItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *GalleryItemMutation) AddedFields() []string
- func (m *GalleryItemMutation) AddedIDs(name string) []ent.Value
- func (m *GalleryItemMutation) AddedWeight() (r int, exists bool)
- func (m *GalleryItemMutation) ClearDescription()
- func (m *GalleryItemMutation) ClearEdge(name string) error
- func (m *GalleryItemMutation) ClearField(name string) error
- func (m *GalleryItemMutation) ClearFile()
- func (m *GalleryItemMutation) ClearGallery()
- func (m *GalleryItemMutation) ClearTitle()
- func (m *GalleryItemMutation) ClearWeight()
- func (m *GalleryItemMutation) ClearedEdges() []string
- func (m *GalleryItemMutation) ClearedFields() []string
- func (m GalleryItemMutation) Client() *Client
- func (m *GalleryItemMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GalleryItemMutation) Description() (r string, exists bool)
- func (m *GalleryItemMutation) DescriptionCleared() bool
- func (m *GalleryItemMutation) EdgeCleared(name string) bool
- func (m *GalleryItemMutation) Fid() (r int, exists bool)
- func (m *GalleryItemMutation) Field(name string) (ent.Value, bool)
- func (m *GalleryItemMutation) FieldCleared(name string) bool
- func (m *GalleryItemMutation) Fields() []string
- func (m *GalleryItemMutation) FileCleared() bool
- func (m *GalleryItemMutation) FileID() (id int, exists bool)
- func (m *GalleryItemMutation) FileIDs() (ids []int)
- func (m *GalleryItemMutation) GalleryCleared() bool
- func (m *GalleryItemMutation) GalleryID() (r int, exists bool)
- func (m *GalleryItemMutation) GalleryIDs() (ids []int)
- func (m *GalleryItemMutation) ID() (id int, exists bool)
- func (m *GalleryItemMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GalleryItemMutation) IsCover() (r bool, exists bool)
- func (m *GalleryItemMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GalleryItemMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *GalleryItemMutation) OldFid(ctx context.Context) (v int, err error)
- func (m *GalleryItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GalleryItemMutation) OldGalleryID(ctx context.Context) (v int, err error)
- func (m *GalleryItemMutation) OldIsCover(ctx context.Context) (v bool, err error)
- func (m *GalleryItemMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *GalleryItemMutation) OldWeight(ctx context.Context) (v int, err error)
- func (m *GalleryItemMutation) Op() Op
- func (m *GalleryItemMutation) RemovedEdges() []string
- func (m *GalleryItemMutation) RemovedIDs(name string) []ent.Value
- func (m *GalleryItemMutation) ResetCreatedAt()
- func (m *GalleryItemMutation) ResetDescription()
- func (m *GalleryItemMutation) ResetEdge(name string) error
- func (m *GalleryItemMutation) ResetFid()
- func (m *GalleryItemMutation) ResetField(name string) error
- func (m *GalleryItemMutation) ResetFile()
- func (m *GalleryItemMutation) ResetGallery()
- func (m *GalleryItemMutation) ResetGalleryID()
- func (m *GalleryItemMutation) ResetIsCover()
- func (m *GalleryItemMutation) ResetTitle()
- func (m *GalleryItemMutation) ResetWeight()
- func (m *GalleryItemMutation) SetCreatedAt(t time.Time)
- func (m *GalleryItemMutation) SetDescription(s string)
- func (m *GalleryItemMutation) SetFid(i int)
- func (m *GalleryItemMutation) SetField(name string, value ent.Value) error
- func (m *GalleryItemMutation) SetFileID(id int)
- func (m *GalleryItemMutation) SetGalleryID(i int)
- func (m *GalleryItemMutation) SetID(id int)
- func (m *GalleryItemMutation) SetIsCover(b bool)
- func (m *GalleryItemMutation) SetOp(op Op)
- func (m *GalleryItemMutation) SetTitle(s string)
- func (m *GalleryItemMutation) SetWeight(i int)
- func (m *GalleryItemMutation) Title() (r string, exists bool)
- func (m *GalleryItemMutation) TitleCleared() bool
- func (m GalleryItemMutation) Tx() (*Tx, error)
- func (m *GalleryItemMutation) Type() string
- func (m *GalleryItemMutation) Weight() (r int, exists bool)
- func (m *GalleryItemMutation) WeightCleared() bool
- func (m *GalleryItemMutation) Where(ps ...predicate.GalleryItem)
- func (m *GalleryItemMutation) WhereP(ps ...func(*sql.Selector))
- type GalleryItemQuery
- func (_q *GalleryItemQuery) Aggregate(fns ...AggregateFunc) *GalleryItemSelect
- func (_q *GalleryItemQuery) All(ctx context.Context) ([]*GalleryItem, error)
- func (_q *GalleryItemQuery) AllX(ctx context.Context) []*GalleryItem
- func (_q *GalleryItemQuery) Clone() *GalleryItemQuery
- func (_q *GalleryItemQuery) Count(ctx context.Context) (int, error)
- func (_q *GalleryItemQuery) CountX(ctx context.Context) int
- func (_q *GalleryItemQuery) Exist(ctx context.Context) (bool, error)
- func (_q *GalleryItemQuery) ExistX(ctx context.Context) bool
- func (_q *GalleryItemQuery) First(ctx context.Context) (*GalleryItem, error)
- func (_q *GalleryItemQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *GalleryItemQuery) FirstIDX(ctx context.Context) int
- func (_q *GalleryItemQuery) FirstX(ctx context.Context) *GalleryItem
- func (_q *GalleryItemQuery) GroupBy(field string, fields ...string) *GalleryItemGroupBy
- func (_q *GalleryItemQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *GalleryItemQuery) IDsX(ctx context.Context) []int
- func (_q *GalleryItemQuery) Limit(limit int) *GalleryItemQuery
- func (_q *GalleryItemQuery) Offset(offset int) *GalleryItemQuery
- func (_q *GalleryItemQuery) Only(ctx context.Context) (*GalleryItem, error)
- func (_q *GalleryItemQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *GalleryItemQuery) OnlyIDX(ctx context.Context) int
- func (_q *GalleryItemQuery) OnlyX(ctx context.Context) *GalleryItem
- func (_q *GalleryItemQuery) Order(o ...galleryitem.OrderOption) *GalleryItemQuery
- func (_q *GalleryItemQuery) QueryFile() *FileQuery
- func (_q *GalleryItemQuery) QueryGallery() *GalleryQuery
- func (_q *GalleryItemQuery) Select(fields ...string) *GalleryItemSelect
- func (_q *GalleryItemQuery) Unique(unique bool) *GalleryItemQuery
- func (_q *GalleryItemQuery) Where(ps ...predicate.GalleryItem) *GalleryItemQuery
- func (_q *GalleryItemQuery) WithFile(opts ...func(*FileQuery)) *GalleryItemQuery
- func (_q *GalleryItemQuery) WithGallery(opts ...func(*GalleryQuery)) *GalleryItemQuery
- type GalleryItemSelect
- func (_s *GalleryItemSelect) Aggregate(fns ...AggregateFunc) *GalleryItemSelect
- func (s *GalleryItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GalleryItemSelect) BoolX(ctx context.Context) bool
- func (s *GalleryItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GalleryItemSelect) BoolsX(ctx context.Context) []bool
- func (s *GalleryItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GalleryItemSelect) Float64X(ctx context.Context) float64
- func (s *GalleryItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GalleryItemSelect) Float64sX(ctx context.Context) []float64
- func (s *GalleryItemSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GalleryItemSelect) IntX(ctx context.Context) int
- func (s *GalleryItemSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GalleryItemSelect) IntsX(ctx context.Context) []int
- func (_s *GalleryItemSelect) Scan(ctx context.Context, v any) error
- func (s *GalleryItemSelect) ScanX(ctx context.Context, v any)
- func (s *GalleryItemSelect) String(ctx context.Context) (_ string, err error)
- func (s *GalleryItemSelect) StringX(ctx context.Context) string
- func (s *GalleryItemSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GalleryItemSelect) StringsX(ctx context.Context) []string
- type GalleryItemUpdate
- func (_u *GalleryItemUpdate) AddWeight(v int) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) ClearDescription() *GalleryItemUpdate
- func (_u *GalleryItemUpdate) ClearFile() *GalleryItemUpdate
- func (_u *GalleryItemUpdate) ClearGallery() *GalleryItemUpdate
- func (_u *GalleryItemUpdate) ClearTitle() *GalleryItemUpdate
- func (_u *GalleryItemUpdate) ClearWeight() *GalleryItemUpdate
- func (_u *GalleryItemUpdate) Exec(ctx context.Context) error
- func (_u *GalleryItemUpdate) ExecX(ctx context.Context)
- func (_u *GalleryItemUpdate) Mutation() *GalleryItemMutation
- func (_u *GalleryItemUpdate) Save(ctx context.Context) (int, error)
- func (_u *GalleryItemUpdate) SaveX(ctx context.Context) int
- func (_u *GalleryItemUpdate) SetDescription(v string) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetFid(v int) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetFile(v *File) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetFileID(id int) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetGallery(v *Gallery) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetGalleryID(v int) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetIsCover(v bool) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetNillableDescription(v *string) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetNillableFid(v *int) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetNillableGalleryID(v *int) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetNillableIsCover(v *bool) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetNillableTitle(v *string) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetNillableWeight(v *int) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetTitle(v string) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) SetWeight(v int) *GalleryItemUpdate
- func (_u *GalleryItemUpdate) Where(ps ...predicate.GalleryItem) *GalleryItemUpdate
- type GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) AddWeight(v int) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) ClearDescription() *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) ClearFile() *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) ClearGallery() *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) ClearTitle() *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) ClearWeight() *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) Exec(ctx context.Context) error
- func (_u *GalleryItemUpdateOne) ExecX(ctx context.Context)
- func (_u *GalleryItemUpdateOne) Mutation() *GalleryItemMutation
- func (_u *GalleryItemUpdateOne) Save(ctx context.Context) (*GalleryItem, error)
- func (_u *GalleryItemUpdateOne) SaveX(ctx context.Context) *GalleryItem
- func (_u *GalleryItemUpdateOne) Select(field string, fields ...string) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetDescription(v string) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetFid(v int) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetFile(v *File) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetFileID(id int) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetGallery(v *Gallery) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetGalleryID(v int) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetIsCover(v bool) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetNillableDescription(v *string) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetNillableFid(v *int) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetNillableGalleryID(v *int) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetNillableIsCover(v *bool) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetNillableTitle(v *string) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetNillableWeight(v *int) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetTitle(v string) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) SetWeight(v int) *GalleryItemUpdateOne
- func (_u *GalleryItemUpdateOne) Where(ps ...predicate.GalleryItem) *GalleryItemUpdateOne
- type GalleryItems
- type GalleryMutation
- func (m *GalleryMutation) AddField(name string, value ent.Value) error
- func (m *GalleryMutation) AddItemIDs(ids ...int)
- func (m *GalleryMutation) AddWeight(i int)
- func (m *GalleryMutation) AddedEdges() []string
- func (m *GalleryMutation) AddedField(name string) (ent.Value, bool)
- func (m *GalleryMutation) AddedFields() []string
- func (m *GalleryMutation) AddedIDs(name string) []ent.Value
- func (m *GalleryMutation) AddedWeight() (r int, exists bool)
- func (m *GalleryMutation) ClearDescription()
- func (m *GalleryMutation) ClearEdge(name string) error
- func (m *GalleryMutation) ClearField(name string) error
- func (m *GalleryMutation) ClearItems()
- func (m *GalleryMutation) ClearNode()
- func (m *GalleryMutation) ClearStatus()
- func (m *GalleryMutation) ClearTitle()
- func (m *GalleryMutation) ClearWeight()
- func (m *GalleryMutation) ClearedEdges() []string
- func (m *GalleryMutation) ClearedFields() []string
- func (m GalleryMutation) Client() *Client
- func (m *GalleryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *GalleryMutation) Description() (r string, exists bool)
- func (m *GalleryMutation) DescriptionCleared() bool
- func (m *GalleryMutation) EdgeCleared(name string) bool
- func (m *GalleryMutation) Field(name string) (ent.Value, bool)
- func (m *GalleryMutation) FieldCleared(name string) bool
- func (m *GalleryMutation) Fields() []string
- func (m *GalleryMutation) ID() (id int, exists bool)
- func (m *GalleryMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GalleryMutation) ItemsCleared() bool
- func (m *GalleryMutation) ItemsIDs() (ids []int)
- func (m *GalleryMutation) Nid() (r int, exists bool)
- func (m *GalleryMutation) NodeCleared() bool
- func (m *GalleryMutation) NodeID() (id int, exists bool)
- func (m *GalleryMutation) NodeIDs() (ids []int)
- func (m *GalleryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GalleryMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *GalleryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GalleryMutation) OldNid(ctx context.Context) (v int, err error)
- func (m *GalleryMutation) OldPreviewMediumStyle(ctx context.Context) (v string, err error)
- func (m *GalleryMutation) OldPreviewSmallStyle(ctx context.Context) (v string, err error)
- func (m *GalleryMutation) OldStatus(ctx context.Context) (v bool, err error)
- func (m *GalleryMutation) OldTitle(ctx context.Context) (v string, err error)
- func (m *GalleryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *GalleryMutation) OldWeight(ctx context.Context) (v int, err error)
- func (m *GalleryMutation) Op() Op
- func (m *GalleryMutation) PreviewMediumStyle() (r string, exists bool)
- func (m *GalleryMutation) PreviewSmallStyle() (r string, exists bool)
- func (m *GalleryMutation) RemoveItemIDs(ids ...int)
- func (m *GalleryMutation) RemovedEdges() []string
- func (m *GalleryMutation) RemovedIDs(name string) []ent.Value
- func (m *GalleryMutation) RemovedItemsIDs() (ids []int)
- func (m *GalleryMutation) ResetCreatedAt()
- func (m *GalleryMutation) ResetDescription()
- func (m *GalleryMutation) ResetEdge(name string) error
- func (m *GalleryMutation) ResetField(name string) error
- func (m *GalleryMutation) ResetItems()
- func (m *GalleryMutation) ResetNid()
- func (m *GalleryMutation) ResetNode()
- func (m *GalleryMutation) ResetPreviewMediumStyle()
- func (m *GalleryMutation) ResetPreviewSmallStyle()
- func (m *GalleryMutation) ResetStatus()
- func (m *GalleryMutation) ResetTitle()
- func (m *GalleryMutation) ResetUpdatedAt()
- func (m *GalleryMutation) ResetWeight()
- func (m *GalleryMutation) SetCreatedAt(t time.Time)
- func (m *GalleryMutation) SetDescription(s string)
- func (m *GalleryMutation) SetField(name string, value ent.Value) error
- func (m *GalleryMutation) SetID(id int)
- func (m *GalleryMutation) SetNid(i int)
- func (m *GalleryMutation) SetNodeID(id int)
- func (m *GalleryMutation) SetOp(op Op)
- func (m *GalleryMutation) SetPreviewMediumStyle(s string)
- func (m *GalleryMutation) SetPreviewSmallStyle(s string)
- func (m *GalleryMutation) SetStatus(b bool)
- func (m *GalleryMutation) SetTitle(s string)
- func (m *GalleryMutation) SetUpdatedAt(t time.Time)
- func (m *GalleryMutation) SetWeight(i int)
- func (m *GalleryMutation) Status() (r bool, exists bool)
- func (m *GalleryMutation) StatusCleared() bool
- func (m *GalleryMutation) Title() (r string, exists bool)
- func (m *GalleryMutation) TitleCleared() bool
- func (m GalleryMutation) Tx() (*Tx, error)
- func (m *GalleryMutation) Type() string
- func (m *GalleryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *GalleryMutation) Weight() (r int, exists bool)
- func (m *GalleryMutation) WeightCleared() bool
- func (m *GalleryMutation) Where(ps ...predicate.Gallery)
- func (m *GalleryMutation) WhereP(ps ...func(*sql.Selector))
- type GalleryNode
- type GalleryNodeClient
- func (c *GalleryNodeClient) Create() *GalleryNodeCreate
- func (c *GalleryNodeClient) CreateBulk(builders ...*GalleryNodeCreate) *GalleryNodeCreateBulk
- func (c *GalleryNodeClient) Delete() *GalleryNodeDelete
- func (c *GalleryNodeClient) DeleteOne(_m *GalleryNode) *GalleryNodeDeleteOne
- func (c *GalleryNodeClient) DeleteOneID(id int) *GalleryNodeDeleteOne
- func (c *GalleryNodeClient) Get(ctx context.Context, id int) (*GalleryNode, error)
- func (c *GalleryNodeClient) GetX(ctx context.Context, id int) *GalleryNode
- func (c *GalleryNodeClient) Hooks() []Hook
- func (c *GalleryNodeClient) Intercept(interceptors ...Interceptor)
- func (c *GalleryNodeClient) Interceptors() []Interceptor
- func (c *GalleryNodeClient) MapCreateBulk(slice any, setFunc func(*GalleryNodeCreate, int)) *GalleryNodeCreateBulk
- func (c *GalleryNodeClient) Query() *GalleryNodeQuery
- func (c *GalleryNodeClient) QueryNode(_m *GalleryNode) *NodeQuery
- func (c *GalleryNodeClient) Update() *GalleryNodeUpdate
- func (c *GalleryNodeClient) UpdateOne(_m *GalleryNode) *GalleryNodeUpdateOne
- func (c *GalleryNodeClient) UpdateOneID(id int) *GalleryNodeUpdateOne
- func (c *GalleryNodeClient) Use(hooks ...Hook)
- type GalleryNodeCreate
- func (_c *GalleryNodeCreate) Exec(ctx context.Context) error
- func (_c *GalleryNodeCreate) ExecX(ctx context.Context)
- func (_c *GalleryNodeCreate) Mutation() *GalleryNodeMutation
- func (_c *GalleryNodeCreate) Save(ctx context.Context) (*GalleryNode, error)
- func (_c *GalleryNodeCreate) SaveX(ctx context.Context) *GalleryNode
- func (_c *GalleryNodeCreate) SetID(v int) *GalleryNodeCreate
- func (_c *GalleryNodeCreate) SetNid(v int) *GalleryNodeCreate
- func (_c *GalleryNodeCreate) SetNode(v *Node) *GalleryNodeCreate
- func (_c *GalleryNodeCreate) SetNodeID(id int) *GalleryNodeCreate
- type GalleryNodeCreateBulk
- type GalleryNodeDelete
- type GalleryNodeDeleteOne
- type GalleryNodeEdges
- type GalleryNodeGroupBy
- func (_g *GalleryNodeGroupBy) Aggregate(fns ...AggregateFunc) *GalleryNodeGroupBy
- func (s *GalleryNodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *GalleryNodeGroupBy) BoolX(ctx context.Context) bool
- func (s *GalleryNodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *GalleryNodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *GalleryNodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *GalleryNodeGroupBy) Float64X(ctx context.Context) float64
- func (s *GalleryNodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *GalleryNodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *GalleryNodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *GalleryNodeGroupBy) IntX(ctx context.Context) int
- func (s *GalleryNodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *GalleryNodeGroupBy) IntsX(ctx context.Context) []int
- func (_g *GalleryNodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *GalleryNodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *GalleryNodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *GalleryNodeGroupBy) StringX(ctx context.Context) string
- func (s *GalleryNodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *GalleryNodeGroupBy) StringsX(ctx context.Context) []string
- type GalleryNodeMutation
- func (m *GalleryNodeMutation) AddField(name string, value ent.Value) error
- func (m *GalleryNodeMutation) AddedEdges() []string
- func (m *GalleryNodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *GalleryNodeMutation) AddedFields() []string
- func (m *GalleryNodeMutation) AddedIDs(name string) []ent.Value
- func (m *GalleryNodeMutation) ClearEdge(name string) error
- func (m *GalleryNodeMutation) ClearField(name string) error
- func (m *GalleryNodeMutation) ClearNode()
- func (m *GalleryNodeMutation) ClearedEdges() []string
- func (m *GalleryNodeMutation) ClearedFields() []string
- func (m GalleryNodeMutation) Client() *Client
- func (m *GalleryNodeMutation) EdgeCleared(name string) bool
- func (m *GalleryNodeMutation) Field(name string) (ent.Value, bool)
- func (m *GalleryNodeMutation) FieldCleared(name string) bool
- func (m *GalleryNodeMutation) Fields() []string
- func (m *GalleryNodeMutation) ID() (id int, exists bool)
- func (m *GalleryNodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *GalleryNodeMutation) Nid() (r int, exists bool)
- func (m *GalleryNodeMutation) NodeCleared() bool
- func (m *GalleryNodeMutation) NodeID() (id int, exists bool)
- func (m *GalleryNodeMutation) NodeIDs() (ids []int)
- func (m *GalleryNodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *GalleryNodeMutation) OldNid(ctx context.Context) (v int, err error)
- func (m *GalleryNodeMutation) Op() Op
- func (m *GalleryNodeMutation) RemovedEdges() []string
- func (m *GalleryNodeMutation) RemovedIDs(name string) []ent.Value
- func (m *GalleryNodeMutation) ResetEdge(name string) error
- func (m *GalleryNodeMutation) ResetField(name string) error
- func (m *GalleryNodeMutation) ResetNid()
- func (m *GalleryNodeMutation) ResetNode()
- func (m *GalleryNodeMutation) SetField(name string, value ent.Value) error
- func (m *GalleryNodeMutation) SetID(id int)
- func (m *GalleryNodeMutation) SetNid(i int)
- func (m *GalleryNodeMutation) SetNodeID(id int)
- func (m *GalleryNodeMutation) SetOp(op Op)
- func (m GalleryNodeMutation) Tx() (*Tx, error)
- func (m *GalleryNodeMutation) Type() string
- func (m *GalleryNodeMutation) Where(ps ...predicate.GalleryNode)
- func (m *GalleryNodeMutation) WhereP(ps ...func(*sql.Selector))
- type GalleryNodeQuery
- func (_q *GalleryNodeQuery) Aggregate(fns ...AggregateFunc) *GalleryNodeSelect
- func (_q *GalleryNodeQuery) All(ctx context.Context) ([]*GalleryNode, error)
- func (_q *GalleryNodeQuery) AllX(ctx context.Context) []*GalleryNode
- func (_q *GalleryNodeQuery) Clone() *GalleryNodeQuery
- func (_q *GalleryNodeQuery) Count(ctx context.Context) (int, error)
- func (_q *GalleryNodeQuery) CountX(ctx context.Context) int
- func (_q *GalleryNodeQuery) Exist(ctx context.Context) (bool, error)
- func (_q *GalleryNodeQuery) ExistX(ctx context.Context) bool
- func (_q *GalleryNodeQuery) First(ctx context.Context) (*GalleryNode, error)
- func (_q *GalleryNodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *GalleryNodeQuery) FirstIDX(ctx context.Context) int
- func (_q *GalleryNodeQuery) FirstX(ctx context.Context) *GalleryNode
- func (_q *GalleryNodeQuery) GroupBy(field string, fields ...string) *GalleryNodeGroupBy
- func (_q *GalleryNodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *GalleryNodeQuery) IDsX(ctx context.Context) []int
- func (_q *GalleryNodeQuery) Limit(limit int) *GalleryNodeQuery
- func (_q *GalleryNodeQuery) Offset(offset int) *GalleryNodeQuery
- func (_q *GalleryNodeQuery) Only(ctx context.Context) (*GalleryNode, error)
- func (_q *GalleryNodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *GalleryNodeQuery) OnlyIDX(ctx context.Context) int
- func (_q *GalleryNodeQuery) OnlyX(ctx context.Context) *GalleryNode
- func (_q *GalleryNodeQuery) Order(o ...gallerynode.OrderOption) *GalleryNodeQuery
- func (_q *GalleryNodeQuery) QueryNode() *NodeQuery
- func (_q *GalleryNodeQuery) Select(fields ...string) *GalleryNodeSelect
- func (_q *GalleryNodeQuery) Unique(unique bool) *GalleryNodeQuery
- func (_q *GalleryNodeQuery) Where(ps ...predicate.GalleryNode) *GalleryNodeQuery
- func (_q *GalleryNodeQuery) WithNode(opts ...func(*NodeQuery)) *GalleryNodeQuery
- type GalleryNodeSelect
- func (_s *GalleryNodeSelect) Aggregate(fns ...AggregateFunc) *GalleryNodeSelect
- func (s *GalleryNodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GalleryNodeSelect) BoolX(ctx context.Context) bool
- func (s *GalleryNodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GalleryNodeSelect) BoolsX(ctx context.Context) []bool
- func (s *GalleryNodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GalleryNodeSelect) Float64X(ctx context.Context) float64
- func (s *GalleryNodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GalleryNodeSelect) Float64sX(ctx context.Context) []float64
- func (s *GalleryNodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *GalleryNodeSelect) IntX(ctx context.Context) int
- func (s *GalleryNodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *GalleryNodeSelect) IntsX(ctx context.Context) []int
- func (_s *GalleryNodeSelect) Scan(ctx context.Context, v any) error
- func (s *GalleryNodeSelect) ScanX(ctx context.Context, v any)
- func (s *GalleryNodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *GalleryNodeSelect) StringX(ctx context.Context) string
- func (s *GalleryNodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *GalleryNodeSelect) StringsX(ctx context.Context) []string
- type GalleryNodeUpdate
- func (_u *GalleryNodeUpdate) ClearNode() *GalleryNodeUpdate
- func (_u *GalleryNodeUpdate) Exec(ctx context.Context) error
- func (_u *GalleryNodeUpdate) ExecX(ctx context.Context)
- func (_u *GalleryNodeUpdate) Mutation() *GalleryNodeMutation
- func (_u *GalleryNodeUpdate) Save(ctx context.Context) (int, error)
- func (_u *GalleryNodeUpdate) SaveX(ctx context.Context) int
- func (_u *GalleryNodeUpdate) SetNid(v int) *GalleryNodeUpdate
- func (_u *GalleryNodeUpdate) SetNillableNid(v *int) *GalleryNodeUpdate
- func (_u *GalleryNodeUpdate) SetNode(v *Node) *GalleryNodeUpdate
- func (_u *GalleryNodeUpdate) SetNodeID(id int) *GalleryNodeUpdate
- func (_u *GalleryNodeUpdate) Where(ps ...predicate.GalleryNode) *GalleryNodeUpdate
- type GalleryNodeUpdateOne
- func (_u *GalleryNodeUpdateOne) ClearNode() *GalleryNodeUpdateOne
- func (_u *GalleryNodeUpdateOne) Exec(ctx context.Context) error
- func (_u *GalleryNodeUpdateOne) ExecX(ctx context.Context)
- func (_u *GalleryNodeUpdateOne) Mutation() *GalleryNodeMutation
- func (_u *GalleryNodeUpdateOne) Save(ctx context.Context) (*GalleryNode, error)
- func (_u *GalleryNodeUpdateOne) SaveX(ctx context.Context) *GalleryNode
- func (_u *GalleryNodeUpdateOne) Select(field string, fields ...string) *GalleryNodeUpdateOne
- func (_u *GalleryNodeUpdateOne) SetNid(v int) *GalleryNodeUpdateOne
- func (_u *GalleryNodeUpdateOne) SetNillableNid(v *int) *GalleryNodeUpdateOne
- func (_u *GalleryNodeUpdateOne) SetNode(v *Node) *GalleryNodeUpdateOne
- func (_u *GalleryNodeUpdateOne) SetNodeID(id int) *GalleryNodeUpdateOne
- func (_u *GalleryNodeUpdateOne) Where(ps ...predicate.GalleryNode) *GalleryNodeUpdateOne
- type GalleryNodes
- type GalleryQuery
- func (_q *GalleryQuery) Aggregate(fns ...AggregateFunc) *GallerySelect
- func (_q *GalleryQuery) All(ctx context.Context) ([]*Gallery, error)
- func (_q *GalleryQuery) AllX(ctx context.Context) []*Gallery
- func (_q *GalleryQuery) Clone() *GalleryQuery
- func (_q *GalleryQuery) Count(ctx context.Context) (int, error)
- func (_q *GalleryQuery) CountX(ctx context.Context) int
- func (_q *GalleryQuery) Exist(ctx context.Context) (bool, error)
- func (_q *GalleryQuery) ExistX(ctx context.Context) bool
- func (_q *GalleryQuery) First(ctx context.Context) (*Gallery, error)
- func (_q *GalleryQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *GalleryQuery) FirstIDX(ctx context.Context) int
- func (_q *GalleryQuery) FirstX(ctx context.Context) *Gallery
- func (_q *GalleryQuery) GroupBy(field string, fields ...string) *GalleryGroupBy
- func (_q *GalleryQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *GalleryQuery) IDsX(ctx context.Context) []int
- func (_q *GalleryQuery) Limit(limit int) *GalleryQuery
- func (_q *GalleryQuery) Offset(offset int) *GalleryQuery
- func (_q *GalleryQuery) Only(ctx context.Context) (*Gallery, error)
- func (_q *GalleryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *GalleryQuery) OnlyIDX(ctx context.Context) int
- func (_q *GalleryQuery) OnlyX(ctx context.Context) *Gallery
- func (_q *GalleryQuery) Order(o ...gallery.OrderOption) *GalleryQuery
- func (_q *GalleryQuery) QueryItems() *GalleryItemQuery
- func (_q *GalleryQuery) QueryNode() *NodeQuery
- func (_q *GalleryQuery) Select(fields ...string) *GallerySelect
- func (_q *GalleryQuery) Unique(unique bool) *GalleryQuery
- func (_q *GalleryQuery) Where(ps ...predicate.Gallery) *GalleryQuery
- func (_q *GalleryQuery) WithItems(opts ...func(*GalleryItemQuery)) *GalleryQuery
- func (_q *GalleryQuery) WithNode(opts ...func(*NodeQuery)) *GalleryQuery
- type GallerySelect
- func (_s *GallerySelect) Aggregate(fns ...AggregateFunc) *GallerySelect
- func (s *GallerySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *GallerySelect) BoolX(ctx context.Context) bool
- func (s *GallerySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *GallerySelect) BoolsX(ctx context.Context) []bool
- func (s *GallerySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *GallerySelect) Float64X(ctx context.Context) float64
- func (s *GallerySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *GallerySelect) Float64sX(ctx context.Context) []float64
- func (s *GallerySelect) Int(ctx context.Context) (_ int, err error)
- func (s *GallerySelect) IntX(ctx context.Context) int
- func (s *GallerySelect) Ints(ctx context.Context) ([]int, error)
- func (s *GallerySelect) IntsX(ctx context.Context) []int
- func (_s *GallerySelect) Scan(ctx context.Context, v any) error
- func (s *GallerySelect) ScanX(ctx context.Context, v any)
- func (s *GallerySelect) String(ctx context.Context) (_ string, err error)
- func (s *GallerySelect) StringX(ctx context.Context) string
- func (s *GallerySelect) Strings(ctx context.Context) ([]string, error)
- func (s *GallerySelect) StringsX(ctx context.Context) []string
- type GalleryUpdate
- func (_u *GalleryUpdate) AddItemIDs(ids ...int) *GalleryUpdate
- func (_u *GalleryUpdate) AddItems(v ...*GalleryItem) *GalleryUpdate
- func (_u *GalleryUpdate) AddWeight(v int) *GalleryUpdate
- func (_u *GalleryUpdate) ClearDescription() *GalleryUpdate
- func (_u *GalleryUpdate) ClearItems() *GalleryUpdate
- func (_u *GalleryUpdate) ClearNode() *GalleryUpdate
- func (_u *GalleryUpdate) ClearStatus() *GalleryUpdate
- func (_u *GalleryUpdate) ClearTitle() *GalleryUpdate
- func (_u *GalleryUpdate) ClearWeight() *GalleryUpdate
- func (_u *GalleryUpdate) Exec(ctx context.Context) error
- func (_u *GalleryUpdate) ExecX(ctx context.Context)
- func (_u *GalleryUpdate) Mutation() *GalleryMutation
- func (_u *GalleryUpdate) RemoveItemIDs(ids ...int) *GalleryUpdate
- func (_u *GalleryUpdate) RemoveItems(v ...*GalleryItem) *GalleryUpdate
- func (_u *GalleryUpdate) Save(ctx context.Context) (int, error)
- func (_u *GalleryUpdate) SaveX(ctx context.Context) int
- func (_u *GalleryUpdate) SetDescription(v string) *GalleryUpdate
- func (_u *GalleryUpdate) SetNid(v int) *GalleryUpdate
- func (_u *GalleryUpdate) SetNillableDescription(v *string) *GalleryUpdate
- func (_u *GalleryUpdate) SetNillableNid(v *int) *GalleryUpdate
- func (_u *GalleryUpdate) SetNillablePreviewMediumStyle(v *string) *GalleryUpdate
- func (_u *GalleryUpdate) SetNillablePreviewSmallStyle(v *string) *GalleryUpdate
- func (_u *GalleryUpdate) SetNillableStatus(v *bool) *GalleryUpdate
- func (_u *GalleryUpdate) SetNillableTitle(v *string) *GalleryUpdate
- func (_u *GalleryUpdate) SetNillableWeight(v *int) *GalleryUpdate
- func (_u *GalleryUpdate) SetNode(v *Node) *GalleryUpdate
- func (_u *GalleryUpdate) SetNodeID(id int) *GalleryUpdate
- func (_u *GalleryUpdate) SetPreviewMediumStyle(v string) *GalleryUpdate
- func (_u *GalleryUpdate) SetPreviewSmallStyle(v string) *GalleryUpdate
- func (_u *GalleryUpdate) SetStatus(v bool) *GalleryUpdate
- func (_u *GalleryUpdate) SetTitle(v string) *GalleryUpdate
- func (_u *GalleryUpdate) SetUpdatedAt(v time.Time) *GalleryUpdate
- func (_u *GalleryUpdate) SetWeight(v int) *GalleryUpdate
- func (_u *GalleryUpdate) Where(ps ...predicate.Gallery) *GalleryUpdate
- type GalleryUpdateOne
- func (_u *GalleryUpdateOne) AddItemIDs(ids ...int) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) AddItems(v ...*GalleryItem) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) AddWeight(v int) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) ClearDescription() *GalleryUpdateOne
- func (_u *GalleryUpdateOne) ClearItems() *GalleryUpdateOne
- func (_u *GalleryUpdateOne) ClearNode() *GalleryUpdateOne
- func (_u *GalleryUpdateOne) ClearStatus() *GalleryUpdateOne
- func (_u *GalleryUpdateOne) ClearTitle() *GalleryUpdateOne
- func (_u *GalleryUpdateOne) ClearWeight() *GalleryUpdateOne
- func (_u *GalleryUpdateOne) Exec(ctx context.Context) error
- func (_u *GalleryUpdateOne) ExecX(ctx context.Context)
- func (_u *GalleryUpdateOne) Mutation() *GalleryMutation
- func (_u *GalleryUpdateOne) RemoveItemIDs(ids ...int) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) RemoveItems(v ...*GalleryItem) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) Save(ctx context.Context) (*Gallery, error)
- func (_u *GalleryUpdateOne) SaveX(ctx context.Context) *Gallery
- func (_u *GalleryUpdateOne) Select(field string, fields ...string) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetDescription(v string) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetNid(v int) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetNillableDescription(v *string) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetNillableNid(v *int) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetNillablePreviewMediumStyle(v *string) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetNillablePreviewSmallStyle(v *string) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetNillableStatus(v *bool) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetNillableTitle(v *string) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetNillableWeight(v *int) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetNode(v *Node) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetNodeID(id int) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetPreviewMediumStyle(v string) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetPreviewSmallStyle(v string) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetStatus(v bool) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetTitle(v string) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetUpdatedAt(v time.Time) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) SetWeight(v int) *GalleryUpdateOne
- func (_u *GalleryUpdateOne) Where(ps ...predicate.Gallery) *GalleryUpdateOne
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type Node
- type NodeClient
- func (c *NodeClient) Create() *NodeCreate
- func (c *NodeClient) CreateBulk(builders ...*NodeCreate) *NodeCreateBulk
- func (c *NodeClient) Delete() *NodeDelete
- func (c *NodeClient) DeleteOne(_m *Node) *NodeDeleteOne
- func (c *NodeClient) DeleteOneID(id int) *NodeDeleteOne
- func (c *NodeClient) Get(ctx context.Context, id int) (*Node, error)
- func (c *NodeClient) GetX(ctx context.Context, id int) *Node
- func (c *NodeClient) Hooks() []Hook
- func (c *NodeClient) Intercept(interceptors ...Interceptor)
- func (c *NodeClient) Interceptors() []Interceptor
- func (c *NodeClient) MapCreateBulk(slice any, setFunc func(*NodeCreate, int)) *NodeCreateBulk
- func (c *NodeClient) Query() *NodeQuery
- func (c *NodeClient) Update() *NodeUpdate
- func (c *NodeClient) UpdateOne(_m *Node) *NodeUpdateOne
- func (c *NodeClient) UpdateOneID(id int) *NodeUpdateOne
- func (c *NodeClient) Use(hooks ...Hook)
- type NodeCreate
- func (_c *NodeCreate) Exec(ctx context.Context) error
- func (_c *NodeCreate) ExecX(ctx context.Context)
- func (_c *NodeCreate) Mutation() *NodeMutation
- func (_c *NodeCreate) Save(ctx context.Context) (*Node, error)
- func (_c *NodeCreate) SaveX(ctx context.Context) *Node
- func (_c *NodeCreate) SetID(v int) *NodeCreate
- type NodeCreateBulk
- type NodeDelete
- type NodeDeleteOne
- type NodeGroupBy
- func (_g *NodeGroupBy) Aggregate(fns ...AggregateFunc) *NodeGroupBy
- func (s *NodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeGroupBy) BoolX(ctx context.Context) bool
- func (s *NodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeGroupBy) Float64X(ctx context.Context) float64
- func (s *NodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NodeGroupBy) IntX(ctx context.Context) int
- func (s *NodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NodeGroupBy) IntsX(ctx context.Context) []int
- func (_g *NodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *NodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *NodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NodeGroupBy) StringX(ctx context.Context) string
- func (s *NodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NodeGroupBy) StringsX(ctx context.Context) []string
- type NodeMutation
- func (m *NodeMutation) AddField(name string, value ent.Value) error
- func (m *NodeMutation) AddedEdges() []string
- func (m *NodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *NodeMutation) AddedFields() []string
- func (m *NodeMutation) AddedIDs(name string) []ent.Value
- func (m *NodeMutation) ClearEdge(name string) error
- func (m *NodeMutation) ClearField(name string) error
- func (m *NodeMutation) ClearedEdges() []string
- func (m *NodeMutation) ClearedFields() []string
- func (m NodeMutation) Client() *Client
- func (m *NodeMutation) EdgeCleared(name string) bool
- func (m *NodeMutation) Field(name string) (ent.Value, bool)
- func (m *NodeMutation) FieldCleared(name string) bool
- func (m *NodeMutation) Fields() []string
- func (m *NodeMutation) ID() (id int, exists bool)
- func (m *NodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NodeMutation) Op() Op
- func (m *NodeMutation) RemovedEdges() []string
- func (m *NodeMutation) RemovedIDs(name string) []ent.Value
- func (m *NodeMutation) ResetEdge(name string) error
- func (m *NodeMutation) ResetField(name string) error
- func (m *NodeMutation) SetField(name string, value ent.Value) error
- func (m *NodeMutation) SetID(id int)
- func (m *NodeMutation) SetOp(op Op)
- func (m NodeMutation) Tx() (*Tx, error)
- func (m *NodeMutation) Type() string
- func (m *NodeMutation) Where(ps ...predicate.Node)
- func (m *NodeMutation) WhereP(ps ...func(*sql.Selector))
- type NodeQuery
- func (_q *NodeQuery) Aggregate(fns ...AggregateFunc) *NodeSelect
- func (_q *NodeQuery) All(ctx context.Context) ([]*Node, error)
- func (_q *NodeQuery) AllX(ctx context.Context) []*Node
- func (_q *NodeQuery) Clone() *NodeQuery
- func (_q *NodeQuery) Count(ctx context.Context) (int, error)
- func (_q *NodeQuery) CountX(ctx context.Context) int
- func (_q *NodeQuery) Exist(ctx context.Context) (bool, error)
- func (_q *NodeQuery) ExistX(ctx context.Context) bool
- func (_q *NodeQuery) First(ctx context.Context) (*Node, error)
- func (_q *NodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *NodeQuery) FirstIDX(ctx context.Context) int
- func (_q *NodeQuery) FirstX(ctx context.Context) *Node
- func (_q *NodeQuery) GroupBy(field string, fields ...string) *NodeGroupBy
- func (_q *NodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *NodeQuery) IDsX(ctx context.Context) []int
- func (_q *NodeQuery) Limit(limit int) *NodeQuery
- func (_q *NodeQuery) Offset(offset int) *NodeQuery
- func (_q *NodeQuery) Only(ctx context.Context) (*Node, error)
- func (_q *NodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *NodeQuery) OnlyIDX(ctx context.Context) int
- func (_q *NodeQuery) OnlyX(ctx context.Context) *Node
- func (_q *NodeQuery) Order(o ...node.OrderOption) *NodeQuery
- func (_q *NodeQuery) Select(fields ...string) *NodeSelect
- func (_q *NodeQuery) Unique(unique bool) *NodeQuery
- func (_q *NodeQuery) Where(ps ...predicate.Node) *NodeQuery
- type NodeSelect
- func (_s *NodeSelect) Aggregate(fns ...AggregateFunc) *NodeSelect
- func (s *NodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeSelect) BoolX(ctx context.Context) bool
- func (s *NodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeSelect) BoolsX(ctx context.Context) []bool
- func (s *NodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeSelect) Float64X(ctx context.Context) float64
- func (s *NodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeSelect) Float64sX(ctx context.Context) []float64
- func (s *NodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NodeSelect) IntX(ctx context.Context) int
- func (s *NodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NodeSelect) IntsX(ctx context.Context) []int
- func (_s *NodeSelect) Scan(ctx context.Context, v any) error
- func (s *NodeSelect) ScanX(ctx context.Context, v any)
- func (s *NodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *NodeSelect) StringX(ctx context.Context) string
- func (s *NodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NodeSelect) StringsX(ctx context.Context) []string
- type NodeUpdate
- func (_u *NodeUpdate) Exec(ctx context.Context) error
- func (_u *NodeUpdate) ExecX(ctx context.Context)
- func (_u *NodeUpdate) Mutation() *NodeMutation
- func (_u *NodeUpdate) Save(ctx context.Context) (int, error)
- func (_u *NodeUpdate) SaveX(ctx context.Context) int
- func (_u *NodeUpdate) Where(ps ...predicate.Node) *NodeUpdate
- type NodeUpdateOne
- func (_u *NodeUpdateOne) Exec(ctx context.Context) error
- func (_u *NodeUpdateOne) ExecX(ctx context.Context)
- func (_u *NodeUpdateOne) Mutation() *NodeMutation
- func (_u *NodeUpdateOne) Save(ctx context.Context) (*Node, error)
- func (_u *NodeUpdateOne) SaveX(ctx context.Context) *Node
- func (_u *NodeUpdateOne) Select(field string, fields ...string) *NodeUpdateOne
- func (_u *NodeUpdateOne) Where(ps ...predicate.Node) *NodeUpdateOne
- type Nodes
- 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 TraverseFunc
- type Traverser
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeContentTypeDef = "ContentTypeDef" TypeFile = "File" TypeGallery = "Gallery" TypeGalleryContentType = "GalleryContentType" TypeGalleryItem = "GalleryItem" TypeGalleryNode = "GalleryNode" TypeNode = "Node" )
Variables ¶
var ErrTxStarted = errors.New("generated: 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(generated.As(generated.Sum(field1), "sum_field1"), (generated.As(generated.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
// ContentTypeDef is the client for interacting with the ContentTypeDef builders.
ContentTypeDef *ContentTypeDefClient
// File is the client for interacting with the File builders.
File *FileClient
// Gallery is the client for interacting with the Gallery builders.
Gallery *GalleryClient
// GalleryContentType is the client for interacting with the GalleryContentType builders.
GalleryContentType *GalleryContentTypeClient
// GalleryItem is the client for interacting with the GalleryItem builders.
GalleryItem *GalleryItemClient
// GalleryNode is the client for interacting with the GalleryNode builders.
GalleryNode *GalleryNodeClient
// Node is the client for interacting with the Node builders.
Node *NodeClient
// 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(). ContentTypeDef. 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 ContentTypeDef ¶
type ContentTypeDef struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// contains filtered or unexported fields
}
ContentTypeDef is the model entity for the ContentTypeDef schema.
func (*ContentTypeDef) String ¶
func (_m *ContentTypeDef) String() string
String implements the fmt.Stringer.
func (*ContentTypeDef) Unwrap ¶
func (_m *ContentTypeDef) Unwrap() *ContentTypeDef
Unwrap unwraps the ContentTypeDef 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 (*ContentTypeDef) Update ¶
func (_m *ContentTypeDef) Update() *ContentTypeDefUpdateOne
Update returns a builder for updating this ContentTypeDef. Note that you need to call ContentTypeDef.Unwrap() before calling this method if this ContentTypeDef was returned from a transaction, and the transaction was committed or rolled back.
type ContentTypeDefClient ¶
type ContentTypeDefClient struct {
// contains filtered or unexported fields
}
ContentTypeDefClient is a client for the ContentTypeDef schema.
func NewContentTypeDefClient ¶
func NewContentTypeDefClient(c config) *ContentTypeDefClient
NewContentTypeDefClient returns a client for the ContentTypeDef from the given config.
func (*ContentTypeDefClient) Create ¶
func (c *ContentTypeDefClient) Create() *ContentTypeDefCreate
Create returns a builder for creating a ContentTypeDef entity.
func (*ContentTypeDefClient) CreateBulk ¶
func (c *ContentTypeDefClient) CreateBulk(builders ...*ContentTypeDefCreate) *ContentTypeDefCreateBulk
CreateBulk returns a builder for creating a bulk of ContentTypeDef entities.
func (*ContentTypeDefClient) Delete ¶
func (c *ContentTypeDefClient) Delete() *ContentTypeDefDelete
Delete returns a delete builder for ContentTypeDef.
func (*ContentTypeDefClient) DeleteOne ¶
func (c *ContentTypeDefClient) DeleteOne(_m *ContentTypeDef) *ContentTypeDefDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ContentTypeDefClient) DeleteOneID ¶
func (c *ContentTypeDefClient) DeleteOneID(id int) *ContentTypeDefDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ContentTypeDefClient) Get ¶
func (c *ContentTypeDefClient) Get(ctx context.Context, id int) (*ContentTypeDef, error)
Get returns a ContentTypeDef entity by its id.
func (*ContentTypeDefClient) GetX ¶
func (c *ContentTypeDefClient) GetX(ctx context.Context, id int) *ContentTypeDef
GetX is like Get, but panics if an error occurs.
func (*ContentTypeDefClient) Hooks ¶
func (c *ContentTypeDefClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ContentTypeDefClient) Intercept ¶
func (c *ContentTypeDefClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `contenttypedef.Intercept(f(g(h())))`.
func (*ContentTypeDefClient) Interceptors ¶
func (c *ContentTypeDefClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ContentTypeDefClient) MapCreateBulk ¶
func (c *ContentTypeDefClient) MapCreateBulk(slice any, setFunc func(*ContentTypeDefCreate, int)) *ContentTypeDefCreateBulk
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 (*ContentTypeDefClient) Query ¶
func (c *ContentTypeDefClient) Query() *ContentTypeDefQuery
Query returns a query builder for ContentTypeDef.
func (*ContentTypeDefClient) Update ¶
func (c *ContentTypeDefClient) Update() *ContentTypeDefUpdate
Update returns an update builder for ContentTypeDef.
func (*ContentTypeDefClient) UpdateOne ¶
func (c *ContentTypeDefClient) UpdateOne(_m *ContentTypeDef) *ContentTypeDefUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ContentTypeDefClient) UpdateOneID ¶
func (c *ContentTypeDefClient) UpdateOneID(id int) *ContentTypeDefUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ContentTypeDefClient) Use ¶
func (c *ContentTypeDefClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `contenttypedef.Hooks(f(g(h())))`.
type ContentTypeDefCreate ¶
type ContentTypeDefCreate struct {
// contains filtered or unexported fields
}
ContentTypeDefCreate is the builder for creating a ContentTypeDef entity.
func (*ContentTypeDefCreate) Exec ¶
func (_c *ContentTypeDefCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContentTypeDefCreate) ExecX ¶
func (_c *ContentTypeDefCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContentTypeDefCreate) Mutation ¶
func (_c *ContentTypeDefCreate) Mutation() *ContentTypeDefMutation
Mutation returns the ContentTypeDefMutation object of the builder.
func (*ContentTypeDefCreate) Save ¶
func (_c *ContentTypeDefCreate) Save(ctx context.Context) (*ContentTypeDef, error)
Save creates the ContentTypeDef in the database.
func (*ContentTypeDefCreate) SaveX ¶
func (_c *ContentTypeDefCreate) SaveX(ctx context.Context) *ContentTypeDef
SaveX calls Save and panics if Save returns an error.
func (*ContentTypeDefCreate) SetID ¶
func (_c *ContentTypeDefCreate) SetID(v int) *ContentTypeDefCreate
SetID sets the "id" field.
type ContentTypeDefCreateBulk ¶
type ContentTypeDefCreateBulk struct {
// contains filtered or unexported fields
}
ContentTypeDefCreateBulk is the builder for creating many ContentTypeDef entities in bulk.
func (*ContentTypeDefCreateBulk) Exec ¶
func (_c *ContentTypeDefCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ContentTypeDefCreateBulk) ExecX ¶
func (_c *ContentTypeDefCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContentTypeDefCreateBulk) Save ¶
func (_c *ContentTypeDefCreateBulk) Save(ctx context.Context) ([]*ContentTypeDef, error)
Save creates the ContentTypeDef entities in the database.
func (*ContentTypeDefCreateBulk) SaveX ¶
func (_c *ContentTypeDefCreateBulk) SaveX(ctx context.Context) []*ContentTypeDef
SaveX is like Save, but panics if an error occurs.
type ContentTypeDefDelete ¶
type ContentTypeDefDelete struct {
// contains filtered or unexported fields
}
ContentTypeDefDelete is the builder for deleting a ContentTypeDef entity.
func (*ContentTypeDefDelete) Exec ¶
func (_d *ContentTypeDefDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ContentTypeDefDelete) ExecX ¶
func (_d *ContentTypeDefDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ContentTypeDefDelete) Where ¶
func (_d *ContentTypeDefDelete) Where(ps ...predicate.ContentTypeDef) *ContentTypeDefDelete
Where appends a list predicates to the ContentTypeDefDelete builder.
type ContentTypeDefDeleteOne ¶
type ContentTypeDefDeleteOne struct {
// contains filtered or unexported fields
}
ContentTypeDefDeleteOne is the builder for deleting a single ContentTypeDef entity.
func (*ContentTypeDefDeleteOne) Exec ¶
func (_d *ContentTypeDefDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ContentTypeDefDeleteOne) ExecX ¶
func (_d *ContentTypeDefDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContentTypeDefDeleteOne) Where ¶
func (_d *ContentTypeDefDeleteOne) Where(ps ...predicate.ContentTypeDef) *ContentTypeDefDeleteOne
Where appends a list predicates to the ContentTypeDefDelete builder.
type ContentTypeDefGroupBy ¶
type ContentTypeDefGroupBy struct {
// contains filtered or unexported fields
}
ContentTypeDefGroupBy is the group-by builder for ContentTypeDef entities.
func (*ContentTypeDefGroupBy) Aggregate ¶
func (_g *ContentTypeDefGroupBy) Aggregate(fns ...AggregateFunc) *ContentTypeDefGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ContentTypeDefGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ContentTypeDefGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefGroupBy) Scan ¶
func (_g *ContentTypeDefGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ContentTypeDefGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContentTypeDefMutation ¶
type ContentTypeDefMutation struct {
// contains filtered or unexported fields
}
ContentTypeDefMutation represents an operation that mutates the ContentTypeDef nodes in the graph.
func (*ContentTypeDefMutation) AddField ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) AddedEdges ¶
func (m *ContentTypeDefMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ContentTypeDefMutation) AddedField ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) AddedFields ¶
func (m *ContentTypeDefMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ContentTypeDefMutation) AddedIDs ¶
func (m *ContentTypeDefMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ContentTypeDefMutation) ClearEdge ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) ClearField ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) ClearedEdges ¶
func (m *ContentTypeDefMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ContentTypeDefMutation) ClearedFields ¶
func (m *ContentTypeDefMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ContentTypeDefMutation) Client ¶
func (m ContentTypeDefMutation) 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 (*ContentTypeDefMutation) EdgeCleared ¶
func (m *ContentTypeDefMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ContentTypeDefMutation) Field ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) FieldCleared ¶
func (m *ContentTypeDefMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ContentTypeDefMutation) Fields ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) ID ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) IDs ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) 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 (*ContentTypeDefMutation) Op ¶
func (m *ContentTypeDefMutation) Op() Op
Op returns the operation name.
func (*ContentTypeDefMutation) RemovedEdges ¶
func (m *ContentTypeDefMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ContentTypeDefMutation) RemovedIDs ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) ResetEdge ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) ResetField ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) SetField ¶
func (m *ContentTypeDefMutation) 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 (*ContentTypeDefMutation) SetID ¶
func (m *ContentTypeDefMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ContentTypeDef entities.
func (*ContentTypeDefMutation) SetOp ¶
func (m *ContentTypeDefMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ContentTypeDefMutation) Tx ¶
func (m ContentTypeDefMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ContentTypeDefMutation) Type ¶
func (m *ContentTypeDefMutation) Type() string
Type returns the node type of this mutation (ContentTypeDef).
func (*ContentTypeDefMutation) Where ¶
func (m *ContentTypeDefMutation) Where(ps ...predicate.ContentTypeDef)
Where appends a list predicates to the ContentTypeDefMutation builder.
func (*ContentTypeDefMutation) WhereP ¶
func (m *ContentTypeDefMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ContentTypeDefMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ContentTypeDefQuery ¶
type ContentTypeDefQuery struct {
// contains filtered or unexported fields
}
ContentTypeDefQuery is the builder for querying ContentTypeDef entities.
func (*ContentTypeDefQuery) Aggregate ¶
func (_q *ContentTypeDefQuery) Aggregate(fns ...AggregateFunc) *ContentTypeDefSelect
Aggregate returns a ContentTypeDefSelect configured with the given aggregations.
func (*ContentTypeDefQuery) All ¶
func (_q *ContentTypeDefQuery) All(ctx context.Context) ([]*ContentTypeDef, error)
All executes the query and returns a list of ContentTypeDefs.
func (*ContentTypeDefQuery) AllX ¶
func (_q *ContentTypeDefQuery) AllX(ctx context.Context) []*ContentTypeDef
AllX is like All, but panics if an error occurs.
func (*ContentTypeDefQuery) Clone ¶
func (_q *ContentTypeDefQuery) Clone() *ContentTypeDefQuery
Clone returns a duplicate of the ContentTypeDefQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ContentTypeDefQuery) Count ¶
func (_q *ContentTypeDefQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ContentTypeDefQuery) CountX ¶
func (_q *ContentTypeDefQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ContentTypeDefQuery) Exist ¶
func (_q *ContentTypeDefQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ContentTypeDefQuery) ExistX ¶
func (_q *ContentTypeDefQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ContentTypeDefQuery) First ¶
func (_q *ContentTypeDefQuery) First(ctx context.Context) (*ContentTypeDef, error)
First returns the first ContentTypeDef entity from the query. Returns a *NotFoundError when no ContentTypeDef was found.
func (*ContentTypeDefQuery) FirstID ¶
func (_q *ContentTypeDefQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ContentTypeDef ID from the query. Returns a *NotFoundError when no ContentTypeDef ID was found.
func (*ContentTypeDefQuery) FirstIDX ¶
func (_q *ContentTypeDefQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ContentTypeDefQuery) FirstX ¶
func (_q *ContentTypeDefQuery) FirstX(ctx context.Context) *ContentTypeDef
FirstX is like First, but panics if an error occurs.
func (*ContentTypeDefQuery) GroupBy ¶
func (_q *ContentTypeDefQuery) GroupBy(field string, fields ...string) *ContentTypeDefGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
func (*ContentTypeDefQuery) IDs ¶
func (_q *ContentTypeDefQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of ContentTypeDef IDs.
func (*ContentTypeDefQuery) IDsX ¶
func (_q *ContentTypeDefQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ContentTypeDefQuery) Limit ¶
func (_q *ContentTypeDefQuery) Limit(limit int) *ContentTypeDefQuery
Limit the number of records to be returned by this query.
func (*ContentTypeDefQuery) Offset ¶
func (_q *ContentTypeDefQuery) Offset(offset int) *ContentTypeDefQuery
Offset to start from.
func (*ContentTypeDefQuery) Only ¶
func (_q *ContentTypeDefQuery) Only(ctx context.Context) (*ContentTypeDef, error)
Only returns a single ContentTypeDef entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ContentTypeDef entity is found. Returns a *NotFoundError when no ContentTypeDef entities are found.
func (*ContentTypeDefQuery) OnlyID ¶
func (_q *ContentTypeDefQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ContentTypeDef ID in the query. Returns a *NotSingularError when more than one ContentTypeDef ID is found. Returns a *NotFoundError when no entities are found.
func (*ContentTypeDefQuery) OnlyIDX ¶
func (_q *ContentTypeDefQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ContentTypeDefQuery) OnlyX ¶
func (_q *ContentTypeDefQuery) OnlyX(ctx context.Context) *ContentTypeDef
OnlyX is like Only, but panics if an error occurs.
func (*ContentTypeDefQuery) Order ¶
func (_q *ContentTypeDefQuery) Order(o ...contenttypedef.OrderOption) *ContentTypeDefQuery
Order specifies how the records should be ordered.
func (*ContentTypeDefQuery) Select ¶
func (_q *ContentTypeDefQuery) Select(fields ...string) *ContentTypeDefSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
func (*ContentTypeDefQuery) Unique ¶
func (_q *ContentTypeDefQuery) Unique(unique bool) *ContentTypeDefQuery
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 (*ContentTypeDefQuery) Where ¶
func (_q *ContentTypeDefQuery) Where(ps ...predicate.ContentTypeDef) *ContentTypeDefQuery
Where adds a new predicate for the ContentTypeDefQuery builder.
type ContentTypeDefSelect ¶
type ContentTypeDefSelect struct {
*ContentTypeDefQuery
// contains filtered or unexported fields
}
ContentTypeDefSelect is the builder for selecting fields of ContentTypeDef entities.
func (*ContentTypeDefSelect) Aggregate ¶
func (_s *ContentTypeDefSelect) Aggregate(fns ...AggregateFunc) *ContentTypeDefSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ContentTypeDefSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContentTypeDefSelect) Scan ¶
func (_s *ContentTypeDefSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ContentTypeDefSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContentTypeDefUpdate ¶
type ContentTypeDefUpdate struct {
// contains filtered or unexported fields
}
ContentTypeDefUpdate is the builder for updating ContentTypeDef entities.
func (*ContentTypeDefUpdate) Exec ¶
func (_u *ContentTypeDefUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContentTypeDefUpdate) ExecX ¶
func (_u *ContentTypeDefUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContentTypeDefUpdate) Mutation ¶
func (_u *ContentTypeDefUpdate) Mutation() *ContentTypeDefMutation
Mutation returns the ContentTypeDefMutation object of the builder.
func (*ContentTypeDefUpdate) Save ¶
func (_u *ContentTypeDefUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ContentTypeDefUpdate) SaveX ¶
func (_u *ContentTypeDefUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ContentTypeDefUpdate) Where ¶
func (_u *ContentTypeDefUpdate) Where(ps ...predicate.ContentTypeDef) *ContentTypeDefUpdate
Where appends a list predicates to the ContentTypeDefUpdate builder.
type ContentTypeDefUpdateOne ¶
type ContentTypeDefUpdateOne struct {
// contains filtered or unexported fields
}
ContentTypeDefUpdateOne is the builder for updating a single ContentTypeDef entity.
func (*ContentTypeDefUpdateOne) Exec ¶
func (_u *ContentTypeDefUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ContentTypeDefUpdateOne) ExecX ¶
func (_u *ContentTypeDefUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContentTypeDefUpdateOne) Mutation ¶
func (_u *ContentTypeDefUpdateOne) Mutation() *ContentTypeDefMutation
Mutation returns the ContentTypeDefMutation object of the builder.
func (*ContentTypeDefUpdateOne) Save ¶
func (_u *ContentTypeDefUpdateOne) Save(ctx context.Context) (*ContentTypeDef, error)
Save executes the query and returns the updated ContentTypeDef entity.
func (*ContentTypeDefUpdateOne) SaveX ¶
func (_u *ContentTypeDefUpdateOne) SaveX(ctx context.Context) *ContentTypeDef
SaveX is like Save, but panics if an error occurs.
func (*ContentTypeDefUpdateOne) Select ¶
func (_u *ContentTypeDefUpdateOne) Select(field string, fields ...string) *ContentTypeDefUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ContentTypeDefUpdateOne) Where ¶
func (_u *ContentTypeDefUpdateOne) Where(ps ...predicate.ContentTypeDef) *ContentTypeDefUpdateOne
Where appends a list predicates to the ContentTypeDefUpdate builder.
type ContentTypeDefs ¶
type ContentTypeDefs []*ContentTypeDef
ContentTypeDefs is a parsable slice of ContentTypeDef.
type File ¶
type File struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// contains filtered or unexported fields
}
File is the model entity for the File schema.
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 (_m *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(_m *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) Update ¶
func (c *FileClient) Update() *FileUpdate
Update returns an update builder for File.
func (*FileClient) UpdateOne ¶
func (c *FileClient) UpdateOne(_m *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) Exec ¶
func (_c *FileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreate) ExecX ¶
func (_c *FileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreate) Mutation ¶
func (_c *FileCreate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileCreate) Save ¶
func (_c *FileCreate) Save(ctx context.Context) (*File, error)
Save creates the File in the database.
func (*FileCreate) SaveX ¶
func (_c *FileCreate) SaveX(ctx context.Context) *File
SaveX calls Save and panics if Save returns an error.
func (*FileCreate) SetID ¶
func (_c *FileCreate) SetID(v int) *FileCreate
SetID sets the "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 (_c *FileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreateBulk) ExecX ¶
func (_c *FileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FileDelete ¶
type FileDelete struct {
// contains filtered or unexported fields
}
FileDelete is the builder for deleting a File entity.
func (*FileDelete) Exec ¶
func (_d *FileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FileDelete) ExecX ¶
func (_d *FileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FileDelete) Where ¶
func (_d *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 (_d *FileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FileDeleteOne) ExecX ¶
func (_d *FileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileDeleteOne) Where ¶
func (_d *FileDeleteOne) Where(ps ...predicate.File) *FileDeleteOne
Where appends a list predicates to the FileDelete builder.
type FileGroupBy ¶
type FileGroupBy struct {
// contains filtered or unexported fields
}
FileGroupBy is the group-by builder for File entities.
func (*FileGroupBy) Aggregate ¶
func (_g *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 (_g *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) 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) 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) 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) 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) 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) 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) 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) 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) 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) SetID ¶
func (m *FileMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of File entities.
func (*FileMutation) SetOp ¶
func (m *FileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
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) 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 (_q *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) GroupBy ¶
func (_q *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.
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 (_q *FileQuery) Order(o ...file.OrderOption) *FileQuery
Order specifies how the records should be ordered.
func (*FileQuery) Select ¶
func (_q *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.
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 (_s *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 (_s *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) Exec ¶
func (_u *FileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpdate) ExecX ¶
func (_u *FileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdate) Mutation ¶
func (_u *FileUpdate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdate) Save ¶
func (_u *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 (_u *FileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FileUpdate) Where ¶
func (_u *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) Exec ¶
func (_u *FileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FileUpdateOne) ExecX ¶
func (_u *FileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdateOne) Mutation ¶
func (_u *FileUpdateOne) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdateOne) Save ¶
func (_u *FileUpdateOne) Save(ctx context.Context) (*File, error)
Save executes the query and returns the updated File entity.
func (*FileUpdateOne) SaveX ¶
func (_u *FileUpdateOne) SaveX(ctx context.Context) *File
SaveX is like Save, but panics if an error occurs.
func (*FileUpdateOne) Select ¶
func (_u *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) Where ¶
func (_u *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
Where appends a list predicates to the FileUpdate builder.
type Gallery ¶
type Gallery struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// The node (nodes.id) the gallery belongs to
Nid int `json:"nid,omitempty"`
// PreviewSmallStyle holds the value of the "preview_small_style" field.
PreviewSmallStyle string `json:"preview_small_style,omitempty"`
// PreviewMediumStyle holds the value of the "preview_medium_style" field.
PreviewMediumStyle string `json:"preview_medium_style,omitempty"`
// The gallery's title
Title string `json:"title,omitempty"`
// The gallery's description
Description string `json:"description,omitempty"`
// The gallery's position among the node's galleries
Weight int `json:"weight,omitempty"`
// 1 - shown, 0 - hidden
Status bool `json:"status,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 GalleryQuery when eager-loading is set.
Edges GalleryEdges `json:"edges"`
// contains filtered or unexported fields
}
Gallery is the model entity for the Gallery schema.
func (*Gallery) QueryItems ¶
func (_m *Gallery) QueryItems() *GalleryItemQuery
QueryItems queries the "items" edge of the Gallery entity.
func (*Gallery) Unwrap ¶
Unwrap unwraps the Gallery 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 (*Gallery) Update ¶
func (_m *Gallery) Update() *GalleryUpdateOne
Update returns a builder for updating this Gallery. Note that you need to call Gallery.Unwrap() before calling this method if this Gallery was returned from a transaction, and the transaction was committed or rolled back.
type GalleryClient ¶
type GalleryClient struct {
// contains filtered or unexported fields
}
GalleryClient is a client for the Gallery schema.
func NewGalleryClient ¶
func NewGalleryClient(c config) *GalleryClient
NewGalleryClient returns a client for the Gallery from the given config.
func (*GalleryClient) Create ¶
func (c *GalleryClient) Create() *GalleryCreate
Create returns a builder for creating a Gallery entity.
func (*GalleryClient) CreateBulk ¶
func (c *GalleryClient) CreateBulk(builders ...*GalleryCreate) *GalleryCreateBulk
CreateBulk returns a builder for creating a bulk of Gallery entities.
func (*GalleryClient) Delete ¶
func (c *GalleryClient) Delete() *GalleryDelete
Delete returns a delete builder for Gallery.
func (*GalleryClient) DeleteOne ¶
func (c *GalleryClient) DeleteOne(_m *Gallery) *GalleryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GalleryClient) DeleteOneID ¶
func (c *GalleryClient) DeleteOneID(id int) *GalleryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GalleryClient) GetX ¶
func (c *GalleryClient) GetX(ctx context.Context, id int) *Gallery
GetX is like Get, but panics if an error occurs.
func (*GalleryClient) Hooks ¶
func (c *GalleryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GalleryClient) Intercept ¶
func (c *GalleryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `gallery.Intercept(f(g(h())))`.
func (*GalleryClient) Interceptors ¶
func (c *GalleryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GalleryClient) MapCreateBulk ¶
func (c *GalleryClient) MapCreateBulk(slice any, setFunc func(*GalleryCreate, int)) *GalleryCreateBulk
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 (*GalleryClient) Query ¶
func (c *GalleryClient) Query() *GalleryQuery
Query returns a query builder for Gallery.
func (*GalleryClient) QueryItems ¶
func (c *GalleryClient) QueryItems(_m *Gallery) *GalleryItemQuery
QueryItems queries the items edge of a Gallery.
func (*GalleryClient) QueryNode ¶
func (c *GalleryClient) QueryNode(_m *Gallery) *NodeQuery
QueryNode queries the node edge of a Gallery.
func (*GalleryClient) Update ¶
func (c *GalleryClient) Update() *GalleryUpdate
Update returns an update builder for Gallery.
func (*GalleryClient) UpdateOne ¶
func (c *GalleryClient) UpdateOne(_m *Gallery) *GalleryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GalleryClient) UpdateOneID ¶
func (c *GalleryClient) UpdateOneID(id int) *GalleryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GalleryClient) Use ¶
func (c *GalleryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gallery.Hooks(f(g(h())))`.
type GalleryContentType ¶
type GalleryContentType struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// ContentTypeID holds the value of the "content_type_id" field.
ContentTypeID int `json:"content_type_id,omitempty"`
// DefaultEnabled holds the value of the "default_enabled" field.
DefaultEnabled bool `json:"default_enabled,omitempty"`
// PictureField holds the value of the "picture_field" field.
PictureField string `json:"picture_field,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the GalleryContentTypeQuery when eager-loading is set.
Edges GalleryContentTypeEdges `json:"edges"`
// contains filtered or unexported fields
}
GalleryContentType is the model entity for the GalleryContentType schema.
func (*GalleryContentType) QueryContentType ¶
func (_m *GalleryContentType) QueryContentType() *ContentTypeDefQuery
QueryContentType queries the "content_type" edge of the GalleryContentType entity.
func (*GalleryContentType) String ¶
func (_m *GalleryContentType) String() string
String implements the fmt.Stringer.
func (*GalleryContentType) Unwrap ¶
func (_m *GalleryContentType) Unwrap() *GalleryContentType
Unwrap unwraps the GalleryContentType 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 (*GalleryContentType) Update ¶
func (_m *GalleryContentType) Update() *GalleryContentTypeUpdateOne
Update returns a builder for updating this GalleryContentType. Note that you need to call GalleryContentType.Unwrap() before calling this method if this GalleryContentType was returned from a transaction, and the transaction was committed or rolled back.
type GalleryContentTypeClient ¶
type GalleryContentTypeClient struct {
// contains filtered or unexported fields
}
GalleryContentTypeClient is a client for the GalleryContentType schema.
func NewGalleryContentTypeClient ¶
func NewGalleryContentTypeClient(c config) *GalleryContentTypeClient
NewGalleryContentTypeClient returns a client for the GalleryContentType from the given config.
func (*GalleryContentTypeClient) Create ¶
func (c *GalleryContentTypeClient) Create() *GalleryContentTypeCreate
Create returns a builder for creating a GalleryContentType entity.
func (*GalleryContentTypeClient) CreateBulk ¶
func (c *GalleryContentTypeClient) CreateBulk(builders ...*GalleryContentTypeCreate) *GalleryContentTypeCreateBulk
CreateBulk returns a builder for creating a bulk of GalleryContentType entities.
func (*GalleryContentTypeClient) Delete ¶
func (c *GalleryContentTypeClient) Delete() *GalleryContentTypeDelete
Delete returns a delete builder for GalleryContentType.
func (*GalleryContentTypeClient) DeleteOne ¶
func (c *GalleryContentTypeClient) DeleteOne(_m *GalleryContentType) *GalleryContentTypeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GalleryContentTypeClient) DeleteOneID ¶
func (c *GalleryContentTypeClient) DeleteOneID(id int) *GalleryContentTypeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GalleryContentTypeClient) Get ¶
func (c *GalleryContentTypeClient) Get(ctx context.Context, id int) (*GalleryContentType, error)
Get returns a GalleryContentType entity by its id.
func (*GalleryContentTypeClient) GetX ¶
func (c *GalleryContentTypeClient) GetX(ctx context.Context, id int) *GalleryContentType
GetX is like Get, but panics if an error occurs.
func (*GalleryContentTypeClient) Hooks ¶
func (c *GalleryContentTypeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GalleryContentTypeClient) Intercept ¶
func (c *GalleryContentTypeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `gallerycontenttype.Intercept(f(g(h())))`.
func (*GalleryContentTypeClient) Interceptors ¶
func (c *GalleryContentTypeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GalleryContentTypeClient) MapCreateBulk ¶
func (c *GalleryContentTypeClient) MapCreateBulk(slice any, setFunc func(*GalleryContentTypeCreate, int)) *GalleryContentTypeCreateBulk
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 (*GalleryContentTypeClient) Query ¶
func (c *GalleryContentTypeClient) Query() *GalleryContentTypeQuery
Query returns a query builder for GalleryContentType.
func (*GalleryContentTypeClient) QueryContentType ¶
func (c *GalleryContentTypeClient) QueryContentType(_m *GalleryContentType) *ContentTypeDefQuery
QueryContentType queries the content_type edge of a GalleryContentType.
func (*GalleryContentTypeClient) Update ¶
func (c *GalleryContentTypeClient) Update() *GalleryContentTypeUpdate
Update returns an update builder for GalleryContentType.
func (*GalleryContentTypeClient) UpdateOne ¶
func (c *GalleryContentTypeClient) UpdateOne(_m *GalleryContentType) *GalleryContentTypeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GalleryContentTypeClient) UpdateOneID ¶
func (c *GalleryContentTypeClient) UpdateOneID(id int) *GalleryContentTypeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GalleryContentTypeClient) Use ¶
func (c *GalleryContentTypeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gallerycontenttype.Hooks(f(g(h())))`.
type GalleryContentTypeCreate ¶
type GalleryContentTypeCreate struct {
// contains filtered or unexported fields
}
GalleryContentTypeCreate is the builder for creating a GalleryContentType entity.
func (*GalleryContentTypeCreate) Exec ¶
func (_c *GalleryContentTypeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryContentTypeCreate) ExecX ¶
func (_c *GalleryContentTypeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryContentTypeCreate) Mutation ¶
func (_c *GalleryContentTypeCreate) Mutation() *GalleryContentTypeMutation
Mutation returns the GalleryContentTypeMutation object of the builder.
func (*GalleryContentTypeCreate) Save ¶
func (_c *GalleryContentTypeCreate) Save(ctx context.Context) (*GalleryContentType, error)
Save creates the GalleryContentType in the database.
func (*GalleryContentTypeCreate) SaveX ¶
func (_c *GalleryContentTypeCreate) SaveX(ctx context.Context) *GalleryContentType
SaveX calls Save and panics if Save returns an error.
func (*GalleryContentTypeCreate) SetContentType ¶
func (_c *GalleryContentTypeCreate) SetContentType(v *ContentTypeDef) *GalleryContentTypeCreate
SetContentType sets the "content_type" edge to the ContentTypeDef entity.
func (*GalleryContentTypeCreate) SetContentTypeID ¶
func (_c *GalleryContentTypeCreate) SetContentTypeID(v int) *GalleryContentTypeCreate
SetContentTypeID sets the "content_type_id" field.
func (*GalleryContentTypeCreate) SetDefaultEnabled ¶
func (_c *GalleryContentTypeCreate) SetDefaultEnabled(v bool) *GalleryContentTypeCreate
SetDefaultEnabled sets the "default_enabled" field.
func (*GalleryContentTypeCreate) SetID ¶
func (_c *GalleryContentTypeCreate) SetID(v int) *GalleryContentTypeCreate
SetID sets the "id" field.
func (*GalleryContentTypeCreate) SetNillableDefaultEnabled ¶
func (_c *GalleryContentTypeCreate) SetNillableDefaultEnabled(v *bool) *GalleryContentTypeCreate
SetNillableDefaultEnabled sets the "default_enabled" field if the given value is not nil.
func (*GalleryContentTypeCreate) SetNillablePictureField ¶
func (_c *GalleryContentTypeCreate) SetNillablePictureField(v *string) *GalleryContentTypeCreate
SetNillablePictureField sets the "picture_field" field if the given value is not nil.
func (*GalleryContentTypeCreate) SetPictureField ¶
func (_c *GalleryContentTypeCreate) SetPictureField(v string) *GalleryContentTypeCreate
SetPictureField sets the "picture_field" field.
type GalleryContentTypeCreateBulk ¶
type GalleryContentTypeCreateBulk struct {
// contains filtered or unexported fields
}
GalleryContentTypeCreateBulk is the builder for creating many GalleryContentType entities in bulk.
func (*GalleryContentTypeCreateBulk) Exec ¶
func (_c *GalleryContentTypeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryContentTypeCreateBulk) ExecX ¶
func (_c *GalleryContentTypeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryContentTypeCreateBulk) Save ¶
func (_c *GalleryContentTypeCreateBulk) Save(ctx context.Context) ([]*GalleryContentType, error)
Save creates the GalleryContentType entities in the database.
func (*GalleryContentTypeCreateBulk) SaveX ¶
func (_c *GalleryContentTypeCreateBulk) SaveX(ctx context.Context) []*GalleryContentType
SaveX is like Save, but panics if an error occurs.
type GalleryContentTypeDelete ¶
type GalleryContentTypeDelete struct {
// contains filtered or unexported fields
}
GalleryContentTypeDelete is the builder for deleting a GalleryContentType entity.
func (*GalleryContentTypeDelete) Exec ¶
func (_d *GalleryContentTypeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GalleryContentTypeDelete) ExecX ¶
func (_d *GalleryContentTypeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GalleryContentTypeDelete) Where ¶
func (_d *GalleryContentTypeDelete) Where(ps ...predicate.GalleryContentType) *GalleryContentTypeDelete
Where appends a list predicates to the GalleryContentTypeDelete builder.
type GalleryContentTypeDeleteOne ¶
type GalleryContentTypeDeleteOne struct {
// contains filtered or unexported fields
}
GalleryContentTypeDeleteOne is the builder for deleting a single GalleryContentType entity.
func (*GalleryContentTypeDeleteOne) Exec ¶
func (_d *GalleryContentTypeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GalleryContentTypeDeleteOne) ExecX ¶
func (_d *GalleryContentTypeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryContentTypeDeleteOne) Where ¶
func (_d *GalleryContentTypeDeleteOne) Where(ps ...predicate.GalleryContentType) *GalleryContentTypeDeleteOne
Where appends a list predicates to the GalleryContentTypeDelete builder.
type GalleryContentTypeEdges ¶
type GalleryContentTypeEdges struct {
// ContentType holds the value of the content_type edge.
ContentType *ContentTypeDef `json:"content_type,omitempty"`
// contains filtered or unexported fields
}
GalleryContentTypeEdges holds the relations/edges for other nodes in the graph.
func (GalleryContentTypeEdges) ContentTypeOrErr ¶
func (e GalleryContentTypeEdges) ContentTypeOrErr() (*ContentTypeDef, error)
ContentTypeOrErr returns the ContentType value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GalleryContentTypeGroupBy ¶
type GalleryContentTypeGroupBy struct {
// contains filtered or unexported fields
}
GalleryContentTypeGroupBy is the group-by builder for GalleryContentType entities.
func (*GalleryContentTypeGroupBy) Aggregate ¶
func (_g *GalleryContentTypeGroupBy) Aggregate(fns ...AggregateFunc) *GalleryContentTypeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GalleryContentTypeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*GalleryContentTypeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GalleryContentTypeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeGroupBy) Scan ¶
func (_g *GalleryContentTypeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GalleryContentTypeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GalleryContentTypeMutation ¶
type GalleryContentTypeMutation struct {
// contains filtered or unexported fields
}
GalleryContentTypeMutation represents an operation that mutates the GalleryContentType nodes in the graph.
func (*GalleryContentTypeMutation) AddField ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) AddedEdges ¶
func (m *GalleryContentTypeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GalleryContentTypeMutation) AddedField ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) AddedFields ¶
func (m *GalleryContentTypeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GalleryContentTypeMutation) AddedIDs ¶
func (m *GalleryContentTypeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GalleryContentTypeMutation) ClearContentType ¶
func (m *GalleryContentTypeMutation) ClearContentType()
ClearContentType clears the "content_type" edge to the ContentTypeDef entity.
func (*GalleryContentTypeMutation) ClearEdge ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) ClearField ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) ClearedEdges ¶
func (m *GalleryContentTypeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GalleryContentTypeMutation) ClearedFields ¶
func (m *GalleryContentTypeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GalleryContentTypeMutation) Client ¶
func (m GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) ContentTypeCleared ¶
func (m *GalleryContentTypeMutation) ContentTypeCleared() bool
ContentTypeCleared reports if the "content_type" edge to the ContentTypeDef entity was cleared.
func (*GalleryContentTypeMutation) ContentTypeID ¶
func (m *GalleryContentTypeMutation) ContentTypeID() (r int, exists bool)
ContentTypeID returns the value of the "content_type_id" field in the mutation.
func (*GalleryContentTypeMutation) ContentTypeIDs ¶
func (m *GalleryContentTypeMutation) ContentTypeIDs() (ids []int)
ContentTypeIDs returns the "content_type" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ContentTypeID instead. It exists only for internal usage by the builders.
func (*GalleryContentTypeMutation) DefaultEnabled ¶
func (m *GalleryContentTypeMutation) DefaultEnabled() (r bool, exists bool)
DefaultEnabled returns the value of the "default_enabled" field in the mutation.
func (*GalleryContentTypeMutation) EdgeCleared ¶
func (m *GalleryContentTypeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GalleryContentTypeMutation) Field ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) FieldCleared ¶
func (m *GalleryContentTypeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GalleryContentTypeMutation) Fields ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) ID ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) IDs ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) OldContentTypeID ¶
func (m *GalleryContentTypeMutation) OldContentTypeID(ctx context.Context) (v int, err error)
OldContentTypeID returns the old "content_type_id" field's value of the GalleryContentType entity. If the GalleryContentType 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 (*GalleryContentTypeMutation) OldDefaultEnabled ¶
func (m *GalleryContentTypeMutation) OldDefaultEnabled(ctx context.Context) (v bool, err error)
OldDefaultEnabled returns the old "default_enabled" field's value of the GalleryContentType entity. If the GalleryContentType 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 (*GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) OldPictureField ¶
func (m *GalleryContentTypeMutation) OldPictureField(ctx context.Context) (v string, err error)
OldPictureField returns the old "picture_field" field's value of the GalleryContentType entity. If the GalleryContentType 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 (*GalleryContentTypeMutation) Op ¶
func (m *GalleryContentTypeMutation) Op() Op
Op returns the operation name.
func (*GalleryContentTypeMutation) PictureField ¶
func (m *GalleryContentTypeMutation) PictureField() (r string, exists bool)
PictureField returns the value of the "picture_field" field in the mutation.
func (*GalleryContentTypeMutation) RemovedEdges ¶
func (m *GalleryContentTypeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GalleryContentTypeMutation) RemovedIDs ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) ResetContentType ¶
func (m *GalleryContentTypeMutation) ResetContentType()
ResetContentType resets all changes to the "content_type" edge.
func (*GalleryContentTypeMutation) ResetContentTypeID ¶
func (m *GalleryContentTypeMutation) ResetContentTypeID()
ResetContentTypeID resets all changes to the "content_type_id" field.
func (*GalleryContentTypeMutation) ResetDefaultEnabled ¶
func (m *GalleryContentTypeMutation) ResetDefaultEnabled()
ResetDefaultEnabled resets all changes to the "default_enabled" field.
func (*GalleryContentTypeMutation) ResetEdge ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) ResetField ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) ResetPictureField ¶
func (m *GalleryContentTypeMutation) ResetPictureField()
ResetPictureField resets all changes to the "picture_field" field.
func (*GalleryContentTypeMutation) SetContentTypeID ¶
func (m *GalleryContentTypeMutation) SetContentTypeID(i int)
SetContentTypeID sets the "content_type_id" field.
func (*GalleryContentTypeMutation) SetDefaultEnabled ¶
func (m *GalleryContentTypeMutation) SetDefaultEnabled(b bool)
SetDefaultEnabled sets the "default_enabled" field.
func (*GalleryContentTypeMutation) SetField ¶
func (m *GalleryContentTypeMutation) 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 (*GalleryContentTypeMutation) SetID ¶
func (m *GalleryContentTypeMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GalleryContentType entities.
func (*GalleryContentTypeMutation) SetOp ¶
func (m *GalleryContentTypeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GalleryContentTypeMutation) SetPictureField ¶
func (m *GalleryContentTypeMutation) SetPictureField(s string)
SetPictureField sets the "picture_field" field.
func (GalleryContentTypeMutation) Tx ¶
func (m GalleryContentTypeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GalleryContentTypeMutation) Type ¶
func (m *GalleryContentTypeMutation) Type() string
Type returns the node type of this mutation (GalleryContentType).
func (*GalleryContentTypeMutation) Where ¶
func (m *GalleryContentTypeMutation) Where(ps ...predicate.GalleryContentType)
Where appends a list predicates to the GalleryContentTypeMutation builder.
func (*GalleryContentTypeMutation) WhereP ¶
func (m *GalleryContentTypeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GalleryContentTypeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GalleryContentTypeQuery ¶
type GalleryContentTypeQuery struct {
// contains filtered or unexported fields
}
GalleryContentTypeQuery is the builder for querying GalleryContentType entities.
func (*GalleryContentTypeQuery) Aggregate ¶
func (_q *GalleryContentTypeQuery) Aggregate(fns ...AggregateFunc) *GalleryContentTypeSelect
Aggregate returns a GalleryContentTypeSelect configured with the given aggregations.
func (*GalleryContentTypeQuery) All ¶
func (_q *GalleryContentTypeQuery) All(ctx context.Context) ([]*GalleryContentType, error)
All executes the query and returns a list of GalleryContentTypes.
func (*GalleryContentTypeQuery) AllX ¶
func (_q *GalleryContentTypeQuery) AllX(ctx context.Context) []*GalleryContentType
AllX is like All, but panics if an error occurs.
func (*GalleryContentTypeQuery) Clone ¶
func (_q *GalleryContentTypeQuery) Clone() *GalleryContentTypeQuery
Clone returns a duplicate of the GalleryContentTypeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GalleryContentTypeQuery) Count ¶
func (_q *GalleryContentTypeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GalleryContentTypeQuery) CountX ¶
func (_q *GalleryContentTypeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GalleryContentTypeQuery) Exist ¶
func (_q *GalleryContentTypeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GalleryContentTypeQuery) ExistX ¶
func (_q *GalleryContentTypeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GalleryContentTypeQuery) First ¶
func (_q *GalleryContentTypeQuery) First(ctx context.Context) (*GalleryContentType, error)
First returns the first GalleryContentType entity from the query. Returns a *NotFoundError when no GalleryContentType was found.
func (*GalleryContentTypeQuery) FirstID ¶
func (_q *GalleryContentTypeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first GalleryContentType ID from the query. Returns a *NotFoundError when no GalleryContentType ID was found.
func (*GalleryContentTypeQuery) FirstIDX ¶
func (_q *GalleryContentTypeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GalleryContentTypeQuery) FirstX ¶
func (_q *GalleryContentTypeQuery) FirstX(ctx context.Context) *GalleryContentType
FirstX is like First, but panics if an error occurs.
func (*GalleryContentTypeQuery) GroupBy ¶
func (_q *GalleryContentTypeQuery) GroupBy(field string, fields ...string) *GalleryContentTypeGroupBy
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 {
ContentTypeID int `json:"content_type_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.GalleryContentType.Query().
GroupBy(gallerycontenttype.FieldContentTypeID).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*GalleryContentTypeQuery) IDs ¶
func (_q *GalleryContentTypeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of GalleryContentType IDs.
func (*GalleryContentTypeQuery) IDsX ¶
func (_q *GalleryContentTypeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GalleryContentTypeQuery) Limit ¶
func (_q *GalleryContentTypeQuery) Limit(limit int) *GalleryContentTypeQuery
Limit the number of records to be returned by this query.
func (*GalleryContentTypeQuery) Offset ¶
func (_q *GalleryContentTypeQuery) Offset(offset int) *GalleryContentTypeQuery
Offset to start from.
func (*GalleryContentTypeQuery) Only ¶
func (_q *GalleryContentTypeQuery) Only(ctx context.Context) (*GalleryContentType, error)
Only returns a single GalleryContentType entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GalleryContentType entity is found. Returns a *NotFoundError when no GalleryContentType entities are found.
func (*GalleryContentTypeQuery) OnlyID ¶
func (_q *GalleryContentTypeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only GalleryContentType ID in the query. Returns a *NotSingularError when more than one GalleryContentType ID is found. Returns a *NotFoundError when no entities are found.
func (*GalleryContentTypeQuery) OnlyIDX ¶
func (_q *GalleryContentTypeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GalleryContentTypeQuery) OnlyX ¶
func (_q *GalleryContentTypeQuery) OnlyX(ctx context.Context) *GalleryContentType
OnlyX is like Only, but panics if an error occurs.
func (*GalleryContentTypeQuery) Order ¶
func (_q *GalleryContentTypeQuery) Order(o ...gallerycontenttype.OrderOption) *GalleryContentTypeQuery
Order specifies how the records should be ordered.
func (*GalleryContentTypeQuery) QueryContentType ¶
func (_q *GalleryContentTypeQuery) QueryContentType() *ContentTypeDefQuery
QueryContentType chains the current query on the "content_type" edge.
func (*GalleryContentTypeQuery) Select ¶
func (_q *GalleryContentTypeQuery) Select(fields ...string) *GalleryContentTypeSelect
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 {
ContentTypeID int `json:"content_type_id,omitempty"`
}
client.GalleryContentType.Query().
Select(gallerycontenttype.FieldContentTypeID).
Scan(ctx, &v)
func (*GalleryContentTypeQuery) Unique ¶
func (_q *GalleryContentTypeQuery) Unique(unique bool) *GalleryContentTypeQuery
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 (*GalleryContentTypeQuery) Where ¶
func (_q *GalleryContentTypeQuery) Where(ps ...predicate.GalleryContentType) *GalleryContentTypeQuery
Where adds a new predicate for the GalleryContentTypeQuery builder.
func (*GalleryContentTypeQuery) WithContentType ¶
func (_q *GalleryContentTypeQuery) WithContentType(opts ...func(*ContentTypeDefQuery)) *GalleryContentTypeQuery
WithContentType tells the query-builder to eager-load the nodes that are connected to the "content_type" edge. The optional arguments are used to configure the query builder of the edge.
type GalleryContentTypeSelect ¶
type GalleryContentTypeSelect struct {
*GalleryContentTypeQuery
// contains filtered or unexported fields
}
GalleryContentTypeSelect is the builder for selecting fields of GalleryContentType entities.
func (*GalleryContentTypeSelect) Aggregate ¶
func (_s *GalleryContentTypeSelect) Aggregate(fns ...AggregateFunc) *GalleryContentTypeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GalleryContentTypeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*GalleryContentTypeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*GalleryContentTypeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GalleryContentTypeSelect) Scan ¶
func (_s *GalleryContentTypeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GalleryContentTypeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GalleryContentTypeUpdate ¶
type GalleryContentTypeUpdate struct {
// contains filtered or unexported fields
}
GalleryContentTypeUpdate is the builder for updating GalleryContentType entities.
func (*GalleryContentTypeUpdate) ClearContentType ¶
func (_u *GalleryContentTypeUpdate) ClearContentType() *GalleryContentTypeUpdate
ClearContentType clears the "content_type" edge to the ContentTypeDef entity.
func (*GalleryContentTypeUpdate) Exec ¶
func (_u *GalleryContentTypeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryContentTypeUpdate) ExecX ¶
func (_u *GalleryContentTypeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryContentTypeUpdate) Mutation ¶
func (_u *GalleryContentTypeUpdate) Mutation() *GalleryContentTypeMutation
Mutation returns the GalleryContentTypeMutation object of the builder.
func (*GalleryContentTypeUpdate) Save ¶
func (_u *GalleryContentTypeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GalleryContentTypeUpdate) SaveX ¶
func (_u *GalleryContentTypeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GalleryContentTypeUpdate) SetContentType ¶
func (_u *GalleryContentTypeUpdate) SetContentType(v *ContentTypeDef) *GalleryContentTypeUpdate
SetContentType sets the "content_type" edge to the ContentTypeDef entity.
func (*GalleryContentTypeUpdate) SetContentTypeID ¶
func (_u *GalleryContentTypeUpdate) SetContentTypeID(v int) *GalleryContentTypeUpdate
SetContentTypeID sets the "content_type_id" field.
func (*GalleryContentTypeUpdate) SetDefaultEnabled ¶
func (_u *GalleryContentTypeUpdate) SetDefaultEnabled(v bool) *GalleryContentTypeUpdate
SetDefaultEnabled sets the "default_enabled" field.
func (*GalleryContentTypeUpdate) SetNillableContentTypeID ¶
func (_u *GalleryContentTypeUpdate) SetNillableContentTypeID(v *int) *GalleryContentTypeUpdate
SetNillableContentTypeID sets the "content_type_id" field if the given value is not nil.
func (*GalleryContentTypeUpdate) SetNillableDefaultEnabled ¶
func (_u *GalleryContentTypeUpdate) SetNillableDefaultEnabled(v *bool) *GalleryContentTypeUpdate
SetNillableDefaultEnabled sets the "default_enabled" field if the given value is not nil.
func (*GalleryContentTypeUpdate) SetNillablePictureField ¶
func (_u *GalleryContentTypeUpdate) SetNillablePictureField(v *string) *GalleryContentTypeUpdate
SetNillablePictureField sets the "picture_field" field if the given value is not nil.
func (*GalleryContentTypeUpdate) SetPictureField ¶
func (_u *GalleryContentTypeUpdate) SetPictureField(v string) *GalleryContentTypeUpdate
SetPictureField sets the "picture_field" field.
func (*GalleryContentTypeUpdate) Where ¶
func (_u *GalleryContentTypeUpdate) Where(ps ...predicate.GalleryContentType) *GalleryContentTypeUpdate
Where appends a list predicates to the GalleryContentTypeUpdate builder.
type GalleryContentTypeUpdateOne ¶
type GalleryContentTypeUpdateOne struct {
// contains filtered or unexported fields
}
GalleryContentTypeUpdateOne is the builder for updating a single GalleryContentType entity.
func (*GalleryContentTypeUpdateOne) ClearContentType ¶
func (_u *GalleryContentTypeUpdateOne) ClearContentType() *GalleryContentTypeUpdateOne
ClearContentType clears the "content_type" edge to the ContentTypeDef entity.
func (*GalleryContentTypeUpdateOne) Exec ¶
func (_u *GalleryContentTypeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GalleryContentTypeUpdateOne) ExecX ¶
func (_u *GalleryContentTypeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryContentTypeUpdateOne) Mutation ¶
func (_u *GalleryContentTypeUpdateOne) Mutation() *GalleryContentTypeMutation
Mutation returns the GalleryContentTypeMutation object of the builder.
func (*GalleryContentTypeUpdateOne) Save ¶
func (_u *GalleryContentTypeUpdateOne) Save(ctx context.Context) (*GalleryContentType, error)
Save executes the query and returns the updated GalleryContentType entity.
func (*GalleryContentTypeUpdateOne) SaveX ¶
func (_u *GalleryContentTypeUpdateOne) SaveX(ctx context.Context) *GalleryContentType
SaveX is like Save, but panics if an error occurs.
func (*GalleryContentTypeUpdateOne) Select ¶
func (_u *GalleryContentTypeUpdateOne) Select(field string, fields ...string) *GalleryContentTypeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GalleryContentTypeUpdateOne) SetContentType ¶
func (_u *GalleryContentTypeUpdateOne) SetContentType(v *ContentTypeDef) *GalleryContentTypeUpdateOne
SetContentType sets the "content_type" edge to the ContentTypeDef entity.
func (*GalleryContentTypeUpdateOne) SetContentTypeID ¶
func (_u *GalleryContentTypeUpdateOne) SetContentTypeID(v int) *GalleryContentTypeUpdateOne
SetContentTypeID sets the "content_type_id" field.
func (*GalleryContentTypeUpdateOne) SetDefaultEnabled ¶
func (_u *GalleryContentTypeUpdateOne) SetDefaultEnabled(v bool) *GalleryContentTypeUpdateOne
SetDefaultEnabled sets the "default_enabled" field.
func (*GalleryContentTypeUpdateOne) SetNillableContentTypeID ¶
func (_u *GalleryContentTypeUpdateOne) SetNillableContentTypeID(v *int) *GalleryContentTypeUpdateOne
SetNillableContentTypeID sets the "content_type_id" field if the given value is not nil.
func (*GalleryContentTypeUpdateOne) SetNillableDefaultEnabled ¶
func (_u *GalleryContentTypeUpdateOne) SetNillableDefaultEnabled(v *bool) *GalleryContentTypeUpdateOne
SetNillableDefaultEnabled sets the "default_enabled" field if the given value is not nil.
func (*GalleryContentTypeUpdateOne) SetNillablePictureField ¶
func (_u *GalleryContentTypeUpdateOne) SetNillablePictureField(v *string) *GalleryContentTypeUpdateOne
SetNillablePictureField sets the "picture_field" field if the given value is not nil.
func (*GalleryContentTypeUpdateOne) SetPictureField ¶
func (_u *GalleryContentTypeUpdateOne) SetPictureField(v string) *GalleryContentTypeUpdateOne
SetPictureField sets the "picture_field" field.
func (*GalleryContentTypeUpdateOne) Where ¶
func (_u *GalleryContentTypeUpdateOne) Where(ps ...predicate.GalleryContentType) *GalleryContentTypeUpdateOne
Where appends a list predicates to the GalleryContentTypeUpdate builder.
type GalleryContentTypes ¶
type GalleryContentTypes []*GalleryContentType
GalleryContentTypes is a parsable slice of GalleryContentType.
type GalleryCreate ¶
type GalleryCreate struct {
// contains filtered or unexported fields
}
GalleryCreate is the builder for creating a Gallery entity.
func (*GalleryCreate) AddItemIDs ¶
func (_c *GalleryCreate) AddItemIDs(ids ...int) *GalleryCreate
AddItemIDs adds the "items" edge to the GalleryItem entity by IDs.
func (*GalleryCreate) AddItems ¶
func (_c *GalleryCreate) AddItems(v ...*GalleryItem) *GalleryCreate
AddItems adds the "items" edges to the GalleryItem entity.
func (*GalleryCreate) Exec ¶
func (_c *GalleryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryCreate) ExecX ¶
func (_c *GalleryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryCreate) Mutation ¶
func (_c *GalleryCreate) Mutation() *GalleryMutation
Mutation returns the GalleryMutation object of the builder.
func (*GalleryCreate) Save ¶
func (_c *GalleryCreate) Save(ctx context.Context) (*Gallery, error)
Save creates the Gallery in the database.
func (*GalleryCreate) SaveX ¶
func (_c *GalleryCreate) SaveX(ctx context.Context) *Gallery
SaveX calls Save and panics if Save returns an error.
func (*GalleryCreate) SetCreatedAt ¶
func (_c *GalleryCreate) SetCreatedAt(v time.Time) *GalleryCreate
SetCreatedAt sets the "created_at" field.
func (*GalleryCreate) SetDescription ¶
func (_c *GalleryCreate) SetDescription(v string) *GalleryCreate
SetDescription sets the "description" field.
func (*GalleryCreate) SetID ¶
func (_c *GalleryCreate) SetID(v int) *GalleryCreate
SetID sets the "id" field.
func (*GalleryCreate) SetNid ¶
func (_c *GalleryCreate) SetNid(v int) *GalleryCreate
SetNid sets the "nid" field.
func (*GalleryCreate) SetNillableCreatedAt ¶
func (_c *GalleryCreate) SetNillableCreatedAt(v *time.Time) *GalleryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GalleryCreate) SetNillableDescription ¶
func (_c *GalleryCreate) SetNillableDescription(v *string) *GalleryCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*GalleryCreate) SetNillablePreviewMediumStyle ¶
func (_c *GalleryCreate) SetNillablePreviewMediumStyle(v *string) *GalleryCreate
SetNillablePreviewMediumStyle sets the "preview_medium_style" field if the given value is not nil.
func (*GalleryCreate) SetNillablePreviewSmallStyle ¶
func (_c *GalleryCreate) SetNillablePreviewSmallStyle(v *string) *GalleryCreate
SetNillablePreviewSmallStyle sets the "preview_small_style" field if the given value is not nil.
func (*GalleryCreate) SetNillableStatus ¶
func (_c *GalleryCreate) SetNillableStatus(v *bool) *GalleryCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*GalleryCreate) SetNillableTitle ¶
func (_c *GalleryCreate) SetNillableTitle(v *string) *GalleryCreate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*GalleryCreate) SetNillableUpdatedAt ¶
func (_c *GalleryCreate) SetNillableUpdatedAt(v *time.Time) *GalleryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*GalleryCreate) SetNillableWeight ¶
func (_c *GalleryCreate) SetNillableWeight(v *int) *GalleryCreate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*GalleryCreate) SetNode ¶
func (_c *GalleryCreate) SetNode(v *Node) *GalleryCreate
SetNode sets the "node" edge to the Node entity.
func (*GalleryCreate) SetNodeID ¶
func (_c *GalleryCreate) SetNodeID(id int) *GalleryCreate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*GalleryCreate) SetPreviewMediumStyle ¶
func (_c *GalleryCreate) SetPreviewMediumStyle(v string) *GalleryCreate
SetPreviewMediumStyle sets the "preview_medium_style" field.
func (*GalleryCreate) SetPreviewSmallStyle ¶
func (_c *GalleryCreate) SetPreviewSmallStyle(v string) *GalleryCreate
SetPreviewSmallStyle sets the "preview_small_style" field.
func (*GalleryCreate) SetStatus ¶
func (_c *GalleryCreate) SetStatus(v bool) *GalleryCreate
SetStatus sets the "status" field.
func (*GalleryCreate) SetTitle ¶
func (_c *GalleryCreate) SetTitle(v string) *GalleryCreate
SetTitle sets the "title" field.
func (*GalleryCreate) SetUpdatedAt ¶
func (_c *GalleryCreate) SetUpdatedAt(v time.Time) *GalleryCreate
SetUpdatedAt sets the "updated_at" field.
func (*GalleryCreate) SetWeight ¶
func (_c *GalleryCreate) SetWeight(v int) *GalleryCreate
SetWeight sets the "weight" field.
type GalleryCreateBulk ¶
type GalleryCreateBulk struct {
// contains filtered or unexported fields
}
GalleryCreateBulk is the builder for creating many Gallery entities in bulk.
func (*GalleryCreateBulk) Exec ¶
func (_c *GalleryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryCreateBulk) ExecX ¶
func (_c *GalleryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type GalleryDelete ¶
type GalleryDelete struct {
// contains filtered or unexported fields
}
GalleryDelete is the builder for deleting a Gallery entity.
func (*GalleryDelete) Exec ¶
func (_d *GalleryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GalleryDelete) ExecX ¶
func (_d *GalleryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GalleryDelete) Where ¶
func (_d *GalleryDelete) Where(ps ...predicate.Gallery) *GalleryDelete
Where appends a list predicates to the GalleryDelete builder.
type GalleryDeleteOne ¶
type GalleryDeleteOne struct {
// contains filtered or unexported fields
}
GalleryDeleteOne is the builder for deleting a single Gallery entity.
func (*GalleryDeleteOne) Exec ¶
func (_d *GalleryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GalleryDeleteOne) ExecX ¶
func (_d *GalleryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryDeleteOne) Where ¶
func (_d *GalleryDeleteOne) Where(ps ...predicate.Gallery) *GalleryDeleteOne
Where appends a list predicates to the GalleryDelete builder.
type GalleryEdges ¶
type GalleryEdges struct {
// Node holds the value of the node edge.
Node *Node `json:"node,omitempty"`
// Items holds the value of the items edge.
Items []*GalleryItem `json:"items,omitempty"`
// contains filtered or unexported fields
}
GalleryEdges holds the relations/edges for other nodes in the graph.
func (GalleryEdges) ItemsOrErr ¶
func (e GalleryEdges) ItemsOrErr() ([]*GalleryItem, error)
ItemsOrErr returns the Items value or an error if the edge was not loaded in eager-loading.
func (GalleryEdges) NodeOrErr ¶
func (e GalleryEdges) NodeOrErr() (*Node, error)
NodeOrErr returns the Node value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GalleryGroupBy ¶
type GalleryGroupBy struct {
// contains filtered or unexported fields
}
GalleryGroupBy is the group-by builder for Gallery entities.
func (*GalleryGroupBy) Aggregate ¶
func (_g *GalleryGroupBy) Aggregate(fns ...AggregateFunc) *GalleryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GalleryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GalleryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GalleryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GalleryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GalleryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GalleryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GalleryGroupBy) Scan ¶
func (_g *GalleryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GalleryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GalleryItem ¶
type GalleryItem struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// The gallery (galleries.id)
GalleryID int `json:"gallery_id,omitempty"`
// The image file (files.id)
Fid int `json:"fid,omitempty"`
// The image's title
Title string `json:"title,omitempty"`
// The image's description
Description string `json:"description,omitempty"`
// The image's position in the gallery
Weight int `json:"weight,omitempty"`
// Whether the image is the gallery's cover
IsCover bool `json:"is_cover,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the GalleryItemQuery when eager-loading is set.
Edges GalleryItemEdges `json:"edges"`
// contains filtered or unexported fields
}
GalleryItem is the model entity for the GalleryItem schema.
func (*GalleryItem) QueryFile ¶
func (_m *GalleryItem) QueryFile() *FileQuery
QueryFile queries the "file" edge of the GalleryItem entity.
func (*GalleryItem) QueryGallery ¶
func (_m *GalleryItem) QueryGallery() *GalleryQuery
QueryGallery queries the "gallery" edge of the GalleryItem entity.
func (*GalleryItem) String ¶
func (_m *GalleryItem) String() string
String implements the fmt.Stringer.
func (*GalleryItem) Unwrap ¶
func (_m *GalleryItem) Unwrap() *GalleryItem
Unwrap unwraps the GalleryItem 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 (*GalleryItem) Update ¶
func (_m *GalleryItem) Update() *GalleryItemUpdateOne
Update returns a builder for updating this GalleryItem. Note that you need to call GalleryItem.Unwrap() before calling this method if this GalleryItem was returned from a transaction, and the transaction was committed or rolled back.
type GalleryItemClient ¶
type GalleryItemClient struct {
// contains filtered or unexported fields
}
GalleryItemClient is a client for the GalleryItem schema.
func NewGalleryItemClient ¶
func NewGalleryItemClient(c config) *GalleryItemClient
NewGalleryItemClient returns a client for the GalleryItem from the given config.
func (*GalleryItemClient) Create ¶
func (c *GalleryItemClient) Create() *GalleryItemCreate
Create returns a builder for creating a GalleryItem entity.
func (*GalleryItemClient) CreateBulk ¶
func (c *GalleryItemClient) CreateBulk(builders ...*GalleryItemCreate) *GalleryItemCreateBulk
CreateBulk returns a builder for creating a bulk of GalleryItem entities.
func (*GalleryItemClient) Delete ¶
func (c *GalleryItemClient) Delete() *GalleryItemDelete
Delete returns a delete builder for GalleryItem.
func (*GalleryItemClient) DeleteOne ¶
func (c *GalleryItemClient) DeleteOne(_m *GalleryItem) *GalleryItemDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GalleryItemClient) DeleteOneID ¶
func (c *GalleryItemClient) DeleteOneID(id int) *GalleryItemDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GalleryItemClient) Get ¶
func (c *GalleryItemClient) Get(ctx context.Context, id int) (*GalleryItem, error)
Get returns a GalleryItem entity by its id.
func (*GalleryItemClient) GetX ¶
func (c *GalleryItemClient) GetX(ctx context.Context, id int) *GalleryItem
GetX is like Get, but panics if an error occurs.
func (*GalleryItemClient) Hooks ¶
func (c *GalleryItemClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GalleryItemClient) Intercept ¶
func (c *GalleryItemClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `galleryitem.Intercept(f(g(h())))`.
func (*GalleryItemClient) Interceptors ¶
func (c *GalleryItemClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GalleryItemClient) MapCreateBulk ¶
func (c *GalleryItemClient) MapCreateBulk(slice any, setFunc func(*GalleryItemCreate, int)) *GalleryItemCreateBulk
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 (*GalleryItemClient) Query ¶
func (c *GalleryItemClient) Query() *GalleryItemQuery
Query returns a query builder for GalleryItem.
func (*GalleryItemClient) QueryFile ¶
func (c *GalleryItemClient) QueryFile(_m *GalleryItem) *FileQuery
QueryFile queries the file edge of a GalleryItem.
func (*GalleryItemClient) QueryGallery ¶
func (c *GalleryItemClient) QueryGallery(_m *GalleryItem) *GalleryQuery
QueryGallery queries the gallery edge of a GalleryItem.
func (*GalleryItemClient) Update ¶
func (c *GalleryItemClient) Update() *GalleryItemUpdate
Update returns an update builder for GalleryItem.
func (*GalleryItemClient) UpdateOne ¶
func (c *GalleryItemClient) UpdateOne(_m *GalleryItem) *GalleryItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GalleryItemClient) UpdateOneID ¶
func (c *GalleryItemClient) UpdateOneID(id int) *GalleryItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GalleryItemClient) Use ¶
func (c *GalleryItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `galleryitem.Hooks(f(g(h())))`.
type GalleryItemCreate ¶
type GalleryItemCreate struct {
// contains filtered or unexported fields
}
GalleryItemCreate is the builder for creating a GalleryItem entity.
func (*GalleryItemCreate) Exec ¶
func (_c *GalleryItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryItemCreate) ExecX ¶
func (_c *GalleryItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryItemCreate) Mutation ¶
func (_c *GalleryItemCreate) Mutation() *GalleryItemMutation
Mutation returns the GalleryItemMutation object of the builder.
func (*GalleryItemCreate) Save ¶
func (_c *GalleryItemCreate) Save(ctx context.Context) (*GalleryItem, error)
Save creates the GalleryItem in the database.
func (*GalleryItemCreate) SaveX ¶
func (_c *GalleryItemCreate) SaveX(ctx context.Context) *GalleryItem
SaveX calls Save and panics if Save returns an error.
func (*GalleryItemCreate) SetCreatedAt ¶
func (_c *GalleryItemCreate) SetCreatedAt(v time.Time) *GalleryItemCreate
SetCreatedAt sets the "created_at" field.
func (*GalleryItemCreate) SetDescription ¶
func (_c *GalleryItemCreate) SetDescription(v string) *GalleryItemCreate
SetDescription sets the "description" field.
func (*GalleryItemCreate) SetFid ¶
func (_c *GalleryItemCreate) SetFid(v int) *GalleryItemCreate
SetFid sets the "fid" field.
func (*GalleryItemCreate) SetFile ¶
func (_c *GalleryItemCreate) SetFile(v *File) *GalleryItemCreate
SetFile sets the "file" edge to the File entity.
func (*GalleryItemCreate) SetFileID ¶
func (_c *GalleryItemCreate) SetFileID(id int) *GalleryItemCreate
SetFileID sets the "file" edge to the File entity by ID.
func (*GalleryItemCreate) SetGallery ¶
func (_c *GalleryItemCreate) SetGallery(v *Gallery) *GalleryItemCreate
SetGallery sets the "gallery" edge to the Gallery entity.
func (*GalleryItemCreate) SetGalleryID ¶
func (_c *GalleryItemCreate) SetGalleryID(v int) *GalleryItemCreate
SetGalleryID sets the "gallery_id" field.
func (*GalleryItemCreate) SetID ¶
func (_c *GalleryItemCreate) SetID(v int) *GalleryItemCreate
SetID sets the "id" field.
func (*GalleryItemCreate) SetIsCover ¶
func (_c *GalleryItemCreate) SetIsCover(v bool) *GalleryItemCreate
SetIsCover sets the "is_cover" field.
func (*GalleryItemCreate) SetNillableCreatedAt ¶
func (_c *GalleryItemCreate) SetNillableCreatedAt(v *time.Time) *GalleryItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*GalleryItemCreate) SetNillableDescription ¶
func (_c *GalleryItemCreate) SetNillableDescription(v *string) *GalleryItemCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*GalleryItemCreate) SetNillableIsCover ¶
func (_c *GalleryItemCreate) SetNillableIsCover(v *bool) *GalleryItemCreate
SetNillableIsCover sets the "is_cover" field if the given value is not nil.
func (*GalleryItemCreate) SetNillableTitle ¶
func (_c *GalleryItemCreate) SetNillableTitle(v *string) *GalleryItemCreate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*GalleryItemCreate) SetNillableWeight ¶
func (_c *GalleryItemCreate) SetNillableWeight(v *int) *GalleryItemCreate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*GalleryItemCreate) SetTitle ¶
func (_c *GalleryItemCreate) SetTitle(v string) *GalleryItemCreate
SetTitle sets the "title" field.
func (*GalleryItemCreate) SetWeight ¶
func (_c *GalleryItemCreate) SetWeight(v int) *GalleryItemCreate
SetWeight sets the "weight" field.
type GalleryItemCreateBulk ¶
type GalleryItemCreateBulk struct {
// contains filtered or unexported fields
}
GalleryItemCreateBulk is the builder for creating many GalleryItem entities in bulk.
func (*GalleryItemCreateBulk) Exec ¶
func (_c *GalleryItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryItemCreateBulk) ExecX ¶
func (_c *GalleryItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryItemCreateBulk) Save ¶
func (_c *GalleryItemCreateBulk) Save(ctx context.Context) ([]*GalleryItem, error)
Save creates the GalleryItem entities in the database.
func (*GalleryItemCreateBulk) SaveX ¶
func (_c *GalleryItemCreateBulk) SaveX(ctx context.Context) []*GalleryItem
SaveX is like Save, but panics if an error occurs.
type GalleryItemDelete ¶
type GalleryItemDelete struct {
// contains filtered or unexported fields
}
GalleryItemDelete is the builder for deleting a GalleryItem entity.
func (*GalleryItemDelete) Exec ¶
func (_d *GalleryItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GalleryItemDelete) ExecX ¶
func (_d *GalleryItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GalleryItemDelete) Where ¶
func (_d *GalleryItemDelete) Where(ps ...predicate.GalleryItem) *GalleryItemDelete
Where appends a list predicates to the GalleryItemDelete builder.
type GalleryItemDeleteOne ¶
type GalleryItemDeleteOne struct {
// contains filtered or unexported fields
}
GalleryItemDeleteOne is the builder for deleting a single GalleryItem entity.
func (*GalleryItemDeleteOne) Exec ¶
func (_d *GalleryItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GalleryItemDeleteOne) ExecX ¶
func (_d *GalleryItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryItemDeleteOne) Where ¶
func (_d *GalleryItemDeleteOne) Where(ps ...predicate.GalleryItem) *GalleryItemDeleteOne
Where appends a list predicates to the GalleryItemDelete builder.
type GalleryItemEdges ¶
type GalleryItemEdges struct {
// Gallery holds the value of the gallery edge.
Gallery *Gallery `json:"gallery,omitempty"`
// File holds the value of the file edge.
File *File `json:"file,omitempty"`
// contains filtered or unexported fields
}
GalleryItemEdges holds the relations/edges for other nodes in the graph.
func (GalleryItemEdges) FileOrErr ¶
func (e GalleryItemEdges) FileOrErr() (*File, error)
FileOrErr returns the File value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (GalleryItemEdges) GalleryOrErr ¶
func (e GalleryItemEdges) GalleryOrErr() (*Gallery, error)
GalleryOrErr returns the Gallery value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GalleryItemGroupBy ¶
type GalleryItemGroupBy struct {
// contains filtered or unexported fields
}
GalleryItemGroupBy is the group-by builder for GalleryItem entities.
func (*GalleryItemGroupBy) Aggregate ¶
func (_g *GalleryItemGroupBy) Aggregate(fns ...AggregateFunc) *GalleryItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GalleryItemGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GalleryItemGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GalleryItemGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GalleryItemGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GalleryItemGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GalleryItemGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GalleryItemGroupBy) Scan ¶
func (_g *GalleryItemGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GalleryItemGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GalleryItemMutation ¶
type GalleryItemMutation struct {
// contains filtered or unexported fields
}
GalleryItemMutation represents an operation that mutates the GalleryItem nodes in the graph.
func (*GalleryItemMutation) AddField ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) AddWeight ¶
func (m *GalleryItemMutation) AddWeight(i int)
AddWeight adds i to the "weight" field.
func (*GalleryItemMutation) AddedEdges ¶
func (m *GalleryItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GalleryItemMutation) AddedField ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) AddedFields ¶
func (m *GalleryItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GalleryItemMutation) AddedIDs ¶
func (m *GalleryItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GalleryItemMutation) AddedWeight ¶
func (m *GalleryItemMutation) AddedWeight() (r int, exists bool)
AddedWeight returns the value that was added to the "weight" field in this mutation.
func (*GalleryItemMutation) ClearDescription ¶
func (m *GalleryItemMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*GalleryItemMutation) ClearEdge ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) ClearField ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) ClearFile ¶
func (m *GalleryItemMutation) ClearFile()
ClearFile clears the "file" edge to the File entity.
func (*GalleryItemMutation) ClearGallery ¶
func (m *GalleryItemMutation) ClearGallery()
ClearGallery clears the "gallery" edge to the Gallery entity.
func (*GalleryItemMutation) ClearTitle ¶
func (m *GalleryItemMutation) ClearTitle()
ClearTitle clears the value of the "title" field.
func (*GalleryItemMutation) ClearWeight ¶
func (m *GalleryItemMutation) ClearWeight()
ClearWeight clears the value of the "weight" field.
func (*GalleryItemMutation) ClearedEdges ¶
func (m *GalleryItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GalleryItemMutation) ClearedFields ¶
func (m *GalleryItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GalleryItemMutation) Client ¶
func (m GalleryItemMutation) 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 (*GalleryItemMutation) CreatedAt ¶
func (m *GalleryItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GalleryItemMutation) Description ¶
func (m *GalleryItemMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*GalleryItemMutation) DescriptionCleared ¶
func (m *GalleryItemMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*GalleryItemMutation) EdgeCleared ¶
func (m *GalleryItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GalleryItemMutation) Fid ¶
func (m *GalleryItemMutation) Fid() (r int, exists bool)
Fid returns the value of the "fid" field in the mutation.
func (*GalleryItemMutation) Field ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) FieldCleared ¶
func (m *GalleryItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GalleryItemMutation) Fields ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) FileCleared ¶
func (m *GalleryItemMutation) FileCleared() bool
FileCleared reports if the "file" edge to the File entity was cleared.
func (*GalleryItemMutation) FileID ¶
func (m *GalleryItemMutation) FileID() (id int, exists bool)
FileID returns the "file" edge ID in the mutation.
func (*GalleryItemMutation) FileIDs ¶
func (m *GalleryItemMutation) FileIDs() (ids []int)
FileIDs returns the "file" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use FileID instead. It exists only for internal usage by the builders.
func (*GalleryItemMutation) GalleryCleared ¶
func (m *GalleryItemMutation) GalleryCleared() bool
GalleryCleared reports if the "gallery" edge to the Gallery entity was cleared.
func (*GalleryItemMutation) GalleryID ¶
func (m *GalleryItemMutation) GalleryID() (r int, exists bool)
GalleryID returns the value of the "gallery_id" field in the mutation.
func (*GalleryItemMutation) GalleryIDs ¶
func (m *GalleryItemMutation) GalleryIDs() (ids []int)
GalleryIDs returns the "gallery" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use GalleryID instead. It exists only for internal usage by the builders.
func (*GalleryItemMutation) ID ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) IDs ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) IsCover ¶
func (m *GalleryItemMutation) IsCover() (r bool, exists bool)
IsCover returns the value of the "is_cover" field in the mutation.
func (*GalleryItemMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the GalleryItem entity. If the GalleryItem 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 (*GalleryItemMutation) OldDescription ¶
func (m *GalleryItemMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the GalleryItem entity. If the GalleryItem 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 (*GalleryItemMutation) OldFid ¶
func (m *GalleryItemMutation) OldFid(ctx context.Context) (v int, err error)
OldFid returns the old "fid" field's value of the GalleryItem entity. If the GalleryItem 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 (*GalleryItemMutation) 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 (*GalleryItemMutation) OldGalleryID ¶
func (m *GalleryItemMutation) OldGalleryID(ctx context.Context) (v int, err error)
OldGalleryID returns the old "gallery_id" field's value of the GalleryItem entity. If the GalleryItem 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 (*GalleryItemMutation) OldIsCover ¶
func (m *GalleryItemMutation) OldIsCover(ctx context.Context) (v bool, err error)
OldIsCover returns the old "is_cover" field's value of the GalleryItem entity. If the GalleryItem 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 (*GalleryItemMutation) OldTitle ¶
func (m *GalleryItemMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the GalleryItem entity. If the GalleryItem 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 (*GalleryItemMutation) OldWeight ¶
func (m *GalleryItemMutation) OldWeight(ctx context.Context) (v int, err error)
OldWeight returns the old "weight" field's value of the GalleryItem entity. If the GalleryItem 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 (*GalleryItemMutation) Op ¶
func (m *GalleryItemMutation) Op() Op
Op returns the operation name.
func (*GalleryItemMutation) RemovedEdges ¶
func (m *GalleryItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GalleryItemMutation) RemovedIDs ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) ResetCreatedAt ¶
func (m *GalleryItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GalleryItemMutation) ResetDescription ¶
func (m *GalleryItemMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*GalleryItemMutation) ResetEdge ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) ResetFid ¶
func (m *GalleryItemMutation) ResetFid()
ResetFid resets all changes to the "fid" field.
func (*GalleryItemMutation) ResetField ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) ResetFile ¶
func (m *GalleryItemMutation) ResetFile()
ResetFile resets all changes to the "file" edge.
func (*GalleryItemMutation) ResetGallery ¶
func (m *GalleryItemMutation) ResetGallery()
ResetGallery resets all changes to the "gallery" edge.
func (*GalleryItemMutation) ResetGalleryID ¶
func (m *GalleryItemMutation) ResetGalleryID()
ResetGalleryID resets all changes to the "gallery_id" field.
func (*GalleryItemMutation) ResetIsCover ¶
func (m *GalleryItemMutation) ResetIsCover()
ResetIsCover resets all changes to the "is_cover" field.
func (*GalleryItemMutation) ResetTitle ¶
func (m *GalleryItemMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*GalleryItemMutation) ResetWeight ¶
func (m *GalleryItemMutation) ResetWeight()
ResetWeight resets all changes to the "weight" field.
func (*GalleryItemMutation) SetCreatedAt ¶
func (m *GalleryItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GalleryItemMutation) SetDescription ¶
func (m *GalleryItemMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*GalleryItemMutation) SetFid ¶
func (m *GalleryItemMutation) SetFid(i int)
SetFid sets the "fid" field.
func (*GalleryItemMutation) SetField ¶
func (m *GalleryItemMutation) 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 (*GalleryItemMutation) SetFileID ¶
func (m *GalleryItemMutation) SetFileID(id int)
SetFileID sets the "file" edge to the File entity by id.
func (*GalleryItemMutation) SetGalleryID ¶
func (m *GalleryItemMutation) SetGalleryID(i int)
SetGalleryID sets the "gallery_id" field.
func (*GalleryItemMutation) SetID ¶
func (m *GalleryItemMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GalleryItem entities.
func (*GalleryItemMutation) SetIsCover ¶
func (m *GalleryItemMutation) SetIsCover(b bool)
SetIsCover sets the "is_cover" field.
func (*GalleryItemMutation) SetOp ¶
func (m *GalleryItemMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GalleryItemMutation) SetTitle ¶
func (m *GalleryItemMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*GalleryItemMutation) SetWeight ¶
func (m *GalleryItemMutation) SetWeight(i int)
SetWeight sets the "weight" field.
func (*GalleryItemMutation) Title ¶
func (m *GalleryItemMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (*GalleryItemMutation) TitleCleared ¶
func (m *GalleryItemMutation) TitleCleared() bool
TitleCleared returns if the "title" field was cleared in this mutation.
func (GalleryItemMutation) Tx ¶
func (m GalleryItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GalleryItemMutation) Type ¶
func (m *GalleryItemMutation) Type() string
Type returns the node type of this mutation (GalleryItem).
func (*GalleryItemMutation) Weight ¶
func (m *GalleryItemMutation) Weight() (r int, exists bool)
Weight returns the value of the "weight" field in the mutation.
func (*GalleryItemMutation) WeightCleared ¶
func (m *GalleryItemMutation) WeightCleared() bool
WeightCleared returns if the "weight" field was cleared in this mutation.
func (*GalleryItemMutation) Where ¶
func (m *GalleryItemMutation) Where(ps ...predicate.GalleryItem)
Where appends a list predicates to the GalleryItemMutation builder.
func (*GalleryItemMutation) WhereP ¶
func (m *GalleryItemMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GalleryItemMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GalleryItemQuery ¶
type GalleryItemQuery struct {
// contains filtered or unexported fields
}
GalleryItemQuery is the builder for querying GalleryItem entities.
func (*GalleryItemQuery) Aggregate ¶
func (_q *GalleryItemQuery) Aggregate(fns ...AggregateFunc) *GalleryItemSelect
Aggregate returns a GalleryItemSelect configured with the given aggregations.
func (*GalleryItemQuery) All ¶
func (_q *GalleryItemQuery) All(ctx context.Context) ([]*GalleryItem, error)
All executes the query and returns a list of GalleryItems.
func (*GalleryItemQuery) AllX ¶
func (_q *GalleryItemQuery) AllX(ctx context.Context) []*GalleryItem
AllX is like All, but panics if an error occurs.
func (*GalleryItemQuery) Clone ¶
func (_q *GalleryItemQuery) Clone() *GalleryItemQuery
Clone returns a duplicate of the GalleryItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GalleryItemQuery) Count ¶
func (_q *GalleryItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GalleryItemQuery) CountX ¶
func (_q *GalleryItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GalleryItemQuery) Exist ¶
func (_q *GalleryItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GalleryItemQuery) ExistX ¶
func (_q *GalleryItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GalleryItemQuery) First ¶
func (_q *GalleryItemQuery) First(ctx context.Context) (*GalleryItem, error)
First returns the first GalleryItem entity from the query. Returns a *NotFoundError when no GalleryItem was found.
func (*GalleryItemQuery) FirstID ¶
func (_q *GalleryItemQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first GalleryItem ID from the query. Returns a *NotFoundError when no GalleryItem ID was found.
func (*GalleryItemQuery) FirstIDX ¶
func (_q *GalleryItemQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GalleryItemQuery) FirstX ¶
func (_q *GalleryItemQuery) FirstX(ctx context.Context) *GalleryItem
FirstX is like First, but panics if an error occurs.
func (*GalleryItemQuery) GroupBy ¶
func (_q *GalleryItemQuery) GroupBy(field string, fields ...string) *GalleryItemGroupBy
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 {
GalleryID int `json:"gallery_id,omitempty"`
Count int `json:"count,omitempty"`
}
client.GalleryItem.Query().
GroupBy(galleryitem.FieldGalleryID).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*GalleryItemQuery) IDs ¶
func (_q *GalleryItemQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of GalleryItem IDs.
func (*GalleryItemQuery) IDsX ¶
func (_q *GalleryItemQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GalleryItemQuery) Limit ¶
func (_q *GalleryItemQuery) Limit(limit int) *GalleryItemQuery
Limit the number of records to be returned by this query.
func (*GalleryItemQuery) Offset ¶
func (_q *GalleryItemQuery) Offset(offset int) *GalleryItemQuery
Offset to start from.
func (*GalleryItemQuery) Only ¶
func (_q *GalleryItemQuery) Only(ctx context.Context) (*GalleryItem, error)
Only returns a single GalleryItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GalleryItem entity is found. Returns a *NotFoundError when no GalleryItem entities are found.
func (*GalleryItemQuery) OnlyID ¶
func (_q *GalleryItemQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only GalleryItem ID in the query. Returns a *NotSingularError when more than one GalleryItem ID is found. Returns a *NotFoundError when no entities are found.
func (*GalleryItemQuery) OnlyIDX ¶
func (_q *GalleryItemQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GalleryItemQuery) OnlyX ¶
func (_q *GalleryItemQuery) OnlyX(ctx context.Context) *GalleryItem
OnlyX is like Only, but panics if an error occurs.
func (*GalleryItemQuery) Order ¶
func (_q *GalleryItemQuery) Order(o ...galleryitem.OrderOption) *GalleryItemQuery
Order specifies how the records should be ordered.
func (*GalleryItemQuery) QueryFile ¶
func (_q *GalleryItemQuery) QueryFile() *FileQuery
QueryFile chains the current query on the "file" edge.
func (*GalleryItemQuery) QueryGallery ¶
func (_q *GalleryItemQuery) QueryGallery() *GalleryQuery
QueryGallery chains the current query on the "gallery" edge.
func (*GalleryItemQuery) Select ¶
func (_q *GalleryItemQuery) Select(fields ...string) *GalleryItemSelect
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 {
GalleryID int `json:"gallery_id,omitempty"`
}
client.GalleryItem.Query().
Select(galleryitem.FieldGalleryID).
Scan(ctx, &v)
func (*GalleryItemQuery) Unique ¶
func (_q *GalleryItemQuery) Unique(unique bool) *GalleryItemQuery
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 (*GalleryItemQuery) Where ¶
func (_q *GalleryItemQuery) Where(ps ...predicate.GalleryItem) *GalleryItemQuery
Where adds a new predicate for the GalleryItemQuery builder.
func (*GalleryItemQuery) WithFile ¶
func (_q *GalleryItemQuery) WithFile(opts ...func(*FileQuery)) *GalleryItemQuery
WithFile tells the query-builder to eager-load the nodes that are connected to the "file" edge. The optional arguments are used to configure the query builder of the edge.
func (*GalleryItemQuery) WithGallery ¶
func (_q *GalleryItemQuery) WithGallery(opts ...func(*GalleryQuery)) *GalleryItemQuery
WithGallery tells the query-builder to eager-load the nodes that are connected to the "gallery" edge. The optional arguments are used to configure the query builder of the edge.
type GalleryItemSelect ¶
type GalleryItemSelect struct {
*GalleryItemQuery
// contains filtered or unexported fields
}
GalleryItemSelect is the builder for selecting fields of GalleryItem entities.
func (*GalleryItemSelect) Aggregate ¶
func (_s *GalleryItemSelect) Aggregate(fns ...AggregateFunc) *GalleryItemSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GalleryItemSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GalleryItemSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GalleryItemSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GalleryItemSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GalleryItemSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GalleryItemSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GalleryItemSelect) Scan ¶
func (_s *GalleryItemSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GalleryItemSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GalleryItemUpdate ¶
type GalleryItemUpdate struct {
// contains filtered or unexported fields
}
GalleryItemUpdate is the builder for updating GalleryItem entities.
func (*GalleryItemUpdate) AddWeight ¶
func (_u *GalleryItemUpdate) AddWeight(v int) *GalleryItemUpdate
AddWeight adds value to the "weight" field.
func (*GalleryItemUpdate) ClearDescription ¶
func (_u *GalleryItemUpdate) ClearDescription() *GalleryItemUpdate
ClearDescription clears the value of the "description" field.
func (*GalleryItemUpdate) ClearFile ¶
func (_u *GalleryItemUpdate) ClearFile() *GalleryItemUpdate
ClearFile clears the "file" edge to the File entity.
func (*GalleryItemUpdate) ClearGallery ¶
func (_u *GalleryItemUpdate) ClearGallery() *GalleryItemUpdate
ClearGallery clears the "gallery" edge to the Gallery entity.
func (*GalleryItemUpdate) ClearTitle ¶
func (_u *GalleryItemUpdate) ClearTitle() *GalleryItemUpdate
ClearTitle clears the value of the "title" field.
func (*GalleryItemUpdate) ClearWeight ¶
func (_u *GalleryItemUpdate) ClearWeight() *GalleryItemUpdate
ClearWeight clears the value of the "weight" field.
func (*GalleryItemUpdate) Exec ¶
func (_u *GalleryItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryItemUpdate) ExecX ¶
func (_u *GalleryItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryItemUpdate) Mutation ¶
func (_u *GalleryItemUpdate) Mutation() *GalleryItemMutation
Mutation returns the GalleryItemMutation object of the builder.
func (*GalleryItemUpdate) Save ¶
func (_u *GalleryItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GalleryItemUpdate) SaveX ¶
func (_u *GalleryItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GalleryItemUpdate) SetDescription ¶
func (_u *GalleryItemUpdate) SetDescription(v string) *GalleryItemUpdate
SetDescription sets the "description" field.
func (*GalleryItemUpdate) SetFid ¶
func (_u *GalleryItemUpdate) SetFid(v int) *GalleryItemUpdate
SetFid sets the "fid" field.
func (*GalleryItemUpdate) SetFile ¶
func (_u *GalleryItemUpdate) SetFile(v *File) *GalleryItemUpdate
SetFile sets the "file" edge to the File entity.
func (*GalleryItemUpdate) SetFileID ¶
func (_u *GalleryItemUpdate) SetFileID(id int) *GalleryItemUpdate
SetFileID sets the "file" edge to the File entity by ID.
func (*GalleryItemUpdate) SetGallery ¶
func (_u *GalleryItemUpdate) SetGallery(v *Gallery) *GalleryItemUpdate
SetGallery sets the "gallery" edge to the Gallery entity.
func (*GalleryItemUpdate) SetGalleryID ¶
func (_u *GalleryItemUpdate) SetGalleryID(v int) *GalleryItemUpdate
SetGalleryID sets the "gallery_id" field.
func (*GalleryItemUpdate) SetIsCover ¶
func (_u *GalleryItemUpdate) SetIsCover(v bool) *GalleryItemUpdate
SetIsCover sets the "is_cover" field.
func (*GalleryItemUpdate) SetNillableDescription ¶
func (_u *GalleryItemUpdate) SetNillableDescription(v *string) *GalleryItemUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*GalleryItemUpdate) SetNillableFid ¶
func (_u *GalleryItemUpdate) SetNillableFid(v *int) *GalleryItemUpdate
SetNillableFid sets the "fid" field if the given value is not nil.
func (*GalleryItemUpdate) SetNillableGalleryID ¶
func (_u *GalleryItemUpdate) SetNillableGalleryID(v *int) *GalleryItemUpdate
SetNillableGalleryID sets the "gallery_id" field if the given value is not nil.
func (*GalleryItemUpdate) SetNillableIsCover ¶
func (_u *GalleryItemUpdate) SetNillableIsCover(v *bool) *GalleryItemUpdate
SetNillableIsCover sets the "is_cover" field if the given value is not nil.
func (*GalleryItemUpdate) SetNillableTitle ¶
func (_u *GalleryItemUpdate) SetNillableTitle(v *string) *GalleryItemUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*GalleryItemUpdate) SetNillableWeight ¶
func (_u *GalleryItemUpdate) SetNillableWeight(v *int) *GalleryItemUpdate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*GalleryItemUpdate) SetTitle ¶
func (_u *GalleryItemUpdate) SetTitle(v string) *GalleryItemUpdate
SetTitle sets the "title" field.
func (*GalleryItemUpdate) SetWeight ¶
func (_u *GalleryItemUpdate) SetWeight(v int) *GalleryItemUpdate
SetWeight sets the "weight" field.
func (*GalleryItemUpdate) Where ¶
func (_u *GalleryItemUpdate) Where(ps ...predicate.GalleryItem) *GalleryItemUpdate
Where appends a list predicates to the GalleryItemUpdate builder.
type GalleryItemUpdateOne ¶
type GalleryItemUpdateOne struct {
// contains filtered or unexported fields
}
GalleryItemUpdateOne is the builder for updating a single GalleryItem entity.
func (*GalleryItemUpdateOne) AddWeight ¶
func (_u *GalleryItemUpdateOne) AddWeight(v int) *GalleryItemUpdateOne
AddWeight adds value to the "weight" field.
func (*GalleryItemUpdateOne) ClearDescription ¶
func (_u *GalleryItemUpdateOne) ClearDescription() *GalleryItemUpdateOne
ClearDescription clears the value of the "description" field.
func (*GalleryItemUpdateOne) ClearFile ¶
func (_u *GalleryItemUpdateOne) ClearFile() *GalleryItemUpdateOne
ClearFile clears the "file" edge to the File entity.
func (*GalleryItemUpdateOne) ClearGallery ¶
func (_u *GalleryItemUpdateOne) ClearGallery() *GalleryItemUpdateOne
ClearGallery clears the "gallery" edge to the Gallery entity.
func (*GalleryItemUpdateOne) ClearTitle ¶
func (_u *GalleryItemUpdateOne) ClearTitle() *GalleryItemUpdateOne
ClearTitle clears the value of the "title" field.
func (*GalleryItemUpdateOne) ClearWeight ¶
func (_u *GalleryItemUpdateOne) ClearWeight() *GalleryItemUpdateOne
ClearWeight clears the value of the "weight" field.
func (*GalleryItemUpdateOne) Exec ¶
func (_u *GalleryItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GalleryItemUpdateOne) ExecX ¶
func (_u *GalleryItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryItemUpdateOne) Mutation ¶
func (_u *GalleryItemUpdateOne) Mutation() *GalleryItemMutation
Mutation returns the GalleryItemMutation object of the builder.
func (*GalleryItemUpdateOne) Save ¶
func (_u *GalleryItemUpdateOne) Save(ctx context.Context) (*GalleryItem, error)
Save executes the query and returns the updated GalleryItem entity.
func (*GalleryItemUpdateOne) SaveX ¶
func (_u *GalleryItemUpdateOne) SaveX(ctx context.Context) *GalleryItem
SaveX is like Save, but panics if an error occurs.
func (*GalleryItemUpdateOne) Select ¶
func (_u *GalleryItemUpdateOne) Select(field string, fields ...string) *GalleryItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GalleryItemUpdateOne) SetDescription ¶
func (_u *GalleryItemUpdateOne) SetDescription(v string) *GalleryItemUpdateOne
SetDescription sets the "description" field.
func (*GalleryItemUpdateOne) SetFid ¶
func (_u *GalleryItemUpdateOne) SetFid(v int) *GalleryItemUpdateOne
SetFid sets the "fid" field.
func (*GalleryItemUpdateOne) SetFile ¶
func (_u *GalleryItemUpdateOne) SetFile(v *File) *GalleryItemUpdateOne
SetFile sets the "file" edge to the File entity.
func (*GalleryItemUpdateOne) SetFileID ¶
func (_u *GalleryItemUpdateOne) SetFileID(id int) *GalleryItemUpdateOne
SetFileID sets the "file" edge to the File entity by ID.
func (*GalleryItemUpdateOne) SetGallery ¶
func (_u *GalleryItemUpdateOne) SetGallery(v *Gallery) *GalleryItemUpdateOne
SetGallery sets the "gallery" edge to the Gallery entity.
func (*GalleryItemUpdateOne) SetGalleryID ¶
func (_u *GalleryItemUpdateOne) SetGalleryID(v int) *GalleryItemUpdateOne
SetGalleryID sets the "gallery_id" field.
func (*GalleryItemUpdateOne) SetIsCover ¶
func (_u *GalleryItemUpdateOne) SetIsCover(v bool) *GalleryItemUpdateOne
SetIsCover sets the "is_cover" field.
func (*GalleryItemUpdateOne) SetNillableDescription ¶
func (_u *GalleryItemUpdateOne) SetNillableDescription(v *string) *GalleryItemUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*GalleryItemUpdateOne) SetNillableFid ¶
func (_u *GalleryItemUpdateOne) SetNillableFid(v *int) *GalleryItemUpdateOne
SetNillableFid sets the "fid" field if the given value is not nil.
func (*GalleryItemUpdateOne) SetNillableGalleryID ¶
func (_u *GalleryItemUpdateOne) SetNillableGalleryID(v *int) *GalleryItemUpdateOne
SetNillableGalleryID sets the "gallery_id" field if the given value is not nil.
func (*GalleryItemUpdateOne) SetNillableIsCover ¶
func (_u *GalleryItemUpdateOne) SetNillableIsCover(v *bool) *GalleryItemUpdateOne
SetNillableIsCover sets the "is_cover" field if the given value is not nil.
func (*GalleryItemUpdateOne) SetNillableTitle ¶
func (_u *GalleryItemUpdateOne) SetNillableTitle(v *string) *GalleryItemUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*GalleryItemUpdateOne) SetNillableWeight ¶
func (_u *GalleryItemUpdateOne) SetNillableWeight(v *int) *GalleryItemUpdateOne
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*GalleryItemUpdateOne) SetTitle ¶
func (_u *GalleryItemUpdateOne) SetTitle(v string) *GalleryItemUpdateOne
SetTitle sets the "title" field.
func (*GalleryItemUpdateOne) SetWeight ¶
func (_u *GalleryItemUpdateOne) SetWeight(v int) *GalleryItemUpdateOne
SetWeight sets the "weight" field.
func (*GalleryItemUpdateOne) Where ¶
func (_u *GalleryItemUpdateOne) Where(ps ...predicate.GalleryItem) *GalleryItemUpdateOne
Where appends a list predicates to the GalleryItemUpdate builder.
type GalleryItems ¶
type GalleryItems []*GalleryItem
GalleryItems is a parsable slice of GalleryItem.
type GalleryMutation ¶
type GalleryMutation struct {
// contains filtered or unexported fields
}
GalleryMutation represents an operation that mutates the Gallery nodes in the graph.
func (*GalleryMutation) AddField ¶
func (m *GalleryMutation) 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 (*GalleryMutation) AddItemIDs ¶
func (m *GalleryMutation) AddItemIDs(ids ...int)
AddItemIDs adds the "items" edge to the GalleryItem entity by ids.
func (*GalleryMutation) AddWeight ¶
func (m *GalleryMutation) AddWeight(i int)
AddWeight adds i to the "weight" field.
func (*GalleryMutation) AddedEdges ¶
func (m *GalleryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GalleryMutation) AddedField ¶
func (m *GalleryMutation) 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 (*GalleryMutation) AddedFields ¶
func (m *GalleryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GalleryMutation) AddedIDs ¶
func (m *GalleryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GalleryMutation) AddedWeight ¶
func (m *GalleryMutation) AddedWeight() (r int, exists bool)
AddedWeight returns the value that was added to the "weight" field in this mutation.
func (*GalleryMutation) ClearDescription ¶
func (m *GalleryMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*GalleryMutation) ClearEdge ¶
func (m *GalleryMutation) 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 (*GalleryMutation) ClearField ¶
func (m *GalleryMutation) 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 (*GalleryMutation) ClearItems ¶
func (m *GalleryMutation) ClearItems()
ClearItems clears the "items" edge to the GalleryItem entity.
func (*GalleryMutation) ClearNode ¶
func (m *GalleryMutation) ClearNode()
ClearNode clears the "node" edge to the Node entity.
func (*GalleryMutation) ClearStatus ¶
func (m *GalleryMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*GalleryMutation) ClearTitle ¶
func (m *GalleryMutation) ClearTitle()
ClearTitle clears the value of the "title" field.
func (*GalleryMutation) ClearWeight ¶
func (m *GalleryMutation) ClearWeight()
ClearWeight clears the value of the "weight" field.
func (*GalleryMutation) ClearedEdges ¶
func (m *GalleryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GalleryMutation) ClearedFields ¶
func (m *GalleryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GalleryMutation) Client ¶
func (m GalleryMutation) 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 (*GalleryMutation) CreatedAt ¶
func (m *GalleryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*GalleryMutation) Description ¶
func (m *GalleryMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*GalleryMutation) DescriptionCleared ¶
func (m *GalleryMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*GalleryMutation) EdgeCleared ¶
func (m *GalleryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GalleryMutation) Field ¶
func (m *GalleryMutation) 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 (*GalleryMutation) FieldCleared ¶
func (m *GalleryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GalleryMutation) Fields ¶
func (m *GalleryMutation) 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 (*GalleryMutation) ID ¶
func (m *GalleryMutation) 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 (*GalleryMutation) IDs ¶
func (m *GalleryMutation) 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 (*GalleryMutation) ItemsCleared ¶
func (m *GalleryMutation) ItemsCleared() bool
ItemsCleared reports if the "items" edge to the GalleryItem entity was cleared.
func (*GalleryMutation) ItemsIDs ¶
func (m *GalleryMutation) ItemsIDs() (ids []int)
ItemsIDs returns the "items" edge IDs in the mutation.
func (*GalleryMutation) Nid ¶
func (m *GalleryMutation) Nid() (r int, exists bool)
Nid returns the value of the "nid" field in the mutation.
func (*GalleryMutation) NodeCleared ¶
func (m *GalleryMutation) NodeCleared() bool
NodeCleared reports if the "node" edge to the Node entity was cleared.
func (*GalleryMutation) NodeID ¶
func (m *GalleryMutation) NodeID() (id int, exists bool)
NodeID returns the "node" edge ID in the mutation.
func (*GalleryMutation) NodeIDs ¶
func (m *GalleryMutation) NodeIDs() (ids []int)
NodeIDs returns the "node" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NodeID instead. It exists only for internal usage by the builders.
func (*GalleryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Gallery entity. If the Gallery 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 (*GalleryMutation) OldDescription ¶
func (m *GalleryMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Gallery entity. If the Gallery 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 (*GalleryMutation) 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 (*GalleryMutation) OldNid ¶
func (m *GalleryMutation) OldNid(ctx context.Context) (v int, err error)
OldNid returns the old "nid" field's value of the Gallery entity. If the Gallery 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 (*GalleryMutation) OldPreviewMediumStyle ¶
func (m *GalleryMutation) OldPreviewMediumStyle(ctx context.Context) (v string, err error)
OldPreviewMediumStyle returns the old "preview_medium_style" field's value of the Gallery entity. If the Gallery 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 (*GalleryMutation) OldPreviewSmallStyle ¶
func (m *GalleryMutation) OldPreviewSmallStyle(ctx context.Context) (v string, err error)
OldPreviewSmallStyle returns the old "preview_small_style" field's value of the Gallery entity. If the Gallery 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 (*GalleryMutation) OldStatus ¶
func (m *GalleryMutation) OldStatus(ctx context.Context) (v bool, err error)
OldStatus returns the old "status" field's value of the Gallery entity. If the Gallery 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 (*GalleryMutation) OldTitle ¶
func (m *GalleryMutation) OldTitle(ctx context.Context) (v string, err error)
OldTitle returns the old "title" field's value of the Gallery entity. If the Gallery 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 (*GalleryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Gallery entity. If the Gallery 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 (*GalleryMutation) OldWeight ¶
func (m *GalleryMutation) OldWeight(ctx context.Context) (v int, err error)
OldWeight returns the old "weight" field's value of the Gallery entity. If the Gallery 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 (*GalleryMutation) PreviewMediumStyle ¶
func (m *GalleryMutation) PreviewMediumStyle() (r string, exists bool)
PreviewMediumStyle returns the value of the "preview_medium_style" field in the mutation.
func (*GalleryMutation) PreviewSmallStyle ¶
func (m *GalleryMutation) PreviewSmallStyle() (r string, exists bool)
PreviewSmallStyle returns the value of the "preview_small_style" field in the mutation.
func (*GalleryMutation) RemoveItemIDs ¶
func (m *GalleryMutation) RemoveItemIDs(ids ...int)
RemoveItemIDs removes the "items" edge to the GalleryItem entity by IDs.
func (*GalleryMutation) RemovedEdges ¶
func (m *GalleryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GalleryMutation) RemovedIDs ¶
func (m *GalleryMutation) 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 (*GalleryMutation) RemovedItemsIDs ¶
func (m *GalleryMutation) RemovedItemsIDs() (ids []int)
RemovedItems returns the removed IDs of the "items" edge to the GalleryItem entity.
func (*GalleryMutation) ResetCreatedAt ¶
func (m *GalleryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*GalleryMutation) ResetDescription ¶
func (m *GalleryMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*GalleryMutation) ResetEdge ¶
func (m *GalleryMutation) 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 (*GalleryMutation) ResetField ¶
func (m *GalleryMutation) 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 (*GalleryMutation) ResetItems ¶
func (m *GalleryMutation) ResetItems()
ResetItems resets all changes to the "items" edge.
func (*GalleryMutation) ResetNid ¶
func (m *GalleryMutation) ResetNid()
ResetNid resets all changes to the "nid" field.
func (*GalleryMutation) ResetNode ¶
func (m *GalleryMutation) ResetNode()
ResetNode resets all changes to the "node" edge.
func (*GalleryMutation) ResetPreviewMediumStyle ¶
func (m *GalleryMutation) ResetPreviewMediumStyle()
ResetPreviewMediumStyle resets all changes to the "preview_medium_style" field.
func (*GalleryMutation) ResetPreviewSmallStyle ¶
func (m *GalleryMutation) ResetPreviewSmallStyle()
ResetPreviewSmallStyle resets all changes to the "preview_small_style" field.
func (*GalleryMutation) ResetStatus ¶
func (m *GalleryMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*GalleryMutation) ResetTitle ¶
func (m *GalleryMutation) ResetTitle()
ResetTitle resets all changes to the "title" field.
func (*GalleryMutation) ResetUpdatedAt ¶
func (m *GalleryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*GalleryMutation) ResetWeight ¶
func (m *GalleryMutation) ResetWeight()
ResetWeight resets all changes to the "weight" field.
func (*GalleryMutation) SetCreatedAt ¶
func (m *GalleryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*GalleryMutation) SetDescription ¶
func (m *GalleryMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*GalleryMutation) SetField ¶
func (m *GalleryMutation) 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 (*GalleryMutation) SetID ¶
func (m *GalleryMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Gallery entities.
func (*GalleryMutation) SetNid ¶
func (m *GalleryMutation) SetNid(i int)
SetNid sets the "nid" field.
func (*GalleryMutation) SetNodeID ¶
func (m *GalleryMutation) SetNodeID(id int)
SetNodeID sets the "node" edge to the Node entity by id.
func (*GalleryMutation) SetOp ¶
func (m *GalleryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*GalleryMutation) SetPreviewMediumStyle ¶
func (m *GalleryMutation) SetPreviewMediumStyle(s string)
SetPreviewMediumStyle sets the "preview_medium_style" field.
func (*GalleryMutation) SetPreviewSmallStyle ¶
func (m *GalleryMutation) SetPreviewSmallStyle(s string)
SetPreviewSmallStyle sets the "preview_small_style" field.
func (*GalleryMutation) SetStatus ¶
func (m *GalleryMutation) SetStatus(b bool)
SetStatus sets the "status" field.
func (*GalleryMutation) SetTitle ¶
func (m *GalleryMutation) SetTitle(s string)
SetTitle sets the "title" field.
func (*GalleryMutation) SetUpdatedAt ¶
func (m *GalleryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*GalleryMutation) SetWeight ¶
func (m *GalleryMutation) SetWeight(i int)
SetWeight sets the "weight" field.
func (*GalleryMutation) Status ¶
func (m *GalleryMutation) Status() (r bool, exists bool)
Status returns the value of the "status" field in the mutation.
func (*GalleryMutation) StatusCleared ¶
func (m *GalleryMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (*GalleryMutation) Title ¶
func (m *GalleryMutation) Title() (r string, exists bool)
Title returns the value of the "title" field in the mutation.
func (*GalleryMutation) TitleCleared ¶
func (m *GalleryMutation) TitleCleared() bool
TitleCleared returns if the "title" field was cleared in this mutation.
func (GalleryMutation) Tx ¶
func (m GalleryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GalleryMutation) Type ¶
func (m *GalleryMutation) Type() string
Type returns the node type of this mutation (Gallery).
func (*GalleryMutation) UpdatedAt ¶
func (m *GalleryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*GalleryMutation) Weight ¶
func (m *GalleryMutation) Weight() (r int, exists bool)
Weight returns the value of the "weight" field in the mutation.
func (*GalleryMutation) WeightCleared ¶
func (m *GalleryMutation) WeightCleared() bool
WeightCleared returns if the "weight" field was cleared in this mutation.
func (*GalleryMutation) Where ¶
func (m *GalleryMutation) Where(ps ...predicate.Gallery)
Where appends a list predicates to the GalleryMutation builder.
func (*GalleryMutation) WhereP ¶
func (m *GalleryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GalleryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GalleryNode ¶
type GalleryNode struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Nid holds the value of the "nid" field.
Nid int `json:"nid,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the GalleryNodeQuery when eager-loading is set.
Edges GalleryNodeEdges `json:"edges"`
// contains filtered or unexported fields
}
GalleryNode is the model entity for the GalleryNode schema.
func (*GalleryNode) QueryNode ¶
func (_m *GalleryNode) QueryNode() *NodeQuery
QueryNode queries the "node" edge of the GalleryNode entity.
func (*GalleryNode) String ¶
func (_m *GalleryNode) String() string
String implements the fmt.Stringer.
func (*GalleryNode) Unwrap ¶
func (_m *GalleryNode) Unwrap() *GalleryNode
Unwrap unwraps the GalleryNode 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 (*GalleryNode) Update ¶
func (_m *GalleryNode) Update() *GalleryNodeUpdateOne
Update returns a builder for updating this GalleryNode. Note that you need to call GalleryNode.Unwrap() before calling this method if this GalleryNode was returned from a transaction, and the transaction was committed or rolled back.
type GalleryNodeClient ¶
type GalleryNodeClient struct {
// contains filtered or unexported fields
}
GalleryNodeClient is a client for the GalleryNode schema.
func NewGalleryNodeClient ¶
func NewGalleryNodeClient(c config) *GalleryNodeClient
NewGalleryNodeClient returns a client for the GalleryNode from the given config.
func (*GalleryNodeClient) Create ¶
func (c *GalleryNodeClient) Create() *GalleryNodeCreate
Create returns a builder for creating a GalleryNode entity.
func (*GalleryNodeClient) CreateBulk ¶
func (c *GalleryNodeClient) CreateBulk(builders ...*GalleryNodeCreate) *GalleryNodeCreateBulk
CreateBulk returns a builder for creating a bulk of GalleryNode entities.
func (*GalleryNodeClient) Delete ¶
func (c *GalleryNodeClient) Delete() *GalleryNodeDelete
Delete returns a delete builder for GalleryNode.
func (*GalleryNodeClient) DeleteOne ¶
func (c *GalleryNodeClient) DeleteOne(_m *GalleryNode) *GalleryNodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*GalleryNodeClient) DeleteOneID ¶
func (c *GalleryNodeClient) DeleteOneID(id int) *GalleryNodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*GalleryNodeClient) Get ¶
func (c *GalleryNodeClient) Get(ctx context.Context, id int) (*GalleryNode, error)
Get returns a GalleryNode entity by its id.
func (*GalleryNodeClient) GetX ¶
func (c *GalleryNodeClient) GetX(ctx context.Context, id int) *GalleryNode
GetX is like Get, but panics if an error occurs.
func (*GalleryNodeClient) Hooks ¶
func (c *GalleryNodeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*GalleryNodeClient) Intercept ¶
func (c *GalleryNodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `gallerynode.Intercept(f(g(h())))`.
func (*GalleryNodeClient) Interceptors ¶
func (c *GalleryNodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*GalleryNodeClient) MapCreateBulk ¶
func (c *GalleryNodeClient) MapCreateBulk(slice any, setFunc func(*GalleryNodeCreate, int)) *GalleryNodeCreateBulk
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 (*GalleryNodeClient) Query ¶
func (c *GalleryNodeClient) Query() *GalleryNodeQuery
Query returns a query builder for GalleryNode.
func (*GalleryNodeClient) QueryNode ¶
func (c *GalleryNodeClient) QueryNode(_m *GalleryNode) *NodeQuery
QueryNode queries the node edge of a GalleryNode.
func (*GalleryNodeClient) Update ¶
func (c *GalleryNodeClient) Update() *GalleryNodeUpdate
Update returns an update builder for GalleryNode.
func (*GalleryNodeClient) UpdateOne ¶
func (c *GalleryNodeClient) UpdateOne(_m *GalleryNode) *GalleryNodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*GalleryNodeClient) UpdateOneID ¶
func (c *GalleryNodeClient) UpdateOneID(id int) *GalleryNodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*GalleryNodeClient) Use ¶
func (c *GalleryNodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `gallerynode.Hooks(f(g(h())))`.
type GalleryNodeCreate ¶
type GalleryNodeCreate struct {
// contains filtered or unexported fields
}
GalleryNodeCreate is the builder for creating a GalleryNode entity.
func (*GalleryNodeCreate) Exec ¶
func (_c *GalleryNodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryNodeCreate) ExecX ¶
func (_c *GalleryNodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryNodeCreate) Mutation ¶
func (_c *GalleryNodeCreate) Mutation() *GalleryNodeMutation
Mutation returns the GalleryNodeMutation object of the builder.
func (*GalleryNodeCreate) Save ¶
func (_c *GalleryNodeCreate) Save(ctx context.Context) (*GalleryNode, error)
Save creates the GalleryNode in the database.
func (*GalleryNodeCreate) SaveX ¶
func (_c *GalleryNodeCreate) SaveX(ctx context.Context) *GalleryNode
SaveX calls Save and panics if Save returns an error.
func (*GalleryNodeCreate) SetID ¶
func (_c *GalleryNodeCreate) SetID(v int) *GalleryNodeCreate
SetID sets the "id" field.
func (*GalleryNodeCreate) SetNid ¶
func (_c *GalleryNodeCreate) SetNid(v int) *GalleryNodeCreate
SetNid sets the "nid" field.
func (*GalleryNodeCreate) SetNode ¶
func (_c *GalleryNodeCreate) SetNode(v *Node) *GalleryNodeCreate
SetNode sets the "node" edge to the Node entity.
func (*GalleryNodeCreate) SetNodeID ¶
func (_c *GalleryNodeCreate) SetNodeID(id int) *GalleryNodeCreate
SetNodeID sets the "node" edge to the Node entity by ID.
type GalleryNodeCreateBulk ¶
type GalleryNodeCreateBulk struct {
// contains filtered or unexported fields
}
GalleryNodeCreateBulk is the builder for creating many GalleryNode entities in bulk.
func (*GalleryNodeCreateBulk) Exec ¶
func (_c *GalleryNodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryNodeCreateBulk) ExecX ¶
func (_c *GalleryNodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryNodeCreateBulk) Save ¶
func (_c *GalleryNodeCreateBulk) Save(ctx context.Context) ([]*GalleryNode, error)
Save creates the GalleryNode entities in the database.
func (*GalleryNodeCreateBulk) SaveX ¶
func (_c *GalleryNodeCreateBulk) SaveX(ctx context.Context) []*GalleryNode
SaveX is like Save, but panics if an error occurs.
type GalleryNodeDelete ¶
type GalleryNodeDelete struct {
// contains filtered or unexported fields
}
GalleryNodeDelete is the builder for deleting a GalleryNode entity.
func (*GalleryNodeDelete) Exec ¶
func (_d *GalleryNodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*GalleryNodeDelete) ExecX ¶
func (_d *GalleryNodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*GalleryNodeDelete) Where ¶
func (_d *GalleryNodeDelete) Where(ps ...predicate.GalleryNode) *GalleryNodeDelete
Where appends a list predicates to the GalleryNodeDelete builder.
type GalleryNodeDeleteOne ¶
type GalleryNodeDeleteOne struct {
// contains filtered or unexported fields
}
GalleryNodeDeleteOne is the builder for deleting a single GalleryNode entity.
func (*GalleryNodeDeleteOne) Exec ¶
func (_d *GalleryNodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*GalleryNodeDeleteOne) ExecX ¶
func (_d *GalleryNodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryNodeDeleteOne) Where ¶
func (_d *GalleryNodeDeleteOne) Where(ps ...predicate.GalleryNode) *GalleryNodeDeleteOne
Where appends a list predicates to the GalleryNodeDelete builder.
type GalleryNodeEdges ¶
type GalleryNodeEdges struct {
// Node holds the value of the node edge.
Node *Node `json:"node,omitempty"`
// contains filtered or unexported fields
}
GalleryNodeEdges holds the relations/edges for other nodes in the graph.
func (GalleryNodeEdges) NodeOrErr ¶
func (e GalleryNodeEdges) NodeOrErr() (*Node, error)
NodeOrErr returns the Node value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type GalleryNodeGroupBy ¶
type GalleryNodeGroupBy struct {
// contains filtered or unexported fields
}
GalleryNodeGroupBy is the group-by builder for GalleryNode entities.
func (*GalleryNodeGroupBy) Aggregate ¶
func (_g *GalleryNodeGroupBy) Aggregate(fns ...AggregateFunc) *GalleryNodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*GalleryNodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GalleryNodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GalleryNodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GalleryNodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GalleryNodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GalleryNodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GalleryNodeGroupBy) Scan ¶
func (_g *GalleryNodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GalleryNodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GalleryNodeMutation ¶
type GalleryNodeMutation struct {
// contains filtered or unexported fields
}
GalleryNodeMutation represents an operation that mutates the GalleryNode nodes in the graph.
func (*GalleryNodeMutation) AddField ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) AddedEdges ¶
func (m *GalleryNodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*GalleryNodeMutation) AddedField ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) AddedFields ¶
func (m *GalleryNodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*GalleryNodeMutation) AddedIDs ¶
func (m *GalleryNodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*GalleryNodeMutation) ClearEdge ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) ClearField ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) ClearNode ¶
func (m *GalleryNodeMutation) ClearNode()
ClearNode clears the "node" edge to the Node entity.
func (*GalleryNodeMutation) ClearedEdges ¶
func (m *GalleryNodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*GalleryNodeMutation) ClearedFields ¶
func (m *GalleryNodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (GalleryNodeMutation) Client ¶
func (m GalleryNodeMutation) 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 (*GalleryNodeMutation) EdgeCleared ¶
func (m *GalleryNodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*GalleryNodeMutation) Field ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) FieldCleared ¶
func (m *GalleryNodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*GalleryNodeMutation) Fields ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) ID ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) IDs ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) Nid ¶
func (m *GalleryNodeMutation) Nid() (r int, exists bool)
Nid returns the value of the "nid" field in the mutation.
func (*GalleryNodeMutation) NodeCleared ¶
func (m *GalleryNodeMutation) NodeCleared() bool
NodeCleared reports if the "node" edge to the Node entity was cleared.
func (*GalleryNodeMutation) NodeID ¶
func (m *GalleryNodeMutation) NodeID() (id int, exists bool)
NodeID returns the "node" edge ID in the mutation.
func (*GalleryNodeMutation) NodeIDs ¶
func (m *GalleryNodeMutation) NodeIDs() (ids []int)
NodeIDs returns the "node" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NodeID instead. It exists only for internal usage by the builders.
func (*GalleryNodeMutation) 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 (*GalleryNodeMutation) OldNid ¶
func (m *GalleryNodeMutation) OldNid(ctx context.Context) (v int, err error)
OldNid returns the old "nid" field's value of the GalleryNode entity. If the GalleryNode 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 (*GalleryNodeMutation) Op ¶
func (m *GalleryNodeMutation) Op() Op
Op returns the operation name.
func (*GalleryNodeMutation) RemovedEdges ¶
func (m *GalleryNodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*GalleryNodeMutation) RemovedIDs ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) ResetEdge ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) ResetField ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) ResetNid ¶
func (m *GalleryNodeMutation) ResetNid()
ResetNid resets all changes to the "nid" field.
func (*GalleryNodeMutation) ResetNode ¶
func (m *GalleryNodeMutation) ResetNode()
ResetNode resets all changes to the "node" edge.
func (*GalleryNodeMutation) SetField ¶
func (m *GalleryNodeMutation) 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 (*GalleryNodeMutation) SetID ¶
func (m *GalleryNodeMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of GalleryNode entities.
func (*GalleryNodeMutation) SetNid ¶
func (m *GalleryNodeMutation) SetNid(i int)
SetNid sets the "nid" field.
func (*GalleryNodeMutation) SetNodeID ¶
func (m *GalleryNodeMutation) SetNodeID(id int)
SetNodeID sets the "node" edge to the Node entity by id.
func (*GalleryNodeMutation) SetOp ¶
func (m *GalleryNodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (GalleryNodeMutation) Tx ¶
func (m GalleryNodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*GalleryNodeMutation) Type ¶
func (m *GalleryNodeMutation) Type() string
Type returns the node type of this mutation (GalleryNode).
func (*GalleryNodeMutation) Where ¶
func (m *GalleryNodeMutation) Where(ps ...predicate.GalleryNode)
Where appends a list predicates to the GalleryNodeMutation builder.
func (*GalleryNodeMutation) WhereP ¶
func (m *GalleryNodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the GalleryNodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type GalleryNodeQuery ¶
type GalleryNodeQuery struct {
// contains filtered or unexported fields
}
GalleryNodeQuery is the builder for querying GalleryNode entities.
func (*GalleryNodeQuery) Aggregate ¶
func (_q *GalleryNodeQuery) Aggregate(fns ...AggregateFunc) *GalleryNodeSelect
Aggregate returns a GalleryNodeSelect configured with the given aggregations.
func (*GalleryNodeQuery) All ¶
func (_q *GalleryNodeQuery) All(ctx context.Context) ([]*GalleryNode, error)
All executes the query and returns a list of GalleryNodes.
func (*GalleryNodeQuery) AllX ¶
func (_q *GalleryNodeQuery) AllX(ctx context.Context) []*GalleryNode
AllX is like All, but panics if an error occurs.
func (*GalleryNodeQuery) Clone ¶
func (_q *GalleryNodeQuery) Clone() *GalleryNodeQuery
Clone returns a duplicate of the GalleryNodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GalleryNodeQuery) Count ¶
func (_q *GalleryNodeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GalleryNodeQuery) CountX ¶
func (_q *GalleryNodeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GalleryNodeQuery) Exist ¶
func (_q *GalleryNodeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GalleryNodeQuery) ExistX ¶
func (_q *GalleryNodeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GalleryNodeQuery) First ¶
func (_q *GalleryNodeQuery) First(ctx context.Context) (*GalleryNode, error)
First returns the first GalleryNode entity from the query. Returns a *NotFoundError when no GalleryNode was found.
func (*GalleryNodeQuery) FirstID ¶
func (_q *GalleryNodeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first GalleryNode ID from the query. Returns a *NotFoundError when no GalleryNode ID was found.
func (*GalleryNodeQuery) FirstIDX ¶
func (_q *GalleryNodeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GalleryNodeQuery) FirstX ¶
func (_q *GalleryNodeQuery) FirstX(ctx context.Context) *GalleryNode
FirstX is like First, but panics if an error occurs.
func (*GalleryNodeQuery) GroupBy ¶
func (_q *GalleryNodeQuery) GroupBy(field string, fields ...string) *GalleryNodeGroupBy
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 {
Nid int `json:"nid,omitempty"`
Count int `json:"count,omitempty"`
}
client.GalleryNode.Query().
GroupBy(gallerynode.FieldNid).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*GalleryNodeQuery) IDs ¶
func (_q *GalleryNodeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of GalleryNode IDs.
func (*GalleryNodeQuery) IDsX ¶
func (_q *GalleryNodeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GalleryNodeQuery) Limit ¶
func (_q *GalleryNodeQuery) Limit(limit int) *GalleryNodeQuery
Limit the number of records to be returned by this query.
func (*GalleryNodeQuery) Offset ¶
func (_q *GalleryNodeQuery) Offset(offset int) *GalleryNodeQuery
Offset to start from.
func (*GalleryNodeQuery) Only ¶
func (_q *GalleryNodeQuery) Only(ctx context.Context) (*GalleryNode, error)
Only returns a single GalleryNode entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one GalleryNode entity is found. Returns a *NotFoundError when no GalleryNode entities are found.
func (*GalleryNodeQuery) OnlyID ¶
func (_q *GalleryNodeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only GalleryNode ID in the query. Returns a *NotSingularError when more than one GalleryNode ID is found. Returns a *NotFoundError when no entities are found.
func (*GalleryNodeQuery) OnlyIDX ¶
func (_q *GalleryNodeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GalleryNodeQuery) OnlyX ¶
func (_q *GalleryNodeQuery) OnlyX(ctx context.Context) *GalleryNode
OnlyX is like Only, but panics if an error occurs.
func (*GalleryNodeQuery) Order ¶
func (_q *GalleryNodeQuery) Order(o ...gallerynode.OrderOption) *GalleryNodeQuery
Order specifies how the records should be ordered.
func (*GalleryNodeQuery) QueryNode ¶
func (_q *GalleryNodeQuery) QueryNode() *NodeQuery
QueryNode chains the current query on the "node" edge.
func (*GalleryNodeQuery) Select ¶
func (_q *GalleryNodeQuery) Select(fields ...string) *GalleryNodeSelect
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 {
Nid int `json:"nid,omitempty"`
}
client.GalleryNode.Query().
Select(gallerynode.FieldNid).
Scan(ctx, &v)
func (*GalleryNodeQuery) Unique ¶
func (_q *GalleryNodeQuery) Unique(unique bool) *GalleryNodeQuery
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 (*GalleryNodeQuery) Where ¶
func (_q *GalleryNodeQuery) Where(ps ...predicate.GalleryNode) *GalleryNodeQuery
Where adds a new predicate for the GalleryNodeQuery builder.
func (*GalleryNodeQuery) WithNode ¶
func (_q *GalleryNodeQuery) WithNode(opts ...func(*NodeQuery)) *GalleryNodeQuery
WithNode tells the query-builder to eager-load the nodes that are connected to the "node" edge. The optional arguments are used to configure the query builder of the edge.
type GalleryNodeSelect ¶
type GalleryNodeSelect struct {
*GalleryNodeQuery
// contains filtered or unexported fields
}
GalleryNodeSelect is the builder for selecting fields of GalleryNode entities.
func (*GalleryNodeSelect) Aggregate ¶
func (_s *GalleryNodeSelect) Aggregate(fns ...AggregateFunc) *GalleryNodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*GalleryNodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GalleryNodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GalleryNodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GalleryNodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GalleryNodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GalleryNodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GalleryNodeSelect) Scan ¶
func (_s *GalleryNodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GalleryNodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GalleryNodeUpdate ¶
type GalleryNodeUpdate struct {
// contains filtered or unexported fields
}
GalleryNodeUpdate is the builder for updating GalleryNode entities.
func (*GalleryNodeUpdate) ClearNode ¶
func (_u *GalleryNodeUpdate) ClearNode() *GalleryNodeUpdate
ClearNode clears the "node" edge to the Node entity.
func (*GalleryNodeUpdate) Exec ¶
func (_u *GalleryNodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryNodeUpdate) ExecX ¶
func (_u *GalleryNodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryNodeUpdate) Mutation ¶
func (_u *GalleryNodeUpdate) Mutation() *GalleryNodeMutation
Mutation returns the GalleryNodeMutation object of the builder.
func (*GalleryNodeUpdate) Save ¶
func (_u *GalleryNodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GalleryNodeUpdate) SaveX ¶
func (_u *GalleryNodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GalleryNodeUpdate) SetNid ¶
func (_u *GalleryNodeUpdate) SetNid(v int) *GalleryNodeUpdate
SetNid sets the "nid" field.
func (*GalleryNodeUpdate) SetNillableNid ¶
func (_u *GalleryNodeUpdate) SetNillableNid(v *int) *GalleryNodeUpdate
SetNillableNid sets the "nid" field if the given value is not nil.
func (*GalleryNodeUpdate) SetNode ¶
func (_u *GalleryNodeUpdate) SetNode(v *Node) *GalleryNodeUpdate
SetNode sets the "node" edge to the Node entity.
func (*GalleryNodeUpdate) SetNodeID ¶
func (_u *GalleryNodeUpdate) SetNodeID(id int) *GalleryNodeUpdate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*GalleryNodeUpdate) Where ¶
func (_u *GalleryNodeUpdate) Where(ps ...predicate.GalleryNode) *GalleryNodeUpdate
Where appends a list predicates to the GalleryNodeUpdate builder.
type GalleryNodeUpdateOne ¶
type GalleryNodeUpdateOne struct {
// contains filtered or unexported fields
}
GalleryNodeUpdateOne is the builder for updating a single GalleryNode entity.
func (*GalleryNodeUpdateOne) ClearNode ¶
func (_u *GalleryNodeUpdateOne) ClearNode() *GalleryNodeUpdateOne
ClearNode clears the "node" edge to the Node entity.
func (*GalleryNodeUpdateOne) Exec ¶
func (_u *GalleryNodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GalleryNodeUpdateOne) ExecX ¶
func (_u *GalleryNodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryNodeUpdateOne) Mutation ¶
func (_u *GalleryNodeUpdateOne) Mutation() *GalleryNodeMutation
Mutation returns the GalleryNodeMutation object of the builder.
func (*GalleryNodeUpdateOne) Save ¶
func (_u *GalleryNodeUpdateOne) Save(ctx context.Context) (*GalleryNode, error)
Save executes the query and returns the updated GalleryNode entity.
func (*GalleryNodeUpdateOne) SaveX ¶
func (_u *GalleryNodeUpdateOne) SaveX(ctx context.Context) *GalleryNode
SaveX is like Save, but panics if an error occurs.
func (*GalleryNodeUpdateOne) Select ¶
func (_u *GalleryNodeUpdateOne) Select(field string, fields ...string) *GalleryNodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GalleryNodeUpdateOne) SetNid ¶
func (_u *GalleryNodeUpdateOne) SetNid(v int) *GalleryNodeUpdateOne
SetNid sets the "nid" field.
func (*GalleryNodeUpdateOne) SetNillableNid ¶
func (_u *GalleryNodeUpdateOne) SetNillableNid(v *int) *GalleryNodeUpdateOne
SetNillableNid sets the "nid" field if the given value is not nil.
func (*GalleryNodeUpdateOne) SetNode ¶
func (_u *GalleryNodeUpdateOne) SetNode(v *Node) *GalleryNodeUpdateOne
SetNode sets the "node" edge to the Node entity.
func (*GalleryNodeUpdateOne) SetNodeID ¶
func (_u *GalleryNodeUpdateOne) SetNodeID(id int) *GalleryNodeUpdateOne
SetNodeID sets the "node" edge to the Node entity by ID.
func (*GalleryNodeUpdateOne) Where ¶
func (_u *GalleryNodeUpdateOne) Where(ps ...predicate.GalleryNode) *GalleryNodeUpdateOne
Where appends a list predicates to the GalleryNodeUpdate builder.
type GalleryNodes ¶
type GalleryNodes []*GalleryNode
GalleryNodes is a parsable slice of GalleryNode.
type GalleryQuery ¶
type GalleryQuery struct {
// contains filtered or unexported fields
}
GalleryQuery is the builder for querying Gallery entities.
func (*GalleryQuery) Aggregate ¶
func (_q *GalleryQuery) Aggregate(fns ...AggregateFunc) *GallerySelect
Aggregate returns a GallerySelect configured with the given aggregations.
func (*GalleryQuery) All ¶
func (_q *GalleryQuery) All(ctx context.Context) ([]*Gallery, error)
All executes the query and returns a list of Galleries.
func (*GalleryQuery) AllX ¶
func (_q *GalleryQuery) AllX(ctx context.Context) []*Gallery
AllX is like All, but panics if an error occurs.
func (*GalleryQuery) Clone ¶
func (_q *GalleryQuery) Clone() *GalleryQuery
Clone returns a duplicate of the GalleryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*GalleryQuery) Count ¶
func (_q *GalleryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*GalleryQuery) CountX ¶
func (_q *GalleryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*GalleryQuery) Exist ¶
func (_q *GalleryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*GalleryQuery) ExistX ¶
func (_q *GalleryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*GalleryQuery) First ¶
func (_q *GalleryQuery) First(ctx context.Context) (*Gallery, error)
First returns the first Gallery entity from the query. Returns a *NotFoundError when no Gallery was found.
func (*GalleryQuery) FirstID ¶
func (_q *GalleryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Gallery ID from the query. Returns a *NotFoundError when no Gallery ID was found.
func (*GalleryQuery) FirstIDX ¶
func (_q *GalleryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*GalleryQuery) FirstX ¶
func (_q *GalleryQuery) FirstX(ctx context.Context) *Gallery
FirstX is like First, but panics if an error occurs.
func (*GalleryQuery) GroupBy ¶
func (_q *GalleryQuery) GroupBy(field string, fields ...string) *GalleryGroupBy
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 {
Nid int `json:"nid,omitempty"`
Count int `json:"count,omitempty"`
}
client.Gallery.Query().
GroupBy(gallery.FieldNid).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*GalleryQuery) IDs ¶
func (_q *GalleryQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Gallery IDs.
func (*GalleryQuery) IDsX ¶
func (_q *GalleryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*GalleryQuery) Limit ¶
func (_q *GalleryQuery) Limit(limit int) *GalleryQuery
Limit the number of records to be returned by this query.
func (*GalleryQuery) Offset ¶
func (_q *GalleryQuery) Offset(offset int) *GalleryQuery
Offset to start from.
func (*GalleryQuery) Only ¶
func (_q *GalleryQuery) Only(ctx context.Context) (*Gallery, error)
Only returns a single Gallery entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Gallery entity is found. Returns a *NotFoundError when no Gallery entities are found.
func (*GalleryQuery) OnlyID ¶
func (_q *GalleryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Gallery ID in the query. Returns a *NotSingularError when more than one Gallery ID is found. Returns a *NotFoundError when no entities are found.
func (*GalleryQuery) OnlyIDX ¶
func (_q *GalleryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*GalleryQuery) OnlyX ¶
func (_q *GalleryQuery) OnlyX(ctx context.Context) *Gallery
OnlyX is like Only, but panics if an error occurs.
func (*GalleryQuery) Order ¶
func (_q *GalleryQuery) Order(o ...gallery.OrderOption) *GalleryQuery
Order specifies how the records should be ordered.
func (*GalleryQuery) QueryItems ¶
func (_q *GalleryQuery) QueryItems() *GalleryItemQuery
QueryItems chains the current query on the "items" edge.
func (*GalleryQuery) QueryNode ¶
func (_q *GalleryQuery) QueryNode() *NodeQuery
QueryNode chains the current query on the "node" edge.
func (*GalleryQuery) Select ¶
func (_q *GalleryQuery) Select(fields ...string) *GallerySelect
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 {
Nid int `json:"nid,omitempty"`
}
client.Gallery.Query().
Select(gallery.FieldNid).
Scan(ctx, &v)
func (*GalleryQuery) Unique ¶
func (_q *GalleryQuery) Unique(unique bool) *GalleryQuery
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 (*GalleryQuery) Where ¶
func (_q *GalleryQuery) Where(ps ...predicate.Gallery) *GalleryQuery
Where adds a new predicate for the GalleryQuery builder.
func (*GalleryQuery) WithItems ¶
func (_q *GalleryQuery) WithItems(opts ...func(*GalleryItemQuery)) *GalleryQuery
WithItems tells the query-builder to eager-load the nodes that are connected to the "items" edge. The optional arguments are used to configure the query builder of the edge.
func (*GalleryQuery) WithNode ¶
func (_q *GalleryQuery) WithNode(opts ...func(*NodeQuery)) *GalleryQuery
WithNode tells the query-builder to eager-load the nodes that are connected to the "node" edge. The optional arguments are used to configure the query builder of the edge.
type GallerySelect ¶
type GallerySelect struct {
*GalleryQuery
// contains filtered or unexported fields
}
GallerySelect is the builder for selecting fields of Gallery entities.
func (*GallerySelect) Aggregate ¶
func (_s *GallerySelect) Aggregate(fns ...AggregateFunc) *GallerySelect
Aggregate adds the given aggregation functions to the selector query.
func (*GallerySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*GallerySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*GallerySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*GallerySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*GallerySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*GallerySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*GallerySelect) Scan ¶
func (_s *GallerySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*GallerySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type GalleryUpdate ¶
type GalleryUpdate struct {
// contains filtered or unexported fields
}
GalleryUpdate is the builder for updating Gallery entities.
func (*GalleryUpdate) AddItemIDs ¶
func (_u *GalleryUpdate) AddItemIDs(ids ...int) *GalleryUpdate
AddItemIDs adds the "items" edge to the GalleryItem entity by IDs.
func (*GalleryUpdate) AddItems ¶
func (_u *GalleryUpdate) AddItems(v ...*GalleryItem) *GalleryUpdate
AddItems adds the "items" edges to the GalleryItem entity.
func (*GalleryUpdate) AddWeight ¶
func (_u *GalleryUpdate) AddWeight(v int) *GalleryUpdate
AddWeight adds value to the "weight" field.
func (*GalleryUpdate) ClearDescription ¶
func (_u *GalleryUpdate) ClearDescription() *GalleryUpdate
ClearDescription clears the value of the "description" field.
func (*GalleryUpdate) ClearItems ¶
func (_u *GalleryUpdate) ClearItems() *GalleryUpdate
ClearItems clears all "items" edges to the GalleryItem entity.
func (*GalleryUpdate) ClearNode ¶
func (_u *GalleryUpdate) ClearNode() *GalleryUpdate
ClearNode clears the "node" edge to the Node entity.
func (*GalleryUpdate) ClearStatus ¶
func (_u *GalleryUpdate) ClearStatus() *GalleryUpdate
ClearStatus clears the value of the "status" field.
func (*GalleryUpdate) ClearTitle ¶
func (_u *GalleryUpdate) ClearTitle() *GalleryUpdate
ClearTitle clears the value of the "title" field.
func (*GalleryUpdate) ClearWeight ¶
func (_u *GalleryUpdate) ClearWeight() *GalleryUpdate
ClearWeight clears the value of the "weight" field.
func (*GalleryUpdate) Exec ¶
func (_u *GalleryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*GalleryUpdate) ExecX ¶
func (_u *GalleryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryUpdate) Mutation ¶
func (_u *GalleryUpdate) Mutation() *GalleryMutation
Mutation returns the GalleryMutation object of the builder.
func (*GalleryUpdate) RemoveItemIDs ¶
func (_u *GalleryUpdate) RemoveItemIDs(ids ...int) *GalleryUpdate
RemoveItemIDs removes the "items" edge to GalleryItem entities by IDs.
func (*GalleryUpdate) RemoveItems ¶
func (_u *GalleryUpdate) RemoveItems(v ...*GalleryItem) *GalleryUpdate
RemoveItems removes "items" edges to GalleryItem entities.
func (*GalleryUpdate) Save ¶
func (_u *GalleryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*GalleryUpdate) SaveX ¶
func (_u *GalleryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*GalleryUpdate) SetDescription ¶
func (_u *GalleryUpdate) SetDescription(v string) *GalleryUpdate
SetDescription sets the "description" field.
func (*GalleryUpdate) SetNid ¶
func (_u *GalleryUpdate) SetNid(v int) *GalleryUpdate
SetNid sets the "nid" field.
func (*GalleryUpdate) SetNillableDescription ¶
func (_u *GalleryUpdate) SetNillableDescription(v *string) *GalleryUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*GalleryUpdate) SetNillableNid ¶
func (_u *GalleryUpdate) SetNillableNid(v *int) *GalleryUpdate
SetNillableNid sets the "nid" field if the given value is not nil.
func (*GalleryUpdate) SetNillablePreviewMediumStyle ¶
func (_u *GalleryUpdate) SetNillablePreviewMediumStyle(v *string) *GalleryUpdate
SetNillablePreviewMediumStyle sets the "preview_medium_style" field if the given value is not nil.
func (*GalleryUpdate) SetNillablePreviewSmallStyle ¶
func (_u *GalleryUpdate) SetNillablePreviewSmallStyle(v *string) *GalleryUpdate
SetNillablePreviewSmallStyle sets the "preview_small_style" field if the given value is not nil.
func (*GalleryUpdate) SetNillableStatus ¶
func (_u *GalleryUpdate) SetNillableStatus(v *bool) *GalleryUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*GalleryUpdate) SetNillableTitle ¶
func (_u *GalleryUpdate) SetNillableTitle(v *string) *GalleryUpdate
SetNillableTitle sets the "title" field if the given value is not nil.
func (*GalleryUpdate) SetNillableWeight ¶
func (_u *GalleryUpdate) SetNillableWeight(v *int) *GalleryUpdate
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*GalleryUpdate) SetNode ¶
func (_u *GalleryUpdate) SetNode(v *Node) *GalleryUpdate
SetNode sets the "node" edge to the Node entity.
func (*GalleryUpdate) SetNodeID ¶
func (_u *GalleryUpdate) SetNodeID(id int) *GalleryUpdate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*GalleryUpdate) SetPreviewMediumStyle ¶
func (_u *GalleryUpdate) SetPreviewMediumStyle(v string) *GalleryUpdate
SetPreviewMediumStyle sets the "preview_medium_style" field.
func (*GalleryUpdate) SetPreviewSmallStyle ¶
func (_u *GalleryUpdate) SetPreviewSmallStyle(v string) *GalleryUpdate
SetPreviewSmallStyle sets the "preview_small_style" field.
func (*GalleryUpdate) SetStatus ¶
func (_u *GalleryUpdate) SetStatus(v bool) *GalleryUpdate
SetStatus sets the "status" field.
func (*GalleryUpdate) SetTitle ¶
func (_u *GalleryUpdate) SetTitle(v string) *GalleryUpdate
SetTitle sets the "title" field.
func (*GalleryUpdate) SetUpdatedAt ¶
func (_u *GalleryUpdate) SetUpdatedAt(v time.Time) *GalleryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*GalleryUpdate) SetWeight ¶
func (_u *GalleryUpdate) SetWeight(v int) *GalleryUpdate
SetWeight sets the "weight" field.
func (*GalleryUpdate) Where ¶
func (_u *GalleryUpdate) Where(ps ...predicate.Gallery) *GalleryUpdate
Where appends a list predicates to the GalleryUpdate builder.
type GalleryUpdateOne ¶
type GalleryUpdateOne struct {
// contains filtered or unexported fields
}
GalleryUpdateOne is the builder for updating a single Gallery entity.
func (*GalleryUpdateOne) AddItemIDs ¶
func (_u *GalleryUpdateOne) AddItemIDs(ids ...int) *GalleryUpdateOne
AddItemIDs adds the "items" edge to the GalleryItem entity by IDs.
func (*GalleryUpdateOne) AddItems ¶
func (_u *GalleryUpdateOne) AddItems(v ...*GalleryItem) *GalleryUpdateOne
AddItems adds the "items" edges to the GalleryItem entity.
func (*GalleryUpdateOne) AddWeight ¶
func (_u *GalleryUpdateOne) AddWeight(v int) *GalleryUpdateOne
AddWeight adds value to the "weight" field.
func (*GalleryUpdateOne) ClearDescription ¶
func (_u *GalleryUpdateOne) ClearDescription() *GalleryUpdateOne
ClearDescription clears the value of the "description" field.
func (*GalleryUpdateOne) ClearItems ¶
func (_u *GalleryUpdateOne) ClearItems() *GalleryUpdateOne
ClearItems clears all "items" edges to the GalleryItem entity.
func (*GalleryUpdateOne) ClearNode ¶
func (_u *GalleryUpdateOne) ClearNode() *GalleryUpdateOne
ClearNode clears the "node" edge to the Node entity.
func (*GalleryUpdateOne) ClearStatus ¶
func (_u *GalleryUpdateOne) ClearStatus() *GalleryUpdateOne
ClearStatus clears the value of the "status" field.
func (*GalleryUpdateOne) ClearTitle ¶
func (_u *GalleryUpdateOne) ClearTitle() *GalleryUpdateOne
ClearTitle clears the value of the "title" field.
func (*GalleryUpdateOne) ClearWeight ¶
func (_u *GalleryUpdateOne) ClearWeight() *GalleryUpdateOne
ClearWeight clears the value of the "weight" field.
func (*GalleryUpdateOne) Exec ¶
func (_u *GalleryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*GalleryUpdateOne) ExecX ¶
func (_u *GalleryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*GalleryUpdateOne) Mutation ¶
func (_u *GalleryUpdateOne) Mutation() *GalleryMutation
Mutation returns the GalleryMutation object of the builder.
func (*GalleryUpdateOne) RemoveItemIDs ¶
func (_u *GalleryUpdateOne) RemoveItemIDs(ids ...int) *GalleryUpdateOne
RemoveItemIDs removes the "items" edge to GalleryItem entities by IDs.
func (*GalleryUpdateOne) RemoveItems ¶
func (_u *GalleryUpdateOne) RemoveItems(v ...*GalleryItem) *GalleryUpdateOne
RemoveItems removes "items" edges to GalleryItem entities.
func (*GalleryUpdateOne) Save ¶
func (_u *GalleryUpdateOne) Save(ctx context.Context) (*Gallery, error)
Save executes the query and returns the updated Gallery entity.
func (*GalleryUpdateOne) SaveX ¶
func (_u *GalleryUpdateOne) SaveX(ctx context.Context) *Gallery
SaveX is like Save, but panics if an error occurs.
func (*GalleryUpdateOne) Select ¶
func (_u *GalleryUpdateOne) Select(field string, fields ...string) *GalleryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*GalleryUpdateOne) SetDescription ¶
func (_u *GalleryUpdateOne) SetDescription(v string) *GalleryUpdateOne
SetDescription sets the "description" field.
func (*GalleryUpdateOne) SetNid ¶
func (_u *GalleryUpdateOne) SetNid(v int) *GalleryUpdateOne
SetNid sets the "nid" field.
func (*GalleryUpdateOne) SetNillableDescription ¶
func (_u *GalleryUpdateOne) SetNillableDescription(v *string) *GalleryUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*GalleryUpdateOne) SetNillableNid ¶
func (_u *GalleryUpdateOne) SetNillableNid(v *int) *GalleryUpdateOne
SetNillableNid sets the "nid" field if the given value is not nil.
func (*GalleryUpdateOne) SetNillablePreviewMediumStyle ¶
func (_u *GalleryUpdateOne) SetNillablePreviewMediumStyle(v *string) *GalleryUpdateOne
SetNillablePreviewMediumStyle sets the "preview_medium_style" field if the given value is not nil.
func (*GalleryUpdateOne) SetNillablePreviewSmallStyle ¶
func (_u *GalleryUpdateOne) SetNillablePreviewSmallStyle(v *string) *GalleryUpdateOne
SetNillablePreviewSmallStyle sets the "preview_small_style" field if the given value is not nil.
func (*GalleryUpdateOne) SetNillableStatus ¶
func (_u *GalleryUpdateOne) SetNillableStatus(v *bool) *GalleryUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*GalleryUpdateOne) SetNillableTitle ¶
func (_u *GalleryUpdateOne) SetNillableTitle(v *string) *GalleryUpdateOne
SetNillableTitle sets the "title" field if the given value is not nil.
func (*GalleryUpdateOne) SetNillableWeight ¶
func (_u *GalleryUpdateOne) SetNillableWeight(v *int) *GalleryUpdateOne
SetNillableWeight sets the "weight" field if the given value is not nil.
func (*GalleryUpdateOne) SetNode ¶
func (_u *GalleryUpdateOne) SetNode(v *Node) *GalleryUpdateOne
SetNode sets the "node" edge to the Node entity.
func (*GalleryUpdateOne) SetNodeID ¶
func (_u *GalleryUpdateOne) SetNodeID(id int) *GalleryUpdateOne
SetNodeID sets the "node" edge to the Node entity by ID.
func (*GalleryUpdateOne) SetPreviewMediumStyle ¶
func (_u *GalleryUpdateOne) SetPreviewMediumStyle(v string) *GalleryUpdateOne
SetPreviewMediumStyle sets the "preview_medium_style" field.
func (*GalleryUpdateOne) SetPreviewSmallStyle ¶
func (_u *GalleryUpdateOne) SetPreviewSmallStyle(v string) *GalleryUpdateOne
SetPreviewSmallStyle sets the "preview_small_style" field.
func (*GalleryUpdateOne) SetStatus ¶
func (_u *GalleryUpdateOne) SetStatus(v bool) *GalleryUpdateOne
SetStatus sets the "status" field.
func (*GalleryUpdateOne) SetTitle ¶
func (_u *GalleryUpdateOne) SetTitle(v string) *GalleryUpdateOne
SetTitle sets the "title" field.
func (*GalleryUpdateOne) SetUpdatedAt ¶
func (_u *GalleryUpdateOne) SetUpdatedAt(v time.Time) *GalleryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*GalleryUpdateOne) SetWeight ¶
func (_u *GalleryUpdateOne) SetWeight(v int) *GalleryUpdateOne
SetWeight sets the "weight" field.
func (*GalleryUpdateOne) Where ¶
func (_u *GalleryUpdateOne) Where(ps ...predicate.Gallery) *GalleryUpdateOne
Where appends a list predicates to the GalleryUpdate builder.
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 Node ¶
type Node struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// contains filtered or unexported fields
}
Node is the model entity for the Node schema.
func (*Node) Unwrap ¶
Unwrap unwraps the Node 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 (*Node) Update ¶
func (_m *Node) Update() *NodeUpdateOne
Update returns a builder for updating this Node. Note that you need to call Node.Unwrap() before calling this method if this Node was returned from a transaction, and the transaction was committed or rolled back.
type NodeClient ¶
type NodeClient struct {
// contains filtered or unexported fields
}
NodeClient is a client for the Node schema.
func NewNodeClient ¶
func NewNodeClient(c config) *NodeClient
NewNodeClient returns a client for the Node from the given config.
func (*NodeClient) Create ¶
func (c *NodeClient) Create() *NodeCreate
Create returns a builder for creating a Node entity.
func (*NodeClient) CreateBulk ¶
func (c *NodeClient) CreateBulk(builders ...*NodeCreate) *NodeCreateBulk
CreateBulk returns a builder for creating a bulk of Node entities.
func (*NodeClient) Delete ¶
func (c *NodeClient) Delete() *NodeDelete
Delete returns a delete builder for Node.
func (*NodeClient) DeleteOne ¶
func (c *NodeClient) DeleteOne(_m *Node) *NodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NodeClient) DeleteOneID ¶
func (c *NodeClient) DeleteOneID(id int) *NodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NodeClient) GetX ¶
func (c *NodeClient) GetX(ctx context.Context, id int) *Node
GetX is like Get, but panics if an error occurs.
func (*NodeClient) Intercept ¶
func (c *NodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `node.Intercept(f(g(h())))`.
func (*NodeClient) Interceptors ¶
func (c *NodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NodeClient) MapCreateBulk ¶
func (c *NodeClient) MapCreateBulk(slice any, setFunc func(*NodeCreate, int)) *NodeCreateBulk
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 (*NodeClient) Query ¶
func (c *NodeClient) Query() *NodeQuery
Query returns a query builder for Node.
func (*NodeClient) Update ¶
func (c *NodeClient) Update() *NodeUpdate
Update returns an update builder for Node.
func (*NodeClient) UpdateOne ¶
func (c *NodeClient) UpdateOne(_m *Node) *NodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NodeClient) UpdateOneID ¶
func (c *NodeClient) UpdateOneID(id int) *NodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NodeClient) Use ¶
func (c *NodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `node.Hooks(f(g(h())))`.
type NodeCreate ¶
type NodeCreate struct {
// contains filtered or unexported fields
}
NodeCreate is the builder for creating a Node entity.
func (*NodeCreate) Exec ¶
func (_c *NodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeCreate) ExecX ¶
func (_c *NodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeCreate) Mutation ¶
func (_c *NodeCreate) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeCreate) Save ¶
func (_c *NodeCreate) Save(ctx context.Context) (*Node, error)
Save creates the Node in the database.
func (*NodeCreate) SaveX ¶
func (_c *NodeCreate) SaveX(ctx context.Context) *Node
SaveX calls Save and panics if Save returns an error.
func (*NodeCreate) SetID ¶
func (_c *NodeCreate) SetID(v int) *NodeCreate
SetID sets the "id" field.
type NodeCreateBulk ¶
type NodeCreateBulk struct {
// contains filtered or unexported fields
}
NodeCreateBulk is the builder for creating many Node entities in bulk.
func (*NodeCreateBulk) Exec ¶
func (_c *NodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeCreateBulk) ExecX ¶
func (_c *NodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NodeDelete ¶
type NodeDelete struct {
// contains filtered or unexported fields
}
NodeDelete is the builder for deleting a Node entity.
func (*NodeDelete) Exec ¶
func (_d *NodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NodeDelete) ExecX ¶
func (_d *NodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NodeDelete) Where ¶
func (_d *NodeDelete) Where(ps ...predicate.Node) *NodeDelete
Where appends a list predicates to the NodeDelete builder.
type NodeDeleteOne ¶
type NodeDeleteOne struct {
// contains filtered or unexported fields
}
NodeDeleteOne is the builder for deleting a single Node entity.
func (*NodeDeleteOne) Exec ¶
func (_d *NodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NodeDeleteOne) ExecX ¶
func (_d *NodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeDeleteOne) Where ¶
func (_d *NodeDeleteOne) Where(ps ...predicate.Node) *NodeDeleteOne
Where appends a list predicates to the NodeDelete builder.
type NodeGroupBy ¶
type NodeGroupBy struct {
// contains filtered or unexported fields
}
NodeGroupBy is the group-by builder for Node entities.
func (*NodeGroupBy) Aggregate ¶
func (_g *NodeGroupBy) Aggregate(fns ...AggregateFunc) *NodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Scan ¶
func (_g *NodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeMutation ¶
type NodeMutation struct {
// contains filtered or unexported fields
}
NodeMutation represents an operation that mutates the Node nodes in the graph.
func (*NodeMutation) AddField ¶
func (m *NodeMutation) 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 (*NodeMutation) AddedEdges ¶
func (m *NodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NodeMutation) AddedField ¶
func (m *NodeMutation) 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 (*NodeMutation) AddedFields ¶
func (m *NodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NodeMutation) AddedIDs ¶
func (m *NodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NodeMutation) ClearEdge ¶
func (m *NodeMutation) 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 (*NodeMutation) ClearField ¶
func (m *NodeMutation) 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 (*NodeMutation) ClearedEdges ¶
func (m *NodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NodeMutation) ClearedFields ¶
func (m *NodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NodeMutation) Client ¶
func (m NodeMutation) 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 (*NodeMutation) EdgeCleared ¶
func (m *NodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NodeMutation) Field ¶
func (m *NodeMutation) 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 (*NodeMutation) FieldCleared ¶
func (m *NodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NodeMutation) Fields ¶
func (m *NodeMutation) 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 (*NodeMutation) ID ¶
func (m *NodeMutation) 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 (*NodeMutation) IDs ¶
func (m *NodeMutation) 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 (*NodeMutation) 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 (*NodeMutation) RemovedEdges ¶
func (m *NodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NodeMutation) RemovedIDs ¶
func (m *NodeMutation) 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 (*NodeMutation) ResetEdge ¶
func (m *NodeMutation) 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 (*NodeMutation) ResetField ¶
func (m *NodeMutation) 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 (*NodeMutation) SetField ¶
func (m *NodeMutation) 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 (*NodeMutation) SetID ¶
func (m *NodeMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Node entities.
func (*NodeMutation) SetOp ¶
func (m *NodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (NodeMutation) Tx ¶
func (m NodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NodeMutation) Type ¶
func (m *NodeMutation) Type() string
Type returns the node type of this mutation (Node).
func (*NodeMutation) Where ¶
func (m *NodeMutation) Where(ps ...predicate.Node)
Where appends a list predicates to the NodeMutation builder.
func (*NodeMutation) WhereP ¶
func (m *NodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NodeQuery ¶
type NodeQuery struct {
// contains filtered or unexported fields
}
NodeQuery is the builder for querying Node entities.
func (*NodeQuery) Aggregate ¶
func (_q *NodeQuery) Aggregate(fns ...AggregateFunc) *NodeSelect
Aggregate returns a NodeSelect configured with the given aggregations.
func (*NodeQuery) Clone ¶
Clone returns a duplicate of the NodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NodeQuery) First ¶
First returns the first Node entity from the query. Returns a *NotFoundError when no Node was found.
func (*NodeQuery) FirstID ¶
FirstID returns the first Node ID from the query. Returns a *NotFoundError when no Node ID was found.
func (*NodeQuery) GroupBy ¶
func (_q *NodeQuery) GroupBy(field string, fields ...string) *NodeGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
func (*NodeQuery) Only ¶
Only returns a single Node entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Node entity is found. Returns a *NotFoundError when no Node entities are found.
func (*NodeQuery) OnlyID ¶
OnlyID is like Only, but returns the only Node ID in the query. Returns a *NotSingularError when more than one Node ID is found. Returns a *NotFoundError when no entities are found.
func (*NodeQuery) Order ¶
func (_q *NodeQuery) Order(o ...node.OrderOption) *NodeQuery
Order specifies how the records should be ordered.
func (*NodeQuery) Select ¶
func (_q *NodeQuery) Select(fields ...string) *NodeSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
type NodeSelect ¶
type NodeSelect struct {
*NodeQuery
// contains filtered or unexported fields
}
NodeSelect is the builder for selecting fields of Node entities.
func (*NodeSelect) Aggregate ¶
func (_s *NodeSelect) Aggregate(fns ...AggregateFunc) *NodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Scan ¶
func (_s *NodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeUpdate ¶
type NodeUpdate struct {
// contains filtered or unexported fields
}
NodeUpdate is the builder for updating Node entities.
func (*NodeUpdate) Exec ¶
func (_u *NodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeUpdate) ExecX ¶
func (_u *NodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeUpdate) Mutation ¶
func (_u *NodeUpdate) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeUpdate) Save ¶
func (_u *NodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NodeUpdate) SaveX ¶
func (_u *NodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NodeUpdate) Where ¶
func (_u *NodeUpdate) Where(ps ...predicate.Node) *NodeUpdate
Where appends a list predicates to the NodeUpdate builder.
type NodeUpdateOne ¶
type NodeUpdateOne struct {
// contains filtered or unexported fields
}
NodeUpdateOne is the builder for updating a single Node entity.
func (*NodeUpdateOne) Exec ¶
func (_u *NodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NodeUpdateOne) ExecX ¶
func (_u *NodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeUpdateOne) Mutation ¶
func (_u *NodeUpdateOne) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeUpdateOne) Save ¶
func (_u *NodeUpdateOne) Save(ctx context.Context) (*Node, error)
Save executes the query and returns the updated Node entity.
func (*NodeUpdateOne) SaveX ¶
func (_u *NodeUpdateOne) SaveX(ctx context.Context) *Node
SaveX is like Save, but panics if an error occurs.
func (*NodeUpdateOne) Select ¶
func (_u *NodeUpdateOne) Select(field string, fields ...string) *NodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NodeUpdateOne) Where ¶
func (_u *NodeUpdateOne) Where(ps ...predicate.Node) *NodeUpdateOne
Where appends a list predicates to the NodeUpdate builder.
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.
func (*NotFoundError) Is ¶
func (e *NotFoundError) Is(target error) bool
Is makes errors.Is(err, schemakit.ErrEntityNotFound) true for ent's not-found errors, so the engine recognizes the module's missing record as it does the core's (its handlers answer 404).
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 TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// ContentTypeDef is the client for interacting with the ContentTypeDef builders.
ContentTypeDef *ContentTypeDefClient
// File is the client for interacting with the File builders.
File *FileClient
// Gallery is the client for interacting with the Gallery builders.
Gallery *GalleryClient
// GalleryContentType is the client for interacting with the GalleryContentType builders.
GalleryContentType *GalleryContentTypeClient
// GalleryItem is the client for interacting with the GalleryItem builders.
GalleryItem *GalleryItemClient
// GalleryNode is the client for interacting with the GalleryNode builders.
GalleryNode *GalleryNodeClient
// Node is the client for interacting with the Node builders.
Node *NodeClient
// contains filtered or unexported fields
}
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct {
Name string // Field or edge name.
// contains filtered or unexported fields
}
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- client.go
- contenttypedef.go
- contenttypedef_create.go
- contenttypedef_delete.go
- contenttypedef_query.go
- contenttypedef_update.go
- ent.go
- file.go
- file_create.go
- file_delete.go
- file_query.go
- file_update.go
- gallery.go
- gallery_create.go
- gallery_delete.go
- gallery_query.go
- gallery_update.go
- gallerycontenttype.go
- gallerycontenttype_create.go
- gallerycontenttype_delete.go
- gallerycontenttype_query.go
- gallerycontenttype_update.go
- galleryitem.go
- galleryitem_create.go
- galleryitem_delete.go
- galleryitem_query.go
- galleryitem_update.go
- gallerynode.go
- gallerynode_create.go
- gallerynode_delete.go
- gallerynode_query.go
- gallerynode_update.go
- mutation.go
- node.go
- node_create.go
- node_delete.go
- node_query.go
- node_update.go
- not_found_entity.go
- runtime.go
- tx.go