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 Hook
- type InterceptFunc
- type Interceptor
- type LanguageSettings
- type LanguageSettingsClient
- func (c *LanguageSettingsClient) Create() *LanguageSettingsCreate
- func (c *LanguageSettingsClient) CreateBulk(builders ...*LanguageSettingsCreate) *LanguageSettingsCreateBulk
- func (c *LanguageSettingsClient) Delete() *LanguageSettingsDelete
- func (c *LanguageSettingsClient) DeleteOne(_m *LanguageSettings) *LanguageSettingsDeleteOne
- func (c *LanguageSettingsClient) DeleteOneID(id int) *LanguageSettingsDeleteOne
- func (c *LanguageSettingsClient) Get(ctx context.Context, id int) (*LanguageSettings, error)
- func (c *LanguageSettingsClient) GetX(ctx context.Context, id int) *LanguageSettings
- func (c *LanguageSettingsClient) Hooks() []Hook
- func (c *LanguageSettingsClient) Intercept(interceptors ...Interceptor)
- func (c *LanguageSettingsClient) Interceptors() []Interceptor
- func (c *LanguageSettingsClient) MapCreateBulk(slice any, setFunc func(*LanguageSettingsCreate, int)) *LanguageSettingsCreateBulk
- func (c *LanguageSettingsClient) Query() *LanguageSettingsQuery
- func (c *LanguageSettingsClient) Update() *LanguageSettingsUpdate
- func (c *LanguageSettingsClient) UpdateOne(_m *LanguageSettings) *LanguageSettingsUpdateOne
- func (c *LanguageSettingsClient) UpdateOneID(id int) *LanguageSettingsUpdateOne
- func (c *LanguageSettingsClient) Use(hooks ...Hook)
- type LanguageSettingsCreate
- func (_c *LanguageSettingsCreate) Exec(ctx context.Context) error
- func (_c *LanguageSettingsCreate) ExecX(ctx context.Context)
- func (_c *LanguageSettingsCreate) Mutation() *LanguageSettingsMutation
- func (_c *LanguageSettingsCreate) Save(ctx context.Context) (*LanguageSettings, error)
- func (_c *LanguageSettingsCreate) SaveX(ctx context.Context) *LanguageSettings
- func (_c *LanguageSettingsCreate) SetID(v int) *LanguageSettingsCreate
- func (_c *LanguageSettingsCreate) SetNillableUntranslated(v *string) *LanguageSettingsCreate
- func (_c *LanguageSettingsCreate) SetTranslatableTypes(v []string) *LanguageSettingsCreate
- func (_c *LanguageSettingsCreate) SetUntranslated(v string) *LanguageSettingsCreate
- type LanguageSettingsCreateBulk
- func (_c *LanguageSettingsCreateBulk) Exec(ctx context.Context) error
- func (_c *LanguageSettingsCreateBulk) ExecX(ctx context.Context)
- func (_c *LanguageSettingsCreateBulk) Save(ctx context.Context) ([]*LanguageSettings, error)
- func (_c *LanguageSettingsCreateBulk) SaveX(ctx context.Context) []*LanguageSettings
- type LanguageSettingsDelete
- type LanguageSettingsDeleteOne
- type LanguageSettingsGroupBy
- func (_g *LanguageSettingsGroupBy) Aggregate(fns ...AggregateFunc) *LanguageSettingsGroupBy
- func (s *LanguageSettingsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LanguageSettingsGroupBy) BoolX(ctx context.Context) bool
- func (s *LanguageSettingsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LanguageSettingsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LanguageSettingsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LanguageSettingsGroupBy) Float64X(ctx context.Context) float64
- func (s *LanguageSettingsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LanguageSettingsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LanguageSettingsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LanguageSettingsGroupBy) IntX(ctx context.Context) int
- func (s *LanguageSettingsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LanguageSettingsGroupBy) IntsX(ctx context.Context) []int
- func (_g *LanguageSettingsGroupBy) Scan(ctx context.Context, v any) error
- func (s *LanguageSettingsGroupBy) ScanX(ctx context.Context, v any)
- func (s *LanguageSettingsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LanguageSettingsGroupBy) StringX(ctx context.Context) string
- func (s *LanguageSettingsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LanguageSettingsGroupBy) StringsX(ctx context.Context) []string
- type LanguageSettingsMutation
- func (m *LanguageSettingsMutation) AddField(name string, value ent.Value) error
- func (m *LanguageSettingsMutation) AddedEdges() []string
- func (m *LanguageSettingsMutation) AddedField(name string) (ent.Value, bool)
- func (m *LanguageSettingsMutation) AddedFields() []string
- func (m *LanguageSettingsMutation) AddedIDs(name string) []ent.Value
- func (m *LanguageSettingsMutation) AppendTranslatableTypes(s []string)
- func (m *LanguageSettingsMutation) AppendedTranslatableTypes() ([]string, bool)
- func (m *LanguageSettingsMutation) ClearEdge(name string) error
- func (m *LanguageSettingsMutation) ClearField(name string) error
- func (m *LanguageSettingsMutation) ClearTranslatableTypes()
- func (m *LanguageSettingsMutation) ClearedEdges() []string
- func (m *LanguageSettingsMutation) ClearedFields() []string
- func (m LanguageSettingsMutation) Client() *Client
- func (m *LanguageSettingsMutation) EdgeCleared(name string) bool
- func (m *LanguageSettingsMutation) Field(name string) (ent.Value, bool)
- func (m *LanguageSettingsMutation) FieldCleared(name string) bool
- func (m *LanguageSettingsMutation) Fields() []string
- func (m *LanguageSettingsMutation) ID() (id int, exists bool)
- func (m *LanguageSettingsMutation) IDs(ctx context.Context) ([]int, error)
- func (m *LanguageSettingsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LanguageSettingsMutation) OldTranslatableTypes(ctx context.Context) (v []string, err error)
- func (m *LanguageSettingsMutation) OldUntranslated(ctx context.Context) (v string, err error)
- func (m *LanguageSettingsMutation) Op() Op
- func (m *LanguageSettingsMutation) RemovedEdges() []string
- func (m *LanguageSettingsMutation) RemovedIDs(name string) []ent.Value
- func (m *LanguageSettingsMutation) ResetEdge(name string) error
- func (m *LanguageSettingsMutation) ResetField(name string) error
- func (m *LanguageSettingsMutation) ResetTranslatableTypes()
- func (m *LanguageSettingsMutation) ResetUntranslated()
- func (m *LanguageSettingsMutation) SetField(name string, value ent.Value) error
- func (m *LanguageSettingsMutation) SetID(id int)
- func (m *LanguageSettingsMutation) SetOp(op Op)
- func (m *LanguageSettingsMutation) SetTranslatableTypes(s []string)
- func (m *LanguageSettingsMutation) SetUntranslated(s string)
- func (m *LanguageSettingsMutation) TranslatableTypes() (r []string, exists bool)
- func (m *LanguageSettingsMutation) TranslatableTypesCleared() bool
- func (m LanguageSettingsMutation) Tx() (*Tx, error)
- func (m *LanguageSettingsMutation) Type() string
- func (m *LanguageSettingsMutation) Untranslated() (r string, exists bool)
- func (m *LanguageSettingsMutation) Where(ps ...predicate.LanguageSettings)
- func (m *LanguageSettingsMutation) WhereP(ps ...func(*sql.Selector))
- type LanguageSettingsQuery
- func (_q *LanguageSettingsQuery) Aggregate(fns ...AggregateFunc) *LanguageSettingsSelect
- func (_q *LanguageSettingsQuery) All(ctx context.Context) ([]*LanguageSettings, error)
- func (_q *LanguageSettingsQuery) AllX(ctx context.Context) []*LanguageSettings
- func (_q *LanguageSettingsQuery) Clone() *LanguageSettingsQuery
- func (_q *LanguageSettingsQuery) Count(ctx context.Context) (int, error)
- func (_q *LanguageSettingsQuery) CountX(ctx context.Context) int
- func (_q *LanguageSettingsQuery) Exist(ctx context.Context) (bool, error)
- func (_q *LanguageSettingsQuery) ExistX(ctx context.Context) bool
- func (_q *LanguageSettingsQuery) First(ctx context.Context) (*LanguageSettings, error)
- func (_q *LanguageSettingsQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *LanguageSettingsQuery) FirstIDX(ctx context.Context) int
- func (_q *LanguageSettingsQuery) FirstX(ctx context.Context) *LanguageSettings
- func (_q *LanguageSettingsQuery) GroupBy(field string, fields ...string) *LanguageSettingsGroupBy
- func (_q *LanguageSettingsQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *LanguageSettingsQuery) IDsX(ctx context.Context) []int
- func (_q *LanguageSettingsQuery) Limit(limit int) *LanguageSettingsQuery
- func (_q *LanguageSettingsQuery) Offset(offset int) *LanguageSettingsQuery
- func (_q *LanguageSettingsQuery) Only(ctx context.Context) (*LanguageSettings, error)
- func (_q *LanguageSettingsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *LanguageSettingsQuery) OnlyIDX(ctx context.Context) int
- func (_q *LanguageSettingsQuery) OnlyX(ctx context.Context) *LanguageSettings
- func (_q *LanguageSettingsQuery) Order(o ...languagesettings.OrderOption) *LanguageSettingsQuery
- func (_q *LanguageSettingsQuery) Select(fields ...string) *LanguageSettingsSelect
- func (_q *LanguageSettingsQuery) Unique(unique bool) *LanguageSettingsQuery
- func (_q *LanguageSettingsQuery) Where(ps ...predicate.LanguageSettings) *LanguageSettingsQuery
- type LanguageSettingsSelect
- func (_s *LanguageSettingsSelect) Aggregate(fns ...AggregateFunc) *LanguageSettingsSelect
- func (s *LanguageSettingsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LanguageSettingsSelect) BoolX(ctx context.Context) bool
- func (s *LanguageSettingsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LanguageSettingsSelect) BoolsX(ctx context.Context) []bool
- func (s *LanguageSettingsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LanguageSettingsSelect) Float64X(ctx context.Context) float64
- func (s *LanguageSettingsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LanguageSettingsSelect) Float64sX(ctx context.Context) []float64
- func (s *LanguageSettingsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *LanguageSettingsSelect) IntX(ctx context.Context) int
- func (s *LanguageSettingsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *LanguageSettingsSelect) IntsX(ctx context.Context) []int
- func (_s *LanguageSettingsSelect) Scan(ctx context.Context, v any) error
- func (s *LanguageSettingsSelect) ScanX(ctx context.Context, v any)
- func (s *LanguageSettingsSelect) String(ctx context.Context) (_ string, err error)
- func (s *LanguageSettingsSelect) StringX(ctx context.Context) string
- func (s *LanguageSettingsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *LanguageSettingsSelect) StringsX(ctx context.Context) []string
- type LanguageSettingsSlice
- type LanguageSettingsUpdate
- func (_u *LanguageSettingsUpdate) AppendTranslatableTypes(v []string) *LanguageSettingsUpdate
- func (_u *LanguageSettingsUpdate) ClearTranslatableTypes() *LanguageSettingsUpdate
- func (_u *LanguageSettingsUpdate) Exec(ctx context.Context) error
- func (_u *LanguageSettingsUpdate) ExecX(ctx context.Context)
- func (_u *LanguageSettingsUpdate) Mutation() *LanguageSettingsMutation
- func (_u *LanguageSettingsUpdate) Save(ctx context.Context) (int, error)
- func (_u *LanguageSettingsUpdate) SaveX(ctx context.Context) int
- func (_u *LanguageSettingsUpdate) SetNillableUntranslated(v *string) *LanguageSettingsUpdate
- func (_u *LanguageSettingsUpdate) SetTranslatableTypes(v []string) *LanguageSettingsUpdate
- func (_u *LanguageSettingsUpdate) SetUntranslated(v string) *LanguageSettingsUpdate
- func (_u *LanguageSettingsUpdate) Where(ps ...predicate.LanguageSettings) *LanguageSettingsUpdate
- type LanguageSettingsUpdateOne
- func (_u *LanguageSettingsUpdateOne) AppendTranslatableTypes(v []string) *LanguageSettingsUpdateOne
- func (_u *LanguageSettingsUpdateOne) ClearTranslatableTypes() *LanguageSettingsUpdateOne
- func (_u *LanguageSettingsUpdateOne) Exec(ctx context.Context) error
- func (_u *LanguageSettingsUpdateOne) ExecX(ctx context.Context)
- func (_u *LanguageSettingsUpdateOne) Mutation() *LanguageSettingsMutation
- func (_u *LanguageSettingsUpdateOne) Save(ctx context.Context) (*LanguageSettings, error)
- func (_u *LanguageSettingsUpdateOne) SaveX(ctx context.Context) *LanguageSettings
- func (_u *LanguageSettingsUpdateOne) Select(field string, fields ...string) *LanguageSettingsUpdateOne
- func (_u *LanguageSettingsUpdateOne) SetNillableUntranslated(v *string) *LanguageSettingsUpdateOne
- func (_u *LanguageSettingsUpdateOne) SetTranslatableTypes(v []string) *LanguageSettingsUpdateOne
- func (_u *LanguageSettingsUpdateOne) SetUntranslated(v string) *LanguageSettingsUpdateOne
- func (_u *LanguageSettingsUpdateOne) Where(ps ...predicate.LanguageSettings) *LanguageSettingsUpdateOne
- type LanguageVisibilities
- type LanguageVisibility
- type LanguageVisibilityClient
- func (c *LanguageVisibilityClient) Create() *LanguageVisibilityCreate
- func (c *LanguageVisibilityClient) CreateBulk(builders ...*LanguageVisibilityCreate) *LanguageVisibilityCreateBulk
- func (c *LanguageVisibilityClient) Delete() *LanguageVisibilityDelete
- func (c *LanguageVisibilityClient) DeleteOne(_m *LanguageVisibility) *LanguageVisibilityDeleteOne
- func (c *LanguageVisibilityClient) DeleteOneID(id int) *LanguageVisibilityDeleteOne
- func (c *LanguageVisibilityClient) Get(ctx context.Context, id int) (*LanguageVisibility, error)
- func (c *LanguageVisibilityClient) GetX(ctx context.Context, id int) *LanguageVisibility
- func (c *LanguageVisibilityClient) Hooks() []Hook
- func (c *LanguageVisibilityClient) Intercept(interceptors ...Interceptor)
- func (c *LanguageVisibilityClient) Interceptors() []Interceptor
- func (c *LanguageVisibilityClient) MapCreateBulk(slice any, setFunc func(*LanguageVisibilityCreate, int)) *LanguageVisibilityCreateBulk
- func (c *LanguageVisibilityClient) Query() *LanguageVisibilityQuery
- func (c *LanguageVisibilityClient) Update() *LanguageVisibilityUpdate
- func (c *LanguageVisibilityClient) UpdateOne(_m *LanguageVisibility) *LanguageVisibilityUpdateOne
- func (c *LanguageVisibilityClient) UpdateOneID(id int) *LanguageVisibilityUpdateOne
- func (c *LanguageVisibilityClient) Use(hooks ...Hook)
- type LanguageVisibilityCreate
- func (_c *LanguageVisibilityCreate) Exec(ctx context.Context) error
- func (_c *LanguageVisibilityCreate) ExecX(ctx context.Context)
- func (_c *LanguageVisibilityCreate) Mutation() *LanguageVisibilityMutation
- func (_c *LanguageVisibilityCreate) Save(ctx context.Context) (*LanguageVisibility, error)
- func (_c *LanguageVisibilityCreate) SaveX(ctx context.Context) *LanguageVisibility
- func (_c *LanguageVisibilityCreate) SetID(v int) *LanguageVisibilityCreate
- func (_c *LanguageVisibilityCreate) SetKind(v string) *LanguageVisibilityCreate
- func (_c *LanguageVisibilityCreate) SetLangs(v []string) *LanguageVisibilityCreate
- func (_c *LanguageVisibilityCreate) SetRef(v string) *LanguageVisibilityCreate
- type LanguageVisibilityCreateBulk
- func (_c *LanguageVisibilityCreateBulk) Exec(ctx context.Context) error
- func (_c *LanguageVisibilityCreateBulk) ExecX(ctx context.Context)
- func (_c *LanguageVisibilityCreateBulk) Save(ctx context.Context) ([]*LanguageVisibility, error)
- func (_c *LanguageVisibilityCreateBulk) SaveX(ctx context.Context) []*LanguageVisibility
- type LanguageVisibilityDelete
- type LanguageVisibilityDeleteOne
- type LanguageVisibilityGroupBy
- func (_g *LanguageVisibilityGroupBy) Aggregate(fns ...AggregateFunc) *LanguageVisibilityGroupBy
- func (s *LanguageVisibilityGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *LanguageVisibilityGroupBy) BoolX(ctx context.Context) bool
- func (s *LanguageVisibilityGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *LanguageVisibilityGroupBy) BoolsX(ctx context.Context) []bool
- func (s *LanguageVisibilityGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *LanguageVisibilityGroupBy) Float64X(ctx context.Context) float64
- func (s *LanguageVisibilityGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *LanguageVisibilityGroupBy) Float64sX(ctx context.Context) []float64
- func (s *LanguageVisibilityGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *LanguageVisibilityGroupBy) IntX(ctx context.Context) int
- func (s *LanguageVisibilityGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *LanguageVisibilityGroupBy) IntsX(ctx context.Context) []int
- func (_g *LanguageVisibilityGroupBy) Scan(ctx context.Context, v any) error
- func (s *LanguageVisibilityGroupBy) ScanX(ctx context.Context, v any)
- func (s *LanguageVisibilityGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *LanguageVisibilityGroupBy) StringX(ctx context.Context) string
- func (s *LanguageVisibilityGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *LanguageVisibilityGroupBy) StringsX(ctx context.Context) []string
- type LanguageVisibilityMutation
- func (m *LanguageVisibilityMutation) AddField(name string, value ent.Value) error
- func (m *LanguageVisibilityMutation) AddedEdges() []string
- func (m *LanguageVisibilityMutation) AddedField(name string) (ent.Value, bool)
- func (m *LanguageVisibilityMutation) AddedFields() []string
- func (m *LanguageVisibilityMutation) AddedIDs(name string) []ent.Value
- func (m *LanguageVisibilityMutation) AppendLangs(s []string)
- func (m *LanguageVisibilityMutation) AppendedLangs() ([]string, bool)
- func (m *LanguageVisibilityMutation) ClearEdge(name string) error
- func (m *LanguageVisibilityMutation) ClearField(name string) error
- func (m *LanguageVisibilityMutation) ClearedEdges() []string
- func (m *LanguageVisibilityMutation) ClearedFields() []string
- func (m LanguageVisibilityMutation) Client() *Client
- func (m *LanguageVisibilityMutation) EdgeCleared(name string) bool
- func (m *LanguageVisibilityMutation) Field(name string) (ent.Value, bool)
- func (m *LanguageVisibilityMutation) FieldCleared(name string) bool
- func (m *LanguageVisibilityMutation) Fields() []string
- func (m *LanguageVisibilityMutation) ID() (id int, exists bool)
- func (m *LanguageVisibilityMutation) IDs(ctx context.Context) ([]int, error)
- func (m *LanguageVisibilityMutation) Kind() (r string, exists bool)
- func (m *LanguageVisibilityMutation) Langs() (r []string, exists bool)
- func (m *LanguageVisibilityMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *LanguageVisibilityMutation) OldKind(ctx context.Context) (v string, err error)
- func (m *LanguageVisibilityMutation) OldLangs(ctx context.Context) (v []string, err error)
- func (m *LanguageVisibilityMutation) OldRef(ctx context.Context) (v string, err error)
- func (m *LanguageVisibilityMutation) Op() Op
- func (m *LanguageVisibilityMutation) Ref() (r string, exists bool)
- func (m *LanguageVisibilityMutation) RemovedEdges() []string
- func (m *LanguageVisibilityMutation) RemovedIDs(name string) []ent.Value
- func (m *LanguageVisibilityMutation) ResetEdge(name string) error
- func (m *LanguageVisibilityMutation) ResetField(name string) error
- func (m *LanguageVisibilityMutation) ResetKind()
- func (m *LanguageVisibilityMutation) ResetLangs()
- func (m *LanguageVisibilityMutation) ResetRef()
- func (m *LanguageVisibilityMutation) SetField(name string, value ent.Value) error
- func (m *LanguageVisibilityMutation) SetID(id int)
- func (m *LanguageVisibilityMutation) SetKind(s string)
- func (m *LanguageVisibilityMutation) SetLangs(s []string)
- func (m *LanguageVisibilityMutation) SetOp(op Op)
- func (m *LanguageVisibilityMutation) SetRef(s string)
- func (m LanguageVisibilityMutation) Tx() (*Tx, error)
- func (m *LanguageVisibilityMutation) Type() string
- func (m *LanguageVisibilityMutation) Where(ps ...predicate.LanguageVisibility)
- func (m *LanguageVisibilityMutation) WhereP(ps ...func(*sql.Selector))
- type LanguageVisibilityQuery
- func (_q *LanguageVisibilityQuery) Aggregate(fns ...AggregateFunc) *LanguageVisibilitySelect
- func (_q *LanguageVisibilityQuery) All(ctx context.Context) ([]*LanguageVisibility, error)
- func (_q *LanguageVisibilityQuery) AllX(ctx context.Context) []*LanguageVisibility
- func (_q *LanguageVisibilityQuery) Clone() *LanguageVisibilityQuery
- func (_q *LanguageVisibilityQuery) Count(ctx context.Context) (int, error)
- func (_q *LanguageVisibilityQuery) CountX(ctx context.Context) int
- func (_q *LanguageVisibilityQuery) Exist(ctx context.Context) (bool, error)
- func (_q *LanguageVisibilityQuery) ExistX(ctx context.Context) bool
- func (_q *LanguageVisibilityQuery) First(ctx context.Context) (*LanguageVisibility, error)
- func (_q *LanguageVisibilityQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *LanguageVisibilityQuery) FirstIDX(ctx context.Context) int
- func (_q *LanguageVisibilityQuery) FirstX(ctx context.Context) *LanguageVisibility
- func (_q *LanguageVisibilityQuery) GroupBy(field string, fields ...string) *LanguageVisibilityGroupBy
- func (_q *LanguageVisibilityQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *LanguageVisibilityQuery) IDsX(ctx context.Context) []int
- func (_q *LanguageVisibilityQuery) Limit(limit int) *LanguageVisibilityQuery
- func (_q *LanguageVisibilityQuery) Offset(offset int) *LanguageVisibilityQuery
- func (_q *LanguageVisibilityQuery) Only(ctx context.Context) (*LanguageVisibility, error)
- func (_q *LanguageVisibilityQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *LanguageVisibilityQuery) OnlyIDX(ctx context.Context) int
- func (_q *LanguageVisibilityQuery) OnlyX(ctx context.Context) *LanguageVisibility
- func (_q *LanguageVisibilityQuery) Order(o ...languagevisibility.OrderOption) *LanguageVisibilityQuery
- func (_q *LanguageVisibilityQuery) Select(fields ...string) *LanguageVisibilitySelect
- func (_q *LanguageVisibilityQuery) Unique(unique bool) *LanguageVisibilityQuery
- func (_q *LanguageVisibilityQuery) Where(ps ...predicate.LanguageVisibility) *LanguageVisibilityQuery
- type LanguageVisibilitySelect
- func (_s *LanguageVisibilitySelect) Aggregate(fns ...AggregateFunc) *LanguageVisibilitySelect
- func (s *LanguageVisibilitySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *LanguageVisibilitySelect) BoolX(ctx context.Context) bool
- func (s *LanguageVisibilitySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *LanguageVisibilitySelect) BoolsX(ctx context.Context) []bool
- func (s *LanguageVisibilitySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *LanguageVisibilitySelect) Float64X(ctx context.Context) float64
- func (s *LanguageVisibilitySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *LanguageVisibilitySelect) Float64sX(ctx context.Context) []float64
- func (s *LanguageVisibilitySelect) Int(ctx context.Context) (_ int, err error)
- func (s *LanguageVisibilitySelect) IntX(ctx context.Context) int
- func (s *LanguageVisibilitySelect) Ints(ctx context.Context) ([]int, error)
- func (s *LanguageVisibilitySelect) IntsX(ctx context.Context) []int
- func (_s *LanguageVisibilitySelect) Scan(ctx context.Context, v any) error
- func (s *LanguageVisibilitySelect) ScanX(ctx context.Context, v any)
- func (s *LanguageVisibilitySelect) String(ctx context.Context) (_ string, err error)
- func (s *LanguageVisibilitySelect) StringX(ctx context.Context) string
- func (s *LanguageVisibilitySelect) Strings(ctx context.Context) ([]string, error)
- func (s *LanguageVisibilitySelect) StringsX(ctx context.Context) []string
- type LanguageVisibilityUpdate
- func (_u *LanguageVisibilityUpdate) AppendLangs(v []string) *LanguageVisibilityUpdate
- func (_u *LanguageVisibilityUpdate) Exec(ctx context.Context) error
- func (_u *LanguageVisibilityUpdate) ExecX(ctx context.Context)
- func (_u *LanguageVisibilityUpdate) Mutation() *LanguageVisibilityMutation
- func (_u *LanguageVisibilityUpdate) Save(ctx context.Context) (int, error)
- func (_u *LanguageVisibilityUpdate) SaveX(ctx context.Context) int
- func (_u *LanguageVisibilityUpdate) SetKind(v string) *LanguageVisibilityUpdate
- func (_u *LanguageVisibilityUpdate) SetLangs(v []string) *LanguageVisibilityUpdate
- func (_u *LanguageVisibilityUpdate) SetNillableKind(v *string) *LanguageVisibilityUpdate
- func (_u *LanguageVisibilityUpdate) SetNillableRef(v *string) *LanguageVisibilityUpdate
- func (_u *LanguageVisibilityUpdate) SetRef(v string) *LanguageVisibilityUpdate
- func (_u *LanguageVisibilityUpdate) Where(ps ...predicate.LanguageVisibility) *LanguageVisibilityUpdate
- type LanguageVisibilityUpdateOne
- func (_u *LanguageVisibilityUpdateOne) AppendLangs(v []string) *LanguageVisibilityUpdateOne
- func (_u *LanguageVisibilityUpdateOne) Exec(ctx context.Context) error
- func (_u *LanguageVisibilityUpdateOne) ExecX(ctx context.Context)
- func (_u *LanguageVisibilityUpdateOne) Mutation() *LanguageVisibilityMutation
- func (_u *LanguageVisibilityUpdateOne) Save(ctx context.Context) (*LanguageVisibility, error)
- func (_u *LanguageVisibilityUpdateOne) SaveX(ctx context.Context) *LanguageVisibility
- func (_u *LanguageVisibilityUpdateOne) Select(field string, fields ...string) *LanguageVisibilityUpdateOne
- func (_u *LanguageVisibilityUpdateOne) SetKind(v string) *LanguageVisibilityUpdateOne
- func (_u *LanguageVisibilityUpdateOne) SetLangs(v []string) *LanguageVisibilityUpdateOne
- func (_u *LanguageVisibilityUpdateOne) SetNillableKind(v *string) *LanguageVisibilityUpdateOne
- func (_u *LanguageVisibilityUpdateOne) SetNillableRef(v *string) *LanguageVisibilityUpdateOne
- func (_u *LanguageVisibilityUpdateOne) SetRef(v string) *LanguageVisibilityUpdateOne
- func (_u *LanguageVisibilityUpdateOne) Where(ps ...predicate.LanguageVisibility) *LanguageVisibilityUpdateOne
- 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 NodeTranslation
- type NodeTranslationClient
- func (c *NodeTranslationClient) Create() *NodeTranslationCreate
- func (c *NodeTranslationClient) CreateBulk(builders ...*NodeTranslationCreate) *NodeTranslationCreateBulk
- func (c *NodeTranslationClient) Delete() *NodeTranslationDelete
- func (c *NodeTranslationClient) DeleteOne(_m *NodeTranslation) *NodeTranslationDeleteOne
- func (c *NodeTranslationClient) DeleteOneID(id int) *NodeTranslationDeleteOne
- func (c *NodeTranslationClient) Get(ctx context.Context, id int) (*NodeTranslation, error)
- func (c *NodeTranslationClient) GetX(ctx context.Context, id int) *NodeTranslation
- func (c *NodeTranslationClient) Hooks() []Hook
- func (c *NodeTranslationClient) Intercept(interceptors ...Interceptor)
- func (c *NodeTranslationClient) Interceptors() []Interceptor
- func (c *NodeTranslationClient) MapCreateBulk(slice any, setFunc func(*NodeTranslationCreate, int)) *NodeTranslationCreateBulk
- func (c *NodeTranslationClient) Query() *NodeTranslationQuery
- func (c *NodeTranslationClient) QueryNode(_m *NodeTranslation) *NodeQuery
- func (c *NodeTranslationClient) Update() *NodeTranslationUpdate
- func (c *NodeTranslationClient) UpdateOne(_m *NodeTranslation) *NodeTranslationUpdateOne
- func (c *NodeTranslationClient) UpdateOneID(id int) *NodeTranslationUpdateOne
- func (c *NodeTranslationClient) Use(hooks ...Hook)
- type NodeTranslationCreate
- func (_c *NodeTranslationCreate) Exec(ctx context.Context) error
- func (_c *NodeTranslationCreate) ExecX(ctx context.Context)
- func (_c *NodeTranslationCreate) Mutation() *NodeTranslationMutation
- func (_c *NodeTranslationCreate) Save(ctx context.Context) (*NodeTranslation, error)
- func (_c *NodeTranslationCreate) SaveX(ctx context.Context) *NodeTranslation
- func (_c *NodeTranslationCreate) SetID(v int) *NodeTranslationCreate
- func (_c *NodeTranslationCreate) SetNid(v int) *NodeTranslationCreate
- func (_c *NodeTranslationCreate) SetNillableOutdated(v *bool) *NodeTranslationCreate
- func (_c *NodeTranslationCreate) SetNode(v *Node) *NodeTranslationCreate
- func (_c *NodeTranslationCreate) SetNodeID(id int) *NodeTranslationCreate
- func (_c *NodeTranslationCreate) SetOutdated(v bool) *NodeTranslationCreate
- func (_c *NodeTranslationCreate) SetTnid(v int) *NodeTranslationCreate
- type NodeTranslationCreateBulk
- func (_c *NodeTranslationCreateBulk) Exec(ctx context.Context) error
- func (_c *NodeTranslationCreateBulk) ExecX(ctx context.Context)
- func (_c *NodeTranslationCreateBulk) Save(ctx context.Context) ([]*NodeTranslation, error)
- func (_c *NodeTranslationCreateBulk) SaveX(ctx context.Context) []*NodeTranslation
- type NodeTranslationDelete
- type NodeTranslationDeleteOne
- type NodeTranslationEdges
- type NodeTranslationGroupBy
- func (_g *NodeTranslationGroupBy) Aggregate(fns ...AggregateFunc) *NodeTranslationGroupBy
- func (s *NodeTranslationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeTranslationGroupBy) BoolX(ctx context.Context) bool
- func (s *NodeTranslationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeTranslationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NodeTranslationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeTranslationGroupBy) Float64X(ctx context.Context) float64
- func (s *NodeTranslationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeTranslationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NodeTranslationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NodeTranslationGroupBy) IntX(ctx context.Context) int
- func (s *NodeTranslationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NodeTranslationGroupBy) IntsX(ctx context.Context) []int
- func (_g *NodeTranslationGroupBy) Scan(ctx context.Context, v any) error
- func (s *NodeTranslationGroupBy) ScanX(ctx context.Context, v any)
- func (s *NodeTranslationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NodeTranslationGroupBy) StringX(ctx context.Context) string
- func (s *NodeTranslationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NodeTranslationGroupBy) StringsX(ctx context.Context) []string
- type NodeTranslationMutation
- func (m *NodeTranslationMutation) AddField(name string, value ent.Value) error
- func (m *NodeTranslationMutation) AddTnid(i int)
- func (m *NodeTranslationMutation) AddedEdges() []string
- func (m *NodeTranslationMutation) AddedField(name string) (ent.Value, bool)
- func (m *NodeTranslationMutation) AddedFields() []string
- func (m *NodeTranslationMutation) AddedIDs(name string) []ent.Value
- func (m *NodeTranslationMutation) AddedTnid() (r int, exists bool)
- func (m *NodeTranslationMutation) ClearEdge(name string) error
- func (m *NodeTranslationMutation) ClearField(name string) error
- func (m *NodeTranslationMutation) ClearNode()
- func (m *NodeTranslationMutation) ClearedEdges() []string
- func (m *NodeTranslationMutation) ClearedFields() []string
- func (m NodeTranslationMutation) Client() *Client
- func (m *NodeTranslationMutation) EdgeCleared(name string) bool
- func (m *NodeTranslationMutation) Field(name string) (ent.Value, bool)
- func (m *NodeTranslationMutation) FieldCleared(name string) bool
- func (m *NodeTranslationMutation) Fields() []string
- func (m *NodeTranslationMutation) ID() (id int, exists bool)
- func (m *NodeTranslationMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NodeTranslationMutation) Nid() (r int, exists bool)
- func (m *NodeTranslationMutation) NodeCleared() bool
- func (m *NodeTranslationMutation) NodeID() (id int, exists bool)
- func (m *NodeTranslationMutation) NodeIDs() (ids []int)
- func (m *NodeTranslationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NodeTranslationMutation) OldNid(ctx context.Context) (v int, err error)
- func (m *NodeTranslationMutation) OldOutdated(ctx context.Context) (v bool, err error)
- func (m *NodeTranslationMutation) OldTnid(ctx context.Context) (v int, err error)
- func (m *NodeTranslationMutation) Op() Op
- func (m *NodeTranslationMutation) Outdated() (r bool, exists bool)
- func (m *NodeTranslationMutation) RemovedEdges() []string
- func (m *NodeTranslationMutation) RemovedIDs(name string) []ent.Value
- func (m *NodeTranslationMutation) ResetEdge(name string) error
- func (m *NodeTranslationMutation) ResetField(name string) error
- func (m *NodeTranslationMutation) ResetNid()
- func (m *NodeTranslationMutation) ResetNode()
- func (m *NodeTranslationMutation) ResetOutdated()
- func (m *NodeTranslationMutation) ResetTnid()
- func (m *NodeTranslationMutation) SetField(name string, value ent.Value) error
- func (m *NodeTranslationMutation) SetID(id int)
- func (m *NodeTranslationMutation) SetNid(i int)
- func (m *NodeTranslationMutation) SetNodeID(id int)
- func (m *NodeTranslationMutation) SetOp(op Op)
- func (m *NodeTranslationMutation) SetOutdated(b bool)
- func (m *NodeTranslationMutation) SetTnid(i int)
- func (m *NodeTranslationMutation) Tnid() (r int, exists bool)
- func (m NodeTranslationMutation) Tx() (*Tx, error)
- func (m *NodeTranslationMutation) Type() string
- func (m *NodeTranslationMutation) Where(ps ...predicate.NodeTranslation)
- func (m *NodeTranslationMutation) WhereP(ps ...func(*sql.Selector))
- type NodeTranslationQuery
- func (_q *NodeTranslationQuery) Aggregate(fns ...AggregateFunc) *NodeTranslationSelect
- func (_q *NodeTranslationQuery) All(ctx context.Context) ([]*NodeTranslation, error)
- func (_q *NodeTranslationQuery) AllX(ctx context.Context) []*NodeTranslation
- func (_q *NodeTranslationQuery) Clone() *NodeTranslationQuery
- func (_q *NodeTranslationQuery) Count(ctx context.Context) (int, error)
- func (_q *NodeTranslationQuery) CountX(ctx context.Context) int
- func (_q *NodeTranslationQuery) Exist(ctx context.Context) (bool, error)
- func (_q *NodeTranslationQuery) ExistX(ctx context.Context) bool
- func (_q *NodeTranslationQuery) First(ctx context.Context) (*NodeTranslation, error)
- func (_q *NodeTranslationQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *NodeTranslationQuery) FirstIDX(ctx context.Context) int
- func (_q *NodeTranslationQuery) FirstX(ctx context.Context) *NodeTranslation
- func (_q *NodeTranslationQuery) GroupBy(field string, fields ...string) *NodeTranslationGroupBy
- func (_q *NodeTranslationQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *NodeTranslationQuery) IDsX(ctx context.Context) []int
- func (_q *NodeTranslationQuery) Limit(limit int) *NodeTranslationQuery
- func (_q *NodeTranslationQuery) Offset(offset int) *NodeTranslationQuery
- func (_q *NodeTranslationQuery) Only(ctx context.Context) (*NodeTranslation, error)
- func (_q *NodeTranslationQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *NodeTranslationQuery) OnlyIDX(ctx context.Context) int
- func (_q *NodeTranslationQuery) OnlyX(ctx context.Context) *NodeTranslation
- func (_q *NodeTranslationQuery) Order(o ...nodetranslation.OrderOption) *NodeTranslationQuery
- func (_q *NodeTranslationQuery) QueryNode() *NodeQuery
- func (_q *NodeTranslationQuery) Select(fields ...string) *NodeTranslationSelect
- func (_q *NodeTranslationQuery) Unique(unique bool) *NodeTranslationQuery
- func (_q *NodeTranslationQuery) Where(ps ...predicate.NodeTranslation) *NodeTranslationQuery
- func (_q *NodeTranslationQuery) WithNode(opts ...func(*NodeQuery)) *NodeTranslationQuery
- type NodeTranslationSelect
- func (_s *NodeTranslationSelect) Aggregate(fns ...AggregateFunc) *NodeTranslationSelect
- func (s *NodeTranslationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeTranslationSelect) BoolX(ctx context.Context) bool
- func (s *NodeTranslationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeTranslationSelect) BoolsX(ctx context.Context) []bool
- func (s *NodeTranslationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeTranslationSelect) Float64X(ctx context.Context) float64
- func (s *NodeTranslationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeTranslationSelect) Float64sX(ctx context.Context) []float64
- func (s *NodeTranslationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NodeTranslationSelect) IntX(ctx context.Context) int
- func (s *NodeTranslationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NodeTranslationSelect) IntsX(ctx context.Context) []int
- func (_s *NodeTranslationSelect) Scan(ctx context.Context, v any) error
- func (s *NodeTranslationSelect) ScanX(ctx context.Context, v any)
- func (s *NodeTranslationSelect) String(ctx context.Context) (_ string, err error)
- func (s *NodeTranslationSelect) StringX(ctx context.Context) string
- func (s *NodeTranslationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NodeTranslationSelect) StringsX(ctx context.Context) []string
- type NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) AddTnid(v int) *NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) ClearNode() *NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) Exec(ctx context.Context) error
- func (_u *NodeTranslationUpdate) ExecX(ctx context.Context)
- func (_u *NodeTranslationUpdate) Mutation() *NodeTranslationMutation
- func (_u *NodeTranslationUpdate) Save(ctx context.Context) (int, error)
- func (_u *NodeTranslationUpdate) SaveX(ctx context.Context) int
- func (_u *NodeTranslationUpdate) SetNid(v int) *NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) SetNillableNid(v *int) *NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) SetNillableOutdated(v *bool) *NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) SetNillableTnid(v *int) *NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) SetNode(v *Node) *NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) SetNodeID(id int) *NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) SetOutdated(v bool) *NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) SetTnid(v int) *NodeTranslationUpdate
- func (_u *NodeTranslationUpdate) Where(ps ...predicate.NodeTranslation) *NodeTranslationUpdate
- type NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) AddTnid(v int) *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) ClearNode() *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) Exec(ctx context.Context) error
- func (_u *NodeTranslationUpdateOne) ExecX(ctx context.Context)
- func (_u *NodeTranslationUpdateOne) Mutation() *NodeTranslationMutation
- func (_u *NodeTranslationUpdateOne) Save(ctx context.Context) (*NodeTranslation, error)
- func (_u *NodeTranslationUpdateOne) SaveX(ctx context.Context) *NodeTranslation
- func (_u *NodeTranslationUpdateOne) Select(field string, fields ...string) *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) SetNid(v int) *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) SetNillableNid(v *int) *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) SetNillableOutdated(v *bool) *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) SetNillableTnid(v *int) *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) SetNode(v *Node) *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) SetNodeID(id int) *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) SetOutdated(v bool) *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) SetTnid(v int) *NodeTranslationUpdateOne
- func (_u *NodeTranslationUpdateOne) Where(ps ...predicate.NodeTranslation) *NodeTranslationUpdateOne
- type NodeTranslations
- 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 TextTranslation
- type TextTranslationClient
- func (c *TextTranslationClient) Create() *TextTranslationCreate
- func (c *TextTranslationClient) CreateBulk(builders ...*TextTranslationCreate) *TextTranslationCreateBulk
- func (c *TextTranslationClient) Delete() *TextTranslationDelete
- func (c *TextTranslationClient) DeleteOne(_m *TextTranslation) *TextTranslationDeleteOne
- func (c *TextTranslationClient) DeleteOneID(id int) *TextTranslationDeleteOne
- func (c *TextTranslationClient) Get(ctx context.Context, id int) (*TextTranslation, error)
- func (c *TextTranslationClient) GetX(ctx context.Context, id int) *TextTranslation
- func (c *TextTranslationClient) Hooks() []Hook
- func (c *TextTranslationClient) Intercept(interceptors ...Interceptor)
- func (c *TextTranslationClient) Interceptors() []Interceptor
- func (c *TextTranslationClient) MapCreateBulk(slice any, setFunc func(*TextTranslationCreate, int)) *TextTranslationCreateBulk
- func (c *TextTranslationClient) Query() *TextTranslationQuery
- func (c *TextTranslationClient) Update() *TextTranslationUpdate
- func (c *TextTranslationClient) UpdateOne(_m *TextTranslation) *TextTranslationUpdateOne
- func (c *TextTranslationClient) UpdateOneID(id int) *TextTranslationUpdateOne
- func (c *TextTranslationClient) Use(hooks ...Hook)
- type TextTranslationCreate
- func (_c *TextTranslationCreate) Exec(ctx context.Context) error
- func (_c *TextTranslationCreate) ExecX(ctx context.Context)
- func (_c *TextTranslationCreate) Mutation() *TextTranslationMutation
- func (_c *TextTranslationCreate) Save(ctx context.Context) (*TextTranslation, error)
- func (_c *TextTranslationCreate) SaveX(ctx context.Context) *TextTranslation
- func (_c *TextTranslationCreate) SetID(v int) *TextTranslationCreate
- func (_c *TextTranslationCreate) SetKind(v string) *TextTranslationCreate
- func (_c *TextTranslationCreate) SetLang(v string) *TextTranslationCreate
- func (_c *TextTranslationCreate) SetRef(v string) *TextTranslationCreate
- func (_c *TextTranslationCreate) SetValue(v string) *TextTranslationCreate
- type TextTranslationCreateBulk
- func (_c *TextTranslationCreateBulk) Exec(ctx context.Context) error
- func (_c *TextTranslationCreateBulk) ExecX(ctx context.Context)
- func (_c *TextTranslationCreateBulk) Save(ctx context.Context) ([]*TextTranslation, error)
- func (_c *TextTranslationCreateBulk) SaveX(ctx context.Context) []*TextTranslation
- type TextTranslationDelete
- type TextTranslationDeleteOne
- type TextTranslationGroupBy
- func (_g *TextTranslationGroupBy) Aggregate(fns ...AggregateFunc) *TextTranslationGroupBy
- func (s *TextTranslationGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TextTranslationGroupBy) BoolX(ctx context.Context) bool
- func (s *TextTranslationGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TextTranslationGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TextTranslationGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TextTranslationGroupBy) Float64X(ctx context.Context) float64
- func (s *TextTranslationGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TextTranslationGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TextTranslationGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TextTranslationGroupBy) IntX(ctx context.Context) int
- func (s *TextTranslationGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TextTranslationGroupBy) IntsX(ctx context.Context) []int
- func (_g *TextTranslationGroupBy) Scan(ctx context.Context, v any) error
- func (s *TextTranslationGroupBy) ScanX(ctx context.Context, v any)
- func (s *TextTranslationGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TextTranslationGroupBy) StringX(ctx context.Context) string
- func (s *TextTranslationGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TextTranslationGroupBy) StringsX(ctx context.Context) []string
- type TextTranslationMutation
- func (m *TextTranslationMutation) AddField(name string, value ent.Value) error
- func (m *TextTranslationMutation) AddedEdges() []string
- func (m *TextTranslationMutation) AddedField(name string) (ent.Value, bool)
- func (m *TextTranslationMutation) AddedFields() []string
- func (m *TextTranslationMutation) AddedIDs(name string) []ent.Value
- func (m *TextTranslationMutation) ClearEdge(name string) error
- func (m *TextTranslationMutation) ClearField(name string) error
- func (m *TextTranslationMutation) ClearedEdges() []string
- func (m *TextTranslationMutation) ClearedFields() []string
- func (m TextTranslationMutation) Client() *Client
- func (m *TextTranslationMutation) EdgeCleared(name string) bool
- func (m *TextTranslationMutation) Field(name string) (ent.Value, bool)
- func (m *TextTranslationMutation) FieldCleared(name string) bool
- func (m *TextTranslationMutation) Fields() []string
- func (m *TextTranslationMutation) ID() (id int, exists bool)
- func (m *TextTranslationMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TextTranslationMutation) Kind() (r string, exists bool)
- func (m *TextTranslationMutation) Lang() (r string, exists bool)
- func (m *TextTranslationMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TextTranslationMutation) OldKind(ctx context.Context) (v string, err error)
- func (m *TextTranslationMutation) OldLang(ctx context.Context) (v string, err error)
- func (m *TextTranslationMutation) OldRef(ctx context.Context) (v string, err error)
- func (m *TextTranslationMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *TextTranslationMutation) Op() Op
- func (m *TextTranslationMutation) Ref() (r string, exists bool)
- func (m *TextTranslationMutation) RemovedEdges() []string
- func (m *TextTranslationMutation) RemovedIDs(name string) []ent.Value
- func (m *TextTranslationMutation) ResetEdge(name string) error
- func (m *TextTranslationMutation) ResetField(name string) error
- func (m *TextTranslationMutation) ResetKind()
- func (m *TextTranslationMutation) ResetLang()
- func (m *TextTranslationMutation) ResetRef()
- func (m *TextTranslationMutation) ResetValue()
- func (m *TextTranslationMutation) SetField(name string, value ent.Value) error
- func (m *TextTranslationMutation) SetID(id int)
- func (m *TextTranslationMutation) SetKind(s string)
- func (m *TextTranslationMutation) SetLang(s string)
- func (m *TextTranslationMutation) SetOp(op Op)
- func (m *TextTranslationMutation) SetRef(s string)
- func (m *TextTranslationMutation) SetValue(s string)
- func (m TextTranslationMutation) Tx() (*Tx, error)
- func (m *TextTranslationMutation) Type() string
- func (m *TextTranslationMutation) Value() (r string, exists bool)
- func (m *TextTranslationMutation) Where(ps ...predicate.TextTranslation)
- func (m *TextTranslationMutation) WhereP(ps ...func(*sql.Selector))
- type TextTranslationQuery
- func (_q *TextTranslationQuery) Aggregate(fns ...AggregateFunc) *TextTranslationSelect
- func (_q *TextTranslationQuery) All(ctx context.Context) ([]*TextTranslation, error)
- func (_q *TextTranslationQuery) AllX(ctx context.Context) []*TextTranslation
- func (_q *TextTranslationQuery) Clone() *TextTranslationQuery
- func (_q *TextTranslationQuery) Count(ctx context.Context) (int, error)
- func (_q *TextTranslationQuery) CountX(ctx context.Context) int
- func (_q *TextTranslationQuery) Exist(ctx context.Context) (bool, error)
- func (_q *TextTranslationQuery) ExistX(ctx context.Context) bool
- func (_q *TextTranslationQuery) First(ctx context.Context) (*TextTranslation, error)
- func (_q *TextTranslationQuery) FirstID(ctx context.Context) (id int, err error)
- func (_q *TextTranslationQuery) FirstIDX(ctx context.Context) int
- func (_q *TextTranslationQuery) FirstX(ctx context.Context) *TextTranslation
- func (_q *TextTranslationQuery) GroupBy(field string, fields ...string) *TextTranslationGroupBy
- func (_q *TextTranslationQuery) IDs(ctx context.Context) (ids []int, err error)
- func (_q *TextTranslationQuery) IDsX(ctx context.Context) []int
- func (_q *TextTranslationQuery) Limit(limit int) *TextTranslationQuery
- func (_q *TextTranslationQuery) Offset(offset int) *TextTranslationQuery
- func (_q *TextTranslationQuery) Only(ctx context.Context) (*TextTranslation, error)
- func (_q *TextTranslationQuery) OnlyID(ctx context.Context) (id int, err error)
- func (_q *TextTranslationQuery) OnlyIDX(ctx context.Context) int
- func (_q *TextTranslationQuery) OnlyX(ctx context.Context) *TextTranslation
- func (_q *TextTranslationQuery) Order(o ...texttranslation.OrderOption) *TextTranslationQuery
- func (_q *TextTranslationQuery) Select(fields ...string) *TextTranslationSelect
- func (_q *TextTranslationQuery) Unique(unique bool) *TextTranslationQuery
- func (_q *TextTranslationQuery) Where(ps ...predicate.TextTranslation) *TextTranslationQuery
- type TextTranslationSelect
- func (_s *TextTranslationSelect) Aggregate(fns ...AggregateFunc) *TextTranslationSelect
- func (s *TextTranslationSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TextTranslationSelect) BoolX(ctx context.Context) bool
- func (s *TextTranslationSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TextTranslationSelect) BoolsX(ctx context.Context) []bool
- func (s *TextTranslationSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TextTranslationSelect) Float64X(ctx context.Context) float64
- func (s *TextTranslationSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TextTranslationSelect) Float64sX(ctx context.Context) []float64
- func (s *TextTranslationSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TextTranslationSelect) IntX(ctx context.Context) int
- func (s *TextTranslationSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TextTranslationSelect) IntsX(ctx context.Context) []int
- func (_s *TextTranslationSelect) Scan(ctx context.Context, v any) error
- func (s *TextTranslationSelect) ScanX(ctx context.Context, v any)
- func (s *TextTranslationSelect) String(ctx context.Context) (_ string, err error)
- func (s *TextTranslationSelect) StringX(ctx context.Context) string
- func (s *TextTranslationSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TextTranslationSelect) StringsX(ctx context.Context) []string
- type TextTranslationUpdate
- func (_u *TextTranslationUpdate) Exec(ctx context.Context) error
- func (_u *TextTranslationUpdate) ExecX(ctx context.Context)
- func (_u *TextTranslationUpdate) Mutation() *TextTranslationMutation
- func (_u *TextTranslationUpdate) Save(ctx context.Context) (int, error)
- func (_u *TextTranslationUpdate) SaveX(ctx context.Context) int
- func (_u *TextTranslationUpdate) SetKind(v string) *TextTranslationUpdate
- func (_u *TextTranslationUpdate) SetLang(v string) *TextTranslationUpdate
- func (_u *TextTranslationUpdate) SetNillableKind(v *string) *TextTranslationUpdate
- func (_u *TextTranslationUpdate) SetNillableLang(v *string) *TextTranslationUpdate
- func (_u *TextTranslationUpdate) SetNillableRef(v *string) *TextTranslationUpdate
- func (_u *TextTranslationUpdate) SetNillableValue(v *string) *TextTranslationUpdate
- func (_u *TextTranslationUpdate) SetRef(v string) *TextTranslationUpdate
- func (_u *TextTranslationUpdate) SetValue(v string) *TextTranslationUpdate
- func (_u *TextTranslationUpdate) Where(ps ...predicate.TextTranslation) *TextTranslationUpdate
- type TextTranslationUpdateOne
- func (_u *TextTranslationUpdateOne) Exec(ctx context.Context) error
- func (_u *TextTranslationUpdateOne) ExecX(ctx context.Context)
- func (_u *TextTranslationUpdateOne) Mutation() *TextTranslationMutation
- func (_u *TextTranslationUpdateOne) Save(ctx context.Context) (*TextTranslation, error)
- func (_u *TextTranslationUpdateOne) SaveX(ctx context.Context) *TextTranslation
- func (_u *TextTranslationUpdateOne) Select(field string, fields ...string) *TextTranslationUpdateOne
- func (_u *TextTranslationUpdateOne) SetKind(v string) *TextTranslationUpdateOne
- func (_u *TextTranslationUpdateOne) SetLang(v string) *TextTranslationUpdateOne
- func (_u *TextTranslationUpdateOne) SetNillableKind(v *string) *TextTranslationUpdateOne
- func (_u *TextTranslationUpdateOne) SetNillableLang(v *string) *TextTranslationUpdateOne
- func (_u *TextTranslationUpdateOne) SetNillableRef(v *string) *TextTranslationUpdateOne
- func (_u *TextTranslationUpdateOne) SetNillableValue(v *string) *TextTranslationUpdateOne
- func (_u *TextTranslationUpdateOne) SetRef(v string) *TextTranslationUpdateOne
- func (_u *TextTranslationUpdateOne) SetValue(v string) *TextTranslationUpdateOne
- func (_u *TextTranslationUpdateOne) Where(ps ...predicate.TextTranslation) *TextTranslationUpdateOne
- type TextTranslations
- 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. TypeLanguageSettings = "LanguageSettings" TypeLanguageVisibility = "LanguageVisibility" TypeNode = "Node" TypeNodeTranslation = "NodeTranslation" TypeTextTranslation = "TextTranslation" )
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
// LanguageSettings is the client for interacting with the LanguageSettings builders.
LanguageSettings *LanguageSettingsClient
// LanguageVisibility is the client for interacting with the LanguageVisibility builders.
LanguageVisibility *LanguageVisibilityClient
// Node is the client for interacting with the Node builders.
Node *NodeClient
// NodeTranslation is the client for interacting with the NodeTranslation builders.
NodeTranslation *NodeTranslationClient
// TextTranslation is the client for interacting with the TextTranslation builders.
TextTranslation *TextTranslationClient
// 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(). LanguageSettings. 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 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 LanguageSettings ¶
type LanguageSettings struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// TranslatableTypes holds the value of the "translatable_types" field.
TranslatableTypes []string `json:"translatable_types,omitempty"`
// Untranslated holds the value of the "untranslated" field.
Untranslated string `json:"untranslated,omitempty"`
// contains filtered or unexported fields
}
LanguageSettings is the model entity for the LanguageSettings schema.
func (*LanguageSettings) String ¶
func (_m *LanguageSettings) String() string
String implements the fmt.Stringer.
func (*LanguageSettings) Unwrap ¶
func (_m *LanguageSettings) Unwrap() *LanguageSettings
Unwrap unwraps the LanguageSettings 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 (*LanguageSettings) Update ¶
func (_m *LanguageSettings) Update() *LanguageSettingsUpdateOne
Update returns a builder for updating this LanguageSettings. Note that you need to call LanguageSettings.Unwrap() before calling this method if this LanguageSettings was returned from a transaction, and the transaction was committed or rolled back.
type LanguageSettingsClient ¶
type LanguageSettingsClient struct {
// contains filtered or unexported fields
}
LanguageSettingsClient is a client for the LanguageSettings schema.
func NewLanguageSettingsClient ¶
func NewLanguageSettingsClient(c config) *LanguageSettingsClient
NewLanguageSettingsClient returns a client for the LanguageSettings from the given config.
func (*LanguageSettingsClient) Create ¶
func (c *LanguageSettingsClient) Create() *LanguageSettingsCreate
Create returns a builder for creating a LanguageSettings entity.
func (*LanguageSettingsClient) CreateBulk ¶
func (c *LanguageSettingsClient) CreateBulk(builders ...*LanguageSettingsCreate) *LanguageSettingsCreateBulk
CreateBulk returns a builder for creating a bulk of LanguageSettings entities.
func (*LanguageSettingsClient) Delete ¶
func (c *LanguageSettingsClient) Delete() *LanguageSettingsDelete
Delete returns a delete builder for LanguageSettings.
func (*LanguageSettingsClient) DeleteOne ¶
func (c *LanguageSettingsClient) DeleteOne(_m *LanguageSettings) *LanguageSettingsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LanguageSettingsClient) DeleteOneID ¶
func (c *LanguageSettingsClient) DeleteOneID(id int) *LanguageSettingsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LanguageSettingsClient) Get ¶
func (c *LanguageSettingsClient) Get(ctx context.Context, id int) (*LanguageSettings, error)
Get returns a LanguageSettings entity by its id.
func (*LanguageSettingsClient) GetX ¶
func (c *LanguageSettingsClient) GetX(ctx context.Context, id int) *LanguageSettings
GetX is like Get, but panics if an error occurs.
func (*LanguageSettingsClient) Hooks ¶
func (c *LanguageSettingsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*LanguageSettingsClient) Intercept ¶
func (c *LanguageSettingsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `languagesettings.Intercept(f(g(h())))`.
func (*LanguageSettingsClient) Interceptors ¶
func (c *LanguageSettingsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LanguageSettingsClient) MapCreateBulk ¶
func (c *LanguageSettingsClient) MapCreateBulk(slice any, setFunc func(*LanguageSettingsCreate, int)) *LanguageSettingsCreateBulk
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 (*LanguageSettingsClient) Query ¶
func (c *LanguageSettingsClient) Query() *LanguageSettingsQuery
Query returns a query builder for LanguageSettings.
func (*LanguageSettingsClient) Update ¶
func (c *LanguageSettingsClient) Update() *LanguageSettingsUpdate
Update returns an update builder for LanguageSettings.
func (*LanguageSettingsClient) UpdateOne ¶
func (c *LanguageSettingsClient) UpdateOne(_m *LanguageSettings) *LanguageSettingsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LanguageSettingsClient) UpdateOneID ¶
func (c *LanguageSettingsClient) UpdateOneID(id int) *LanguageSettingsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LanguageSettingsClient) Use ¶
func (c *LanguageSettingsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `languagesettings.Hooks(f(g(h())))`.
type LanguageSettingsCreate ¶
type LanguageSettingsCreate struct {
// contains filtered or unexported fields
}
LanguageSettingsCreate is the builder for creating a LanguageSettings entity.
func (*LanguageSettingsCreate) Exec ¶
func (_c *LanguageSettingsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LanguageSettingsCreate) ExecX ¶
func (_c *LanguageSettingsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LanguageSettingsCreate) Mutation ¶
func (_c *LanguageSettingsCreate) Mutation() *LanguageSettingsMutation
Mutation returns the LanguageSettingsMutation object of the builder.
func (*LanguageSettingsCreate) Save ¶
func (_c *LanguageSettingsCreate) Save(ctx context.Context) (*LanguageSettings, error)
Save creates the LanguageSettings in the database.
func (*LanguageSettingsCreate) SaveX ¶
func (_c *LanguageSettingsCreate) SaveX(ctx context.Context) *LanguageSettings
SaveX calls Save and panics if Save returns an error.
func (*LanguageSettingsCreate) SetID ¶
func (_c *LanguageSettingsCreate) SetID(v int) *LanguageSettingsCreate
SetID sets the "id" field.
func (*LanguageSettingsCreate) SetNillableUntranslated ¶
func (_c *LanguageSettingsCreate) SetNillableUntranslated(v *string) *LanguageSettingsCreate
SetNillableUntranslated sets the "untranslated" field if the given value is not nil.
func (*LanguageSettingsCreate) SetTranslatableTypes ¶
func (_c *LanguageSettingsCreate) SetTranslatableTypes(v []string) *LanguageSettingsCreate
SetTranslatableTypes sets the "translatable_types" field.
func (*LanguageSettingsCreate) SetUntranslated ¶
func (_c *LanguageSettingsCreate) SetUntranslated(v string) *LanguageSettingsCreate
SetUntranslated sets the "untranslated" field.
type LanguageSettingsCreateBulk ¶
type LanguageSettingsCreateBulk struct {
// contains filtered or unexported fields
}
LanguageSettingsCreateBulk is the builder for creating many LanguageSettings entities in bulk.
func (*LanguageSettingsCreateBulk) Exec ¶
func (_c *LanguageSettingsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LanguageSettingsCreateBulk) ExecX ¶
func (_c *LanguageSettingsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LanguageSettingsCreateBulk) Save ¶
func (_c *LanguageSettingsCreateBulk) Save(ctx context.Context) ([]*LanguageSettings, error)
Save creates the LanguageSettings entities in the database.
func (*LanguageSettingsCreateBulk) SaveX ¶
func (_c *LanguageSettingsCreateBulk) SaveX(ctx context.Context) []*LanguageSettings
SaveX is like Save, but panics if an error occurs.
type LanguageSettingsDelete ¶
type LanguageSettingsDelete struct {
// contains filtered or unexported fields
}
LanguageSettingsDelete is the builder for deleting a LanguageSettings entity.
func (*LanguageSettingsDelete) Exec ¶
func (_d *LanguageSettingsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LanguageSettingsDelete) ExecX ¶
func (_d *LanguageSettingsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LanguageSettingsDelete) Where ¶
func (_d *LanguageSettingsDelete) Where(ps ...predicate.LanguageSettings) *LanguageSettingsDelete
Where appends a list predicates to the LanguageSettingsDelete builder.
type LanguageSettingsDeleteOne ¶
type LanguageSettingsDeleteOne struct {
// contains filtered or unexported fields
}
LanguageSettingsDeleteOne is the builder for deleting a single LanguageSettings entity.
func (*LanguageSettingsDeleteOne) Exec ¶
func (_d *LanguageSettingsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LanguageSettingsDeleteOne) ExecX ¶
func (_d *LanguageSettingsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LanguageSettingsDeleteOne) Where ¶
func (_d *LanguageSettingsDeleteOne) Where(ps ...predicate.LanguageSettings) *LanguageSettingsDeleteOne
Where appends a list predicates to the LanguageSettingsDelete builder.
type LanguageSettingsGroupBy ¶
type LanguageSettingsGroupBy struct {
// contains filtered or unexported fields
}
LanguageSettingsGroupBy is the group-by builder for LanguageSettings entities.
func (*LanguageSettingsGroupBy) Aggregate ¶
func (_g *LanguageSettingsGroupBy) Aggregate(fns ...AggregateFunc) *LanguageSettingsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LanguageSettingsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*LanguageSettingsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsGroupBy) Scan ¶
func (_g *LanguageSettingsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LanguageSettingsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LanguageSettingsMutation ¶
type LanguageSettingsMutation struct {
// contains filtered or unexported fields
}
LanguageSettingsMutation represents an operation that mutates the LanguageSettings nodes in the graph.
func (*LanguageSettingsMutation) AddField ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) AddedEdges ¶
func (m *LanguageSettingsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LanguageSettingsMutation) AddedField ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) AddedFields ¶
func (m *LanguageSettingsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LanguageSettingsMutation) AddedIDs ¶
func (m *LanguageSettingsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LanguageSettingsMutation) AppendTranslatableTypes ¶
func (m *LanguageSettingsMutation) AppendTranslatableTypes(s []string)
AppendTranslatableTypes adds s to the "translatable_types" field.
func (*LanguageSettingsMutation) AppendedTranslatableTypes ¶
func (m *LanguageSettingsMutation) AppendedTranslatableTypes() ([]string, bool)
AppendedTranslatableTypes returns the list of values that were appended to the "translatable_types" field in this mutation.
func (*LanguageSettingsMutation) ClearEdge ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) ClearField ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) ClearTranslatableTypes ¶
func (m *LanguageSettingsMutation) ClearTranslatableTypes()
ClearTranslatableTypes clears the value of the "translatable_types" field.
func (*LanguageSettingsMutation) ClearedEdges ¶
func (m *LanguageSettingsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LanguageSettingsMutation) ClearedFields ¶
func (m *LanguageSettingsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LanguageSettingsMutation) Client ¶
func (m LanguageSettingsMutation) 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 (*LanguageSettingsMutation) EdgeCleared ¶
func (m *LanguageSettingsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LanguageSettingsMutation) Field ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) FieldCleared ¶
func (m *LanguageSettingsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LanguageSettingsMutation) Fields ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) ID ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) IDs ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) 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 (*LanguageSettingsMutation) OldTranslatableTypes ¶
func (m *LanguageSettingsMutation) OldTranslatableTypes(ctx context.Context) (v []string, err error)
OldTranslatableTypes returns the old "translatable_types" field's value of the LanguageSettings entity. If the LanguageSettings 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 (*LanguageSettingsMutation) OldUntranslated ¶
func (m *LanguageSettingsMutation) OldUntranslated(ctx context.Context) (v string, err error)
OldUntranslated returns the old "untranslated" field's value of the LanguageSettings entity. If the LanguageSettings 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 (*LanguageSettingsMutation) Op ¶
func (m *LanguageSettingsMutation) Op() Op
Op returns the operation name.
func (*LanguageSettingsMutation) RemovedEdges ¶
func (m *LanguageSettingsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LanguageSettingsMutation) RemovedIDs ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) ResetEdge ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) ResetField ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) ResetTranslatableTypes ¶
func (m *LanguageSettingsMutation) ResetTranslatableTypes()
ResetTranslatableTypes resets all changes to the "translatable_types" field.
func (*LanguageSettingsMutation) ResetUntranslated ¶
func (m *LanguageSettingsMutation) ResetUntranslated()
ResetUntranslated resets all changes to the "untranslated" field.
func (*LanguageSettingsMutation) SetField ¶
func (m *LanguageSettingsMutation) 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 (*LanguageSettingsMutation) SetID ¶
func (m *LanguageSettingsMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of LanguageSettings entities.
func (*LanguageSettingsMutation) SetOp ¶
func (m *LanguageSettingsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LanguageSettingsMutation) SetTranslatableTypes ¶
func (m *LanguageSettingsMutation) SetTranslatableTypes(s []string)
SetTranslatableTypes sets the "translatable_types" field.
func (*LanguageSettingsMutation) SetUntranslated ¶
func (m *LanguageSettingsMutation) SetUntranslated(s string)
SetUntranslated sets the "untranslated" field.
func (*LanguageSettingsMutation) TranslatableTypes ¶
func (m *LanguageSettingsMutation) TranslatableTypes() (r []string, exists bool)
TranslatableTypes returns the value of the "translatable_types" field in the mutation.
func (*LanguageSettingsMutation) TranslatableTypesCleared ¶
func (m *LanguageSettingsMutation) TranslatableTypesCleared() bool
TranslatableTypesCleared returns if the "translatable_types" field was cleared in this mutation.
func (LanguageSettingsMutation) Tx ¶
func (m LanguageSettingsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LanguageSettingsMutation) Type ¶
func (m *LanguageSettingsMutation) Type() string
Type returns the node type of this mutation (LanguageSettings).
func (*LanguageSettingsMutation) Untranslated ¶
func (m *LanguageSettingsMutation) Untranslated() (r string, exists bool)
Untranslated returns the value of the "untranslated" field in the mutation.
func (*LanguageSettingsMutation) Where ¶
func (m *LanguageSettingsMutation) Where(ps ...predicate.LanguageSettings)
Where appends a list predicates to the LanguageSettingsMutation builder.
func (*LanguageSettingsMutation) WhereP ¶
func (m *LanguageSettingsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LanguageSettingsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LanguageSettingsQuery ¶
type LanguageSettingsQuery struct {
// contains filtered or unexported fields
}
LanguageSettingsQuery is the builder for querying LanguageSettings entities.
func (*LanguageSettingsQuery) Aggregate ¶
func (_q *LanguageSettingsQuery) Aggregate(fns ...AggregateFunc) *LanguageSettingsSelect
Aggregate returns a LanguageSettingsSelect configured with the given aggregations.
func (*LanguageSettingsQuery) All ¶
func (_q *LanguageSettingsQuery) All(ctx context.Context) ([]*LanguageSettings, error)
All executes the query and returns a list of LanguageSettingsSlice.
func (*LanguageSettingsQuery) AllX ¶
func (_q *LanguageSettingsQuery) AllX(ctx context.Context) []*LanguageSettings
AllX is like All, but panics if an error occurs.
func (*LanguageSettingsQuery) Clone ¶
func (_q *LanguageSettingsQuery) Clone() *LanguageSettingsQuery
Clone returns a duplicate of the LanguageSettingsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LanguageSettingsQuery) Count ¶
func (_q *LanguageSettingsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LanguageSettingsQuery) CountX ¶
func (_q *LanguageSettingsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LanguageSettingsQuery) Exist ¶
func (_q *LanguageSettingsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LanguageSettingsQuery) ExistX ¶
func (_q *LanguageSettingsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LanguageSettingsQuery) First ¶
func (_q *LanguageSettingsQuery) First(ctx context.Context) (*LanguageSettings, error)
First returns the first LanguageSettings entity from the query. Returns a *NotFoundError when no LanguageSettings was found.
func (*LanguageSettingsQuery) FirstID ¶
func (_q *LanguageSettingsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first LanguageSettings ID from the query. Returns a *NotFoundError when no LanguageSettings ID was found.
func (*LanguageSettingsQuery) FirstIDX ¶
func (_q *LanguageSettingsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*LanguageSettingsQuery) FirstX ¶
func (_q *LanguageSettingsQuery) FirstX(ctx context.Context) *LanguageSettings
FirstX is like First, but panics if an error occurs.
func (*LanguageSettingsQuery) GroupBy ¶
func (_q *LanguageSettingsQuery) GroupBy(field string, fields ...string) *LanguageSettingsGroupBy
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 {
TranslatableTypes []string `json:"translatable_types,omitempty"`
Count int `json:"count,omitempty"`
}
client.LanguageSettings.Query().
GroupBy(languagesettings.FieldTranslatableTypes).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*LanguageSettingsQuery) IDs ¶
func (_q *LanguageSettingsQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of LanguageSettings IDs.
func (*LanguageSettingsQuery) IDsX ¶
func (_q *LanguageSettingsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*LanguageSettingsQuery) Limit ¶
func (_q *LanguageSettingsQuery) Limit(limit int) *LanguageSettingsQuery
Limit the number of records to be returned by this query.
func (*LanguageSettingsQuery) Offset ¶
func (_q *LanguageSettingsQuery) Offset(offset int) *LanguageSettingsQuery
Offset to start from.
func (*LanguageSettingsQuery) Only ¶
func (_q *LanguageSettingsQuery) Only(ctx context.Context) (*LanguageSettings, error)
Only returns a single LanguageSettings entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one LanguageSettings entity is found. Returns a *NotFoundError when no LanguageSettings entities are found.
func (*LanguageSettingsQuery) OnlyID ¶
func (_q *LanguageSettingsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only LanguageSettings ID in the query. Returns a *NotSingularError when more than one LanguageSettings ID is found. Returns a *NotFoundError when no entities are found.
func (*LanguageSettingsQuery) OnlyIDX ¶
func (_q *LanguageSettingsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LanguageSettingsQuery) OnlyX ¶
func (_q *LanguageSettingsQuery) OnlyX(ctx context.Context) *LanguageSettings
OnlyX is like Only, but panics if an error occurs.
func (*LanguageSettingsQuery) Order ¶
func (_q *LanguageSettingsQuery) Order(o ...languagesettings.OrderOption) *LanguageSettingsQuery
Order specifies how the records should be ordered.
func (*LanguageSettingsQuery) Select ¶
func (_q *LanguageSettingsQuery) Select(fields ...string) *LanguageSettingsSelect
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 {
TranslatableTypes []string `json:"translatable_types,omitempty"`
}
client.LanguageSettings.Query().
Select(languagesettings.FieldTranslatableTypes).
Scan(ctx, &v)
func (*LanguageSettingsQuery) Unique ¶
func (_q *LanguageSettingsQuery) Unique(unique bool) *LanguageSettingsQuery
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 (*LanguageSettingsQuery) Where ¶
func (_q *LanguageSettingsQuery) Where(ps ...predicate.LanguageSettings) *LanguageSettingsQuery
Where adds a new predicate for the LanguageSettingsQuery builder.
type LanguageSettingsSelect ¶
type LanguageSettingsSelect struct {
*LanguageSettingsQuery
// contains filtered or unexported fields
}
LanguageSettingsSelect is the builder for selecting fields of LanguageSettings entities.
func (*LanguageSettingsSelect) Aggregate ¶
func (_s *LanguageSettingsSelect) Aggregate(fns ...AggregateFunc) *LanguageSettingsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*LanguageSettingsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*LanguageSettingsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LanguageSettingsSelect) Scan ¶
func (_s *LanguageSettingsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LanguageSettingsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LanguageSettingsSlice ¶
type LanguageSettingsSlice []*LanguageSettings
LanguageSettingsSlice is a parsable slice of LanguageSettings.
type LanguageSettingsUpdate ¶
type LanguageSettingsUpdate struct {
// contains filtered or unexported fields
}
LanguageSettingsUpdate is the builder for updating LanguageSettings entities.
func (*LanguageSettingsUpdate) AppendTranslatableTypes ¶
func (_u *LanguageSettingsUpdate) AppendTranslatableTypes(v []string) *LanguageSettingsUpdate
AppendTranslatableTypes appends value to the "translatable_types" field.
func (*LanguageSettingsUpdate) ClearTranslatableTypes ¶
func (_u *LanguageSettingsUpdate) ClearTranslatableTypes() *LanguageSettingsUpdate
ClearTranslatableTypes clears the value of the "translatable_types" field.
func (*LanguageSettingsUpdate) Exec ¶
func (_u *LanguageSettingsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LanguageSettingsUpdate) ExecX ¶
func (_u *LanguageSettingsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LanguageSettingsUpdate) Mutation ¶
func (_u *LanguageSettingsUpdate) Mutation() *LanguageSettingsMutation
Mutation returns the LanguageSettingsMutation object of the builder.
func (*LanguageSettingsUpdate) Save ¶
func (_u *LanguageSettingsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LanguageSettingsUpdate) SaveX ¶
func (_u *LanguageSettingsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LanguageSettingsUpdate) SetNillableUntranslated ¶
func (_u *LanguageSettingsUpdate) SetNillableUntranslated(v *string) *LanguageSettingsUpdate
SetNillableUntranslated sets the "untranslated" field if the given value is not nil.
func (*LanguageSettingsUpdate) SetTranslatableTypes ¶
func (_u *LanguageSettingsUpdate) SetTranslatableTypes(v []string) *LanguageSettingsUpdate
SetTranslatableTypes sets the "translatable_types" field.
func (*LanguageSettingsUpdate) SetUntranslated ¶
func (_u *LanguageSettingsUpdate) SetUntranslated(v string) *LanguageSettingsUpdate
SetUntranslated sets the "untranslated" field.
func (*LanguageSettingsUpdate) Where ¶
func (_u *LanguageSettingsUpdate) Where(ps ...predicate.LanguageSettings) *LanguageSettingsUpdate
Where appends a list predicates to the LanguageSettingsUpdate builder.
type LanguageSettingsUpdateOne ¶
type LanguageSettingsUpdateOne struct {
// contains filtered or unexported fields
}
LanguageSettingsUpdateOne is the builder for updating a single LanguageSettings entity.
func (*LanguageSettingsUpdateOne) AppendTranslatableTypes ¶
func (_u *LanguageSettingsUpdateOne) AppendTranslatableTypes(v []string) *LanguageSettingsUpdateOne
AppendTranslatableTypes appends value to the "translatable_types" field.
func (*LanguageSettingsUpdateOne) ClearTranslatableTypes ¶
func (_u *LanguageSettingsUpdateOne) ClearTranslatableTypes() *LanguageSettingsUpdateOne
ClearTranslatableTypes clears the value of the "translatable_types" field.
func (*LanguageSettingsUpdateOne) Exec ¶
func (_u *LanguageSettingsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LanguageSettingsUpdateOne) ExecX ¶
func (_u *LanguageSettingsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LanguageSettingsUpdateOne) Mutation ¶
func (_u *LanguageSettingsUpdateOne) Mutation() *LanguageSettingsMutation
Mutation returns the LanguageSettingsMutation object of the builder.
func (*LanguageSettingsUpdateOne) Save ¶
func (_u *LanguageSettingsUpdateOne) Save(ctx context.Context) (*LanguageSettings, error)
Save executes the query and returns the updated LanguageSettings entity.
func (*LanguageSettingsUpdateOne) SaveX ¶
func (_u *LanguageSettingsUpdateOne) SaveX(ctx context.Context) *LanguageSettings
SaveX is like Save, but panics if an error occurs.
func (*LanguageSettingsUpdateOne) Select ¶
func (_u *LanguageSettingsUpdateOne) Select(field string, fields ...string) *LanguageSettingsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LanguageSettingsUpdateOne) SetNillableUntranslated ¶
func (_u *LanguageSettingsUpdateOne) SetNillableUntranslated(v *string) *LanguageSettingsUpdateOne
SetNillableUntranslated sets the "untranslated" field if the given value is not nil.
func (*LanguageSettingsUpdateOne) SetTranslatableTypes ¶
func (_u *LanguageSettingsUpdateOne) SetTranslatableTypes(v []string) *LanguageSettingsUpdateOne
SetTranslatableTypes sets the "translatable_types" field.
func (*LanguageSettingsUpdateOne) SetUntranslated ¶
func (_u *LanguageSettingsUpdateOne) SetUntranslated(v string) *LanguageSettingsUpdateOne
SetUntranslated sets the "untranslated" field.
func (*LanguageSettingsUpdateOne) Where ¶
func (_u *LanguageSettingsUpdateOne) Where(ps ...predicate.LanguageSettings) *LanguageSettingsUpdateOne
Where appends a list predicates to the LanguageSettingsUpdate builder.
type LanguageVisibilities ¶
type LanguageVisibilities []*LanguageVisibility
LanguageVisibilities is a parsable slice of LanguageVisibility.
type LanguageVisibility ¶
type LanguageVisibility struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Kind holds the value of the "kind" field.
Kind string `json:"kind,omitempty"`
// Ref holds the value of the "ref" field.
Ref string `json:"ref,omitempty"`
// Langs holds the value of the "langs" field.
Langs []string `json:"langs,omitempty"`
// contains filtered or unexported fields
}
LanguageVisibility is the model entity for the LanguageVisibility schema.
func (*LanguageVisibility) String ¶
func (_m *LanguageVisibility) String() string
String implements the fmt.Stringer.
func (*LanguageVisibility) Unwrap ¶
func (_m *LanguageVisibility) Unwrap() *LanguageVisibility
Unwrap unwraps the LanguageVisibility 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 (*LanguageVisibility) Update ¶
func (_m *LanguageVisibility) Update() *LanguageVisibilityUpdateOne
Update returns a builder for updating this LanguageVisibility. Note that you need to call LanguageVisibility.Unwrap() before calling this method if this LanguageVisibility was returned from a transaction, and the transaction was committed or rolled back.
type LanguageVisibilityClient ¶
type LanguageVisibilityClient struct {
// contains filtered or unexported fields
}
LanguageVisibilityClient is a client for the LanguageVisibility schema.
func NewLanguageVisibilityClient ¶
func NewLanguageVisibilityClient(c config) *LanguageVisibilityClient
NewLanguageVisibilityClient returns a client for the LanguageVisibility from the given config.
func (*LanguageVisibilityClient) Create ¶
func (c *LanguageVisibilityClient) Create() *LanguageVisibilityCreate
Create returns a builder for creating a LanguageVisibility entity.
func (*LanguageVisibilityClient) CreateBulk ¶
func (c *LanguageVisibilityClient) CreateBulk(builders ...*LanguageVisibilityCreate) *LanguageVisibilityCreateBulk
CreateBulk returns a builder for creating a bulk of LanguageVisibility entities.
func (*LanguageVisibilityClient) Delete ¶
func (c *LanguageVisibilityClient) Delete() *LanguageVisibilityDelete
Delete returns a delete builder for LanguageVisibility.
func (*LanguageVisibilityClient) DeleteOne ¶
func (c *LanguageVisibilityClient) DeleteOne(_m *LanguageVisibility) *LanguageVisibilityDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*LanguageVisibilityClient) DeleteOneID ¶
func (c *LanguageVisibilityClient) DeleteOneID(id int) *LanguageVisibilityDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*LanguageVisibilityClient) Get ¶
func (c *LanguageVisibilityClient) Get(ctx context.Context, id int) (*LanguageVisibility, error)
Get returns a LanguageVisibility entity by its id.
func (*LanguageVisibilityClient) GetX ¶
func (c *LanguageVisibilityClient) GetX(ctx context.Context, id int) *LanguageVisibility
GetX is like Get, but panics if an error occurs.
func (*LanguageVisibilityClient) Hooks ¶
func (c *LanguageVisibilityClient) Hooks() []Hook
Hooks returns the client hooks.
func (*LanguageVisibilityClient) Intercept ¶
func (c *LanguageVisibilityClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `languagevisibility.Intercept(f(g(h())))`.
func (*LanguageVisibilityClient) Interceptors ¶
func (c *LanguageVisibilityClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*LanguageVisibilityClient) MapCreateBulk ¶
func (c *LanguageVisibilityClient) MapCreateBulk(slice any, setFunc func(*LanguageVisibilityCreate, int)) *LanguageVisibilityCreateBulk
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 (*LanguageVisibilityClient) Query ¶
func (c *LanguageVisibilityClient) Query() *LanguageVisibilityQuery
Query returns a query builder for LanguageVisibility.
func (*LanguageVisibilityClient) Update ¶
func (c *LanguageVisibilityClient) Update() *LanguageVisibilityUpdate
Update returns an update builder for LanguageVisibility.
func (*LanguageVisibilityClient) UpdateOne ¶
func (c *LanguageVisibilityClient) UpdateOne(_m *LanguageVisibility) *LanguageVisibilityUpdateOne
UpdateOne returns an update builder for the given entity.
func (*LanguageVisibilityClient) UpdateOneID ¶
func (c *LanguageVisibilityClient) UpdateOneID(id int) *LanguageVisibilityUpdateOne
UpdateOneID returns an update builder for the given id.
func (*LanguageVisibilityClient) Use ¶
func (c *LanguageVisibilityClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `languagevisibility.Hooks(f(g(h())))`.
type LanguageVisibilityCreate ¶
type LanguageVisibilityCreate struct {
// contains filtered or unexported fields
}
LanguageVisibilityCreate is the builder for creating a LanguageVisibility entity.
func (*LanguageVisibilityCreate) Exec ¶
func (_c *LanguageVisibilityCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*LanguageVisibilityCreate) ExecX ¶
func (_c *LanguageVisibilityCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LanguageVisibilityCreate) Mutation ¶
func (_c *LanguageVisibilityCreate) Mutation() *LanguageVisibilityMutation
Mutation returns the LanguageVisibilityMutation object of the builder.
func (*LanguageVisibilityCreate) Save ¶
func (_c *LanguageVisibilityCreate) Save(ctx context.Context) (*LanguageVisibility, error)
Save creates the LanguageVisibility in the database.
func (*LanguageVisibilityCreate) SaveX ¶
func (_c *LanguageVisibilityCreate) SaveX(ctx context.Context) *LanguageVisibility
SaveX calls Save and panics if Save returns an error.
func (*LanguageVisibilityCreate) SetID ¶
func (_c *LanguageVisibilityCreate) SetID(v int) *LanguageVisibilityCreate
SetID sets the "id" field.
func (*LanguageVisibilityCreate) SetKind ¶
func (_c *LanguageVisibilityCreate) SetKind(v string) *LanguageVisibilityCreate
SetKind sets the "kind" field.
func (*LanguageVisibilityCreate) SetLangs ¶
func (_c *LanguageVisibilityCreate) SetLangs(v []string) *LanguageVisibilityCreate
SetLangs sets the "langs" field.
func (*LanguageVisibilityCreate) SetRef ¶
func (_c *LanguageVisibilityCreate) SetRef(v string) *LanguageVisibilityCreate
SetRef sets the "ref" field.
type LanguageVisibilityCreateBulk ¶
type LanguageVisibilityCreateBulk struct {
// contains filtered or unexported fields
}
LanguageVisibilityCreateBulk is the builder for creating many LanguageVisibility entities in bulk.
func (*LanguageVisibilityCreateBulk) Exec ¶
func (_c *LanguageVisibilityCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*LanguageVisibilityCreateBulk) ExecX ¶
func (_c *LanguageVisibilityCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LanguageVisibilityCreateBulk) Save ¶
func (_c *LanguageVisibilityCreateBulk) Save(ctx context.Context) ([]*LanguageVisibility, error)
Save creates the LanguageVisibility entities in the database.
func (*LanguageVisibilityCreateBulk) SaveX ¶
func (_c *LanguageVisibilityCreateBulk) SaveX(ctx context.Context) []*LanguageVisibility
SaveX is like Save, but panics if an error occurs.
type LanguageVisibilityDelete ¶
type LanguageVisibilityDelete struct {
// contains filtered or unexported fields
}
LanguageVisibilityDelete is the builder for deleting a LanguageVisibility entity.
func (*LanguageVisibilityDelete) Exec ¶
func (_d *LanguageVisibilityDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*LanguageVisibilityDelete) ExecX ¶
func (_d *LanguageVisibilityDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*LanguageVisibilityDelete) Where ¶
func (_d *LanguageVisibilityDelete) Where(ps ...predicate.LanguageVisibility) *LanguageVisibilityDelete
Where appends a list predicates to the LanguageVisibilityDelete builder.
type LanguageVisibilityDeleteOne ¶
type LanguageVisibilityDeleteOne struct {
// contains filtered or unexported fields
}
LanguageVisibilityDeleteOne is the builder for deleting a single LanguageVisibility entity.
func (*LanguageVisibilityDeleteOne) Exec ¶
func (_d *LanguageVisibilityDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*LanguageVisibilityDeleteOne) ExecX ¶
func (_d *LanguageVisibilityDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LanguageVisibilityDeleteOne) Where ¶
func (_d *LanguageVisibilityDeleteOne) Where(ps ...predicate.LanguageVisibility) *LanguageVisibilityDeleteOne
Where appends a list predicates to the LanguageVisibilityDelete builder.
type LanguageVisibilityGroupBy ¶
type LanguageVisibilityGroupBy struct {
// contains filtered or unexported fields
}
LanguageVisibilityGroupBy is the group-by builder for LanguageVisibility entities.
func (*LanguageVisibilityGroupBy) Aggregate ¶
func (_g *LanguageVisibilityGroupBy) Aggregate(fns ...AggregateFunc) *LanguageVisibilityGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*LanguageVisibilityGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilityGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilityGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilityGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*LanguageVisibilityGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilityGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*LanguageVisibilityGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilityGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilityGroupBy) Scan ¶
func (_g *LanguageVisibilityGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LanguageVisibilityGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LanguageVisibilityMutation ¶
type LanguageVisibilityMutation struct {
// contains filtered or unexported fields
}
LanguageVisibilityMutation represents an operation that mutates the LanguageVisibility nodes in the graph.
func (*LanguageVisibilityMutation) AddField ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) AddedEdges ¶
func (m *LanguageVisibilityMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*LanguageVisibilityMutation) AddedField ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) AddedFields ¶
func (m *LanguageVisibilityMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*LanguageVisibilityMutation) AddedIDs ¶
func (m *LanguageVisibilityMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*LanguageVisibilityMutation) AppendLangs ¶
func (m *LanguageVisibilityMutation) AppendLangs(s []string)
AppendLangs adds s to the "langs" field.
func (*LanguageVisibilityMutation) AppendedLangs ¶
func (m *LanguageVisibilityMutation) AppendedLangs() ([]string, bool)
AppendedLangs returns the list of values that were appended to the "langs" field in this mutation.
func (*LanguageVisibilityMutation) ClearEdge ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) ClearField ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) ClearedEdges ¶
func (m *LanguageVisibilityMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*LanguageVisibilityMutation) ClearedFields ¶
func (m *LanguageVisibilityMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (LanguageVisibilityMutation) Client ¶
func (m LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) EdgeCleared ¶
func (m *LanguageVisibilityMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*LanguageVisibilityMutation) Field ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) FieldCleared ¶
func (m *LanguageVisibilityMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*LanguageVisibilityMutation) Fields ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) ID ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) IDs ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) Kind ¶
func (m *LanguageVisibilityMutation) Kind() (r string, exists bool)
Kind returns the value of the "kind" field in the mutation.
func (*LanguageVisibilityMutation) Langs ¶
func (m *LanguageVisibilityMutation) Langs() (r []string, exists bool)
Langs returns the value of the "langs" field in the mutation.
func (*LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) OldKind ¶
func (m *LanguageVisibilityMutation) OldKind(ctx context.Context) (v string, err error)
OldKind returns the old "kind" field's value of the LanguageVisibility entity. If the LanguageVisibility 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 (*LanguageVisibilityMutation) OldLangs ¶
func (m *LanguageVisibilityMutation) OldLangs(ctx context.Context) (v []string, err error)
OldLangs returns the old "langs" field's value of the LanguageVisibility entity. If the LanguageVisibility 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 (*LanguageVisibilityMutation) OldRef ¶
func (m *LanguageVisibilityMutation) OldRef(ctx context.Context) (v string, err error)
OldRef returns the old "ref" field's value of the LanguageVisibility entity. If the LanguageVisibility 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 (*LanguageVisibilityMutation) Op ¶
func (m *LanguageVisibilityMutation) Op() Op
Op returns the operation name.
func (*LanguageVisibilityMutation) Ref ¶
func (m *LanguageVisibilityMutation) Ref() (r string, exists bool)
Ref returns the value of the "ref" field in the mutation.
func (*LanguageVisibilityMutation) RemovedEdges ¶
func (m *LanguageVisibilityMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*LanguageVisibilityMutation) RemovedIDs ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) ResetEdge ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) ResetField ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) ResetKind ¶
func (m *LanguageVisibilityMutation) ResetKind()
ResetKind resets all changes to the "kind" field.
func (*LanguageVisibilityMutation) ResetLangs ¶
func (m *LanguageVisibilityMutation) ResetLangs()
ResetLangs resets all changes to the "langs" field.
func (*LanguageVisibilityMutation) ResetRef ¶
func (m *LanguageVisibilityMutation) ResetRef()
ResetRef resets all changes to the "ref" field.
func (*LanguageVisibilityMutation) SetField ¶
func (m *LanguageVisibilityMutation) 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 (*LanguageVisibilityMutation) SetID ¶
func (m *LanguageVisibilityMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of LanguageVisibility entities.
func (*LanguageVisibilityMutation) SetKind ¶
func (m *LanguageVisibilityMutation) SetKind(s string)
SetKind sets the "kind" field.
func (*LanguageVisibilityMutation) SetLangs ¶
func (m *LanguageVisibilityMutation) SetLangs(s []string)
SetLangs sets the "langs" field.
func (*LanguageVisibilityMutation) SetOp ¶
func (m *LanguageVisibilityMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*LanguageVisibilityMutation) SetRef ¶
func (m *LanguageVisibilityMutation) SetRef(s string)
SetRef sets the "ref" field.
func (LanguageVisibilityMutation) Tx ¶
func (m LanguageVisibilityMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*LanguageVisibilityMutation) Type ¶
func (m *LanguageVisibilityMutation) Type() string
Type returns the node type of this mutation (LanguageVisibility).
func (*LanguageVisibilityMutation) Where ¶
func (m *LanguageVisibilityMutation) Where(ps ...predicate.LanguageVisibility)
Where appends a list predicates to the LanguageVisibilityMutation builder.
func (*LanguageVisibilityMutation) WhereP ¶
func (m *LanguageVisibilityMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the LanguageVisibilityMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type LanguageVisibilityQuery ¶
type LanguageVisibilityQuery struct {
// contains filtered or unexported fields
}
LanguageVisibilityQuery is the builder for querying LanguageVisibility entities.
func (*LanguageVisibilityQuery) Aggregate ¶
func (_q *LanguageVisibilityQuery) Aggregate(fns ...AggregateFunc) *LanguageVisibilitySelect
Aggregate returns a LanguageVisibilitySelect configured with the given aggregations.
func (*LanguageVisibilityQuery) All ¶
func (_q *LanguageVisibilityQuery) All(ctx context.Context) ([]*LanguageVisibility, error)
All executes the query and returns a list of LanguageVisibilities.
func (*LanguageVisibilityQuery) AllX ¶
func (_q *LanguageVisibilityQuery) AllX(ctx context.Context) []*LanguageVisibility
AllX is like All, but panics if an error occurs.
func (*LanguageVisibilityQuery) Clone ¶
func (_q *LanguageVisibilityQuery) Clone() *LanguageVisibilityQuery
Clone returns a duplicate of the LanguageVisibilityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*LanguageVisibilityQuery) Count ¶
func (_q *LanguageVisibilityQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*LanguageVisibilityQuery) CountX ¶
func (_q *LanguageVisibilityQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*LanguageVisibilityQuery) Exist ¶
func (_q *LanguageVisibilityQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*LanguageVisibilityQuery) ExistX ¶
func (_q *LanguageVisibilityQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*LanguageVisibilityQuery) First ¶
func (_q *LanguageVisibilityQuery) First(ctx context.Context) (*LanguageVisibility, error)
First returns the first LanguageVisibility entity from the query. Returns a *NotFoundError when no LanguageVisibility was found.
func (*LanguageVisibilityQuery) FirstID ¶
func (_q *LanguageVisibilityQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first LanguageVisibility ID from the query. Returns a *NotFoundError when no LanguageVisibility ID was found.
func (*LanguageVisibilityQuery) FirstIDX ¶
func (_q *LanguageVisibilityQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*LanguageVisibilityQuery) FirstX ¶
func (_q *LanguageVisibilityQuery) FirstX(ctx context.Context) *LanguageVisibility
FirstX is like First, but panics if an error occurs.
func (*LanguageVisibilityQuery) GroupBy ¶
func (_q *LanguageVisibilityQuery) GroupBy(field string, fields ...string) *LanguageVisibilityGroupBy
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 {
Kind string `json:"kind,omitempty"`
Count int `json:"count,omitempty"`
}
client.LanguageVisibility.Query().
GroupBy(languagevisibility.FieldKind).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*LanguageVisibilityQuery) IDs ¶
func (_q *LanguageVisibilityQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of LanguageVisibility IDs.
func (*LanguageVisibilityQuery) IDsX ¶
func (_q *LanguageVisibilityQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*LanguageVisibilityQuery) Limit ¶
func (_q *LanguageVisibilityQuery) Limit(limit int) *LanguageVisibilityQuery
Limit the number of records to be returned by this query.
func (*LanguageVisibilityQuery) Offset ¶
func (_q *LanguageVisibilityQuery) Offset(offset int) *LanguageVisibilityQuery
Offset to start from.
func (*LanguageVisibilityQuery) Only ¶
func (_q *LanguageVisibilityQuery) Only(ctx context.Context) (*LanguageVisibility, error)
Only returns a single LanguageVisibility entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one LanguageVisibility entity is found. Returns a *NotFoundError when no LanguageVisibility entities are found.
func (*LanguageVisibilityQuery) OnlyID ¶
func (_q *LanguageVisibilityQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only LanguageVisibility ID in the query. Returns a *NotSingularError when more than one LanguageVisibility ID is found. Returns a *NotFoundError when no entities are found.
func (*LanguageVisibilityQuery) OnlyIDX ¶
func (_q *LanguageVisibilityQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*LanguageVisibilityQuery) OnlyX ¶
func (_q *LanguageVisibilityQuery) OnlyX(ctx context.Context) *LanguageVisibility
OnlyX is like Only, but panics if an error occurs.
func (*LanguageVisibilityQuery) Order ¶
func (_q *LanguageVisibilityQuery) Order(o ...languagevisibility.OrderOption) *LanguageVisibilityQuery
Order specifies how the records should be ordered.
func (*LanguageVisibilityQuery) Select ¶
func (_q *LanguageVisibilityQuery) Select(fields ...string) *LanguageVisibilitySelect
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 {
Kind string `json:"kind,omitempty"`
}
client.LanguageVisibility.Query().
Select(languagevisibility.FieldKind).
Scan(ctx, &v)
func (*LanguageVisibilityQuery) Unique ¶
func (_q *LanguageVisibilityQuery) Unique(unique bool) *LanguageVisibilityQuery
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 (*LanguageVisibilityQuery) Where ¶
func (_q *LanguageVisibilityQuery) Where(ps ...predicate.LanguageVisibility) *LanguageVisibilityQuery
Where adds a new predicate for the LanguageVisibilityQuery builder.
type LanguageVisibilitySelect ¶
type LanguageVisibilitySelect struct {
*LanguageVisibilityQuery
// contains filtered or unexported fields
}
LanguageVisibilitySelect is the builder for selecting fields of LanguageVisibility entities.
func (*LanguageVisibilitySelect) Aggregate ¶
func (_s *LanguageVisibilitySelect) Aggregate(fns ...AggregateFunc) *LanguageVisibilitySelect
Aggregate adds the given aggregation functions to the selector query.
func (*LanguageVisibilitySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilitySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilitySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilitySelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*LanguageVisibilitySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilitySelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*LanguageVisibilitySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilitySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*LanguageVisibilitySelect) Scan ¶
func (_s *LanguageVisibilitySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*LanguageVisibilitySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type LanguageVisibilityUpdate ¶
type LanguageVisibilityUpdate struct {
// contains filtered or unexported fields
}
LanguageVisibilityUpdate is the builder for updating LanguageVisibility entities.
func (*LanguageVisibilityUpdate) AppendLangs ¶
func (_u *LanguageVisibilityUpdate) AppendLangs(v []string) *LanguageVisibilityUpdate
AppendLangs appends value to the "langs" field.
func (*LanguageVisibilityUpdate) Exec ¶
func (_u *LanguageVisibilityUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*LanguageVisibilityUpdate) ExecX ¶
func (_u *LanguageVisibilityUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LanguageVisibilityUpdate) Mutation ¶
func (_u *LanguageVisibilityUpdate) Mutation() *LanguageVisibilityMutation
Mutation returns the LanguageVisibilityMutation object of the builder.
func (*LanguageVisibilityUpdate) Save ¶
func (_u *LanguageVisibilityUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*LanguageVisibilityUpdate) SaveX ¶
func (_u *LanguageVisibilityUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*LanguageVisibilityUpdate) SetKind ¶
func (_u *LanguageVisibilityUpdate) SetKind(v string) *LanguageVisibilityUpdate
SetKind sets the "kind" field.
func (*LanguageVisibilityUpdate) SetLangs ¶
func (_u *LanguageVisibilityUpdate) SetLangs(v []string) *LanguageVisibilityUpdate
SetLangs sets the "langs" field.
func (*LanguageVisibilityUpdate) SetNillableKind ¶
func (_u *LanguageVisibilityUpdate) SetNillableKind(v *string) *LanguageVisibilityUpdate
SetNillableKind sets the "kind" field if the given value is not nil.
func (*LanguageVisibilityUpdate) SetNillableRef ¶
func (_u *LanguageVisibilityUpdate) SetNillableRef(v *string) *LanguageVisibilityUpdate
SetNillableRef sets the "ref" field if the given value is not nil.
func (*LanguageVisibilityUpdate) SetRef ¶
func (_u *LanguageVisibilityUpdate) SetRef(v string) *LanguageVisibilityUpdate
SetRef sets the "ref" field.
func (*LanguageVisibilityUpdate) Where ¶
func (_u *LanguageVisibilityUpdate) Where(ps ...predicate.LanguageVisibility) *LanguageVisibilityUpdate
Where appends a list predicates to the LanguageVisibilityUpdate builder.
type LanguageVisibilityUpdateOne ¶
type LanguageVisibilityUpdateOne struct {
// contains filtered or unexported fields
}
LanguageVisibilityUpdateOne is the builder for updating a single LanguageVisibility entity.
func (*LanguageVisibilityUpdateOne) AppendLangs ¶
func (_u *LanguageVisibilityUpdateOne) AppendLangs(v []string) *LanguageVisibilityUpdateOne
AppendLangs appends value to the "langs" field.
func (*LanguageVisibilityUpdateOne) Exec ¶
func (_u *LanguageVisibilityUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*LanguageVisibilityUpdateOne) ExecX ¶
func (_u *LanguageVisibilityUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*LanguageVisibilityUpdateOne) Mutation ¶
func (_u *LanguageVisibilityUpdateOne) Mutation() *LanguageVisibilityMutation
Mutation returns the LanguageVisibilityMutation object of the builder.
func (*LanguageVisibilityUpdateOne) Save ¶
func (_u *LanguageVisibilityUpdateOne) Save(ctx context.Context) (*LanguageVisibility, error)
Save executes the query and returns the updated LanguageVisibility entity.
func (*LanguageVisibilityUpdateOne) SaveX ¶
func (_u *LanguageVisibilityUpdateOne) SaveX(ctx context.Context) *LanguageVisibility
SaveX is like Save, but panics if an error occurs.
func (*LanguageVisibilityUpdateOne) Select ¶
func (_u *LanguageVisibilityUpdateOne) Select(field string, fields ...string) *LanguageVisibilityUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*LanguageVisibilityUpdateOne) SetKind ¶
func (_u *LanguageVisibilityUpdateOne) SetKind(v string) *LanguageVisibilityUpdateOne
SetKind sets the "kind" field.
func (*LanguageVisibilityUpdateOne) SetLangs ¶
func (_u *LanguageVisibilityUpdateOne) SetLangs(v []string) *LanguageVisibilityUpdateOne
SetLangs sets the "langs" field.
func (*LanguageVisibilityUpdateOne) SetNillableKind ¶
func (_u *LanguageVisibilityUpdateOne) SetNillableKind(v *string) *LanguageVisibilityUpdateOne
SetNillableKind sets the "kind" field if the given value is not nil.
func (*LanguageVisibilityUpdateOne) SetNillableRef ¶
func (_u *LanguageVisibilityUpdateOne) SetNillableRef(v *string) *LanguageVisibilityUpdateOne
SetNillableRef sets the "ref" field if the given value is not nil.
func (*LanguageVisibilityUpdateOne) SetRef ¶
func (_u *LanguageVisibilityUpdateOne) SetRef(v string) *LanguageVisibilityUpdateOne
SetRef sets the "ref" field.
func (*LanguageVisibilityUpdateOne) Where ¶
func (_u *LanguageVisibilityUpdateOne) Where(ps ...predicate.LanguageVisibility) *LanguageVisibilityUpdateOne
Where appends a list predicates to the LanguageVisibilityUpdate builder.
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 NodeTranslation ¶
type NodeTranslation struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Nid holds the value of the "nid" field.
Nid int `json:"nid,omitempty"`
// Tnid holds the value of the "tnid" field.
Tnid int `json:"tnid,omitempty"`
// Outdated holds the value of the "outdated" field.
Outdated bool `json:"outdated,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the NodeTranslationQuery when eager-loading is set.
Edges NodeTranslationEdges `json:"edges"`
// contains filtered or unexported fields
}
NodeTranslation is the model entity for the NodeTranslation schema.
func (*NodeTranslation) QueryNode ¶
func (_m *NodeTranslation) QueryNode() *NodeQuery
QueryNode queries the "node" edge of the NodeTranslation entity.
func (*NodeTranslation) String ¶
func (_m *NodeTranslation) String() string
String implements the fmt.Stringer.
func (*NodeTranslation) Unwrap ¶
func (_m *NodeTranslation) Unwrap() *NodeTranslation
Unwrap unwraps the NodeTranslation 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 (*NodeTranslation) Update ¶
func (_m *NodeTranslation) Update() *NodeTranslationUpdateOne
Update returns a builder for updating this NodeTranslation. Note that you need to call NodeTranslation.Unwrap() before calling this method if this NodeTranslation was returned from a transaction, and the transaction was committed or rolled back.
type NodeTranslationClient ¶
type NodeTranslationClient struct {
// contains filtered or unexported fields
}
NodeTranslationClient is a client for the NodeTranslation schema.
func NewNodeTranslationClient ¶
func NewNodeTranslationClient(c config) *NodeTranslationClient
NewNodeTranslationClient returns a client for the NodeTranslation from the given config.
func (*NodeTranslationClient) Create ¶
func (c *NodeTranslationClient) Create() *NodeTranslationCreate
Create returns a builder for creating a NodeTranslation entity.
func (*NodeTranslationClient) CreateBulk ¶
func (c *NodeTranslationClient) CreateBulk(builders ...*NodeTranslationCreate) *NodeTranslationCreateBulk
CreateBulk returns a builder for creating a bulk of NodeTranslation entities.
func (*NodeTranslationClient) Delete ¶
func (c *NodeTranslationClient) Delete() *NodeTranslationDelete
Delete returns a delete builder for NodeTranslation.
func (*NodeTranslationClient) DeleteOne ¶
func (c *NodeTranslationClient) DeleteOne(_m *NodeTranslation) *NodeTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NodeTranslationClient) DeleteOneID ¶
func (c *NodeTranslationClient) DeleteOneID(id int) *NodeTranslationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NodeTranslationClient) Get ¶
func (c *NodeTranslationClient) Get(ctx context.Context, id int) (*NodeTranslation, error)
Get returns a NodeTranslation entity by its id.
func (*NodeTranslationClient) GetX ¶
func (c *NodeTranslationClient) GetX(ctx context.Context, id int) *NodeTranslation
GetX is like Get, but panics if an error occurs.
func (*NodeTranslationClient) Hooks ¶
func (c *NodeTranslationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NodeTranslationClient) Intercept ¶
func (c *NodeTranslationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `nodetranslation.Intercept(f(g(h())))`.
func (*NodeTranslationClient) Interceptors ¶
func (c *NodeTranslationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NodeTranslationClient) MapCreateBulk ¶
func (c *NodeTranslationClient) MapCreateBulk(slice any, setFunc func(*NodeTranslationCreate, int)) *NodeTranslationCreateBulk
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 (*NodeTranslationClient) Query ¶
func (c *NodeTranslationClient) Query() *NodeTranslationQuery
Query returns a query builder for NodeTranslation.
func (*NodeTranslationClient) QueryNode ¶
func (c *NodeTranslationClient) QueryNode(_m *NodeTranslation) *NodeQuery
QueryNode queries the node edge of a NodeTranslation.
func (*NodeTranslationClient) Update ¶
func (c *NodeTranslationClient) Update() *NodeTranslationUpdate
Update returns an update builder for NodeTranslation.
func (*NodeTranslationClient) UpdateOne ¶
func (c *NodeTranslationClient) UpdateOne(_m *NodeTranslation) *NodeTranslationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NodeTranslationClient) UpdateOneID ¶
func (c *NodeTranslationClient) UpdateOneID(id int) *NodeTranslationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NodeTranslationClient) Use ¶
func (c *NodeTranslationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `nodetranslation.Hooks(f(g(h())))`.
type NodeTranslationCreate ¶
type NodeTranslationCreate struct {
// contains filtered or unexported fields
}
NodeTranslationCreate is the builder for creating a NodeTranslation entity.
func (*NodeTranslationCreate) Exec ¶
func (_c *NodeTranslationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeTranslationCreate) ExecX ¶
func (_c *NodeTranslationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeTranslationCreate) Mutation ¶
func (_c *NodeTranslationCreate) Mutation() *NodeTranslationMutation
Mutation returns the NodeTranslationMutation object of the builder.
func (*NodeTranslationCreate) Save ¶
func (_c *NodeTranslationCreate) Save(ctx context.Context) (*NodeTranslation, error)
Save creates the NodeTranslation in the database.
func (*NodeTranslationCreate) SaveX ¶
func (_c *NodeTranslationCreate) SaveX(ctx context.Context) *NodeTranslation
SaveX calls Save and panics if Save returns an error.
func (*NodeTranslationCreate) SetID ¶
func (_c *NodeTranslationCreate) SetID(v int) *NodeTranslationCreate
SetID sets the "id" field.
func (*NodeTranslationCreate) SetNid ¶
func (_c *NodeTranslationCreate) SetNid(v int) *NodeTranslationCreate
SetNid sets the "nid" field.
func (*NodeTranslationCreate) SetNillableOutdated ¶
func (_c *NodeTranslationCreate) SetNillableOutdated(v *bool) *NodeTranslationCreate
SetNillableOutdated sets the "outdated" field if the given value is not nil.
func (*NodeTranslationCreate) SetNode ¶
func (_c *NodeTranslationCreate) SetNode(v *Node) *NodeTranslationCreate
SetNode sets the "node" edge to the Node entity.
func (*NodeTranslationCreate) SetNodeID ¶
func (_c *NodeTranslationCreate) SetNodeID(id int) *NodeTranslationCreate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*NodeTranslationCreate) SetOutdated ¶
func (_c *NodeTranslationCreate) SetOutdated(v bool) *NodeTranslationCreate
SetOutdated sets the "outdated" field.
func (*NodeTranslationCreate) SetTnid ¶
func (_c *NodeTranslationCreate) SetTnid(v int) *NodeTranslationCreate
SetTnid sets the "tnid" field.
type NodeTranslationCreateBulk ¶
type NodeTranslationCreateBulk struct {
// contains filtered or unexported fields
}
NodeTranslationCreateBulk is the builder for creating many NodeTranslation entities in bulk.
func (*NodeTranslationCreateBulk) Exec ¶
func (_c *NodeTranslationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeTranslationCreateBulk) ExecX ¶
func (_c *NodeTranslationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeTranslationCreateBulk) Save ¶
func (_c *NodeTranslationCreateBulk) Save(ctx context.Context) ([]*NodeTranslation, error)
Save creates the NodeTranslation entities in the database.
func (*NodeTranslationCreateBulk) SaveX ¶
func (_c *NodeTranslationCreateBulk) SaveX(ctx context.Context) []*NodeTranslation
SaveX is like Save, but panics if an error occurs.
type NodeTranslationDelete ¶
type NodeTranslationDelete struct {
// contains filtered or unexported fields
}
NodeTranslationDelete is the builder for deleting a NodeTranslation entity.
func (*NodeTranslationDelete) Exec ¶
func (_d *NodeTranslationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NodeTranslationDelete) ExecX ¶
func (_d *NodeTranslationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NodeTranslationDelete) Where ¶
func (_d *NodeTranslationDelete) Where(ps ...predicate.NodeTranslation) *NodeTranslationDelete
Where appends a list predicates to the NodeTranslationDelete builder.
type NodeTranslationDeleteOne ¶
type NodeTranslationDeleteOne struct {
// contains filtered or unexported fields
}
NodeTranslationDeleteOne is the builder for deleting a single NodeTranslation entity.
func (*NodeTranslationDeleteOne) Exec ¶
func (_d *NodeTranslationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NodeTranslationDeleteOne) ExecX ¶
func (_d *NodeTranslationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeTranslationDeleteOne) Where ¶
func (_d *NodeTranslationDeleteOne) Where(ps ...predicate.NodeTranslation) *NodeTranslationDeleteOne
Where appends a list predicates to the NodeTranslationDelete builder.
type NodeTranslationEdges ¶
type NodeTranslationEdges struct {
// Node holds the value of the node edge.
Node *Node `json:"node,omitempty"`
// contains filtered or unexported fields
}
NodeTranslationEdges holds the relations/edges for other nodes in the graph.
func (NodeTranslationEdges) NodeOrErr ¶
func (e NodeTranslationEdges) 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 NodeTranslationGroupBy ¶
type NodeTranslationGroupBy struct {
// contains filtered or unexported fields
}
NodeTranslationGroupBy is the group-by builder for NodeTranslation entities.
func (*NodeTranslationGroupBy) Aggregate ¶
func (_g *NodeTranslationGroupBy) Aggregate(fns ...AggregateFunc) *NodeTranslationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NodeTranslationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeTranslationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeTranslationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeTranslationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeTranslationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*NodeTranslationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeTranslationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeTranslationGroupBy) Scan ¶
func (_g *NodeTranslationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeTranslationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeTranslationMutation ¶
type NodeTranslationMutation struct {
// contains filtered or unexported fields
}
NodeTranslationMutation represents an operation that mutates the NodeTranslation nodes in the graph.
func (*NodeTranslationMutation) AddField ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) AddTnid ¶
func (m *NodeTranslationMutation) AddTnid(i int)
AddTnid adds i to the "tnid" field.
func (*NodeTranslationMutation) AddedEdges ¶
func (m *NodeTranslationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NodeTranslationMutation) AddedField ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) AddedFields ¶
func (m *NodeTranslationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NodeTranslationMutation) AddedIDs ¶
func (m *NodeTranslationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NodeTranslationMutation) AddedTnid ¶
func (m *NodeTranslationMutation) AddedTnid() (r int, exists bool)
AddedTnid returns the value that was added to the "tnid" field in this mutation.
func (*NodeTranslationMutation) ClearEdge ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) ClearField ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) ClearNode ¶
func (m *NodeTranslationMutation) ClearNode()
ClearNode clears the "node" edge to the Node entity.
func (*NodeTranslationMutation) ClearedEdges ¶
func (m *NodeTranslationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NodeTranslationMutation) ClearedFields ¶
func (m *NodeTranslationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NodeTranslationMutation) Client ¶
func (m NodeTranslationMutation) 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 (*NodeTranslationMutation) EdgeCleared ¶
func (m *NodeTranslationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NodeTranslationMutation) Field ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) FieldCleared ¶
func (m *NodeTranslationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NodeTranslationMutation) Fields ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) ID ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) IDs ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) Nid ¶
func (m *NodeTranslationMutation) Nid() (r int, exists bool)
Nid returns the value of the "nid" field in the mutation.
func (*NodeTranslationMutation) NodeCleared ¶
func (m *NodeTranslationMutation) NodeCleared() bool
NodeCleared reports if the "node" edge to the Node entity was cleared.
func (*NodeTranslationMutation) NodeID ¶
func (m *NodeTranslationMutation) NodeID() (id int, exists bool)
NodeID returns the "node" edge ID in the mutation.
func (*NodeTranslationMutation) NodeIDs ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) 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 (*NodeTranslationMutation) OldNid ¶
func (m *NodeTranslationMutation) OldNid(ctx context.Context) (v int, err error)
OldNid returns the old "nid" field's value of the NodeTranslation entity. If the NodeTranslation 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 (*NodeTranslationMutation) OldOutdated ¶
func (m *NodeTranslationMutation) OldOutdated(ctx context.Context) (v bool, err error)
OldOutdated returns the old "outdated" field's value of the NodeTranslation entity. If the NodeTranslation 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 (*NodeTranslationMutation) OldTnid ¶
func (m *NodeTranslationMutation) OldTnid(ctx context.Context) (v int, err error)
OldTnid returns the old "tnid" field's value of the NodeTranslation entity. If the NodeTranslation 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 (*NodeTranslationMutation) Op ¶
func (m *NodeTranslationMutation) Op() Op
Op returns the operation name.
func (*NodeTranslationMutation) Outdated ¶
func (m *NodeTranslationMutation) Outdated() (r bool, exists bool)
Outdated returns the value of the "outdated" field in the mutation.
func (*NodeTranslationMutation) RemovedEdges ¶
func (m *NodeTranslationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NodeTranslationMutation) RemovedIDs ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) ResetEdge ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) ResetField ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) ResetNid ¶
func (m *NodeTranslationMutation) ResetNid()
ResetNid resets all changes to the "nid" field.
func (*NodeTranslationMutation) ResetNode ¶
func (m *NodeTranslationMutation) ResetNode()
ResetNode resets all changes to the "node" edge.
func (*NodeTranslationMutation) ResetOutdated ¶
func (m *NodeTranslationMutation) ResetOutdated()
ResetOutdated resets all changes to the "outdated" field.
func (*NodeTranslationMutation) ResetTnid ¶
func (m *NodeTranslationMutation) ResetTnid()
ResetTnid resets all changes to the "tnid" field.
func (*NodeTranslationMutation) SetField ¶
func (m *NodeTranslationMutation) 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 (*NodeTranslationMutation) SetID ¶
func (m *NodeTranslationMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of NodeTranslation entities.
func (*NodeTranslationMutation) SetNid ¶
func (m *NodeTranslationMutation) SetNid(i int)
SetNid sets the "nid" field.
func (*NodeTranslationMutation) SetNodeID ¶
func (m *NodeTranslationMutation) SetNodeID(id int)
SetNodeID sets the "node" edge to the Node entity by id.
func (*NodeTranslationMutation) SetOp ¶
func (m *NodeTranslationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NodeTranslationMutation) SetOutdated ¶
func (m *NodeTranslationMutation) SetOutdated(b bool)
SetOutdated sets the "outdated" field.
func (*NodeTranslationMutation) SetTnid ¶
func (m *NodeTranslationMutation) SetTnid(i int)
SetTnid sets the "tnid" field.
func (*NodeTranslationMutation) Tnid ¶
func (m *NodeTranslationMutation) Tnid() (r int, exists bool)
Tnid returns the value of the "tnid" field in the mutation.
func (NodeTranslationMutation) Tx ¶
func (m NodeTranslationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NodeTranslationMutation) Type ¶
func (m *NodeTranslationMutation) Type() string
Type returns the node type of this mutation (NodeTranslation).
func (*NodeTranslationMutation) Where ¶
func (m *NodeTranslationMutation) Where(ps ...predicate.NodeTranslation)
Where appends a list predicates to the NodeTranslationMutation builder.
func (*NodeTranslationMutation) WhereP ¶
func (m *NodeTranslationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NodeTranslationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NodeTranslationQuery ¶
type NodeTranslationQuery struct {
// contains filtered or unexported fields
}
NodeTranslationQuery is the builder for querying NodeTranslation entities.
func (*NodeTranslationQuery) Aggregate ¶
func (_q *NodeTranslationQuery) Aggregate(fns ...AggregateFunc) *NodeTranslationSelect
Aggregate returns a NodeTranslationSelect configured with the given aggregations.
func (*NodeTranslationQuery) All ¶
func (_q *NodeTranslationQuery) All(ctx context.Context) ([]*NodeTranslation, error)
All executes the query and returns a list of NodeTranslations.
func (*NodeTranslationQuery) AllX ¶
func (_q *NodeTranslationQuery) AllX(ctx context.Context) []*NodeTranslation
AllX is like All, but panics if an error occurs.
func (*NodeTranslationQuery) Clone ¶
func (_q *NodeTranslationQuery) Clone() *NodeTranslationQuery
Clone returns a duplicate of the NodeTranslationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NodeTranslationQuery) Count ¶
func (_q *NodeTranslationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NodeTranslationQuery) CountX ¶
func (_q *NodeTranslationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NodeTranslationQuery) Exist ¶
func (_q *NodeTranslationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NodeTranslationQuery) ExistX ¶
func (_q *NodeTranslationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NodeTranslationQuery) First ¶
func (_q *NodeTranslationQuery) First(ctx context.Context) (*NodeTranslation, error)
First returns the first NodeTranslation entity from the query. Returns a *NotFoundError when no NodeTranslation was found.
func (*NodeTranslationQuery) FirstID ¶
func (_q *NodeTranslationQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NodeTranslation ID from the query. Returns a *NotFoundError when no NodeTranslation ID was found.
func (*NodeTranslationQuery) FirstIDX ¶
func (_q *NodeTranslationQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NodeTranslationQuery) FirstX ¶
func (_q *NodeTranslationQuery) FirstX(ctx context.Context) *NodeTranslation
FirstX is like First, but panics if an error occurs.
func (*NodeTranslationQuery) GroupBy ¶
func (_q *NodeTranslationQuery) GroupBy(field string, fields ...string) *NodeTranslationGroupBy
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.NodeTranslation.Query().
GroupBy(nodetranslation.FieldNid).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*NodeTranslationQuery) IDs ¶
func (_q *NodeTranslationQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of NodeTranslation IDs.
func (*NodeTranslationQuery) IDsX ¶
func (_q *NodeTranslationQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NodeTranslationQuery) Limit ¶
func (_q *NodeTranslationQuery) Limit(limit int) *NodeTranslationQuery
Limit the number of records to be returned by this query.
func (*NodeTranslationQuery) Offset ¶
func (_q *NodeTranslationQuery) Offset(offset int) *NodeTranslationQuery
Offset to start from.
func (*NodeTranslationQuery) Only ¶
func (_q *NodeTranslationQuery) Only(ctx context.Context) (*NodeTranslation, error)
Only returns a single NodeTranslation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NodeTranslation entity is found. Returns a *NotFoundError when no NodeTranslation entities are found.
func (*NodeTranslationQuery) OnlyID ¶
func (_q *NodeTranslationQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NodeTranslation ID in the query. Returns a *NotSingularError when more than one NodeTranslation ID is found. Returns a *NotFoundError when no entities are found.
func (*NodeTranslationQuery) OnlyIDX ¶
func (_q *NodeTranslationQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NodeTranslationQuery) OnlyX ¶
func (_q *NodeTranslationQuery) OnlyX(ctx context.Context) *NodeTranslation
OnlyX is like Only, but panics if an error occurs.
func (*NodeTranslationQuery) Order ¶
func (_q *NodeTranslationQuery) Order(o ...nodetranslation.OrderOption) *NodeTranslationQuery
Order specifies how the records should be ordered.
func (*NodeTranslationQuery) QueryNode ¶
func (_q *NodeTranslationQuery) QueryNode() *NodeQuery
QueryNode chains the current query on the "node" edge.
func (*NodeTranslationQuery) Select ¶
func (_q *NodeTranslationQuery) Select(fields ...string) *NodeTranslationSelect
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.NodeTranslation.Query().
Select(nodetranslation.FieldNid).
Scan(ctx, &v)
func (*NodeTranslationQuery) Unique ¶
func (_q *NodeTranslationQuery) Unique(unique bool) *NodeTranslationQuery
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 (*NodeTranslationQuery) Where ¶
func (_q *NodeTranslationQuery) Where(ps ...predicate.NodeTranslation) *NodeTranslationQuery
Where adds a new predicate for the NodeTranslationQuery builder.
func (*NodeTranslationQuery) WithNode ¶
func (_q *NodeTranslationQuery) WithNode(opts ...func(*NodeQuery)) *NodeTranslationQuery
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 NodeTranslationSelect ¶
type NodeTranslationSelect struct {
*NodeTranslationQuery
// contains filtered or unexported fields
}
NodeTranslationSelect is the builder for selecting fields of NodeTranslation entities.
func (*NodeTranslationSelect) Aggregate ¶
func (_s *NodeTranslationSelect) Aggregate(fns ...AggregateFunc) *NodeTranslationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NodeTranslationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeTranslationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeTranslationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeTranslationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeTranslationSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*NodeTranslationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeTranslationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeTranslationSelect) Scan ¶
func (_s *NodeTranslationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeTranslationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeTranslationUpdate ¶
type NodeTranslationUpdate struct {
// contains filtered or unexported fields
}
NodeTranslationUpdate is the builder for updating NodeTranslation entities.
func (*NodeTranslationUpdate) AddTnid ¶
func (_u *NodeTranslationUpdate) AddTnid(v int) *NodeTranslationUpdate
AddTnid adds value to the "tnid" field.
func (*NodeTranslationUpdate) ClearNode ¶
func (_u *NodeTranslationUpdate) ClearNode() *NodeTranslationUpdate
ClearNode clears the "node" edge to the Node entity.
func (*NodeTranslationUpdate) Exec ¶
func (_u *NodeTranslationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeTranslationUpdate) ExecX ¶
func (_u *NodeTranslationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeTranslationUpdate) Mutation ¶
func (_u *NodeTranslationUpdate) Mutation() *NodeTranslationMutation
Mutation returns the NodeTranslationMutation object of the builder.
func (*NodeTranslationUpdate) Save ¶
func (_u *NodeTranslationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NodeTranslationUpdate) SaveX ¶
func (_u *NodeTranslationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NodeTranslationUpdate) SetNid ¶
func (_u *NodeTranslationUpdate) SetNid(v int) *NodeTranslationUpdate
SetNid sets the "nid" field.
func (*NodeTranslationUpdate) SetNillableNid ¶
func (_u *NodeTranslationUpdate) SetNillableNid(v *int) *NodeTranslationUpdate
SetNillableNid sets the "nid" field if the given value is not nil.
func (*NodeTranslationUpdate) SetNillableOutdated ¶
func (_u *NodeTranslationUpdate) SetNillableOutdated(v *bool) *NodeTranslationUpdate
SetNillableOutdated sets the "outdated" field if the given value is not nil.
func (*NodeTranslationUpdate) SetNillableTnid ¶
func (_u *NodeTranslationUpdate) SetNillableTnid(v *int) *NodeTranslationUpdate
SetNillableTnid sets the "tnid" field if the given value is not nil.
func (*NodeTranslationUpdate) SetNode ¶
func (_u *NodeTranslationUpdate) SetNode(v *Node) *NodeTranslationUpdate
SetNode sets the "node" edge to the Node entity.
func (*NodeTranslationUpdate) SetNodeID ¶
func (_u *NodeTranslationUpdate) SetNodeID(id int) *NodeTranslationUpdate
SetNodeID sets the "node" edge to the Node entity by ID.
func (*NodeTranslationUpdate) SetOutdated ¶
func (_u *NodeTranslationUpdate) SetOutdated(v bool) *NodeTranslationUpdate
SetOutdated sets the "outdated" field.
func (*NodeTranslationUpdate) SetTnid ¶
func (_u *NodeTranslationUpdate) SetTnid(v int) *NodeTranslationUpdate
SetTnid sets the "tnid" field.
func (*NodeTranslationUpdate) Where ¶
func (_u *NodeTranslationUpdate) Where(ps ...predicate.NodeTranslation) *NodeTranslationUpdate
Where appends a list predicates to the NodeTranslationUpdate builder.
type NodeTranslationUpdateOne ¶
type NodeTranslationUpdateOne struct {
// contains filtered or unexported fields
}
NodeTranslationUpdateOne is the builder for updating a single NodeTranslation entity.
func (*NodeTranslationUpdateOne) AddTnid ¶
func (_u *NodeTranslationUpdateOne) AddTnid(v int) *NodeTranslationUpdateOne
AddTnid adds value to the "tnid" field.
func (*NodeTranslationUpdateOne) ClearNode ¶
func (_u *NodeTranslationUpdateOne) ClearNode() *NodeTranslationUpdateOne
ClearNode clears the "node" edge to the Node entity.
func (*NodeTranslationUpdateOne) Exec ¶
func (_u *NodeTranslationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NodeTranslationUpdateOne) ExecX ¶
func (_u *NodeTranslationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeTranslationUpdateOne) Mutation ¶
func (_u *NodeTranslationUpdateOne) Mutation() *NodeTranslationMutation
Mutation returns the NodeTranslationMutation object of the builder.
func (*NodeTranslationUpdateOne) Save ¶
func (_u *NodeTranslationUpdateOne) Save(ctx context.Context) (*NodeTranslation, error)
Save executes the query and returns the updated NodeTranslation entity.
func (*NodeTranslationUpdateOne) SaveX ¶
func (_u *NodeTranslationUpdateOne) SaveX(ctx context.Context) *NodeTranslation
SaveX is like Save, but panics if an error occurs.
func (*NodeTranslationUpdateOne) Select ¶
func (_u *NodeTranslationUpdateOne) Select(field string, fields ...string) *NodeTranslationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NodeTranslationUpdateOne) SetNid ¶
func (_u *NodeTranslationUpdateOne) SetNid(v int) *NodeTranslationUpdateOne
SetNid sets the "nid" field.
func (*NodeTranslationUpdateOne) SetNillableNid ¶
func (_u *NodeTranslationUpdateOne) SetNillableNid(v *int) *NodeTranslationUpdateOne
SetNillableNid sets the "nid" field if the given value is not nil.
func (*NodeTranslationUpdateOne) SetNillableOutdated ¶
func (_u *NodeTranslationUpdateOne) SetNillableOutdated(v *bool) *NodeTranslationUpdateOne
SetNillableOutdated sets the "outdated" field if the given value is not nil.
func (*NodeTranslationUpdateOne) SetNillableTnid ¶
func (_u *NodeTranslationUpdateOne) SetNillableTnid(v *int) *NodeTranslationUpdateOne
SetNillableTnid sets the "tnid" field if the given value is not nil.
func (*NodeTranslationUpdateOne) SetNode ¶
func (_u *NodeTranslationUpdateOne) SetNode(v *Node) *NodeTranslationUpdateOne
SetNode sets the "node" edge to the Node entity.
func (*NodeTranslationUpdateOne) SetNodeID ¶
func (_u *NodeTranslationUpdateOne) SetNodeID(id int) *NodeTranslationUpdateOne
SetNodeID sets the "node" edge to the Node entity by ID.
func (*NodeTranslationUpdateOne) SetOutdated ¶
func (_u *NodeTranslationUpdateOne) SetOutdated(v bool) *NodeTranslationUpdateOne
SetOutdated sets the "outdated" field.
func (*NodeTranslationUpdateOne) SetTnid ¶
func (_u *NodeTranslationUpdateOne) SetTnid(v int) *NodeTranslationUpdateOne
SetTnid sets the "tnid" field.
func (*NodeTranslationUpdateOne) Where ¶
func (_u *NodeTranslationUpdateOne) Where(ps ...predicate.NodeTranslation) *NodeTranslationUpdateOne
Where appends a list predicates to the NodeTranslationUpdate builder.
type NodeTranslations ¶
type NodeTranslations []*NodeTranslation
NodeTranslations is a parsable slice of NodeTranslation.
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.
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 TextTranslation ¶
type TextTranslation struct {
// ID of the ent.
ID int `json:"id,omitempty"`
// Kind holds the value of the "kind" field.
Kind string `json:"kind,omitempty"`
// Ref holds the value of the "ref" field.
Ref string `json:"ref,omitempty"`
// Lang holds the value of the "lang" field.
Lang string `json:"lang,omitempty"`
// Value holds the value of the "value" field.
Value string `json:"value,omitempty"`
// contains filtered or unexported fields
}
TextTranslation is the model entity for the TextTranslation schema.
func (*TextTranslation) GetValue ¶
func (_m *TextTranslation) GetValue(name string) (ent.Value, error)
GetValue returns the ent.Value that was dynamically selected and assigned to the TextTranslation. This includes values selected through modifiers, order, etc.
func (*TextTranslation) String ¶
func (_m *TextTranslation) String() string
String implements the fmt.Stringer.
func (*TextTranslation) Unwrap ¶
func (_m *TextTranslation) Unwrap() *TextTranslation
Unwrap unwraps the TextTranslation 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 (*TextTranslation) Update ¶
func (_m *TextTranslation) Update() *TextTranslationUpdateOne
Update returns a builder for updating this TextTranslation. Note that you need to call TextTranslation.Unwrap() before calling this method if this TextTranslation was returned from a transaction, and the transaction was committed or rolled back.
type TextTranslationClient ¶
type TextTranslationClient struct {
// contains filtered or unexported fields
}
TextTranslationClient is a client for the TextTranslation schema.
func NewTextTranslationClient ¶
func NewTextTranslationClient(c config) *TextTranslationClient
NewTextTranslationClient returns a client for the TextTranslation from the given config.
func (*TextTranslationClient) Create ¶
func (c *TextTranslationClient) Create() *TextTranslationCreate
Create returns a builder for creating a TextTranslation entity.
func (*TextTranslationClient) CreateBulk ¶
func (c *TextTranslationClient) CreateBulk(builders ...*TextTranslationCreate) *TextTranslationCreateBulk
CreateBulk returns a builder for creating a bulk of TextTranslation entities.
func (*TextTranslationClient) Delete ¶
func (c *TextTranslationClient) Delete() *TextTranslationDelete
Delete returns a delete builder for TextTranslation.
func (*TextTranslationClient) DeleteOne ¶
func (c *TextTranslationClient) DeleteOne(_m *TextTranslation) *TextTranslationDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TextTranslationClient) DeleteOneID ¶
func (c *TextTranslationClient) DeleteOneID(id int) *TextTranslationDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TextTranslationClient) Get ¶
func (c *TextTranslationClient) Get(ctx context.Context, id int) (*TextTranslation, error)
Get returns a TextTranslation entity by its id.
func (*TextTranslationClient) GetX ¶
func (c *TextTranslationClient) GetX(ctx context.Context, id int) *TextTranslation
GetX is like Get, but panics if an error occurs.
func (*TextTranslationClient) Hooks ¶
func (c *TextTranslationClient) Hooks() []Hook
Hooks returns the client hooks.
func (*TextTranslationClient) Intercept ¶
func (c *TextTranslationClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `texttranslation.Intercept(f(g(h())))`.
func (*TextTranslationClient) Interceptors ¶
func (c *TextTranslationClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TextTranslationClient) MapCreateBulk ¶
func (c *TextTranslationClient) MapCreateBulk(slice any, setFunc func(*TextTranslationCreate, int)) *TextTranslationCreateBulk
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 (*TextTranslationClient) Query ¶
func (c *TextTranslationClient) Query() *TextTranslationQuery
Query returns a query builder for TextTranslation.
func (*TextTranslationClient) Update ¶
func (c *TextTranslationClient) Update() *TextTranslationUpdate
Update returns an update builder for TextTranslation.
func (*TextTranslationClient) UpdateOne ¶
func (c *TextTranslationClient) UpdateOne(_m *TextTranslation) *TextTranslationUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TextTranslationClient) UpdateOneID ¶
func (c *TextTranslationClient) UpdateOneID(id int) *TextTranslationUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TextTranslationClient) Use ¶
func (c *TextTranslationClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `texttranslation.Hooks(f(g(h())))`.
type TextTranslationCreate ¶
type TextTranslationCreate struct {
// contains filtered or unexported fields
}
TextTranslationCreate is the builder for creating a TextTranslation entity.
func (*TextTranslationCreate) Exec ¶
func (_c *TextTranslationCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TextTranslationCreate) ExecX ¶
func (_c *TextTranslationCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TextTranslationCreate) Mutation ¶
func (_c *TextTranslationCreate) Mutation() *TextTranslationMutation
Mutation returns the TextTranslationMutation object of the builder.
func (*TextTranslationCreate) Save ¶
func (_c *TextTranslationCreate) Save(ctx context.Context) (*TextTranslation, error)
Save creates the TextTranslation in the database.
func (*TextTranslationCreate) SaveX ¶
func (_c *TextTranslationCreate) SaveX(ctx context.Context) *TextTranslation
SaveX calls Save and panics if Save returns an error.
func (*TextTranslationCreate) SetID ¶
func (_c *TextTranslationCreate) SetID(v int) *TextTranslationCreate
SetID sets the "id" field.
func (*TextTranslationCreate) SetKind ¶
func (_c *TextTranslationCreate) SetKind(v string) *TextTranslationCreate
SetKind sets the "kind" field.
func (*TextTranslationCreate) SetLang ¶
func (_c *TextTranslationCreate) SetLang(v string) *TextTranslationCreate
SetLang sets the "lang" field.
func (*TextTranslationCreate) SetRef ¶
func (_c *TextTranslationCreate) SetRef(v string) *TextTranslationCreate
SetRef sets the "ref" field.
func (*TextTranslationCreate) SetValue ¶
func (_c *TextTranslationCreate) SetValue(v string) *TextTranslationCreate
SetValue sets the "value" field.
type TextTranslationCreateBulk ¶
type TextTranslationCreateBulk struct {
// contains filtered or unexported fields
}
TextTranslationCreateBulk is the builder for creating many TextTranslation entities in bulk.
func (*TextTranslationCreateBulk) Exec ¶
func (_c *TextTranslationCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TextTranslationCreateBulk) ExecX ¶
func (_c *TextTranslationCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TextTranslationCreateBulk) Save ¶
func (_c *TextTranslationCreateBulk) Save(ctx context.Context) ([]*TextTranslation, error)
Save creates the TextTranslation entities in the database.
func (*TextTranslationCreateBulk) SaveX ¶
func (_c *TextTranslationCreateBulk) SaveX(ctx context.Context) []*TextTranslation
SaveX is like Save, but panics if an error occurs.
type TextTranslationDelete ¶
type TextTranslationDelete struct {
// contains filtered or unexported fields
}
TextTranslationDelete is the builder for deleting a TextTranslation entity.
func (*TextTranslationDelete) Exec ¶
func (_d *TextTranslationDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TextTranslationDelete) ExecX ¶
func (_d *TextTranslationDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TextTranslationDelete) Where ¶
func (_d *TextTranslationDelete) Where(ps ...predicate.TextTranslation) *TextTranslationDelete
Where appends a list predicates to the TextTranslationDelete builder.
type TextTranslationDeleteOne ¶
type TextTranslationDeleteOne struct {
// contains filtered or unexported fields
}
TextTranslationDeleteOne is the builder for deleting a single TextTranslation entity.
func (*TextTranslationDeleteOne) Exec ¶
func (_d *TextTranslationDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TextTranslationDeleteOne) ExecX ¶
func (_d *TextTranslationDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TextTranslationDeleteOne) Where ¶
func (_d *TextTranslationDeleteOne) Where(ps ...predicate.TextTranslation) *TextTranslationDeleteOne
Where appends a list predicates to the TextTranslationDelete builder.
type TextTranslationGroupBy ¶
type TextTranslationGroupBy struct {
// contains filtered or unexported fields
}
TextTranslationGroupBy is the group-by builder for TextTranslation entities.
func (*TextTranslationGroupBy) Aggregate ¶
func (_g *TextTranslationGroupBy) Aggregate(fns ...AggregateFunc) *TextTranslationGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TextTranslationGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TextTranslationGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TextTranslationGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TextTranslationGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TextTranslationGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TextTranslationGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TextTranslationGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TextTranslationGroupBy) Scan ¶
func (_g *TextTranslationGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TextTranslationGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TextTranslationMutation ¶
type TextTranslationMutation struct {
// contains filtered or unexported fields
}
TextTranslationMutation represents an operation that mutates the TextTranslation nodes in the graph.
func (*TextTranslationMutation) AddField ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) AddedEdges ¶
func (m *TextTranslationMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TextTranslationMutation) AddedField ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) AddedFields ¶
func (m *TextTranslationMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TextTranslationMutation) AddedIDs ¶
func (m *TextTranslationMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TextTranslationMutation) ClearEdge ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) ClearField ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) ClearedEdges ¶
func (m *TextTranslationMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TextTranslationMutation) ClearedFields ¶
func (m *TextTranslationMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TextTranslationMutation) Client ¶
func (m TextTranslationMutation) 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 (*TextTranslationMutation) EdgeCleared ¶
func (m *TextTranslationMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TextTranslationMutation) Field ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) FieldCleared ¶
func (m *TextTranslationMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TextTranslationMutation) Fields ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) ID ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) IDs ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) Kind ¶
func (m *TextTranslationMutation) Kind() (r string, exists bool)
Kind returns the value of the "kind" field in the mutation.
func (*TextTranslationMutation) Lang ¶
func (m *TextTranslationMutation) Lang() (r string, exists bool)
Lang returns the value of the "lang" field in the mutation.
func (*TextTranslationMutation) 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 (*TextTranslationMutation) OldKind ¶
func (m *TextTranslationMutation) OldKind(ctx context.Context) (v string, err error)
OldKind returns the old "kind" field's value of the TextTranslation entity. If the TextTranslation 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 (*TextTranslationMutation) OldLang ¶
func (m *TextTranslationMutation) OldLang(ctx context.Context) (v string, err error)
OldLang returns the old "lang" field's value of the TextTranslation entity. If the TextTranslation 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 (*TextTranslationMutation) OldRef ¶
func (m *TextTranslationMutation) OldRef(ctx context.Context) (v string, err error)
OldRef returns the old "ref" field's value of the TextTranslation entity. If the TextTranslation 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 (*TextTranslationMutation) OldValue ¶
func (m *TextTranslationMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the TextTranslation entity. If the TextTranslation 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 (*TextTranslationMutation) Op ¶
func (m *TextTranslationMutation) Op() Op
Op returns the operation name.
func (*TextTranslationMutation) Ref ¶
func (m *TextTranslationMutation) Ref() (r string, exists bool)
Ref returns the value of the "ref" field in the mutation.
func (*TextTranslationMutation) RemovedEdges ¶
func (m *TextTranslationMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TextTranslationMutation) RemovedIDs ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) ResetEdge ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) ResetField ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) ResetKind ¶
func (m *TextTranslationMutation) ResetKind()
ResetKind resets all changes to the "kind" field.
func (*TextTranslationMutation) ResetLang ¶
func (m *TextTranslationMutation) ResetLang()
ResetLang resets all changes to the "lang" field.
func (*TextTranslationMutation) ResetRef ¶
func (m *TextTranslationMutation) ResetRef()
ResetRef resets all changes to the "ref" field.
func (*TextTranslationMutation) ResetValue ¶
func (m *TextTranslationMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*TextTranslationMutation) SetField ¶
func (m *TextTranslationMutation) 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 (*TextTranslationMutation) SetID ¶
func (m *TextTranslationMutation) SetID(id int)
SetID sets the value of the id field. Note that this operation is only accepted on creation of TextTranslation entities.
func (*TextTranslationMutation) SetKind ¶
func (m *TextTranslationMutation) SetKind(s string)
SetKind sets the "kind" field.
func (*TextTranslationMutation) SetLang ¶
func (m *TextTranslationMutation) SetLang(s string)
SetLang sets the "lang" field.
func (*TextTranslationMutation) SetOp ¶
func (m *TextTranslationMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TextTranslationMutation) SetRef ¶
func (m *TextTranslationMutation) SetRef(s string)
SetRef sets the "ref" field.
func (*TextTranslationMutation) SetValue ¶
func (m *TextTranslationMutation) SetValue(s string)
SetValue sets the "value" field.
func (TextTranslationMutation) Tx ¶
func (m TextTranslationMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TextTranslationMutation) Type ¶
func (m *TextTranslationMutation) Type() string
Type returns the node type of this mutation (TextTranslation).
func (*TextTranslationMutation) Value ¶
func (m *TextTranslationMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*TextTranslationMutation) Where ¶
func (m *TextTranslationMutation) Where(ps ...predicate.TextTranslation)
Where appends a list predicates to the TextTranslationMutation builder.
func (*TextTranslationMutation) WhereP ¶
func (m *TextTranslationMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TextTranslationMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TextTranslationQuery ¶
type TextTranslationQuery struct {
// contains filtered or unexported fields
}
TextTranslationQuery is the builder for querying TextTranslation entities.
func (*TextTranslationQuery) Aggregate ¶
func (_q *TextTranslationQuery) Aggregate(fns ...AggregateFunc) *TextTranslationSelect
Aggregate returns a TextTranslationSelect configured with the given aggregations.
func (*TextTranslationQuery) All ¶
func (_q *TextTranslationQuery) All(ctx context.Context) ([]*TextTranslation, error)
All executes the query and returns a list of TextTranslations.
func (*TextTranslationQuery) AllX ¶
func (_q *TextTranslationQuery) AllX(ctx context.Context) []*TextTranslation
AllX is like All, but panics if an error occurs.
func (*TextTranslationQuery) Clone ¶
func (_q *TextTranslationQuery) Clone() *TextTranslationQuery
Clone returns a duplicate of the TextTranslationQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TextTranslationQuery) Count ¶
func (_q *TextTranslationQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*TextTranslationQuery) CountX ¶
func (_q *TextTranslationQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*TextTranslationQuery) Exist ¶
func (_q *TextTranslationQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*TextTranslationQuery) ExistX ¶
func (_q *TextTranslationQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*TextTranslationQuery) First ¶
func (_q *TextTranslationQuery) First(ctx context.Context) (*TextTranslation, error)
First returns the first TextTranslation entity from the query. Returns a *NotFoundError when no TextTranslation was found.
func (*TextTranslationQuery) FirstID ¶
func (_q *TextTranslationQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first TextTranslation ID from the query. Returns a *NotFoundError when no TextTranslation ID was found.
func (*TextTranslationQuery) FirstIDX ¶
func (_q *TextTranslationQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*TextTranslationQuery) FirstX ¶
func (_q *TextTranslationQuery) FirstX(ctx context.Context) *TextTranslation
FirstX is like First, but panics if an error occurs.
func (*TextTranslationQuery) GroupBy ¶
func (_q *TextTranslationQuery) GroupBy(field string, fields ...string) *TextTranslationGroupBy
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 {
Kind string `json:"kind,omitempty"`
Count int `json:"count,omitempty"`
}
client.TextTranslation.Query().
GroupBy(texttranslation.FieldKind).
Aggregate(generated.Count()).
Scan(ctx, &v)
func (*TextTranslationQuery) IDs ¶
func (_q *TextTranslationQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of TextTranslation IDs.
func (*TextTranslationQuery) IDsX ¶
func (_q *TextTranslationQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*TextTranslationQuery) Limit ¶
func (_q *TextTranslationQuery) Limit(limit int) *TextTranslationQuery
Limit the number of records to be returned by this query.
func (*TextTranslationQuery) Offset ¶
func (_q *TextTranslationQuery) Offset(offset int) *TextTranslationQuery
Offset to start from.
func (*TextTranslationQuery) Only ¶
func (_q *TextTranslationQuery) Only(ctx context.Context) (*TextTranslation, error)
Only returns a single TextTranslation entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one TextTranslation entity is found. Returns a *NotFoundError when no TextTranslation entities are found.
func (*TextTranslationQuery) OnlyID ¶
func (_q *TextTranslationQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only TextTranslation ID in the query. Returns a *NotSingularError when more than one TextTranslation ID is found. Returns a *NotFoundError when no entities are found.
func (*TextTranslationQuery) OnlyIDX ¶
func (_q *TextTranslationQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*TextTranslationQuery) OnlyX ¶
func (_q *TextTranslationQuery) OnlyX(ctx context.Context) *TextTranslation
OnlyX is like Only, but panics if an error occurs.
func (*TextTranslationQuery) Order ¶
func (_q *TextTranslationQuery) Order(o ...texttranslation.OrderOption) *TextTranslationQuery
Order specifies how the records should be ordered.
func (*TextTranslationQuery) Select ¶
func (_q *TextTranslationQuery) Select(fields ...string) *TextTranslationSelect
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 {
Kind string `json:"kind,omitempty"`
}
client.TextTranslation.Query().
Select(texttranslation.FieldKind).
Scan(ctx, &v)
func (*TextTranslationQuery) Unique ¶
func (_q *TextTranslationQuery) Unique(unique bool) *TextTranslationQuery
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 (*TextTranslationQuery) Where ¶
func (_q *TextTranslationQuery) Where(ps ...predicate.TextTranslation) *TextTranslationQuery
Where adds a new predicate for the TextTranslationQuery builder.
type TextTranslationSelect ¶
type TextTranslationSelect struct {
*TextTranslationQuery
// contains filtered or unexported fields
}
TextTranslationSelect is the builder for selecting fields of TextTranslation entities.
func (*TextTranslationSelect) Aggregate ¶
func (_s *TextTranslationSelect) Aggregate(fns ...AggregateFunc) *TextTranslationSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TextTranslationSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TextTranslationSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TextTranslationSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TextTranslationSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TextTranslationSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*TextTranslationSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TextTranslationSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TextTranslationSelect) Scan ¶
func (_s *TextTranslationSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TextTranslationSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TextTranslationUpdate ¶
type TextTranslationUpdate struct {
// contains filtered or unexported fields
}
TextTranslationUpdate is the builder for updating TextTranslation entities.
func (*TextTranslationUpdate) Exec ¶
func (_u *TextTranslationUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TextTranslationUpdate) ExecX ¶
func (_u *TextTranslationUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TextTranslationUpdate) Mutation ¶
func (_u *TextTranslationUpdate) Mutation() *TextTranslationMutation
Mutation returns the TextTranslationMutation object of the builder.
func (*TextTranslationUpdate) Save ¶
func (_u *TextTranslationUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TextTranslationUpdate) SaveX ¶
func (_u *TextTranslationUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TextTranslationUpdate) SetKind ¶
func (_u *TextTranslationUpdate) SetKind(v string) *TextTranslationUpdate
SetKind sets the "kind" field.
func (*TextTranslationUpdate) SetLang ¶
func (_u *TextTranslationUpdate) SetLang(v string) *TextTranslationUpdate
SetLang sets the "lang" field.
func (*TextTranslationUpdate) SetNillableKind ¶
func (_u *TextTranslationUpdate) SetNillableKind(v *string) *TextTranslationUpdate
SetNillableKind sets the "kind" field if the given value is not nil.
func (*TextTranslationUpdate) SetNillableLang ¶
func (_u *TextTranslationUpdate) SetNillableLang(v *string) *TextTranslationUpdate
SetNillableLang sets the "lang" field if the given value is not nil.
func (*TextTranslationUpdate) SetNillableRef ¶
func (_u *TextTranslationUpdate) SetNillableRef(v *string) *TextTranslationUpdate
SetNillableRef sets the "ref" field if the given value is not nil.
func (*TextTranslationUpdate) SetNillableValue ¶
func (_u *TextTranslationUpdate) SetNillableValue(v *string) *TextTranslationUpdate
SetNillableValue sets the "value" field if the given value is not nil.
func (*TextTranslationUpdate) SetRef ¶
func (_u *TextTranslationUpdate) SetRef(v string) *TextTranslationUpdate
SetRef sets the "ref" field.
func (*TextTranslationUpdate) SetValue ¶
func (_u *TextTranslationUpdate) SetValue(v string) *TextTranslationUpdate
SetValue sets the "value" field.
func (*TextTranslationUpdate) Where ¶
func (_u *TextTranslationUpdate) Where(ps ...predicate.TextTranslation) *TextTranslationUpdate
Where appends a list predicates to the TextTranslationUpdate builder.
type TextTranslationUpdateOne ¶
type TextTranslationUpdateOne struct {
// contains filtered or unexported fields
}
TextTranslationUpdateOne is the builder for updating a single TextTranslation entity.
func (*TextTranslationUpdateOne) Exec ¶
func (_u *TextTranslationUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TextTranslationUpdateOne) ExecX ¶
func (_u *TextTranslationUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TextTranslationUpdateOne) Mutation ¶
func (_u *TextTranslationUpdateOne) Mutation() *TextTranslationMutation
Mutation returns the TextTranslationMutation object of the builder.
func (*TextTranslationUpdateOne) Save ¶
func (_u *TextTranslationUpdateOne) Save(ctx context.Context) (*TextTranslation, error)
Save executes the query and returns the updated TextTranslation entity.
func (*TextTranslationUpdateOne) SaveX ¶
func (_u *TextTranslationUpdateOne) SaveX(ctx context.Context) *TextTranslation
SaveX is like Save, but panics if an error occurs.
func (*TextTranslationUpdateOne) Select ¶
func (_u *TextTranslationUpdateOne) Select(field string, fields ...string) *TextTranslationUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TextTranslationUpdateOne) SetKind ¶
func (_u *TextTranslationUpdateOne) SetKind(v string) *TextTranslationUpdateOne
SetKind sets the "kind" field.
func (*TextTranslationUpdateOne) SetLang ¶
func (_u *TextTranslationUpdateOne) SetLang(v string) *TextTranslationUpdateOne
SetLang sets the "lang" field.
func (*TextTranslationUpdateOne) SetNillableKind ¶
func (_u *TextTranslationUpdateOne) SetNillableKind(v *string) *TextTranslationUpdateOne
SetNillableKind sets the "kind" field if the given value is not nil.
func (*TextTranslationUpdateOne) SetNillableLang ¶
func (_u *TextTranslationUpdateOne) SetNillableLang(v *string) *TextTranslationUpdateOne
SetNillableLang sets the "lang" field if the given value is not nil.
func (*TextTranslationUpdateOne) SetNillableRef ¶
func (_u *TextTranslationUpdateOne) SetNillableRef(v *string) *TextTranslationUpdateOne
SetNillableRef sets the "ref" field if the given value is not nil.
func (*TextTranslationUpdateOne) SetNillableValue ¶
func (_u *TextTranslationUpdateOne) SetNillableValue(v *string) *TextTranslationUpdateOne
SetNillableValue sets the "value" field if the given value is not nil.
func (*TextTranslationUpdateOne) SetRef ¶
func (_u *TextTranslationUpdateOne) SetRef(v string) *TextTranslationUpdateOne
SetRef sets the "ref" field.
func (*TextTranslationUpdateOne) SetValue ¶
func (_u *TextTranslationUpdateOne) SetValue(v string) *TextTranslationUpdateOne
SetValue sets the "value" field.
func (*TextTranslationUpdateOne) Where ¶
func (_u *TextTranslationUpdateOne) Where(ps ...predicate.TextTranslation) *TextTranslationUpdateOne
Where appends a list predicates to the TextTranslationUpdate builder.
type TextTranslations ¶
type TextTranslations []*TextTranslation
TextTranslations is a parsable slice of TextTranslation.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct {
// LanguageSettings is the client for interacting with the LanguageSettings builders.
LanguageSettings *LanguageSettingsClient
// LanguageVisibility is the client for interacting with the LanguageVisibility builders.
LanguageVisibility *LanguageVisibilityClient
// Node is the client for interacting with the Node builders.
Node *NodeClient
// NodeTranslation is the client for interacting with the NodeTranslation builders.
NodeTranslation *NodeTranslationClient
// TextTranslation is the client for interacting with the TextTranslation builders.
TextTranslation *TextTranslationClient
// 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
- ent.go
- languagesettings.go
- languagesettings_create.go
- languagesettings_delete.go
- languagesettings_query.go
- languagesettings_update.go
- languagevisibility.go
- languagevisibility_create.go
- languagevisibility_delete.go
- languagevisibility_query.go
- languagevisibility_update.go
- mutation.go
- node.go
- node_create.go
- node_delete.go
- node_query.go
- node_update.go
- nodetranslation.go
- nodetranslation_create.go
- nodetranslation_delete.go
- nodetranslation_query.go
- nodetranslation_update.go
- runtime.go
- texttranslation.go
- texttranslation_create.go
- texttranslation_delete.go
- texttranslation_query.go
- texttranslation_update.go
- tx.go